]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - dhcp/dhcp.nm
paxctl: Update to 0.8.
[people/ms/ipfire-3.x.git] / dhcp / dhcp.nm
index f9667b20f9c8460ecdf79ad18519ba341c3d968a..1d15f651f2cdfc2cb590cb2cdd7f816ff24a53de 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = dhcp
-version    = 4.2.2
-release    = 3
+version    = 4.2.5
+release    = 1
 
 groups     = Networking/Daemons
 url        = http://isc.org/products/DHCP/
@@ -20,41 +20,51 @@ description
        easier to administer a large network.
 end
 
-source_dl  = ftp://ftp.isc.org/isc/dhcp/
+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.5-remove-bind.patch \
+       dhcp-4.2.4-P1-remove-dst.patch \
        dhcp-4.2.0-errwarn-message.patch \
-       dhcp-4.2.2-options.patch \
+       dhcp-4.2.4-dhclient-options.patch \
        dhcp-4.2.0-release-by-ifup.patch \
        dhcp-4.2.0-dhclient-decline-backoff.patch \
-       dhcp-4.2.0-unicast-bootp.patch \
-       dhcp-4.2.2-dhclient-usage.patch \
+       dhcp-4.2.4-unicast-bootp.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.0-paths.patch \
+       dhcp-4.2.5-manpages.patch \
+       dhcp-4.2.4-paths.patch \
        dhcp-4.2.2-CLOEXEC.patch \
-       dhcp-4.2.0-inherit-leases.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.1-64_bit_lease_parse.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.0-UseMulticast.patch \
-       dhcp-4.2.1-sendDecline.patch \
+       dhcp-4.2.4-UseMulticast.patch \
+       dhcp-4.2.5-sendDecline.patch \
        dhcp-4.2.1-retransmission.patch \
-       dhcp-4.2.2-rfc3442-classless-static-routes.patch \
+       dhcp-4.2.5-rfc3442-classless-static-routes.patch \
        dhcp-4.2.0-honor-expired.patch \
-       dhcp-4.2.0-noprefixavail.patch \
-       dhcp-4.2.2-sharedlib.patch \
-       dhcp-4.2.0-PPP.patch \
-       dhcp-4.2.2-lpf-ib.patch \
-       dhcp-4.2.2-improved-xid.patch \
+       dhcp-4.2.5-sharedlib.patch \
+       dhcp-4.2.5-PPP.patch \
+       dhcp-4.2.5-paranoia.patch \
+       dhcp-4.2.5-lpf-ib.patch \
+       dhcp-4.2.4-improved-xid.patch \
        dhcp-4.2.2-gpxe-cid.patch \
-       dhcp-4.2.2-systemtap.patch
+       dhcp-4.2.5-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.5-rfc5970-dhcpv6-options-for-network-boot.patch \
+       dhcp-4.2.4-failOverPeer.patch \
+       dhcp-4.2.5b1-atf-pkgconfig.patch \
+       dhcp-4.2.4-P1-interval.patch \
+       dhcp-4.2.4-P2-conflex-do-forward-updates.patch \
+       dhcp-4.2.4-P2-dupl-key.patch \
+       dhcp-4.2.5-range6.patch \
+       dhcp-4.2.5-next-server.patch
 
 build
        requires
@@ -66,17 +76,15 @@ build
                libtool
                openldap-devel
                libcap-ng-devel
+               systemd-units
        end
 
-       CFLAGS += \
-               -fno-strict-aliasing \
-               -D_GNU_SOURCE \
-               -Wl,--as-needed
+       CFLAGS += -fno-strict-aliasing
 
        configure_options += \
-               --sysconfdir=/etc \
+               --sysconfdir=%{sysconfdir}/dhcp \
                --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
-               --with-srv6-lease-file=/var/lib/dhcpd/dhcp6.leases \
+               --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \
                --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
                --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases \
                --with-srv-pid-file=/run/dhcpd.pid \
@@ -96,21 +104,16 @@ build
                # 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
+               #libtoolize --copy --force
                autoreconf --verbose --force --install
        end
 
        install_cmds
-               rm -vf %{BUILDROOT}/etc/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
+               rm -vf %{BUILDROOT}%{sysconfdir}/dhcp/dhclient.conf
 
                # Create runtime folders.
                mkdir -pv %{BUILDROOT}/var/lib/dhclient
@@ -126,19 +129,23 @@ end
 
 packages
        package %{name}
-
                requires
-                       dhcp-common
+                       dhcp-common = %{thisver}
+                       dhcp-libs = %{thisver}
+                       /usr/lib/network/helpers/dhcpd-config-helper
                end
 
                prerequires += shadow-utils
 
+               configfiles
+                       %{sysconfdir}/dhcp
+               end
+
                script prein
                        getent group dhcpd >/dev/null || groupadd -r dhcpd
                        getent passwd dhcpd >/dev/null || \
                                useradd -r -g dhcpd -d /var/lib/dhcpd -s /sbin/nologin \
                                -c "User for the DHCP server" dhcpd
-                       exit  0
                end
 
                # Just search for new unit files that were just installed.
@@ -175,21 +182,41 @@ packages
                description = %{summary}
 
                requires
-                       dhcp-common
+                       dhcp-common = %{thisver}
+                       dhcp-libs = %{thisver}
+                       %{sbindir}/dhclient-script
                end
 
                files
-                       /sbin
+                       %{unitdir}/dhclient*.service
+                       %{sbindir}/dhclient
                        /usr/share/man/man5/dhclient*
                        /usr/share/man/man8/dhclient*
                        /var/lib/dhclient
                end
+
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
        end
 
        package %{name}-common
                summary = Common files used by the dhcp client and server.
                description = %{summary}
 
+               requires
+                       dhcp-libs = %{thisver}
+               end
+
                files
                        /usr/bin/
                        /usr/share/man/man1/omshell.1*