Skip to contentSkip to conversation

upgrade bind to 9.10.2, and fix the building failure

PATCH New [email protected] 1 participant 3 messages May 4, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover upgrade bind to 9.10.2, and fix the building failure

From: Roy Li <[email protected]>

The following changes since commit 7a8f37daa7b42905233c31366915b897886a957a:

dev-manual: Updates to add Luna support for Eclipse (2015-05-03 11:49:35 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib roy/bind-9.10.2-1
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/bind-9.10.2-1

Roy Li (2):
bind: upgrade to 9.10.2
dhcp: fix a building failure when upgrade bind

 .../bind/bind/bind-CVE-2012-3817.patch             |  40 -
 ...d-crosscripts-search-path-for-xml2-config.patch |   2 +-
 .../bind/bind/bind-subdirs-run-serially.patch      |  35 -
 .../bind/bind/bind9_9_5-CVE-2014-8500.patch        | 990 ---------------------
 .../bind/bind/cross-build-fix.patch                |  21 -
 .../bind/bind/dont-test-on-host.patch              |   4 +-
 .../bind/{bind_9.9.5.bb => bind_9.10.2.bb}         |  10 +-
 meta/recipes-connectivity/dhcp/dhcp.inc            |   7 +-
 .../dhcp/dhcp/0001-search-libxml2.patch            |  35 +
 9 files changed, 47 insertions(+), 1097 deletions(-)
 delete mode 100644 meta/recipes-connectivity/bind/bind/bind-CVE-2012-3817.patch
 delete mode 100644 meta/recipes-connectivity/bind/bind/bind-subdirs-run-serially.patch
 delete mode 100644 meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch
 delete mode 100644 meta/recipes-connectivity/bind/bind/cross-build-fix.patch
 rename meta/recipes-connectivity/bind/{bind_9.9.5.bb => bind_9.10.2.bb} (87%)
 create mode 100644 meta/recipes-connectivity/dhcp/dhcp/0001-search-libxml2.patch
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 bind: upgrade to 9.10.2

From: Roy Li <[email protected]>

1. Remove two unneeded CVE patches, 9.10.2 fixed the CVE-2015-1349 also
2. Remove bind-subdirs-run-serially.patch and cross-build-fix.patch, similar fixes are merged into 9.10.2
3. update the dont-test-on-host.patch
4. update the Copyright file checksum, since the date in it has been changed.
5. replace the hardcode lib dir with $base_libdir in bind-add-crosscripts*.patch

---
 .../bind/bind/bind-CVE-2012-3817.patch             |  40 -
 ...d-crosscripts-search-path-for-xml2-config.patch |   2 +-
 .../bind/bind/bind-subdirs-run-serially.patch      |  35 -
 .../bind/bind/bind9_9_5-CVE-2014-8500.patch        | 990 ---------------------
 .../bind/bind/cross-build-fix.patch                |  21 -
 .../bind/bind/dont-test-on-host.patch              |   4 +-
 .../bind/{bind_9.9.5.bb => bind_9.10.2.bb}         |  10 +-
 7 files changed, 6 insertions(+), 1096 deletions(-)
 delete mode 100644 meta/recipes-connectivity/bind/bind/bind-CVE-2012-3817.patch
 delete mode 100644 meta/recipes-connectivity/bind/bind/bind-subdirs-run-serially.patch
 delete mode 100644 meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch
 delete mode 100644 meta/recipes-connectivity/bind/bind/cross-build-fix.patch
 rename meta/recipes-connectivity/bind/{bind_9.9.5.bb => bind_9.10.2.bb} (87%)
meta/recipes-connectivity/bind/bind/bind-CVE-2012-3817.patch deleted +0 -40
deleted file mode 100644
index 1e159bd..0000000
@@ -1,40 +0,0 @@
-bind: fix for CVE-2012-3817
-
-Upstream-Status: Backport
-
-ISC BIND 9.4.x, 9.5.x, 9.6.x, and 9.7.x before 9.7.6-P2; 9.8.x before 9.8.3-P2;
-9.9.x before 9.9.1-P2; and 9.6-ESV before 9.6-ESV-R7-P2, when DNSSEC validation
-is enabled, does not properly initialize the failing-query cache, which allows
-remote attackers to cause a denial of service (assertion failure and daemon exit)
-by sending many queries.
-
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3817
-
-This patch is back-ported from bind-9.3.6-20.P1.el5_8.2.src.rpm package.
-
-Signed-off-by: Ming Liu <[email protected]>
----
- resolver.c |    5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/lib/dns/resolver.c
-+++ b/lib/dns/resolver.c
-@@ -8318,6 +8318,7 @@ dns_resolver_addbadcache(dns_resolver_t 
- 			goto cleanup;
- 		bad->type = type;
- 		bad->hashval = hashval;
-+		bad->expire = *expire;
- 		isc_buffer_init(&buffer, bad + 1, name->length);
- 		dns_name_init(&bad->name, NULL);
- 		dns_name_copy(name, &bad->name, &buffer);
-@@ -8329,8 +8330,8 @@ dns_resolver_addbadcache(dns_resolver_t 
- 		if (resolver->badcount < resolver->badhash * 2 &&
- 		    resolver->badhash > DNS_BADCACHE_SIZE)
- 			resizehash(resolver, &now, ISC_FALSE);
--	}
--	bad->expire = *expire;
-+	} else
-+		bad->expire = *expire;
-  cleanup:
- 	UNLOCK(&resolver->lock);
- }
meta/recipes-connectivity/bind/bind/bind-add-crosscripts-search-path-for-xml2-config.patch +1 -1
index 4f1a3f8..d24276c 100644
@@ -24,7 +24,7 @@ index 3d04f4c..6032f67 100644
  		if test -f "$use_libxml2/bin/xml2-config" ; then
  			libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
  			libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
