Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysutils/chericat: bump the version #169

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

psjm3
Copy link

@psjm3 psjm3 commented Jul 24, 2024

Update the version to the latest (2024-07-17) commit.

Copy link
Member

@kwitaszczyk kwitaszczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chericat fails to compile with this change:

===>  Patching for chericat-0.0.d20240717
===>  Applying FreeBSD patches for chericat-0.0.d20240717 from /zdata/repos/cheribsd-ports/chericat-update-20240724/sysutils/chericat/files
1 out of 1 hunks failed--saving rejects to Makefile.rej
===>  FAILED Applying FreeBSD patch-Makefile
===> FAILED to apply cleanly FreeBSD patch(es)  patch-Makefile
*** Error code 1

We should remove files/patch-Makefile and apply 9081151 directly in the chericat project.

…e need to generate a new patch. Also ABI check has been renamed to MACHINE_ABI
@psjm3
Copy link
Author

psjm3 commented Oct 31, 2024

The patch is needed because the cheribsd-ports build infrastructure already includes the standard include and lib in CFLAGS and LDFLAGS, but outside of the build framework we do need to explicitly add them in the makefile.

So I have generated a new patch based on the version used here.

@kwitaszczyk
Copy link
Member

kwitaszczyk commented Oct 31, 2024

The patch is needed because the cheribsd-ports build infrastructure already includes the standard include and lib in CFLAGS and LDFLAGS, but outside of the build framework we do need to explicitly add them in the makefile.

So I have generated a new patch based on the version used here.

Yes, we should not get rid of this patch. My suggestion was to keep the change but make it directly in chericat rather than maintain this patch in CheriBSD ports. Can we move it there?

Additionally, with the patch in ports, anytime someone forks your chericat repository on CheriBSD, they would have to apply the patch themselves.

@kwitaszczyk
Copy link
Member

We've had an offline discussion that the chericat repository with the patch wouldn't build. That's because the ports build system automatically adds /usr/local directories whilst the chericat's Makefile must explicitly define them.

I would suggest two things:

  1. Reimplement the Makefile file of chericat to make use of the FreeBSD's build system and include the bsd.prog.mk file. You can find examples of it in the CheriBSD repository (e.g., usr.bin/dc) and bsd.prog.mk's variables are described in share/mk/bsd.README. Note that bsd.prog.mk does not automatically add /usr/local paths to CFLAGS/LDFLAGS. This will greatly simplify your file as you don't have to define targets for each source file.
  2. Extend the Makefile to define the PREFIX make variable that is set to /usr/local by default but can be overwritten by the ports build system. bsnmp-ucd (net-mgmt/bsnmp-ucd in ports) includes an example of that. With the PREFIX variable, you can set LIBDIR to ${PREFIX}/lib and extend CFLAGS as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants