dhcpcd-discuss

Re: `make install` will not overwrite just-created hooks

Roy Marples

Tue Jul 16 07:41:41 2019

On 16/07/2019 00:51, Kristopher John Gamrat wrote:
I'm not messing with any of those variables anywhere in my spec file. I am
specifying the hook scripts through configure (keep in mind, %configure is a
rpmbuild macro that does little more than passing the correct paths
into ./configure , e.g. "--prefix=/usr --sysconfdir=/etc ....."):

%configure \
         --with-hook=test \
         --with-hook=dump \
         --with-hook=wpa_supplicant \
         --with-hook=timezone \
         --with-hook=resolv.conf \
         --with-hook=lookup-hostname \
         --with-hook=hostname \
         --with-hook=dhcpcd-compat \
         --with-hook=ntp.conf \
         --with-hook=yp.conf

I used exactly the same thing without issue to build dhcpcd-7.1.1 (in fact, I
repurposed the same spec file for 7.2.3 -- literally all I changed were to
bump the version number and remove the patches that were needed to build
7.1.1 on old versions of make).


From configure:
--with-hook) HOOKSCRIPTS="$HOOKSCRIPTS${HOOKSCRIPTS:+ }$var";;

So, basically you want this:

%configure \
         --with-hook=wpa_supplicant \
         --with-hook=timezone \
         --with-hook=lookup-hostname \
         --with-hook=dhcpcd-compat \
         --with-hook=ntp.conf \
         --with-hook=yp.conf

Or this

%configure --with-hooks="wpa_supplicant timezone lookup-hostname dhcpcd-compat ntp.conf yp.conf"

The latter won't run any tests to see if it can add ntp.conf or yp.conf automatically whereas the former will. So you *might* need to remove ntp.conf and yp.conf from the former depending on how the rpm is built (ie clean chroot or not).

What is interesting though is that I would expect the same failure with dhcpcd-7.1.1 because the configure script does the same as 7.2.3.

Roy

References:
`make install` will not overwrite just-created hooksKristopher John Gamrat
Re: `make install` will not overwrite just-created hooksRoy Marples
Archive administrator: postmaster@marples.name