make it possible to build dhcp without downstream patches
This commit is contained in:
parent
94d8c6567b
commit
43a67dc92b
@ -20,7 +20,7 @@ diff -up dhcp-4.2.1rc1/client/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/client/Makefil
|
||||
+dhclient_CPPFLAGS = -DCLIENT_PATH='"$(sbindir)"' -DLOCALSTATEDIR='"$(localstatedir)"'
|
||||
+dhclient_CFLAGS = -fpie
|
||||
dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
../bind/lib/libdns.a ../bind/lib/libisc.a $(CAPNG_LDADD)
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
+dhclient_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
||||
+
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
@ -57,7 +57,7 @@ diff -up dhcp-4.2.1rc1/omapip/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/omapip/Makefil
|
||||
|
||||
svtest_SOURCES = test.c
|
||||
+svtest_CFLAGS = -fpie
|
||||
svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
diff -up dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/relay/Makefile.am
|
||||
--- dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO 2009-10-28 05:12:30.000000000 +0100
|
||||
@ -68,7 +68,7 @@ diff -up dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/relay/Makefile.
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
+dhcrelay_CFLAGS = -fpie
|
||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
$(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+dhcrelay_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
||||
+
|
||||
man_MANS = dhcrelay.8
|
||||
@ -77,15 +77,14 @@ diff -up dhcp-4.2.1rc1/relay/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/relay/Makefile.
|
||||
diff -up dhcp-4.2.1rc1/server/Makefile.am.PIE-RELRO dhcp-4.2.1rc1/server/Makefile.am
|
||||
--- dhcp-4.2.1rc1/server/Makefile.am.PIE-RELRO 2010-03-24 22:49:47.000000000 +0100
|
||||
+++ dhcp-4.2.1rc1/server/Makefile.am 2011-02-23 10:56:35.000000000 +0100
|
||||
@@ -6,10 +6,11 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||
@@ -6,9 +6,10 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
|
||||
omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c \
|
||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c
|
||||
|
||||
-dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
+dhcpd_CFLAGS = $(LDAP_CFLAGS) -fpie
|
||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
|
||||
../bind/lib/libisc.a
|
||||
../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+dhcpd_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
|
@ -126,8 +126,8 @@ diff -up dhcp-4.2.1b1/client/Makefile.am.capability dhcp-4.2.1b1/client/Makefile
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+ ../bind/lib/libdns.a ../bind/lib/libisc.a $(CAPNG_LDADD)
|
||||
- $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
|
@ -189,6 +189,9 @@ which do not support the systemd unit file format.
|
||||
# Remove bundled BIND source
|
||||
rm bind/bind.tar.gz
|
||||
|
||||
# Fire away bundled BIND source.
|
||||
%patch29 -p1 -b .rh637017 %{?_rawbuild}
|
||||
|
||||
# Replace the standard ISC warning message about requesting help with an
|
||||
# explanation that this is a patched build of ISC DHCP and bugs should be
|
||||
# reported through bugzilla.redhat.com
|
||||
@ -303,8 +306,6 @@ rm bind/bind.tar.gz
|
||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #22676])
|
||||
%patch28 -p1 -b .noprefixavail
|
||||
|
||||
# Fire away bundled BIND source.
|
||||
%patch29 -p1 -b .rh637017
|
||||
#Build dhcp's libraries as shared libs instead of static libs.
|
||||
%patch30 -p1 -b .sharedlib
|
||||
|
||||
|
@ -1,19 +1,20 @@
|
||||
diff -up dhcp-4.2.0/client/Makefile.am.rh637017 dhcp-4.2.0/client/Makefile.am
|
||||
--- dhcp-4.2.0/client/Makefile.am.rh637017 2010-10-01 13:41:16.320002774 +0200
|
||||
+++ dhcp-4.2.0/client/Makefile.am 2010-10-01 13:41:16.320002774 +0200
|
||||
@@ -7,7 +7,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||
dhclient_CPPFLAGS = -DCLIENT_PATH='"$(sbindir)"' -DLOCALSTATEDIR='"$(localstatedir)"'
|
||||
dhclient_CFLAGS = -fpie
|
||||
@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
|
||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||
scripts/solaris scripts/openwrt
|
||||
dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a $(CAPNG_LDADD)
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export $(CAPNG_LDADD)
|
||||
dhclient_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||
diff -up dhcp-4.2.0/configure.ac.rh637017 dhcp-4.2.0/configure.ac
|
||||
--- dhcp-4.2.0/configure.ac.rh637017 2010-10-01 13:41:16.280002774 +0200
|
||||
+++ dhcp-4.2.0/configure.ac 2010-10-01 13:44:24.790002776 +0200
|
||||
@@ -521,20 +521,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_contro
|
||||
@@ -488,20 +488,37 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,,
|
||||
libbind=
|
||||
AC_ARG_WITH(libbind,
|
||||
AC_HELP_STRING([--with-libbind=PATH],
|
||||
@ -56,7 +57,7 @@ diff -up dhcp-4.2.0/configure.ac.rh637017 dhcp-4.2.0/configure.ac
|
||||
|
||||
# OpenLDAP support.
|
||||
AC_ARG_WITH(ldap,
|
||||
@@ -571,7 +588,7 @@ fi
|
||||
@@ -538,7 +555,7 @@ fi
|
||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
||||
|
||||
# Try to add the bind include directory
|
||||
@ -103,23 +104,24 @@ diff -up dhcp-4.2.0/Makefile.am.rh637017 dhcp-4.2.0/Makefile.am
|
||||
diff -up dhcp-4.2.0/omapip/Makefile.am.rh637017 dhcp-4.2.0/omapip/Makefile.am
|
||||
--- dhcp-4.2.0/omapip/Makefile.am.rh637017 2010-10-01 13:41:16.320002774 +0200
|
||||
+++ dhcp-4.2.0/omapip/Makefile.am 2010-10-01 13:41:16.320002774 +0200
|
||||
@@ -13,5 +13,5 @@ EXTRA_DIST = $(man_MANS)
|
||||
@@ -10,5 +10,5 @@ man_MANS = omapi.3
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
svtest_SOURCES = test.c
|
||||
svtest_CFLAGS = -fpie
|
||||
-svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+svtest_LDADD = libomapi.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
|
||||
diff -up dhcp-4.2.0/relay/Makefile.am.rh637017 dhcp-4.2.0/relay/Makefile.am
|
||||
--- dhcp-4.2.0/relay/Makefile.am.rh637017 2010-10-01 13:41:16.320002774 +0200
|
||||
+++ dhcp-4.2.0/relay/Makefile.am 2010-10-01 13:41:16.320002774 +0200
|
||||
@@ -4,7 +4,7 @@ sbin_PROGRAMS = dhcrelay
|
||||
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
|
||||
sbin_PROGRAMS = dhcrelay
|
||||
dhcrelay_SOURCES = dhcrelay.c
|
||||
dhcrelay_CFLAGS = -fpie
|
||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
dhcrelay_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
||||
man_MANS = dhcrelay.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
man_MANS = dhcrelay.8
|
||||
diff -up dhcp-4.2.0/server/Makefile.am.rh637017 dhcp-4.2.0/server/Makefile.am
|
||||
@ -127,11 +129,11 @@ diff -up dhcp-4.2.0/server/Makefile.am.rh637017 dhcp-4.2.0/server/Makefile.am
|
||||
+++ dhcp-4.2.0/server/Makefile.am 2010-10-01 13:41:16.320002774 +0200
|
||||
@@ -8,8 +8,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS) -fpie
|
||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||
dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||
- ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
|
||||
- ../bind/lib/libisc.a
|
||||
+ ../dhcpctl/libdhcpctl.a $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||
dhcpd_LDFLAGS = -pie -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
Loading…
Reference in New Issue
Block a user