I have done a second NMU of this package to fix the bug introduced in
the latest NMU and merge the changes Steve Langasek planned to do in his
NMU.

Please find the diff attached.

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net
diff -u libnss-db-2.2.3pre1/debian/changelog libnss-db-2.2.3pre1/debian/changelog
--- libnss-db-2.2.3pre1/debian/changelog
+++ libnss-db-2.2.3pre1/debian/changelog
@@ -1,3 +1,28 @@
+libnss-db (2.2.3pre1-2.2) unstable; urgency=low
+
+  * Non-maintainer upload to fix bugs introduced in the previous NMU.
+  * Merge patch from Steve Langasek Closes: #460339
+    + Bump Standards-Version to 3.7.3.
+    + Removed 020-db4.3_usage.patch:
+      - Linking with -ldb works fine, and lets us switch to db4.6.
+    + Use bash for install, not sh, so that the current pushd usage
+      doesn't cause a build failure when /bin/sh isn't bash.
+      Closes: #379621.
+    + Modified 070-selinux.patch:
+      - Comparing x$selinux to "xno" works better than comparing it to
+        "no"; fixes build failures on non-Linux archs.  Closes: #344277.
+    + Modified 010-db2_upgrade_code.patch:
+     - Only call db->upgrade if db->open return DB_OLD_VERSION.  Thanks
+       to Dann Frazier <[EMAIL PROTECTED]> for the patch.  Closes: #391517,
+       #460851.
+     - Merge 040-db4.3_api_change.patch into this one, since having
+       multiple patches patching the same line is annoying.
+  * debian/packages: use DEB_HOST_ARCH_OS instead of DEB_HOST_GNU_SYSTEM;
+    needed to avoid accidental SELinux-less misbuilds if SELinux support is
+    broken.
+
+ -- Aurelien Jarno <[EMAIL PROTECTED]>  Tue, 15 Jan 2008 11:36:50 +0100
+
 libnss-db (2.2.3pre1-2.1) unstable; urgency=low
 
   * Non-maintainer upload from the Zürich BSP.
@@ -24,7 +49,7 @@
   * Removed 120-gettextize.patch:
     - Call gettextize in build time with a little help of IPC::Run.
 
- -- Piotr Roszatycki <[EMAIL PROTECTED]>  Mon, 19 Dec 2005 11:45:15 +0100
+ -- Piotr Roszatycki <[EMAIL PROTECTED]>  Mon, 19 Dec 2005 11:45:15 +0100
 
 libnss-db (2.2.3pre1-1) unstable; urgency=low
 
diff -u libnss-db-2.2.3pre1/debian/packages libnss-db-2.2.3pre1/debian/packages
--- libnss-db-2.2.3pre1/debian/packages
+++ libnss-db-2.2.3pre1/debian/packages
@@ -55,7 +55,6 @@
 Major-Changes:
 %`cd debian/patches; ls *.patch | sed -e 's/^/ /'`
 Build: bash
- SHELL=/bin/bash
  CC=${CC:-gcc}
  CFLAGS=${CFLAGS:--Wall -pedantic -g}
  if [ "${DEB_BUILD_OPTIONS#*noopt}" != "$DEB_BUILD_OPTIONS" ]; then
@@ -63,7 +62,7 @@
  else
      CFLAGS="$CFLAGS -O2"
  fi
- if [ "$DEB_HOST_GNU_SYSTEM" = "linux" ]; then
+ if [ "$DEB_HOST_GNU_SYSTEM" = "linux-gnu" ]; then
      WITH_SELINUX="--with-selinux"
  fi
  .
@@ -153,7 +152,7 @@
  networks, protocol, users, RPCs, services, and shadow passwords (instead
  of or in addition to using flat files or NIS). Install nss_db if your
  flat name service files are too large and lookups are slow.
-Install: sh
+Install: bash
  VAR_DB=$(cat VAR_DB)
  pushd build
      make install DESTDIR=$ROOT slibdir=/usr/lib
diff -u libnss-db-2.2.3pre1/debian/rules libnss-db-2.2.3pre1/debian/rules
--- libnss-db-2.2.3pre1/debian/rules
+++ libnss-db-2.2.3pre1/debian/rules
@@ -115,7 +115,6 @@
 	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
 	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
 	echo -E 'eval "yada () { perl $$(which yada) \"[EMAIL PROTECTED]"; }"; set -e; set -v';\
-	echo -E 'SHELL=/bin/bash';\
 	echo -E 'CC=$${CC:-gcc}';\
 	echo -E 'CFLAGS=$${CFLAGS:--Wall -pedantic -g}';\
 	echo -E 'if [ "$${DEB_BUILD_OPTIONS#*noopt}" != "$$DEB_BUILD_OPTIONS" ]; then';\