-+		elif test -f "$use_libxml2/lib/pkgconfig/libxml-2.0.pc" ; then
++		elif test -f "$use_libxml2/$base_libdir/pkgconfig/libxml-2.0.pc" ; then
 +			libxml2_libs=`pkg-config libxml-2.0 --libs`
 +			libxml2_cflags=`pkg-config libxml-2.0 --cflags`
  		fi
meta/recipes-connectivity/bind/bind/bind-subdirs-run-serially.patch deleted +0 -35
deleted file mode 100644
index 9db7a17..0000000
@@ -1,35 +0,0 @@
-From b24468b6fe1f136bfd854773bc0e117aca0012d5 Mon Sep 17 00:00:00 2001
-From: Robert Yang <[email protected]>
-Date: Wed, 28 Jan 2015 01:23:09 -0800
-Subject: [PATCH] lib/export/isc/Makefile.in: let SUBDIRS run serially
-
-Fix parallel issue::
-make[2]: *** No rule to make target `nls/msgcat.o', needed by `libisc.a'.  Stop.
-make[2]: *** Waiting for unfinished jobs....
-make[3]: Leaving directory `bind-9.9.5/lib/export/isc/unix'
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <[email protected]>
----
- lib/export/isc/Makefile.in |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/export/isc/Makefile.in b/lib/export/isc/Makefile.in
-index a92f66f..27dabcb 100644
---- a/lib/export/isc/Makefile.in
-+++ b/lib/export/isc/Makefile.in
-@@ -103,6 +103,10 @@ SRCS =		@ISC_EXTRA_SRCS@ \
- 
- LIBS =		@LIBS@
- 
-+# Note: the order of SUBDIRS is important.
-+# Attempt to disable parallel processing.
-+.NOTPARALLEL:
-+.NO_PARALLEL:
- SUBDIRS =	include unix nls @ISC_THREAD_DIR@
- TARGETS =	timestamp
- 
--- 
-1.7.9.5
-
meta/recipes-connectivity/bind/bind/bind9_9_5-CVE-2014-8500.patch deleted +0 -990

990 lines not on this page · raw message

meta/recipes-connectivity/bind/bind/cross-build-fix.patch deleted +0 -21
deleted file mode 100644
index 4c37b6b..0000000
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-11/30/2010
-gen.c should be build by ${BUILD_CC}
-
-Signed-off-by: Qing He <[email protected]>
-
-diff --git a/lib/export/dns/Makefile.in b/lib/export/dns/Makefile.in
-index aeadf57..d3fae74 100644
---- a/lib/export/dns/Makefile.in
-+++ b/lib/export/dns/Makefile.in
-@@ -166,7 +166,8 @@ code.h:	gen
- 	./gen -s ${srcdir} > code.h
- 
- gen: ${srcdir}/gen.c
--	${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
-+	${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
-+	${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
- 
- #We don't need rbtdb64 for this library
- #rbtdb64.@O@: rbtdb.c
meta/recipes-connectivity/bind/bind/dont-test-on-host.patch +2 -2
index 288e58b..6989d6d 100644
@@ -10,8 +10,8 @@ Index: bind-9.9.5/bin/Makefile.in
  VPATH =		@srcdir@
  top_srcdir =	@top_srcdir@
  
--SUBDIRS =	named rndc dig dnssec tools tests nsupdate \
-+SUBDIRS =	named rndc dig dnssec tools nsupdate \
+-SUBDIRS =	named rndc dig delv dnssec tools tests nsupdate \
++SUBDIRS =	named rndc dig delv dnssec tools nsupdate \
  		check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@
  TARGETS =
  
meta/recipes-connectivity/bind/bind_9.10.2.bb renamed from meta/recipes-connectivity/bind/bind_9.9.5.bb +3 -7
similarity index 87%
rename from meta/recipes-connectivity/bind/bind_9.9.5.bb
rename to meta/recipes-connectivity/bind/bind_9.10.2.bb
index e34cded..21be397 100644
@@ -3,13 +3,12 @@ HOMEPAGE = "http://www.isc.org/sw/bind/"
 SECTION = "console/network"
 
 LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=a3df5f651469919a0e6cb42f84fb6ff1"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0a95f52a0ab6c5f52dedc9a45e7abb3f"
 
 DEPENDS = "openssl libcap"
 
 SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
            file://conf.patch \
-           file://cross-build-fix.patch \
            file://make-etc-initd-bind-stop-work.patch \
            file://mips1-not-support-opcode.diff \
            file://dont-test-on-host.patch \
@@ -17,14 +16,12 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
            file://named.service \
            file://bind9 \
            file://init.d-add-support-for-read-only-rootfs.patch \
-           file://bind9_9_5-CVE-2014-8500.patch \
            file://bind-add-crosscripts-search-path-for-xml2-config.patch \
-           file://bind-subdirs-run-serially.patch \
            file://bind-confgen-build-unix.o-once.patch \
 	   "
 
-SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
-SRC_URI[sha256sum] = "d4b64c1dde442145a316679acff2df4008aa117ae52dfa3a6bc69efecc7840d1"
+SRC_URI[md5sum] = "dca7a9967947bffa98547fca6130fc04"
+SRC_URI[sha256sum] = "6f9bb7908aa45c1edfa391e356fc0afc1ded175386cdefb6cf9e1289f7457a98"
 
 # --enable-exportlib is necessary for building dhcp
 ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
@@ -33,7 +30,6 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
                  --with-gssapi=no --with-ecdsa=yes \
                  --sysconfdir=${sysconfdir}/bind \
                  --with-openssl=${STAGING_LIBDIR}/.. \
-                 --enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
                "
 inherit autotools-brokensep update-rc.d systemd useradd pkgconfig
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 dhcp: fix a building failure when upgrade bind

In reply to [email protected]

From: Roy Li <[email protected]>

The libdns.a and libisc.a from bind-9.10.2 maybe need the libxml2, so add PKGCONFIG to make libxml2 dependence deterministic.

---
 meta/recipes-connectivity/dhcp/dhcp.inc            |  7 ++++-
 .../dhcp/dhcp/0001-search-libxml2.patch            | 35 ++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/dhcp/dhcp/0001-search-libxml2.patch
meta/recipes-connectivity/dhcp/dhcp.inc +6 -1
index 6ced775..ed2849f 100644
@@ -17,7 +17,9 @@ SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
            file://init-relay file://default-relay \
            file://init-server file://default-server \
            file://dhclient.conf file://dhcpd.conf \
-           file://dhcpd.service file://dhcrelay.service"
+           file://dhcpd.service file://dhcrelay.service \
+           file://0001-search-libxml2.patch \
+"
 
 inherit autotools systemd
 
@@ -36,6 +38,9 @@ EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
                 --with-libbind=${STAGING_LIBDIR}/ \
                "
 
+PACKAGECONFIG ?= "libxml2"
+PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2"
+
 do_install_append () {
 	install -d ${D}${sysconfdir}/init.d
 	install -d ${D}${sysconfdir}/default
meta/recipes-connectivity/dhcp/dhcp/0001-search-libxml2.patch new file +35 -0
new file mode 100644
index 0000000..27f0f7b
@@ -0,0 +1,35 @@
+[PATCH] search libxml2
+
+Upstream-Status: Pending
+
+The libdns.a and libisc.a from bind-9.10.2 maybe need libxml2
+
+Signed-off-by: Roy Li <[email protected]>
+---
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index c9dc8b5..55ea877 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -602,6 +602,16 @@ no)
+ esac
+ AC_SUBST([libbind])
+ 
++# XML support.
++AC_ARG_WITH(libxml2,
++    AS_HELP_STRING([--with-libxml2],[enable XML2 support (default is no)]),
++    [libxml2=$withval],
++    [libxml2=no])
++
++if test x$libxml2 = xyes ; then
++    AC_SEARCH_LIBS(xmlTextWriterEndElement, [xml2],)
++fi
++
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+     AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
+-- 
+1.9.1
+
Signature · 1 line
1.9.1