Created attachment 211140 [details]
In attachments you can find the complete build log of dhcpcd on my STABLE-12 system. I have set multiple src.conf options such as WITHOUT_NIS= which results in not building and installing those binaries/headers for my base systemt. This results in dhcpcd not detecting the program and thus not installing 50-ypbind while it is statically included in its port. https://github.com/rsmarples/dhcpcd/blob/master/configure (line 1646)
A similar problem will arise when WITHOUT_NTP= is set in src.conf option with the 50-ntp.conf file.
I see two solutions:
1) Install all hooks independent of the base system configuration (eg in post-install copying all scripts manually). Since this does not influence the binary itself but only the hooks, I think this is easiest. Even if NTP or NIS are not present in the base system the installed hooks wont cause any havoc.
2) Be able to give flags from the ports infrastructure to the dhcpcd build to force each of them on or off. Then the port logic can deal with the pkg-plist dynamic nature.
Thoughts? Happy to provide a patch for 1). From a quick scan I don't think 2) Is possible with the current configure of dhcpcd.
I don't think NIS is used much anymore really.
In pkgsrc we just hardcode the ntp.conf hook as it's extremely portable:
Or you could make the hooks optional and set pass an array via --withhooks="hook1 hook2" or one by one --withhook=hook1 --withhook=hook2 and toggle each hook via the ports option menu thingy which I have no idea how to do.
Created attachment 211939 [details]
This forces the install of the ntp hook independent if ntpd is installed or not. Also force ypbind script to not be installed (excluded from pkg-plist). Roy, I could not force ypbind to be installed by using --with-hook=ypbind like I could with --with-hook=ntp, or is the naming incorrectly of my configure args?
Created attachment 215658 [details]
For FreeBSD this is fine as no special vars to create the ypbind hook script are needed.
Sorry this slipped of my radar.
This wil appear quite soon in dhcpcd-9.1.3, so might want to wait until the weekend.
Thanks for picking this up again Roy, what will the change upstream result in here? Will we have to manually enable eghooks like ypbind? Meaning by default it wont install ypbind.conf?
In this case you'll need to manually specify the hook.
ypbind is tailored for each distro during configure presently.
FreeBSD enjoys the luxury of nothing special needed to be set, so just enabling the hook is fine.