]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - dhcp/dhcp.nm
kernel: Update to 5.1
[ipfire-3.x.git] / dhcp / dhcp.nm
index f97734bf3434438e0539dae5cb8178a3d041d8a3..421c6ca4fa039bd2cc2150f0bd2fb7ad9ac56c28 100644 (file)
@@ -4,7 +4,7 @@
 ###############################################################################
 
 name       = dhcp
-version    = 4.2.4
+version    = 4.4.1
 release    = 1
 
 groups     = Networking/Daemons
@@ -22,63 +22,23 @@ end
 
 source_dl  = ftp://ftp.isc.org/isc/dhcp/%{version}/
 
-# Apply patches in a special order.
-patches = \
-       dhcp-4.2.2-remove-bind.patch \
-       dhcp-4.2.4-P1-remove-dst.patch \
-       dhcp-4.2.0-errwarn-message.patch \
-       dhcp-4.2.4-options.patch \
-       dhcp-4.2.0-release-by-ifup.patch \
-       dhcp-4.2.0-dhclient-decline-backoff.patch \
-       dhcp-4.2.4-unicast-bootp.patch \
-       dhcp-4.2.2-dhclient-usage.patch \
-       dhcp-4.2.0-default-requested-options.patch \
-       dhcp-4.2.2-xen-checksum.patch \
-       dhcp-4.2.1-manpages.patch \
-       dhcp-4.2.4-paths.patch \
-       dhcp-4.2.2-CLOEXEC.patch \
-       dhcp-4.2.0-garbage-chars.patch \
-       dhcp-4.2.0-missing-ipv6-not-fatal.patch \
-       dhcp-4.2.0-add_timeout_when_NULL.patch \
-       dhcp-4.2.4-64_bit_lease_parse.patch \
-       dhcp-4.2.2-capability.patch \
-       dhcp-4.2.0-logpid.patch \
-       dhcp-4.2.4-UseMulticast.patch \
-       dhcp-4.2.1-sendDecline.patch \
-       dhcp-4.2.1-retransmission.patch \
-       dhcp-4.2.4-rfc3442-classless-static-routes.patch \
-       dhcp-4.2.0-honor-expired.patch \
-       dhcp-4.2.2-sharedlib.patch \
-       dhcp-4.2.4-PPP.patch \
-       dhcp-4.2.3-paranoia.patch \
-       dhcp-4.2.4-lpf-ib.patch \
-       dhcp-4.2.4-improved-xid.patch \
-       dhcp-4.2.2-gpxe-cid.patch \
-       dhcp-4.2.4-systemtap.patch \
-       dhcp-4.2.3-dhclient-decline-onetry.patch \
-       dhcp-4.2.3-P2-log_perror.patch \
-       dhcp-4.2.4-getifaddrs.patch \
-       dhcp-4.2.4-send_release.patch \
-       dhcp-4.2.3-P2-rfc5970-dhcpv6-options-for-network-boot.patch \
-       dhcp-4.2.4-failOverPeer.patch  \
-       dhcp-4.2.4-P1-dhclient6-leases_semicolon_expected.patch \
-       dhcp-4.2.4-P1-interval.patch
-
 build
        requires
                autoconf
                automake
-               bind-devel>=9
+               bind-devel>=9.9.9-P6
                bind-devel<10
                groff
                libtool
                openldap-devel
                libcap-ng-devel
-               systemd-units
+               systemd-devel
        end
 
        CFLAGS += -fno-strict-aliasing
 
+       PARALLELISMFLAGS = # No parallel build.
+
        configure_options += \
                --sysconfdir=%{sysconfdir}/dhcp \
                --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
@@ -92,35 +52,41 @@ build
                --with-relay-pid-file=/run/dhcrelay.pid \
                --with-ldap \
                --with-ldapcrypto \
-               --with-libbind=/usr/include/ \
-               --with-libbind-libs=/usr/lib/ \
                --disable-static \
                --enable-paranoia \
-               --enable-early-chroot
+               --enable-early-chroot \
+               --enable-binary-leases \
+               --with-systemd
 
        prepare_cmds
-               # Remove bundled BIND source
-               rm -rvf %{DIR_APP}/bind/bind.tar.gz
-
-               # Remove dst.
-               rm -rvf dst includes/isc-dhcp
-
                # Regenerate build environment
-               #libtoolize --copy --force
                autoreconf --verbose --force --install
+
+               # Change DHCLIENT_DEFAULT_PREFIX_LEN  64 -> 128
+               sed -i -e 's|DHCLIENT_DEFAULT_PREFIX_LEN 64|DHCLIENT_DEFAULT_PREFIX_LEN 128|g' \
+                       includes/site.h
+
+               # Update PATH in all manpages
+               for page in client/dhclient.conf.5 client/dhclient.leases.5 \
+                       client/dhclient-script.8 client/dhclient.8 ; do
+
+                       sed -i -e 's|CLIENTBINDIR|%{sbindir}|g' \
+                               -e 's|RUNDIR|/run|g' \
+                               -e 's|DBDIR|%{localstatedir}/lib/dhclient|g' \
+                               -e 's|ETCDIR|%{dhcpconfdir}|g' $page
+               done
+
+               for page in server/dhcpd.conf.5 server/dhcpd.leases.5 server/dhcpd.8 ; do
+                       sed -i -e 's|CLIENTBINDIR|%{sbindir}|g' \
+                               -e 's|RUNDIR|/run|g' \
+                               -e 's|DBDIR|%{localstatedir}/lib/dhcpd|g' \
+                               -e 's|ETCDIR|%{dhcpconfdir}|g' $page
+               done
        end
 
        install_cmds
                rm -vf %{BUILDROOT}%{sysconfdir}/dhcp/dhclient.conf
 
-               # Move the client to /sbin, create dirs
-               # and remove the default config.
-               mkdir -pv %{BUILDROOT}/sbin
-               mv -v %{BUILDROOT}/usr/sbin/dhclient %{BUILDROOT}/sbin/dhclient
-
-               install -v -m 755 %{DIR_SOURCE}/dhclient-script \
-                       %{BUILDROOT}/sbin/dhclient-script
-
                # Create runtime folders.
                mkdir -pv %{BUILDROOT}/var/lib/dhclient
                mkdir -pv %{BUILDROOT}/var/lib/dhcpd
@@ -190,11 +156,12 @@ packages
                requires
                        dhcp-common = %{thisver}
                        dhcp-libs = %{thisver}
+                       %{sbindir}/dhclient-script
                end
 
                files
                        %{unitdir}/dhclient*.service
-                       /sbin
+                       %{sbindir}/dhclient
                        /usr/share/man/man5/dhclient*
                        /usr/share/man/man8/dhclient*
                        /var/lib/dhclient