Fire away bundled BIND source.
Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
parent
baeadb7b49
commit
9819e31780
14
dhcp.spec
14
dhcp.spec
@ -7,7 +7,7 @@
|
|||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.2.0
|
Version: 4.2.0
|
||||||
Release: 13%{?dist}
|
Release: 14%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -57,6 +57,7 @@ Patch28: dhcp-4.2.0-rfc3442-classless-static-routes.patch
|
|||||||
Patch29: dhcp-4.2.0-PIE-RELRO.patch
|
Patch29: dhcp-4.2.0-PIE-RELRO.patch
|
||||||
Patch30: dhcp-4.2.0-honor-expired.patch
|
Patch30: dhcp-4.2.0-honor-expired.patch
|
||||||
Patch31: dhcp-4.2.0-noprefixavail.patch
|
Patch31: dhcp-4.2.0-noprefixavail.patch
|
||||||
|
Patch32: dhcp420-rh637017.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -65,6 +66,7 @@ BuildRequires: groff
|
|||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: openldap-devel
|
BuildRequires: openldap-devel
|
||||||
BuildRequires: libcap-ng-devel
|
BuildRequires: libcap-ng-devel
|
||||||
|
BuildRequires: bind-lite-devel
|
||||||
|
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(post): coreutils
|
Requires(post): coreutils
|
||||||
@ -123,6 +125,9 @@ libdhcpctl and libomapi static libraries are also included in this package.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
# Remove bundled BIND source
|
||||||
|
rm bind/bind.tar.gz
|
||||||
|
|
||||||
# Replace the standard ISC warning message about requesting help with an
|
# 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
|
# explanation that this is a patched build of ISC DHCP and bugs should be
|
||||||
# reported through bugzilla.redhat.com
|
# reported through bugzilla.redhat.com
|
||||||
@ -249,6 +254,7 @@ libdhcpctl and libomapi static libraries are also included in this package.
|
|||||||
# Without this patch server ignored client's Solicit in which the client was sending
|
# Without this patch server ignored client's Solicit in which the client was sending
|
||||||
# prefix in IA_PD (as a preference) and this prefix was not in any of server's pools.
|
# prefix in IA_PD (as a preference) and this prefix was not in any of server's pools.
|
||||||
%patch31 -p1 -b .noprefixavail
|
%patch31 -p1 -b .noprefixavail
|
||||||
|
%patch32 -p1 -b .rh637017
|
||||||
|
|
||||||
# Copy in the Fedora/RHEL dhclient script
|
# Copy in the Fedora/RHEL dhclient script
|
||||||
%{__install} -p -m 0755 %{SOURCE4} client/scripts/linux
|
%{__install} -p -m 0755 %{SOURCE4} client/scripts/linux
|
||||||
@ -323,7 +329,8 @@ CFLAGS="%{optflags} -fno-strict-aliasing -D_GNU_SOURCE" \
|
|||||||
--with-cli6-pid-file=%{_localstatedir}/run/dhclient6.pid \
|
--with-cli6-pid-file=%{_localstatedir}/run/dhclient6.pid \
|
||||||
--with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid \
|
--with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid \
|
||||||
--with-ldap \
|
--with-ldap \
|
||||||
--with-ldapcrypto
|
--with-ldapcrypto \
|
||||||
|
--with-libbind=%{_includedir} --with-libbind-libs=%{_libdir}
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -540,6 +547,9 @@ fi
|
|||||||
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
%attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 20 2010 Adam Tkac <atkac redhat com> - 12:4.2.0-14
|
||||||
|
- fire away bundled BIND source
|
||||||
|
|
||||||
* Wed Oct 20 2010 Adam Tkac <atkac redhat com> - 12:4.2.0-13
|
* Wed Oct 20 2010 Adam Tkac <atkac redhat com> - 12:4.2.0-13
|
||||||
- improve PIE patch (build libraries with -fpic, not with -fpie)
|
- improve PIE patch (build libraries with -fpic, not with -fpie)
|
||||||
|
|
||||||
|
137
dhcp420-rh637017.patch
Normal file
137
dhcp420-rh637017.patch
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
libbind=
|
||||||
|
AC_ARG_WITH(libbind,
|
||||||
|
AC_HELP_STRING([--with-libbind=PATH],
|
||||||
|
- [bind includes and libraries are in PATH
|
||||||
|
- (default is ./bind)]),
|
||||||
|
+ [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)
|
||||||
|
- libbind="\${top_srcdir}/bind"
|
||||||
|
+ AC_MSG_ERROR([Specify path to bind9 libraries])
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
- libbind="\${top_srcdir}/bind"
|
||||||
|
+ BUNDLED_BIND=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
- libbind="$use_libbind"
|
||||||
|
+ BIND9_LIBDIR="-L$libbind_libs"
|
||||||
|
+ BUNDLED_BIND=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
|
||||||
|
+AC_SUBST([BIND9_LIBDIR])
|
||||||
|
|
||||||
|
# OpenLDAP support.
|
||||||
|
AC_ARG_WITH(ldap,
|
||||||
|
@@ -571,7 +588,7 @@ fi
|
||||||
|
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
||||||
|
|
||||||
|
# Try to add the bind include directory
|
||||||
|
-CFLAGS="$CFLAGS -I$libbind/include"
|
||||||
|
+CFLAGS="$CFLAGS -I$libbind"
|
||||||
|
|
||||||
|
AC_C_FLEXIBLE_ARRAY_MEMBER
|
||||||
|
|
||||||
|
diff -up dhcp-4.2.0/dhcpctl/Makefile.am.rh637017 dhcp-4.2.0/dhcpctl/Makefile.am
|
||||||
|
--- dhcp-4.2.0/dhcpctl/Makefile.am.rh637017 2009-10-28 05:12:30.000000000 +0100
|
||||||
|
+++ dhcp-4.2.0/dhcpctl/Makefile.am 2010-10-01 13:41:16.320002774 +0200
|
||||||
|
@@ -6,10 +6,10 @@ EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
|
omshell_SOURCES = omshell.c
|
||||||
|
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
|
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||||
|
+ $(BIND9_LIBDIR) -ldns-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 \
|
||||||
|
- ../bind/lib/libdns.a ../bind/lib/libisc.a
|
||||||
|
\ No newline at end of file
|
||||||
|
+ $(BIND9_LIBDIR) -ldns-export -lisc-export
|
||||||
|
diff -up dhcp-4.2.0/Makefile.am.rh637017 dhcp-4.2.0/Makefile.am
|
||||||
|
--- dhcp-4.2.0/Makefile.am.rh637017 2010-03-25 00:30:38.000000000 +0100
|
||||||
|
+++ dhcp-4.2.0/Makefile.am 2010-10-01 13:41:16.320002774 +0200
|
||||||
|
@@ -21,7 +21,13 @@ EXTRA_DIST = RELNOTES LICENSE \
|
||||||
|
util/bindvar.sh \
|
||||||
|
bind/Makefile bind/bind.tar.gz bind/version.tmp
|
||||||
|
|
||||||
|
-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
|
||||||
|
+if BUNDLED_BIND
|
||||||
|
+SUBDIRS = bind
|
||||||
|
+else
|
||||||
|
+SUBDIRS =
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+SUBDIRS += includes tests common dst omapip client dhcpctl relay server
|
||||||
|
|
||||||
|
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
diff -up dhcp-4.2.0/server/Makefile.am.rh637017 dhcp-4.2.0/server/Makefile.am
|
||||||
|
--- dhcp-4.2.0/server/Makefile.am.rh637017 2010-10-01 13:41:16.320002774 +0200
|
||||||
|
+++ 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_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
|
Loading…
Reference in New Issue
Block a user