@@ -123,7 +122,7 @@
 	echo -E 'else';\
 	echo -E '    CFLAGS="$$CFLAGS -O2"';\
 	echo -E 'fi';\
-	echo -E 'if [ "$$DEB_HOST_GNU_SYSTEM" = "linux" ]; then';\
+	echo -E 'if [ "$$DEB_HOST_GNU_SYSTEM" = "linux-gnu" ]; then';\
 	echo -E '    WITH_SELINUX="--with-selinux"';\
 	echo -E 'fi';\
 	echo -E '';\
@@ -244,7 +243,7 @@
 	echo -E 'popd';\
 	echo -E 'yada install -data -as Makefile -into $$VAR_DB debian/scripts/db-Makefile';\
 	echo -E 'yada install -doc -as changelog ChangeLog';\
-	echo -E 'yada install -doc NEWS README') | /bin/sh
+	echo -E 'yada install -doc NEWS README') | /bin/bash
 	@umask 022 \
 	  && export pwd="$$(pwd)" \
 	  && export ROOT="$$(pwd)/debian/tmp-libnss-db" \
reverted:
--- libnss-db-2.2.3pre1/debian/patches/020-db4.patch
+++ libnss-db-2.2.3pre1.orig/debian/patches/020-db4.patch
@@ -1,14 +0,0 @@
-Link against libdb4.6
-
-diff -urN nss_db-2.2.orig/configure.in nss_db-2.2/configure.in
---- nss_db-2.2.orig/configure.in	Thu Nov  9 19:56:04 2000
-+++ nss_db-2.2/configure.in	Sun Mar 25 13:25:01 2001
-@@ -43,7 +43,7 @@
- AC_CHECK_HEADER(db.h,, AC_MSG_ERROR([
- *** Could not find Berkeley DB headers.]))
- 
--AC_CHECK_LIB(db, db_version,, AC_MSG_ERROR([
-+AC_CHECK_LIB(db-4.6, db_version,, AC_MSG_ERROR([
- *** Could not find Berkeley DB library.]))
- 
- AC_CACHE_CHECK([Berkeley DB version], nss_db_cv_db_version,
reverted:
--- libnss-db-2.2.3pre1/debian/patches/040-db4.patch
+++ libnss-db-2.2.3pre1.orig/debian/patches/040-db4.patch
@@ -1,14 +0,0 @@
-DB 4.3 API change
-
-diff -uNr nss_db-2.2.orig/src/db-compat.c nss_db-2.2/src/db-compat.c
---- nss_db-2.2.orig/src/db-compat.c	2005-02-22 11:20:08.982739304 -0500
-+++ nss_db-2.2/src/db-compat.c	2005-02-22 11:20:15.872839511 -0500
-@@ -39,7 +39,7 @@
-   if (err)
-     return err;
- 
--  err = db->open (db, file, NULL, type, flags, mode);
-+  err = db->open (db, NULL, file, NULL, type, flags, mode);
-   if (err)
-     {
-       db->close (db, 0);
diff -u libnss-db-2.2.3pre1/debian/patches/010-db2_upgrade_code.patch libnss-db-2.2.3pre1/debian/patches/010-db2_upgrade_code.patch
--- libnss-db-2.2.3pre1/debian/patches/010-db2_upgrade_code.patch
+++ libnss-db-2.2.3pre1/debian/patches/010-db2_upgrade_code.patch
@@ -1,15 +1,22 @@
-Make sure we upgrade, in case this is an older database
+Make sure we upgrade, in case this is an older database; and handle the 
+DB4.3 API change for DB->open().
 
 diff -urN nss_db-2.2.orig/src/db-compat.c nss_db-2.2/src/db-compat.c
 --- nss_db-2.2.orig/src/db-compat.c	Mon Mar 26 15:34:53 2001
 +++ nss_db-2.2/src/db-compat.c	Mon Mar 26 15:31:36 2001
-@@ -39,6 +39,9 @@
+@@ -39,7 +39,14 @@
    if (err)
      return err;
  
+-  err = db->open (db, file, NULL, type, flags, mode);
++  err = db->open (db, NULL, file, NULL, type, flags, mode);
 +  /* Make sure we upgrade, in case this is an older database */
-+  db->upgrade(db, file, 0);
++  if (err == DB_OLD_VERSION)
++    err = db->upgrade(db, file, 0);
++  if (err)
++    return err;
 +
-   err = db->open (db, file, NULL, type, flags, mode);
++  err = db->open (db, NULL, file, NULL, type, flags, mode);
    if (err)
      {
+       db->close (db, 0);

Reply via email to