Page MenuHomeFreeBSD

net/dhcpcd: Use HAS_CONFIGURE over GNU_CONFIGURE
ClosedPublic

Authored by driesm on Nov 9 2021, 3:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 2:03 PM
Unknown Object (File)
Sat, Apr 20, 2:03 PM
Unknown Object (File)
Sat, Apr 20, 2:03 PM
Unknown Object (File)
Sat, Apr 20, 2:03 PM
Unknown Object (File)
Sat, Apr 20, 2:03 PM
Unknown Object (File)
Sat, Apr 20, 2:03 PM
Unknown Object (File)
Fri, Apr 19, 2:13 AM
Unknown Object (File)
Mar 3 2024, 3:58 AM
Subscribers

Details

Summary

Commit message:

net/dhcpcd: Use HAS_CONFIGURE over GNU_CONFIGURE

Historically the port used GNU_CONFIGURE but this is not needed.
Switch to HAS_CONFIGURE and adjust the needed configure args.
While here install the sample config file under etc/.

 Reported by:	diizzy
 Approved by:	tbd (mentor)
 Differential Revision: https://reviews.freebsd.org/D32907
Test Plan

Poudriere testport looks good

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

driesm requested review of this revision.Nov 9 2021, 3:14 PM
driesm added reviewers: diizzy, 0mp, philip.
driesm edited the summary of this revision. (Show Details)
driesm edited the summary of this revision. (Show Details)
0mp requested changes to this revision.Nov 9 2021, 9:23 PM
0mp added inline comments.
net/dhcpcd/Makefile
26

Please use INSTALL_DATA instead of CP.

In general, there should be no need to ever use CP in the install targets.

I think that the reason is with INSTALL_* you control the ownership a bit more tight. Also there are some race conditions with cp but that may be an urban legend.

Also, shouldn't this be dhcpcd.conf.sample?

This revision now requires changes to proceed.Nov 9 2021, 9:23 PM

What @0mp said regarding ${INSTALL_DATA} instead of ${CP}.

Since it's only one configuration file, I would not bother creating an %%EXAMPLESDIR%% for it. It's easier to simply ${INSTALL_DATA} to ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf.sample and mark it as @sample in pkg-plist.

Switch to ${INSTALL_DATA} and install sample config file under etc/

driesm edited the summary of this revision. (Show Details)

Just last minor nit.

Otherwise, it seems like it's ready to go!

net/dhcpcd/pkg-plist
14

I think that if the first argument to @sample ends with ".sample" then there is no need to specify the second argument. ie, @sample etc/dhcpcd.conf.sample should be sufficient.

This revision is now accepted and ready to land.Nov 10 2021, 9:53 AM
net/dhcpcd/pkg-plist
14

Yes, that's correct.

drop second argument of @sample as it is not needed.

This revision now requires review to proceed.Nov 10 2021, 10:35 AM
0mp requested changes to this revision.Nov 10 2021, 11:45 AM
This revision now requires changes to proceed.Nov 10 2021, 11:45 AM
net/dhcpcd/Makefile
26

Sorry, I've not seen this before. I think that we should actually use MV here instead of INSTALL_DATA. The reason is that we don't need ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf in the stage dir anymore. The @sample keyword is going to handle the creation ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf based on the contents of ${STAGEDIR}${PREFIX}/etc/dhcpcd.conf.sample automatically.

use MV over INSTALL_DATA, @sample handles copying the sample.

Assuming that it still builds fine, you have my approval!

This revision is now accepted and ready to land.Nov 10 2021, 12:04 PM