dhcp/dhcp-remove-bind.patch

262 lines
10 KiB
Diff
Raw Normal View History

2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -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
2013-12-20 15:13:52 +00:00
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
scripts/netbsd scripts/nextstep scripts/openbsd \
scripts/solaris scripts/openwrt
2016-05-02 13:17:32 +00:00
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
2013-12-20 15:13:52 +00:00
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
EXTRA_DIST = $(man_MANS)
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -1,7 +1,5 @@
SUBDIRS = .
2013-12-20 15:13:52 +00:00
2016-05-02 13:17:32 +00:00
-BINDLIBDIR = @BINDDIR@/lib
-
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
EXTRA_DIST = Atffile
@@ -15,26 +13,26 @@ ATF_TESTS += alloc_unittest dns_unittest
2013-12-20 15:13:52 +00:00
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
alloc_unittest_LDADD = $(ATF_LDFLAGS)
alloc_unittest_LDADD += ../libdhcp.a \
2016-05-02 13:17:32 +00:00
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
2013-12-20 15:13:52 +00:00
+ ../../omapip/libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
dns_unittest_LDADD = $(ATF_LDFLAGS)
dns_unittest_LDADD += ../libdhcp.a \
2016-05-02 13:17:32 +00:00
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
2014-07-10 17:01:31 +00:00
+ ../../omapip/libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2014-07-10 17:01:31 +00:00
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
misc_unittest_LDADD = $(ATF_LDFLAGS)
2016-05-02 13:17:32 +00:00
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
2015-02-08 17:31:39 +00:00
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 \
2016-05-02 13:17:32 +00:00
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
2013-12-20 15:13:52 +00:00
+ ../../omapip/libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
2015-03-05 18:36:52 +00:00
check: $(ATF_TESTS)
2016-09-12 15:24:05 +00:00
@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
2016-05-02 13:17:32 +00:00
@@ -682,20 +682,33 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t
BINDDIR=
BINDSRCDIR=
2013-12-20 15:13:52 +00:00
AC_ARG_WITH(libbind,
2016-05-02 13:17:32 +00:00
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
2013-12-20 15:13:52 +00:00
- (default is ./bind)]),
2016-05-02 13:17:32 +00:00
+ AS_HELP_STRING([--with-libbind=PATH],[bind includes are in PATH
2013-12-20 15:13:52 +00:00
+ (default is ./bind/includes)]),
use_libbind="$withval", use_libbind="no")
2016-05-02 13:17:32 +00:00
case "$use_libbind" in
2013-12-20 15:13:52 +00:00
+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)
2016-05-02 13:17:32 +00:00
- BINDDIR="\${top_srcdir}/bind"
- BINDSRCDIR="\${top_srcdir}/bind"
2013-12-20 15:13:52 +00:00
+ AC_MSG_ERROR([Specify path to bind9 libraries])
;;
no)
2016-05-02 13:17:32 +00:00
- BINDDIR="\${top_srcdir}/bind"
- BINDSRCDIR="\${top_srcdir}/bind"
2013-12-20 15:13:52 +00:00
+ BUNDLED_BIND=yes
;;
*)
2016-05-02 13:17:32 +00:00
- BINDDIR="$use_libbind"
2013-12-20 15:13:52 +00:00
+ BIND9_LIBDIR="-L$libbind_libs"
+ BUNDLED_BIND=no
2016-05-02 13:17:32 +00:00
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
2013-12-20 15:13:52 +00:00
;;
esac
2016-05-02 13:17:32 +00:00
-AC_SUBST(BINDDIR)
-AC_SUBST(BINDSRCDIR)
2013-12-20 15:13:52 +00:00
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
+AC_SUBST([BIND9_LIBDIR])
# OpenLDAP support.
AC_ARG_WITH(ldap,
2016-05-02 13:17:32 +00:00
@@ -788,7 +801,7 @@ fi
2013-12-20 15:13:52 +00:00
CFLAGS="$CFLAGS $STD_CWARNINGS"
2016-05-02 13:17:32 +00:00
# Try to add the bind and dhcp include directories
-CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
2013-12-20 15:13:52 +00:00
+CFLAGS="$CFLAGS -I$libbind"
case "$host" in
*-darwin*)
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -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)
2013-12-20 15:13:52 +00:00
omshell_SOURCES = omshell.c
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
2016-05-02 13:17:32 +00:00
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2016-05-02 13:17:32 +00:00
2013-12-20 15:13:52 +00:00
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
cltest_SOURCES = cltest.c
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
2016-05-02 13:17:32 +00:00
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -26,7 +26,13 @@ EXTRA_DIST = RELNOTES LICENSE \
2015-08-10 10:09:24 +00:00
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
2014-07-10 17:01:31 +00:00
common/tests/Atffile server/tests/Atffile
2016-05-02 13:17:32 +00:00
-SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay server
2014-07-10 17:01:31 +00:00
+if BUNDLED_BIND
+SUBDIRS = bind
+else
+SUBDIRS =
+endif
+
2015-08-10 10:09:24 +00:00
+SUBDIRS += includes tests common omapip client dhcpctl relay server
2014-07-10 17:01:31 +00:00
nobase_include_HEADERS = dhcpctl/dhcpctl.h
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -1,5 +1,3 @@
-BINDLIBDIR = @BINDDIR@/lib
-
lib_LIBRARIES = libomapi.a
noinst_PROGRAMS = svtest
@@ -12,6 +10,6 @@ man_MANS = omapi.3
2013-12-20 15:13:52 +00:00
EXTRA_DIST = $(man_MANS)
svtest_SOURCES = test.c
2016-05-02 13:17:32 +00:00
-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
2013-12-20 15:13:52 +00:00
+svtest_LDADD = libomapi.a \
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2016-05-02 13:17:32 +00:00
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -1,12 +1,9 @@
-BINDLIBDIR = @BINDDIR@/lib
-
AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
2013-12-20 15:13:52 +00:00
sbin_PROGRAMS = dhcrelay
dhcrelay_SOURCES = dhcrelay.c
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
2016-05-02 13:17:32 +00:00
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
2013-12-20 15:13:52 +00:00
man_MANS = dhcrelay.8
EXTRA_DIST = $(man_MANS)
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -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
2015-08-10 10:09:24 +00:00
dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
2013-12-20 15:13:52 +00:00
dhcpd_CFLAGS = $(LDAP_CFLAGS)
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
2016-05-02 13:17:32 +00:00
- ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
- $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
2013-12-20 15:13:52 +00:00
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
2015-08-10 10:09:24 +00:00
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
+ $(LDAP_LIBS)
2013-12-20 15:13:52 +00:00
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
EXTRA_DIST = $(man_MANS)
2016-09-12 15:24:05 +00:00
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
2016-05-02 13:17:32 +00:00
@@ -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
2015-08-10 10:09:24 +00:00
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
2013-12-20 15:13:52 +00:00
2016-05-02 13:17:32 +00:00
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
2013-12-20 15:13:52 +00:00
ATF_TESTS =
2015-03-05 18:36:52 +00:00
if HAVE_ATF