From d8feb2d7610f3c014fcef26e72ed6e449cd8d710 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sun, 23 Apr 2017 09:45:41 +0200 Subject: [PATCH] dhcp: Update to 4.3.5b1 This is an update to the latest available version of the isc-dhcp. Also rework the patch handling. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- dhcp/dhcp.nm | 81 +- dhcp/patches/0001-dhcp-remove-bind.patch | 261 ++++++ dhcp/patches/0002-dhcp-sharedlib.patch | 140 +++ dhcp/patches/0003-dhcp-errwarn-message.patch | 64 ++ ...patch => 0004-dhcp-dhclient-options.patch} | 254 +++--- ....patch => 0005-dhcp-release-by-ifup.patch} | 10 +- ... 0006-dhcp-dhclient-decline-backoff.patch} | 38 +- ...tp.patch => 0007-dhcp-unicast-bootp.patch} | 30 +- ...0008-dhcp-default-requested-options.patch} | 14 +- ...anpages.patch => 0009-dhcp-manpages.patch} | 61 +- ....2.4-paths.patch => 0010-dhcp-paths.patch} | 16 +- ...-CLOEXEC.patch => 0011-dhcp-CLOEXEC.patch} | 178 ++-- dhcp/patches/0012-dhcp-garbage-chars.patch | 12 + .../0013-dhcp-add_timeout_when_NULL.patch | 14 + ...tch => 0014-dhcp-64_bit_lease_parse.patch} | 43 +- ...ility.patch => 0015-dhcp-capability.patch} | 100 +-- ...line.patch => 0016-dhcp-sendDecline.patch} | 26 +- ...hcp-rfc3442-classless-static-routes.patch} | 110 +-- ...ed.patch => 0018-dhcp-honor-expired.patch} | 10 +- ...cp-4.2.5-PPP.patch => 0019-dhcp-PPP.patch} | 116 +-- ....5-lpf-ib.patch => 0020-dhcp-lpf-ib.patch} | 247 ++++-- dhcp/patches/0021-dhcp-IPoIB-log-id.patch | 165 ++++ ...xid.patch => 0022-dhcp-improved-xid.patch} | 74 +- dhcp/patches/0023-dhcp-duidv4.patch | 34 + dhcp/patches/0024-dhcp-duid_uuid.patch | 111 +++ ...addrs.patch => 0025-dhcp-getifaddrs.patch} | 50 +- ...cp-client-request-release-bind-iface.patch | 61 ++ ...nterval.patch => 0027-dhcp-interval.patch} | 8 +- .../0028-dhcp-no-subnet-error2info.patch | 48 + dhcp/patches/0029-dhcp-sd_notify.patch | 79 ++ .../0030-dhcp-option97-pxe-client-id.patch | 217 +++++ .../0031-dhcp-stateless-DUID-LLT.patch | 13 + .../0032-dhcp-dhclient-preinit6s.patch | 64 ++ .../dhcp-4.2.0-add_timeout_when_NULL.patch | 14 - dhcp/patches/dhcp-4.2.0-errwarn-message.patch | 30 - dhcp/patches/dhcp-4.2.0-garbage-chars.patch | 12 - dhcp/patches/dhcp-4.2.0-logpid.patch | 12 - dhcp/patches/dhcp-4.2.1-retransmission.patch | 48 - dhcp/patches/dhcp-4.2.2-gpxe-cid.patch | 83 -- dhcp/patches/dhcp-4.2.2-xen-checksum.patch | 249 ------ dhcp/patches/dhcp-4.2.3-P2-log_perror.patch | 11 - .../dhcp-4.2.3-dhclient-decline-onetry.patch | 27 - dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch | 46 - ...-4.2.4-P2-conflex-do-forward-updates.patch | 12 - dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch | 13 - dhcp/patches/dhcp-4.2.4-UseMulticast.patch | 239 ----- dhcp/patches/dhcp-4.2.4-failOverPeer.patch | 12 - dhcp/patches/dhcp-4.2.4-send_release.patch | 23 - dhcp/patches/dhcp-4.2.5-next-server.patch | 72 -- dhcp/patches/dhcp-4.2.5-paranoia.patch | 202 ----- dhcp/patches/dhcp-4.2.5-range6.patch | 42 - dhcp/patches/dhcp-4.2.5-remove-bind.patch | 164 ---- ...5970-dhcpv6-options-for-network-boot.patch | 89 -- dhcp/patches/dhcp-4.2.5-sharedlib.patch | 120 --- dhcp/patches/dhcp-4.2.5-systemtap.patch | 822 ------------------ dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch | 23 - 56 files changed, 2014 insertions(+), 3100 deletions(-) create mode 100644 dhcp/patches/0001-dhcp-remove-bind.patch create mode 100644 dhcp/patches/0002-dhcp-sharedlib.patch create mode 100644 dhcp/patches/0003-dhcp-errwarn-message.patch rename dhcp/patches/{dhcp-4.2.4-dhclient-options.patch => 0004-dhcp-dhclient-options.patch} (72%) rename dhcp/patches/{dhcp-4.2.0-release-by-ifup.patch => 0005-dhcp-release-by-ifup.patch} (88%) rename dhcp/patches/{dhcp-4.2.0-dhclient-decline-backoff.patch => 0006-dhcp-dhclient-decline-backoff.patch} (56%) rename dhcp/patches/{dhcp-4.2.4-unicast-bootp.patch => 0007-dhcp-unicast-bootp.patch} (72%) rename dhcp/patches/{dhcp-4.2.0-default-requested-options.patch => 0008-dhcp-default-requested-options.patch} (76%) rename dhcp/patches/{dhcp-4.2.5-manpages.patch => 0009-dhcp-manpages.patch} (70%) rename dhcp/patches/{dhcp-4.2.4-paths.patch => 0010-dhcp-paths.patch} (57%) rename dhcp/patches/{dhcp-4.2.2-CLOEXEC.patch => 0011-dhcp-CLOEXEC.patch} (63%) create mode 100644 dhcp/patches/0012-dhcp-garbage-chars.patch create mode 100644 dhcp/patches/0013-dhcp-add_timeout_when_NULL.patch rename dhcp/patches/{dhcp-4.2.4-64_bit_lease_parse.patch => 0014-dhcp-64_bit_lease_parse.patch} (51%) rename dhcp/patches/{dhcp-4.2.2-capability.patch => 0015-dhcp-capability.patch} (64%) rename dhcp/patches/{dhcp-4.2.5-sendDecline.patch => 0016-dhcp-sendDecline.patch} (88%) rename dhcp/patches/{dhcp-4.2.5-rfc3442-classless-static-routes.patch => 0017-dhcp-rfc3442-classless-static-routes.patch} (76%) rename dhcp/patches/{dhcp-4.2.0-honor-expired.patch => 0018-dhcp-honor-expired.patch} (77%) rename dhcp/patches/{dhcp-4.2.5-PPP.patch => 0019-dhcp-PPP.patch} (62%) rename dhcp/patches/{dhcp-4.2.5-lpf-ib.patch => 0020-dhcp-lpf-ib.patch} (70%) create mode 100644 dhcp/patches/0021-dhcp-IPoIB-log-id.patch rename dhcp/patches/{dhcp-4.2.4-improved-xid.patch => 0022-dhcp-improved-xid.patch} (71%) create mode 100644 dhcp/patches/0023-dhcp-duidv4.patch create mode 100644 dhcp/patches/0024-dhcp-duid_uuid.patch rename dhcp/patches/{dhcp-4.2.4-getifaddrs.patch => 0025-dhcp-getifaddrs.patch} (89%) create mode 100644 dhcp/patches/0026-dhcp-client-request-release-bind-iface.patch rename dhcp/patches/{dhcp-4.2.4-P1-interval.patch => 0027-dhcp-interval.patch} (72%) create mode 100644 dhcp/patches/0028-dhcp-no-subnet-error2info.patch create mode 100644 dhcp/patches/0029-dhcp-sd_notify.patch create mode 100644 dhcp/patches/0030-dhcp-option97-pxe-client-id.patch create mode 100644 dhcp/patches/0031-dhcp-stateless-DUID-LLT.patch create mode 100644 dhcp/patches/0032-dhcp-dhclient-preinit6s.patch delete mode 100644 dhcp/patches/dhcp-4.2.0-add_timeout_when_NULL.patch delete mode 100644 dhcp/patches/dhcp-4.2.0-errwarn-message.patch delete mode 100644 dhcp/patches/dhcp-4.2.0-garbage-chars.patch delete mode 100644 dhcp/patches/dhcp-4.2.0-logpid.patch delete mode 100644 dhcp/patches/dhcp-4.2.1-retransmission.patch delete mode 100644 dhcp/patches/dhcp-4.2.2-gpxe-cid.patch delete mode 100644 dhcp/patches/dhcp-4.2.2-xen-checksum.patch delete mode 100644 dhcp/patches/dhcp-4.2.3-P2-log_perror.patch delete mode 100644 dhcp/patches/dhcp-4.2.3-dhclient-decline-onetry.patch delete mode 100644 dhcp/patches/dhcp-4.2.4-P1-remove-dst.patch delete mode 100644 dhcp/patches/dhcp-4.2.4-P2-conflex-do-forward-updates.patch delete mode 100644 dhcp/patches/dhcp-4.2.4-P2-dupl-key.patch delete mode 100644 dhcp/patches/dhcp-4.2.4-UseMulticast.patch delete mode 100644 dhcp/patches/dhcp-4.2.4-failOverPeer.patch delete mode 100644 dhcp/patches/dhcp-4.2.4-send_release.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-next-server.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-paranoia.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-range6.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-remove-bind.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-rfc5970-dhcpv6-options-for-network-boot.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-sharedlib.patch delete mode 100644 dhcp/patches/dhcp-4.2.5-systemtap.patch delete mode 100644 dhcp/patches/dhcp-4.2.5b1-atf-pkgconfig.patch diff --git a/dhcp/dhcp.nm b/dhcp/dhcp.nm index 4cee3bdcd..eafb0b0fc 100644 --- a/dhcp/dhcp.nm +++ b/dhcp/dhcp.nm @@ -4,8 +4,8 @@ ############################################################################### name = dhcp -version = 4.2.5 -release = 3 +version = 4.3.5b1 +release = 1 groups = Networking/Daemons url = http://isc.org/products/DHCP/ @@ -22,61 +22,17 @@ end source_dl = ftp://ftp.isc.org/isc/dhcp/%{version}/ -# Apply patches in a special order. -patches = \ - 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.4-dhclient-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.0-default-requested-options.patch \ - dhcp-4.2.2-xen-checksum.patch \ - dhcp-4.2.5-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-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.5-sendDecline.patch \ - dhcp-4.2.1-retransmission.patch \ - dhcp-4.2.5-rfc3442-classless-static-routes.patch \ - dhcp-4.2.0-honor-expired.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.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 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 @@ -98,18 +54,37 @@ build --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 diff --git a/dhcp/patches/0001-dhcp-remove-bind.patch b/dhcp/patches/0001-dhcp-remove-bind.patch new file mode 100644 index 000000000..46bd323d6 --- /dev/null +++ b/dhcp/patches/0001-dhcp-remove-bind.patch @@ -0,0 +1,261 @@ +diff -up dhcp-4.3.5b1/client/Makefile.am.remove-bind dhcp-4.3.5b1/client/Makefile.am +--- dhcp-4.3.5b1/client/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/client/Makefile.am 2016-09-12 17:00:22.797902248 +0200 +@@ -4,8 +4,6 @@ + # production code. Sadly, we are not there yet. + SUBDIRS = . tests + +-BINDLIBDIR = @BINDDIR@/lib +- + AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \ + -DLOCALSTATEDIR='"$(localstatedir)"' + +@@ -15,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c + scripts/bsdos scripts/freebsd scripts/linux scripts/macos \ + scripts/netbsd scripts/nextstep scripts/openbsd \ + scripts/solaris scripts/openwrt +-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5 + EXTRA_DIST = $(man_MANS) +diff -up dhcp-4.3.5b1/common/tests/Makefile.am.remove-bind dhcp-4.3.5b1/common/tests/Makefile.am +--- dhcp-4.3.5b1/common/tests/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/common/tests/Makefile.am 2016-09-12 17:07:42.168232452 +0200 +@@ -1,7 +1,5 @@ + SUBDIRS = . + +-BINDLIBDIR = @BINDDIR@/lib +- + AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes + + EXTRA_DIST = Atffile +@@ -15,26 +13,26 @@ ATF_TESTS += alloc_unittest dns_unittest + alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c + alloc_unittest_LDADD = $(ATF_LDFLAGS) + alloc_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ ../../omapip/libomapi.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c + dns_unittest_LDADD = $(ATF_LDFLAGS) + dns_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ ../../omapip/libomapi.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c + misc_unittest_LDADD = $(ATF_LDFLAGS) + misc_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ ../../omapip/libomapi.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c + ns_name_unittest_LDADD = $(ATF_LDFLAGS) + ns_name_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ ../../omapip/libomapi.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + check: $(ATF_TESTS) + @if test $(top_srcdir) != ${top_builddir}; then \ +diff -up dhcp-4.3.5b1/configure.ac.remove-bind dhcp-4.3.5b1/configure.ac +--- dhcp-4.3.5b1/configure.ac.remove-bind 2016-08-26 20:24:41.000000000 +0200 ++++ dhcp-4.3.5b1/configure.ac 2016-09-12 17:00:22.798902249 +0200 +@@ -682,20 +682,33 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t + BINDDIR= + BINDSRCDIR= + AC_ARG_WITH(libbind, +- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH +- (default is ./bind)]), ++ AS_HELP_STRING([--with-libbind=PATH],[bind includes are in PATH ++ (default is ./bind/includes)]), + use_libbind="$withval", use_libbind="no") + case "$use_libbind" in ++yes|no) ++ libbind="\${top_srcdir}/bind/include" ++ ;; ++*) ++ libbind="$use_libbind" ++ ;; ++esac ++ ++BIND9_LIBDIR='-L$(top_builddir)/bind/lib' ++AC_ARG_WITH(libbind-libs, ++ AC_HELP_STRING([--with-libbind-libs=PATH], ++ [bind9 export libraries are in PATH]), ++ [libbind_libs="$withval"], [libbind_libs='no']) ++case "$libbind_libs" in + yes) +- BINDDIR="\${top_srcdir}/bind" +- BINDSRCDIR="\${top_srcdir}/bind" ++ AC_MSG_ERROR([Specify path to bind9 libraries]) + ;; + no) +- BINDDIR="\${top_srcdir}/bind" +- BINDSRCDIR="\${top_srcdir}/bind" ++ BUNDLED_BIND=yes + ;; + *) +- BINDDIR="$use_libbind" ++ BIND9_LIBDIR="-L$libbind_libs" ++ BUNDLED_BIND=no + if test ! -d "$srcdir/bind"; then + # no bind directory, create it with a fake Makefile.in + # (AC_CONFIG_FILES and top Makefile refer to it so +@@ -709,8 +722,8 @@ EOF + fi + ;; + esac +-AC_SUBST(BINDDIR) +-AC_SUBST(BINDSRCDIR) ++AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes]) ++AC_SUBST([BIND9_LIBDIR]) + + # OpenLDAP support. + AC_ARG_WITH(ldap, +@@ -788,7 +801,7 @@ fi + CFLAGS="$CFLAGS $STD_CWARNINGS" + + # Try to add the bind and dhcp include directories +-CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include" ++CFLAGS="$CFLAGS -I$libbind" + + case "$host" in + *-darwin*) +diff -up dhcp-4.3.5b1/dhcpctl/Makefile.am.remove-bind dhcp-4.3.5b1/dhcpctl/Makefile.am +--- dhcp-4.3.5b1/dhcpctl/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/dhcpctl/Makefile.am 2016-09-12 17:00:22.798902249 +0200 +@@ -1,5 +1,3 @@ +-BINDLIBDIR = @BINDDIR@/lib +- + bin_PROGRAMS = omshell + lib_LIBRARIES = libdhcpctl.a + noinst_PROGRAMS = cltest +@@ -8,12 +6,10 @@ EXTRA_DIST = $(man_MANS) + + omshell_SOURCES = omshell.c + omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \ +- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \ +- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c + + cltest_SOURCES = cltest.c + cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \ +- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \ +- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export +diff -up dhcp-4.3.5b1/Makefile.am.remove-bind dhcp-4.3.5b1/Makefile.am +--- dhcp-4.3.5b1/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/Makefile.am 2016-09-12 17:00:22.798902249 +0200 +@@ -26,7 +26,13 @@ EXTRA_DIST = RELNOTES LICENSE \ + bind/Makefile.in bind/bind.tar.gz bind/version.tmp \ + common/tests/Atffile server/tests/Atffile + +-SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay server ++if BUNDLED_BIND ++SUBDIRS = bind ++else ++SUBDIRS = ++endif ++ ++SUBDIRS += includes tests common omapip client dhcpctl relay server + + nobase_include_HEADERS = dhcpctl/dhcpctl.h + +diff -up dhcp-4.3.5b1/omapip/Makefile.am.remove-bind dhcp-4.3.5b1/omapip/Makefile.am +--- dhcp-4.3.5b1/omapip/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/omapip/Makefile.am 2016-09-12 17:00:22.798902249 +0200 +@@ -1,5 +1,3 @@ +-BINDLIBDIR = @BINDDIR@/lib +- + lib_LIBRARIES = libomapi.a + noinst_PROGRAMS = svtest + +@@ -12,6 +10,6 @@ man_MANS = omapi.3 + EXTRA_DIST = $(man_MANS) + + svtest_SOURCES = test.c +-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \ +- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++svtest_LDADD = libomapi.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + +diff -up dhcp-4.3.5b1/relay/Makefile.am.remove-bind dhcp-4.3.5b1/relay/Makefile.am +--- dhcp-4.3.5b1/relay/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/relay/Makefile.am 2016-09-12 17:00:22.798902249 +0200 +@@ -1,12 +1,9 @@ +-BINDLIBDIR = @BINDDIR@/lib +- + AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' + + sbin_PROGRAMS = dhcrelay + dhcrelay_SOURCES = dhcrelay.c + dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \ +- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \ +- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + man_MANS = dhcrelay.8 + EXTRA_DIST = $(man_MANS) + +diff -up dhcp-4.3.5b1/server/Makefile.am.remove-bind dhcp-4.3.5b1/server/Makefile.am +--- dhcp-4.3.5b1/server/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/server/Makefile.am 2016-09-12 17:00:22.798902249 +0200 +@@ -4,8 +4,6 @@ + # production code. Sadly, we are not there yet. + SUBDIRS = . tests + +-BINDLIBDIR = @BINDDIR@/lib +- + AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"' + + dist_sysconf_DATA = dhcpd.conf.example +@@ -15,10 +13,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c + dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c + + dhcpd_CFLAGS = $(LDAP_CFLAGS) +-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \ +- ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \ +- $(BINDLIBDIR)/libisc.a $(LDAP_LIBS) ++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \ ++ $(LDAP_LIBS) + + man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5 + EXTRA_DIST = $(man_MANS) +diff -up dhcp-4.3.5b1/server/tests/Makefile.am.remove-bind dhcp-4.3.5b1/server/tests/Makefile.am +--- dhcp-4.3.5b1/server/tests/Makefile.am.remove-bind 2016-08-26 20:19:53.000000000 +0200 ++++ dhcp-4.3.5b1/server/tests/Makefile.am 2016-09-12 17:00:22.799902249 +0200 +@@ -1,9 +1,7 @@ + SUBDIRS = . + +-BINDLIBDIR = @BINDDIR@/lib +- + AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes +-AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir) ++AM_CPPFLAGS += -I$(top_srcdir) + AM_CPPFLAGS += -DLOCALSTATEDIR='"."' + + EXTRA_DIST = Atffile +@@ -20,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa + ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c + + DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \ +- $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \ +- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \ +- $(BINDLIBDIR)/libisc.a ++ $(top_builddir)/dhcpctl/libdhcpctl.a \ ++ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + ATF_TESTS = + if HAVE_ATF diff --git a/dhcp/patches/0002-dhcp-sharedlib.patch b/dhcp/patches/0002-dhcp-sharedlib.patch new file mode 100644 index 000000000..3427f78f7 --- /dev/null +++ b/dhcp/patches/0002-dhcp-sharedlib.patch @@ -0,0 +1,140 @@ +diff -up dhcp-4.3.4/client/Makefile.am.sharedlib dhcp-4.3.4/client/Makefile.am +--- dhcp-4.3.4/client/Makefile.am.sharedlib 2016-04-29 11:48:30.389923087 +0200 ++++ dhcp-4.3.4/client/Makefile.am 2016-04-29 11:48:30.393923084 +0200 +@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c + scripts/bsdos scripts/freebsd scripts/linux scripts/macos \ + scripts/netbsd scripts/nextstep scripts/openbsd \ + scripts/solaris scripts/openwrt +-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \ ++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5 + EXTRA_DIST = $(man_MANS) +diff -up dhcp-4.3.4/common/tests/Makefile.am.sharedlib dhcp-4.3.4/common/tests/Makefile.am +--- dhcp-4.3.4/common/tests/Makefile.am.sharedlib 2016-04-29 11:48:30.394923084 +0200 ++++ dhcp-4.3.4/common/tests/Makefile.am 2016-04-29 11:54:16.890716651 +0200 +@@ -13,25 +13,25 @@ ATF_TESTS += alloc_unittest dns_unittest + alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c + alloc_unittest_LDADD = $(ATF_LDFLAGS) + alloc_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a \ ++ ../../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c + dns_unittest_LDADD = $(ATF_LDFLAGS) + dns_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a \ ++ ../../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c + misc_unittest_LDADD = $(ATF_LDFLAGS) + misc_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a \ ++ ../../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c + ns_name_unittest_LDADD = $(ATF_LDFLAGS) + ns_name_unittest_LDADD += ../libdhcp.a \ +- ../../omapip/libomapi.a \ ++ ../../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + check: $(ATF_TESTS) +diff -up dhcp-4.3.4/configure.ac.sharedlib dhcp-4.3.4/configure.ac +--- dhcp-4.3.4/configure.ac.sharedlib 2016-04-29 11:48:30.394923084 +0200 ++++ dhcp-4.3.4/configure.ac 2016-04-29 11:55:22.729691668 +0200 +@@ -47,7 +47,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test "$c + # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API. + AC_USE_SYSTEM_EXTENSIONS + +-AC_PROG_RANLIB ++# Use libtool to simplify building of shared libraries ++AC_PROG_LIBTOOL + + AC_PATH_PROG(AR, ar) + AC_SUBST(AR) +diff -up dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib dhcp-4.3.4/dhcpctl/Makefile.am +--- dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib 2016-04-29 11:48:30.394923084 +0200 ++++ dhcp-4.3.4/dhcpctl/Makefile.am 2016-04-29 11:56:18.390670546 +0200 +@@ -1,15 +1,15 @@ + bin_PROGRAMS = omshell +-lib_LIBRARIES = libdhcpctl.a ++lib_LTLIBRARIES = libdhcpctl.la + noinst_PROGRAMS = cltest + man_MANS = omshell.1 dhcpctl.3 + EXTRA_DIST = $(man_MANS) + + omshell_SOURCES = omshell.c +-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \ ++omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + +-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c ++libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c + + cltest_SOURCES = cltest.c +-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \ ++cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export +diff -up dhcp-4.3.4/omapip/Makefile.am.sharedlib dhcp-4.3.4/omapip/Makefile.am +--- dhcp-4.3.4/omapip/Makefile.am.sharedlib 2016-04-29 11:48:30.392923085 +0200 ++++ dhcp-4.3.4/omapip/Makefile.am 2016-04-29 11:57:33.709641969 +0200 +@@ -1,7 +1,7 @@ +-lib_LIBRARIES = libomapi.a ++lib_LTLIBRARIES = libomapi.la + noinst_PROGRAMS = svtest + +-libomapi_a_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \ ++libomapi_la_SOURCES = protocol.c buffer.c alloc.c result.c connection.c \ + errwarn.c listener.c dispatch.c generic.c support.c \ + handle.c message.c convert.c hash.c auth.c inet_addr.c \ + array.c trace.c toisc.c iscprint.c isclib.c +@@ -10,6 +10,6 @@ man_MANS = omapi.3 + EXTRA_DIST = $(man_MANS) + + svtest_SOURCES = test.c +-svtest_LDADD = libomapi.a \ ++svtest_LDADD = libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + +diff -up dhcp-4.3.4/relay/Makefile.am.sharedlib dhcp-4.3.4/relay/Makefile.am +--- dhcp-4.3.4/relay/Makefile.am.sharedlib 2016-04-29 11:48:30.392923085 +0200 ++++ dhcp-4.3.4/relay/Makefile.am 2016-04-29 11:48:30.395923083 +0200 +@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst + + sbin_PROGRAMS = dhcrelay + dhcrelay_SOURCES = dhcrelay.c +-dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \ ++dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + man_MANS = dhcrelay.8 + EXTRA_DIST = $(man_MANS) +diff -up dhcp-4.3.4/server/Makefile.am.sharedlib dhcp-4.3.4/server/Makefile.am +--- dhcp-4.3.4/server/Makefile.am.sharedlib 2016-04-29 11:48:30.392923085 +0200 ++++ dhcp-4.3.4/server/Makefile.am 2016-04-29 11:48:30.395923083 +0200 +@@ -13,7 +13,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c + dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c + + dhcpd_CFLAGS = $(LDAP_CFLAGS) +-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \ ++dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.la ../dhcpctl/libdhcpctl.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \ + $(LDAP_LIBS) + +diff -up dhcp-4.3.4/server/tests/Makefile.am.sharedlib dhcp-4.3.4/server/tests/Makefile.am +--- dhcp-4.3.4/server/tests/Makefile.am.sharedlib 2016-04-29 11:48:30.395923083 +0200 ++++ dhcp-4.3.4/server/tests/Makefile.am 2016-04-29 11:59:13.414604130 +0200 +@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa + ../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \ + ../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c + +-DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \ +- $(top_builddir)/dhcpctl/libdhcpctl.a \ ++DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.la \ ++ $(top_builddir)/dhcpctl/libdhcpctl.la \ + $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export + + ATF_TESTS = diff --git a/dhcp/patches/0003-dhcp-errwarn-message.patch b/dhcp/patches/0003-dhcp-errwarn-message.patch new file mode 100644 index 000000000..f42d1e980 --- /dev/null +++ b/dhcp/patches/0003-dhcp-errwarn-message.patch @@ -0,0 +1,64 @@ +diff -up dhcp-4.3.5/omapip/errwarn.c.errwarn dhcp-4.3.5/omapip/errwarn.c +--- dhcp-4.3.5/omapip/errwarn.c.errwarn 2016-09-27 21:16:50.000000000 +0200 ++++ dhcp-4.3.5/omapip/errwarn.c 2016-11-29 19:44:03.515031147 +0100 +@@ -49,6 +49,41 @@ void (*log_cleanup) (void); + static char mbuf [CVT_BUF_MAX + 1]; + static char fbuf [CVT_BUF_MAX + 1]; + ++// get BUG_REPORT_URL from /etc/os-release ++char * bug_report_url(void) { ++ FILE * file = fopen("/etc/os-release", "r"); ++ size_t len; ++ char * line = NULL; ++ char * url = NULL; ++ size_t url_len = 256; ++ ++ url = (char *) malloc(url_len * sizeof(char)); ++ strcpy(url, "https://bugzilla.redhat.com/"); ++ ++ if (!file) ++ return url; ++ ++ while ((getline(&line, &len, file)) != -1) { ++ if (strstr(line, "BUG_REPORT_URL") != NULL) { ++ char * start = strchr(line, '='); ++ char * rquotes = strrchr(line, '"'); ++ ++ if (rquotes != NULL) { ++ *rquotes = '\0'; ++ strncpy(url, start+2, url_len); ++ } else { ++ strncpy(url, start+1, url_len); ++ } ++ url[url_len-1] = '\0'; ++ fclose(file); ++ return url; ++ } ++ } ++ fclose(file); ++ return url; ++} ++ ++ + /* Log an error message, then exit... */ + + void log_fatal (const char * fmt, ... ) +@@ -75,11 +110,13 @@ void log_fatal (const char * fmt, ... ) + } + + log_error ("%s", ""); +- log_error ("If you think you have received this message due to a bug rather"); +- log_error ("than a configuration issue please read the section on submitting"); +- log_error ("bugs on either our web page at www.isc.org or in the README file"); +- log_error ("before submitting a bug. These pages explain the proper"); +- log_error ("process and the information we find helpful for debugging.."); ++ log_error ("This version of ISC DHCP is based on the release available"); ++ log_error ("on ftp.isc.org. Features have been added and other changes"); ++ log_error ("have been made to the base software release in order to make"); ++ log_error ("it work better with this distribution."); ++ log_error ("%s", ""); ++ log_error ("Please report issues with this software via: "); ++ log_error ("%s", bug_report_url()); + log_error ("%s", ""); + log_error ("exiting."); + diff --git a/dhcp/patches/dhcp-4.2.4-dhclient-options.patch b/dhcp/patches/0004-dhcp-dhclient-options.patch similarity index 72% rename from dhcp/patches/dhcp-4.2.4-dhclient-options.patch rename to dhcp/patches/0004-dhcp-dhclient-options.patch index 40c327162..8f0dfe98b 100644 --- a/dhcp/patches/dhcp-4.2.4-dhclient-options.patch +++ b/dhcp/patches/0004-dhcp-dhclient-options.patch @@ -1,14 +1,48 @@ -diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8 ---- dhcp-4.2.1b1/client/dhclient.8.man 2010-07-14 22:09:34.000000000 +0200 -+++ dhcp-4.2.1b1/client/dhclient.8 2011-01-27 18:19:07.000000000 +0100 -@@ -115,6 +115,33 @@ dhclient - Dynamic Host Configuration Pr +diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c +--- dhcp-4.3.4/client/clparse.c.options 2016-03-22 14:16:51.000000000 +0100 ++++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:06:13.485470579 +0200 +@@ -189,6 +189,7 @@ isc_result_t read_client_conf () + /* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache) + */ + top_level_config.requested_lease = 7200; ++ top_level_config.bootp_broadcast_always = 0; + + group_allocate (&top_level_config.on_receipt, MDL); + if (!top_level_config.on_receipt) +@@ -394,7 +395,8 @@ void read_client_leases () + interface-declaration | + LEASE client-lease-statement | + ALIAS client-lease-statement | +- KEY key-definition */ ++ KEY key-definition | ++ BOOTP_BROADCAST_ALWAYS */ + + void parse_client_statement (cfile, ip, config) + struct parse *cfile; +@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip, + parse_lease_id_format(cfile); + break; + ++ case BOOTP_BROADCAST_ALWAYS: ++ token = next_token(&val, (unsigned*)0, cfile); ++ config -> bootp_broadcast_always = 1; ++ parse_semi (cfile); ++ return; ++ + + default: + lose = 0; +diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8 +--- dhcp-4.3.4/client/dhclient.8.options 2016-03-22 14:16:51.000000000 +0100 ++++ dhcp-4.3.4/client/dhclient.8 2016-04-29 11:59:50.446590077 +0200 +@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Pr .B -w ] [ +.B -B +] +[ -+.B -I ++.B -C +.I dhcp-client-identifier +] +[ @@ -24,18 +58,18 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8 +.I vendor-class-identifier +] +[ -+.B -R ++.B --request-options +.I request-option-list +] +[ -+.B -timeout ++.B --timeout +.I timeout +] +[ .B -v ] [ -@@ -264,6 +291,69 @@ not to exit when it doesn't find any suc +@@ -289,6 +316,69 @@ not to exit when it doesn't find any suc program can then be used to notify the client when a network interface has been added or removed, so that the client can attempt to configure an IP address on that interface. @@ -46,7 +80,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8 +broadcast replies. + +.TP -+.BI \-I\ ++.BI \-C\ +Specify the dhcp-client-identifier option to send to the DHCP server. + +.TP @@ -73,7 +107,7 @@ diff -up dhcp-4.2.1b1/client/dhclient.8.man dhcp-4.2.1b1/client/dhclient.8 +Specify the vendor-class-identifier option to send to the DHCP server. + +.TP -+.BI \-R\