libnss-db (2.2.3pre1-3.1) debian-dir only changes

Summary

 debian/changelog                                     |  230 +++++++++++++
 debian/conf/default                                  |   14 
 debian/control                                       |   19 +
 debian/man/makedb.pod                                |   57 +++
 debian/packages                                      |  200 +++++++++++
 debian/patches/010-db2_upgrade_code.patch            |   23 +
 debian/patches/030-no_internal_libc.patch            |  279 +++++++++++++++
 debian/patches/050-initialize_all_fields.patch       |   13 
 debian/patches/060-errno.patch                       |   14 
 debian/patches/070-selinux.patch                     |  160 +++++++++
 debian/patches/080-translations.patch                |  259 ++++++++++++++
 debian/patches/090-automake_AC_CANONICAL_HOST.patch  |   13 
 debian/patches/100-automake_libtool.patch            |   18 +
 debian/patches/110-automake_install-data-local.patch |   14 
 debian/rules                                         |  335 +++++++++++++++++++
 debian/scripts/db-Makefile                           |  138 +++++++
 16 files changed, 1786 insertions(+)

    
download this patch

Patch contents

--- libnss-db-2.2.3pre1.orig/debian/changelog
+++ libnss-db-2.2.3pre1/debian/changelog
@@ -0,0 +1,230 @@
+libnss-db (2.2.3pre1-3.1) unstable; urgency=low
+
+  * Porter NMU for GNU/kFreeBSD.
+  * Update config.guess/sub from autotools-dev. Closes: #528325.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 30 Jul 2009 02:06:56 +0200
+
+libnss-db (2.2.3pre1-3) unstable; urgency=low
+
+  * Applied all NMU patches. Closes: #460339, #460851, #344277, #361464,
+    #379621, #441624, #391517.
+  * Fixed bad 010-db2_upgrade_code.patch which broke this package.
+    Closes: #460963.
+  * Add Swedish translation to 080-translations.patch. Closes: #386615.
+  * Updated 070-selinux.patch based on the latest Fedora.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Wed, 16 Jan 2008 17:22:21 +0100
+
+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 <dannf@debian.org> 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 <aurel32@debian.org>  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.
+  * Don't build-depends on libselinux1-dev on kfreebsd-amd64. Closes:
+    #361464.
+  * Apply patch by Steve Langasek to switch to db4.6 (Closes: #441624):
+    - Replaced 040-db4.3_api_change.patch with 040-db4.patch,
+      020-db4.3_usage.patch with 020-db4.patch.
+  * Add Swedish translation from Daniel Nylander (Closes: #386615).
+  * Fix selinux detection in debian/patches/070-selinux.patch (Closes: 
+    #344277).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 13 Jan 2008 13:16:01 +0100
+
+libnss-db (2.2.3pre1-2) unstable; urgency=high
+
+  * Renumbered Debian patches.
+  * Modified 060-errno.patch:
+    - Do not remove errnop variable. It causes fatal error on amd64. Just
+      set errno to ENOENT by default. Closes: #341773.
+  * Modified 070-selinux.patch:
+    - Fix configure script for SELinux and fix FTBFS on hurd-i386.
+      Closes: #322190.
+  * Removed 120-gettextize.patch:
+    - Call gettextize in build time with a little help of IPC::Run.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Mon, 19 Dec 2005 11:45:15 +0100
+
+libnss-db (2.2.3pre1-1) unstable; urgency=low
+
+  * New maintainer release. Closes bugs fixed by previous NMUs.
+    Closes: #146707, #165298, #168532, #173082, #284859, #309492.
+  * New upstrem release.
+  * The source package converted to yada.
+  * The source is adapted to the latest automake. Closes: #114936.
+  * debian/packages:
+    - Build-Depends: autoconf, automake1.9, libtool, gettext, perl, libdb4.3-dev, libselinux1-dev
+    - Install library into /usr/lib as far as it requires libdb4.3 from /usr/lib.
+    - Detect _PATH_VARDB and install there db-Makefile. Closes: #316573.
+    - Changed package description. Closes: #314909.
+  * Removed 000_libtool_upgrade.diff:
+    - Not necessary with new upstream.
+  * Replaced 002_db3_usage.diff by 002-db4.3_usage.patch:
+    - Compile against libdb4.3-dev.
+  * Replaced 003_no_internal_libc.diff by 003-no_internal_libc.patch:
+    - The patch from Fedora: doesn't get to use internal interfaces.
+  * Added 004-db4.3_api_change.patch:
+    - Use new interface for db->open()
+  * Added 005-initialize_all_fields.patch:
+    - The patch from Fedora: Initialize all of the fields of the key to zeroes,
+      so that we don't pass garbage keys in to later versions of Berkeley DB.
+  * Added 006-errno.patch:
+    - The patch based on Fedora
+    - set errno to ENOENT by default so that we don't leave stale errno values
+      around in error cases
+    - clear the entire key DBT before handing it to a get() function
+    - set errno to ENOENT when returning NSS_STATUS_NOTFOUND
+  * Added 007-selinux.patch:
+    - Set the SELinux file creation context when opening databases for write
+      access. Note that this does *not* change the context of existing files.
+  * Added 008-translations.patch:
+    - Missing translations for makedb.
+  * Added 009-automake_AC_CANONICAL_HOST.patch:
+    - Remove AC_CANONICAL_HOST for new automake.
+  * Added 010-automake_libtool.patch:
+    - Automake doesn't know how to compile a single file both with and without
+      libtool. So fake it.
+  * Added 011-automake_install-data-local.patch:
+    - Call install-slibLTLIBRARIES before install-data-local.
+  * Added 012-gettextize.patch:
+    - Updated for the newer gettext. Generated by
+      `gettextize --force --copy --no-changelog --intl && rm -f *~ intl/*~ m4/*.in'
+  * debian/man/makedb.pod:
+    - Better formatting.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Mon, 18 Jul 2005 14:39:43 +0200
+
+libnss-db (2.2-6.3) unstable; urgency=medium
+
+  * NMU
+  * debian/local/db-Makefile:
+    - Set correct umask before creating files. Closes: #284859.
+  * debian/packages.d/libnss-db.in: %postinst%:
+    - Don't remove *.db files on upgrade. It can break the system if the files
+      are not generated locally. Closes: #309492.
+    - Use `invoke-rc.d nscd restart'.
+  * debian/rules:
+    - The symlink in /usr/lib should be absolute.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Mon, 23 May 2005 15:37:00 +0200
+
+libnss-db (2.2-6.2) unstable; urgency=low
+
+  * NMU
+  * debian/patches/003_no_internal_libc.diff:
+      - Fix libc-lock.h to work on hppa (closes: #173082)
+      - include errno.h in db-XXX.c (closes: #168532)
+  * Remove duplicated "been" in description (closes: #146707)
+  * Change automake build-depends to automake1.4
+
+ -- Ryan Murray <rmurray@debian.org>  Sun, 23 Feb 2003 20:23:16 -0800
+
+libnss-db (2.2-6.1.1) unstable; urgency=low
+
+  * BinNMU to compile against glibc 2.3.1
+
+ -- Othmar Pasteka <othmar@debian.org>  Tue,  4 Feb 2003 11:07:21 +0100
+
+libnss-db (2.2-6.1) unstable; urgency=low
+
+  * NMU
+  * Change autoconf build-dep to autoconf2.13
+  * Added 003_no_internal_libc.diff from Daniel
+    Jacobowitz <dan@debian.org>. closes: #165298
+
+ -- Randolph Chung <tausq@debian.org>  Sun,  1 Dec 2002 09:31:44 -0800
+
+libnss-db (2.2-6) unstable; urgency=low
+
+  * Rebuild with newer libdb3
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 12 Apr 2002 13:12:29 -0400
+
+libnss-db (2.2-5) unstable; urgency=low
+
+  * Remove libc6-dev build-dep. It was there to make sure it built with a
+    newer libc. That's pretty moot now. closes: #108643
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 13 Aug 2001 21:24:06 -0400
+
+libnss-db (2.2-4) unstable; urgency=low
+
+  * Call libtoolize before autoconf, closes: #101428
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 10 Aug 2001 12:33:20 -0400
+
+libnss-db (2.2-3) unstable; urgency=low
+
+  * Urf, my db2->db3 upgrade code doesn't work for non-root in this case.
+    Leave it, but don't let it fail. Also, make sure we rebuild the db's
+    on upgrades.
+  * Add manpage for makedb.1
+  * Created a etc/default/libnss-db to hold the configurable parts of the
+    db Makefile. Make that new file a conffile, and not Makefile, #92283
+
+ -- Ben Collins <bcollins@debian.org>  Sun,  1 Apr 2001 22:29:26 -0400
+
+libnss-db (2.2-2) unstable; urgency=low
+
+  * Restart nscd if we move the db's, closes: #35844
+  * Added more build-depends, closes: #90207
+  * libdb2 is now in /lib, closes: #81212, #72647
+  * Update libtool, closes: #77950
+  * db-Makefile: set ETC to /etc, and use it throughout. closes: #78579
+  * Build-Dep on db3 now, and compile against that.
+  * Make /var/lib/misc/Makefile a conffile, since the user may want to
+    modify it.
+  * Depend on make, it's needed to generate the .db's
+  * Add patch to call DB->upgrade() after creating and before opening the
+    .db, so it is automatically upgraded to the db3 on-disk format.
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 25 Mar 2001 09:47:06 -0500
+
+libnss-db (2.2-1) unstable; urgency=low
+
+  * New upstream version
+  * Remove the Essential flag, instead we will allow libc6 to suggest us
+
+ -- Ben Collins <bcollins@debian.org>  Wed, 15 Nov 2000 21:54:08 -0500
+
+libnss-db (2.1.92-3) unstable; urgency=low
+
+  * Make libnss-db essential
+
+ -- Ben Collins <bcollins@debian.org>  Tue,  7 Nov 2000 19:03:39 -0500
+
+libnss-db (2.1.92-2) unstable; urgency=low
+
+  * Fix silly copyright problem
+
+ -- Ben Collins <bcollins@debian.org>  Tue, 26 Sep 2000 16:17:09 -0400
+
+libnss-db (2.1.92-1) unstable; urgency=low
+
+  * Original packaging, split from glibc upstream (2.1.93)
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 11 Sep 2000 14:58:01 -0400
--- libnss-db-2.2.3pre1.orig/debian/rules
+++ libnss-db-2.2.3pre1/debian/rules
@@ -0,0 +1,335 @@
+#!/usr/bin/make -f
+# Generated automatically from debian/packages
+# by yada v0.54, of Sun, 28 Oct 2007
+
+DEB_HOST_ARCH        := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
+DEB_HOST_ARCH_OS     := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+DEB_HOST_ARCH_CPU    := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
+DEB_HOST_GNU_CPU     := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU 2>/dev/null)
+DEB_HOST_GNU_TYPE    := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2>/dev/null)
+DEB_HOST_GNU_SYSTEM  := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM 2>/dev/null)
+
+DEB_BUILD_ARCH       := $(shell dpkg-architecture -qDEB_BUILD_ARCH 2>/dev/null)
+DEB_BUILD_ARCH_OS    := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null)
+DEB_BUILD_ARCH_CPU   := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null)
+DEB_BUILD_GNU_CPU    := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU 2>/dev/null)
+DEB_BUILD_GNU_TYPE   := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2>/dev/null)
+DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM 2>/dev/null)
+
+# Take account of old dpkg-architecture output.
+ifeq ($(DEB_HOST_ARCH_CPU),)
+  DEB_HOST_ARCH_CPU := $(DEB_HOST_GNU_CPU))
+  ifeq ($(DEB_HOST_ARCH_CPU),i486)
+    DEB_HOST_ARCH_OS := i386
+  else
+  ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
+    DEB_HOST_ARCH_OS := amd64
+  endif
+  endif
+endif
+ifeq ($(DEB_HOST_ARCH_OS),)
+  DEB_HOST_ARCH_OS := $(subst -gnu,,$(DEB_HOST_GNU_SYSTEM))
+  ifeq ($(DEB_HOST_ARCH_OS),gnu)
+    DEB_HOST_ARCH_OS := hurd
+  endif
+endif
+ifeq ($(DEB_BUILD_ARCH_CPU),)
+  DEB_BUILD_ARCH_CPU := $(DEB_BUILD_GNU_CPU))
+  ifeq ($(DEB_BUILD_ARCH_CPU),i486)
+    DEB_BUILD_ARCH_OS := i386
+  else
+  ifeq ($(DEB_BUILD_ARCH_CPU),x86_64)
+    DEB_BUILD_ARCH_OS := amd64
+  endif
+  endif
+endif
+ifeq ($(DEB_BUILD_ARCH_OS),)
+  DEB_BUILD_ARCH_OS := $(subst -gnu,,$(DEB_BUILD_GNU_SYSTEM))
+  ifeq ($(DEB_BUILD_ARCH_OS),gnu)
+    DEB_BUILD_ARCH_OS := hurd
+  endif
+endif
+
+LEFT_PARENTHESIS:=(
+VERSION:=$(shell head -n1 debian/changelog | sed -e "s/^[0-9a-zA-Z.-]* $(LEFT_PARENTHESIS)//" -e "s/[^0-9a-zA-Z.:+~-].*//")
+
+SHELL=/bin/bash
+
+.PHONY: default
+default:
+	@echo "Specify a target:"; \
+	echo " build              compile the package"; \
+	echo " build-arch         compile the architecture-dependent package"; \
+	echo " build-indep        compile the architecture-independent package"; \
+	echo " binary             make all binary packages"; \
+	echo " binary-arch        make all architecture-dependent binary packages"; \
+	echo " binary-indep       make all architecture-independent binary packages"; \
+	echo " clean              clean up the source package"; \
+	echo; \
+	echo " clean-install-tree clean up only under debian/"; \
+	echo
+
+# Build the package and prepare the install tree
+
+.PHONY: build-only build
+build-only: debian/build-stamp
+build: build-only
+
+.PHONY: build-arch-only build-arch
+build-arch-only: debian/build-arch-stamp
+build-arch: build-arch-only
+
+.PHONY: build-indep-only build-indep
+build-indep-only: debian/build-indep-stamp
+build-indep: build-indep-only
+
+# Make sure these rules and the control file are up-to-date
+
+.PHONY: rules control templates
+rules: debian/rules
+debian/rules: $(shell which yada) debian/packages-tmp
+	yada rebuild rules
+
+control: debian/control
+debian/control: $(shell which yada) debian/packages-tmp
+	yada rebuild control
+
+templates: debian/templates debian/po/POTFILES.in
+debian/templates: $(shell which yada) debian/packages-tmp
+	yada rebuild templates
+debian/po/POTFILES.in: $(shell which yada) debian/packages-tmp
+	yada rebuild templates
+
+debian/build-stamp: debian/build-arch-stamp debian/build-indep-stamp
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	yada patch "debian/patches/*.patch"
+	@umask 022 \
+	  && export pwd="$$(pwd)" \
+	  && export TMPROOT="$$(pwd)/debian/tmp" \
+	  && export SOURCE="libnss-db" \
+	  && export VERSION="$(VERSION)" \
+	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	  && 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) \"\$$@\"; }"; set -e; set -v';\
+	echo -E 'CC=$${CC:-gcc}';\
+	echo -E 'CFLAGS=$${CFLAGS:--Wall -pedantic -g}';\
+	echo -E 'if [ "$${DEB_BUILD_OPTIONS#*noopt}" != "$$DEB_BUILD_OPTIONS" ]; then';\
+	echo -E '    CFLAGS="$$CFLAGS -O0"';\
+	echo -E 'else';\
+	echo -E '    CFLAGS="$$CFLAGS -O2"';\
+	echo -E 'fi';\
+	echo -E 'if [ "$$DEB_HOST_ARCH_OS" = "linux" ]; then';\
+	echo -E '    WITH_SELINUX="--with-selinux"';\
+	echo -E 'fi';\
+	echo -E '';\
+	echo -E 'CPP=`$$CC -print-prog-name=cpp || true`';\
+	echo -E 'CPP=$${CPP:-cpp}';\
+	echo -E '';\
+	echo -E 'VAR_DB=`echo | $$CPP -include paths.h -dD | awk '\''$$1 == "#define" && $$2 == "_PATH_VARDB" { print $$3 }'\'' | tr -d '\''"'\'' || true`';\
+	echo -E 'VAR_DB=$${VAR_DB%/}';\
+	echo -E 'VAR_DB=$${VAR_DB:-/var/db}';\
+	echo -E '';\
+	echo -E 'echo $$VAR_DB > VAR_DB';\
+	echo -E '';\
+	echo -E 'if ! [ -f backup-stamp ]; then';\
+	echo -E '    for f in ABOUT-NLS Makefile.am Makefile.in acconfig.h aclocal.m4 config.guess     config.h.in config.sub configure configure.in ltmain.sh mkinstalldirs     src/Makefile.in; do';\
+	echo -E '        if ! [ -e $$f.bak ]; then';\
+	echo -E '            cp -a $$f $$f.bak';\
+	echo -E '        fi';\
+	echo -E '    done';\
+	echo -E '    sleep 1 && touch backup-stamp';\
+	echo -E 'fi';\
+	echo -E '';\
+	echo -E 'if ! [ gettextize-stamp -nt backup-stamp ]; then';\
+	echo -E '    perl -MIPC::Run=start,pump -e '\''';\
+	echo -E '        @rs = qw(gettextize --force --copy --no-changelog --intl);';\
+	echo -E '        $$h=start \@rs, \$$in, \$$out;';\
+	echo -E '        until ($$out =~ /Press Return to acknowledge/) { pump $$h; print "\r$$out"; flush STDOUT; }'\''';\
+	echo -E '    rm -f *~ intl/*~ m4/*.in';\
+	echo -E '    sleep 1 && touch gettextize-stamp';\
+	echo -E 'fi';\
+	echo -E '';\
+	echo -E 'if ! [ autoconf-stamp -nt gettextize-stamp ]; then';\
+	echo -E '    rm -f acconfig.h aclocal.m4 config.h.in configure ltmain.sh';\
+	echo -E '    cp po/Makevars.template po/Makevars';\
+	echo -E '    perl -MIPC::Run=start -e '\''';\
+	echo -E '        @rs = qw(gettextize --force --copy --no-changelog --intl);';\
+	echo -E '        $$h=start \@rs, \$$in, \$$out;';\
+	echo -E '        until ($$out =~ /Press Return to acknowledge/) { $$h->pump; print "\r$$out"; flush STDOUT; }';\
+	echo -E '	 $$h->kill_kill;'\''';\
+	echo -E '    rm -f *~ intl/*~ m4/*.in';\
+	echo -E '    libtoolize --force --copy';\
+	echo -E '    aclocal-1.9 -I m4';\
+	echo -E '    autoheader';\
+	echo -E '    automake-1.9 --add-missing --copy';\
+	echo -E '    autoconf';\
+	echo -E '    cp /usr/share/misc/config.guess .';\
+	echo -E '    cp /usr/share/misc/config.sub .';\
+	echo -E '    sleep 1 && touch autoconf-stamp';\
+	echo -E 'fi';\
+	echo -E '';\
+	echo -E 'if ! [ configure-stamp -nt autoconf-stamp ]; then';\
+	echo -E '    test -d build || mkdir build';\
+	echo -E '    pushd build';\
+	echo -E '        CC="$$CC" CFLAGS="$$CFLAGS"';\
+	echo -E '            ../configure \';\
+	echo -E '                --prefix=/usr \';\
+	echo -E '                $$WITH_SELINUX';\
+	echo -E '    popd';\
+	echo -E '    sleep 1 && touch configure-stamp';\
+	echo -E 'fi';\
+	echo -E '';\
+	echo -E 'if ! [ build-stamp -nt configure-stamp ]; then';\
+	echo -E '    pushd build';\
+	echo -E '        make';\
+	echo -E '        if ! [ makedb.1 -nt debian/man/makedb.pod ]; then';\
+	echo -E '            pod2man --center="Debian GNU/Linux" --release="Debian" ../debian/man/makedb.pod makedb.1';\
+	echo -E '        fi';\
+	echo -E '        if ! [ libnss-db.default -nt debian/conf/default ]; then';\
+	echo -E '            sed '\''s|@VAR_DB@|'\''"$$VAR_DB"'\''|g'\'' ../debian/conf/default > libnss-db.default.new';\
+	echo -E '        mv -f libnss-db.default.new libnss-db.default';\
+	echo -E '        fi';\
+	echo -E '    popd';\
+	echo -E '    sleep 1 && touch build-stamp';\
+	echo -E 'fi') | /bin/bash
+	touch debian/build-stamp
+
+debian/build-arch-stamp:
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	yada patch "debian/patches/*.patch"
+	touch debian/build-arch-stamp
+
+debian/build-indep-stamp: debian/build-arch-stamp
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	yada patch "debian/patches/*.patch"
+	touch debian/build-indep-stamp
+
+.PHONY: install-tree
+install-tree: install-tree-any
+install-tree-any: \
+	debian/tmp-libnss-db/DEBIAN/control
+
+debian/tmp-libnss-db/DEBIAN/control: debian/build-stamp debian/control
+	rm -rf debian/tmp-libnss-db
+	umask 022 && install -d debian/tmp-libnss-db/DEBIAN
+	install -d debian/tmp-libnss-db/usr/share/doc/libnss-db
+	umask 022; yada generate copyright libnss-db \
+	  > debian/tmp-libnss-db/usr/share/doc/libnss-db/copyright
+	install -m 644 -p debian/changelog \
+	  debian/tmp-libnss-db/usr/share/doc/libnss-db/changelog.Debian
+	@umask 022 \
+	  && export pwd="$$(pwd)" \
+	  && export ROOT="$$(pwd)/debian/tmp-libnss-db" \
+	  && export TMPROOT="$$(pwd)/debian/tmp" \
+	  && export CONTROL="$$(pwd)/debian/tmp-libnss-db/DEBIAN" \
+	  && export PACKAGE="libnss-db" \
+	  && export SOURCE="libnss-db" \
+	  && export VERSION="$(VERSION)" \
+	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	  && 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) \"\$$@\"; }"; set -e; set -v';\
+	echo -E 'VAR_DB=$$(cat VAR_DB)';\
+	echo -E 'pushd build';\
+	echo -E '    make install DESTDIR=$$ROOT slibdir=/usr/lib';\
+	echo -E '    chmod -x $$ROOT/usr/lib/*.so';\
+	echo -E '    yada install -conf -as libnss-db -into /etc/default libnss-db.default';\
+	echo -E '    yada install -man makedb.1';\
+	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/bash
+	@umask 022 \
+	  && export pwd="$$(pwd)" \
+	  && export ROOT="$$(pwd)/debian/tmp-libnss-db" \
+	  && export TMPROOT="$$(pwd)/debian/tmp" \
+	  && export CONTROL="$$(pwd)/debian/tmp-libnss-db/DEBIAN" \
+	  && export PACKAGE="libnss-db" \
+	  && export SOURCE="libnss-db" \
+	  && export VERSION="$(VERSION)" && (\
+	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
+	echo -E 'yada perl';\
+	echo -E 'yada python';\
+	echo -E 'yada strip';\
+	echo -E 'yada shlibdeps') | /bin/sh
+	yada compress libnss-db
+	yada generate maintscripts libnss-db
+	find debian/tmp-libnss-db -type f -print \
+	  | sed -n 's/^debian\/tmp-libnss-db\(\/etc\/.*\)$$/\1/p' \
+	  > debian/tmp-libnss-db/DEBIAN/conffiles
+	test -s debian/tmp-libnss-db/DEBIAN/conffiles || rm -f debian/tmp-libnss-db/DEBIAN/conffiles
+	yada rebuild control
+	yada generate substvars libnss-db
+	umask 022 && dpkg-gencontrol -isp -plibnss-db -Pdebian/tmp-libnss-db
+
+# Build package files
+
+.PHONY: binary binary-arch binary-indep
+binary: binary-arch binary-indep
+binary-arch: binary-arch-any
+
+.PHONY: binary-arch-any
+binary-arch-any: \
+	binary-package-libnss-db
+binary-indep:
+
+.PHONY: binary-package-libnss-db
+binary-package-libnss-db: check-root debian/tmp-libnss-db/DEBIAN/control
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	chown -R 0.0 debian/tmp-libnss-db
+	chmod -R u=rwX,go=rX debian/tmp-libnss-db
+	@if [ -d debian/tmp-libnss-db/usr/doc/libnss-db ]; then \
+	  echo "*** Yada warning: /usr/doc/libnss-db should be /usr/share/doc/libnss-db";\
+	fi
+	dpkg-deb --build debian/tmp-libnss-db ..
+
+.PHONY: check-root
+check-root:
+	@[ `id -u` = 0 ] || (echo "You must be root to do this!"; false)
+
+debian/packages-tmp: debian/packages 
+	yada rebuild packages
+
+## Clean up afterwards
+
+.PHONY: clean clean-install-tree clean-build
+
+clean: clean-install-tree clean-build debian/control debian/rules
+	rm -f debian/packages-tmp debian/packages-tmp-new debian/packages-tmp-include
+
+clean-build:
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	rm -f debian/build-stamp debian/build-arch-stamp debian/build-indep-stamp
+	@umask 022 \
+	  && export pwd="$$(pwd)" \
+	  && export TMPROOT="$$(pwd)/debian/tmp" \
+	  && export SOURCE="libnss-db" \
+	  && export VERSION="$(VERSION)" \
+	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
+	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
+	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
+	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
+	  && 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) \"\$$@\"; }"; set -e; set -v';\
+	echo -E 'rm -rf build || true';\
+	echo -E 'for f in ABOUT-NLS Makefile.am Makefile.in acconfig.h aclocal.m4 config.guess     config.h.in config.sub configure configure.in ltmain.sh mkinstalldirs     src/Makefile.in; do';\
+	echo -E '    test -e $$f.bak && test -e $$f && rm -rf $$f';\
+	echo -E '    test -e $$f.bak && mv -f $$f.bak $$f';\
+	echo -E 'done';\
+	echo -E 'rm -f *-stamp || true';\
+	echo -E 'rm -rf Makefile.in~ VAR_DB autom4te.cache configure.in~ depcomp     libnss-db.default libnss-db.default.new depconf makedb.1     m4/Makefile.in po/pl.gmo po/Makevars src/db-compat-copy-makedb.c || true') | /bin/sh
+	yada unpatch
+	rm -rf debian/tmp
+
+clean-install-tree: debian/rules
+	@[ -f $(shell which yada) -a -f debian/rules ]
+	rm -f debian/install-tree-stamp
+	rm -rf debian/tmp-* debian/files* debian/substvars debian/shlibs.local debian/ucf
--- libnss-db-2.2.3pre1.orig/debian/control
+++ libnss-db-2.2.3pre1/debian/control
@@ -0,0 +1,19 @@
+Source: libnss-db
+Maintainer: Piotr Roszatycki <dexter@debian.org>
+Section: admin
+Priority: standard
+Standards-Version: 3.7.3
+Build-Depends: autoconf, automake1.9, autotools-dev, libtool, gettext, libipc-run-perl, perl, libdb4.6-dev, libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], yada (>= 0.54)
+Homepage: http://www.gnu.org/software/libc/
+Vcs-Browser: http://svn.debian.org/wsvn/cvsdebuild/libnss-db/
+Vcs-Svn: svn://svn.debian.org/cvsdebuild/libnss-db
+
+Package: libnss-db
+Architecture: any
+Depends: make, ${libnss-db:Depends}
+Description: NSS module for using Berkeley Databases as a naming service
+ nss_db is a set of C library extensions which allow Berkeley Databases
+ to be used as a primary source of aliases, ethers, groups, hosts,
+ 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.
--- libnss-db-2.2.3pre1.orig/debian/packages
+++ libnss-db-2.2.3pre1/debian/packages
@@ -0,0 +1,200 @@
+# If the debian/rules or debian/control file is missing, rebuild the file:
+#
+#   $ yada rebuild control
+#   $ yada rebuild rules
+
+
+%define autoconf_version
+%define automake_version 1.9
+%define libdb_version 4.6
+
+%define backup_files \
+    ABOUT-NLS Makefile.am Makefile.in acconfig.h aclocal.m4 config.guess \
+    config.h.in config.sub configure configure.in ltmain.sh mkinstalldirs \
+    src/Makefile.in
+%define clean_files \
+    Makefile.in~ VAR_DB autom4te.cache configure.in~ depcomp \
+    libnss-db.default libnss-db.default.new depconf makedb.1 \
+    m4/Makefile.in po/pl.gmo po/Makevars src/db-compat-copy-makedb.c
+
+# Other macros:
+#   autoconf_version=%{autoconf_version}
+#   automake_version=%{automake_version}
+#   libdb_version=%{libdb_version}
+#   backup_files=%{backup_files}
+#   clean_files=%{clean_files}
+
+
+Source: libnss-db
+Section: admin
+Priority: standard
+Maintainer: Piotr Roszatycki <dexter@debian.org>
+Standards-Version: 3.7.3
+Upstream-Source: <URL:ftp://sources.redhat.com/pub/glibc/releases/nss_db-(.*)\.tar.gz>
+%if %`dpkg --compare-versions %{YADA_VERSION} ge 0.54 && echo 1`
+Homepage: http://www.gnu.org/software/libc/
+Vcs-Browser: http://svn.debian.org/wsvn/cvsdebuild/libnss-db/
+Vcs-Svn: svn://svn.debian.org/cvsdebuild/libnss-db
+%endif
+Description: NSS module for using Berkeley Databases as a naming service
+Copyright: GPL
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# autoconf-stamp
+Build-Depends: autoconf%{autoconf_version}, automake%{automake_version}, autotools-dev
+# libtoolize
+Build-Depends: libtool
+# gettextize
+Build-Depends: gettext
+# IPC::Run (gettextize does not allow to run in batch)
+Build-Depends: libipc-run-perl
+# pod2man
+Build-Depends: perl
+# Berkeley DB library
+Build-Depends: libdb%{libdb_version}-dev
+# --with-selinux
+Build-Depends: libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
+Patches: patches/*.patch
+Major-Changes:
+%`cd debian/patches; ls *.patch | sed -e 's/^/ /'`
+Build: bash
+ CC=${CC:-gcc}
+ CFLAGS=${CFLAGS:--Wall -pedantic -g}
+ if [ "${DEB_BUILD_OPTIONS#*noopt}" != "$DEB_BUILD_OPTIONS" ]; then
+     CFLAGS="$CFLAGS -O0"
+ else
+     CFLAGS="$CFLAGS -O2"
+ fi
+ if [ "$DEB_HOST_ARCH_OS" = "linux" ]; then
+     WITH_SELINUX="--with-selinux"
+ fi
+ .
+ CPP=`$CC -print-prog-name=cpp || true`
+ CPP=${CPP:-cpp}
+ .
+ VAR_DB=`echo | $CPP -include paths.h -dD | awk '$1 == "#define" && $2 == "_PATH_VARDB" { print $3 }' | tr -d '"' || true`
+ VAR_DB=${VAR_DB%/}
+ VAR_DB=${VAR_DB:-/var/db}
+ .
+ echo $VAR_DB > VAR_DB
+ .
+ if ! [ -f backup-stamp ]; then
+     for f in %{backup_files}; do
+         if ! [ -e $f.bak ]; then
+             cp -a $f $f.bak
+         fi
+     done
+     sleep 1 && touch backup-stamp
+ fi
+ .
+ if ! [ gettextize-stamp -nt backup-stamp ]; then
+     perl -MIPC::Run=start,pump -e '
+         @rs = qw(gettextize --force --copy --no-changelog --intl);
+         $h=start \@rs, \$in, \$out;
+         until ($out =~ /Press Return to acknowledge/) { pump $h; print "\r$out"; flush STDOUT; }'
+     rm -f *~ intl/*~ m4/*.in
+     sleep 1 && touch gettextize-stamp
+ fi
+ .
+ if ! [ autoconf-stamp -nt gettextize-stamp ]; then
+     rm -f acconfig.h aclocal.m4 config.h.in configure ltmain.sh
+     cp po/Makevars.template po/Makevars
+     perl -MIPC::Run=start -e '
+         @rs = qw(gettextize --force --copy --no-changelog --intl);
+         $h=start \@rs, \$in, \$out;
+         until ($out =~ /Press Return to acknowledge/) { $h->pump; print "\r$out"; flush STDOUT; }
+ 	 $h->kill_kill;'
+     rm -f *~ intl/*~ m4/*.in
+     libtoolize --force --copy
+     aclocal-%{automake_version} -I m4
+     autoheader
+     automake-%{automake_version} --add-missing --copy
+     autoconf
+     cp /usr/share/misc/config.guess .
+     cp /usr/share/misc/config.sub .
+     sleep 1 && touch autoconf-stamp
+ fi
+ .
+ if ! [ configure-stamp -nt autoconf-stamp ]; then
+     test -d build || mkdir build
+     pushd build
+         CC="$CC" CFLAGS="$CFLAGS"
+             ../configure \
+                 --prefix=/usr \
+                 $WITH_SELINUX
+     popd
+     sleep 1 && touch configure-stamp
+ fi
+ .
+ if ! [ build-stamp -nt configure-stamp ]; then
+     pushd build
+         make
+         if ! [ makedb.1 -nt debian/man/makedb.pod ]; then
+             pod2man --center="Debian GNU/Linux" --release="Debian" ../debian/man/makedb.pod makedb.1
+         fi
+         if ! [ libnss-db.default -nt debian/conf/default ]; then
+             sed 's|@VAR_DB@|'"$VAR_DB"'|g' ../debian/conf/default > libnss-db.default.new
+         mv -f libnss-db.default.new libnss-db.default
+         fi
+     popd
+     sleep 1 && touch build-stamp
+ fi
+Clean: sh
+ rm -rf build || true
+ for f in %{backup_files}; do
+     test -e $f.bak && test -e $f && rm -rf $f
+     test -e $f.bak && mv -f $f.bak $f
+ done
+ rm -f *-stamp || true
+ rm -rf %{clean_files} || true
+
+Package: libnss-db
+Architecture: any
+Depends: make, []
+Description: NSS module for using Berkeley Databases as a naming service
+ nss_db is a set of C library extensions which allow Berkeley Databases
+ to be used as a primary source of aliases, ethers, groups, hosts,
+ 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: bash
+ VAR_DB=$(cat VAR_DB)
+ pushd build
+     make install DESTDIR=$ROOT slibdir=/usr/lib
+     chmod -x $ROOT/usr/lib/*.so
+     yada install -conf -as libnss-db -into /etc/default libnss-db.default
+     yada install -man makedb.1
+ popd
+ yada install -data -as Makefile -into $VAR_DB debian/scripts/db-Makefile
+ yada install -doc -as changelog ChangeLog
+ yada install -doc NEWS README
+Postinst: sh
+ if [ "$1" = "configure" ]; then
+     if [ -n "$2" ]; then
+         if dpkg --compare-versions $2 lt 2.1.1-12 && \
+            dpkg --compare-versions $2 gt 2.1.1-0pre1.3
+         then
+             if [ -f /var/db/passwd.db ]; then
+                 mv /var/db /var/db.old
+                 ln -sf /var/lib/misc /var/db
+                 cp -a /var/db.old/*.db /var/lib/misc/.
+                 rm -rf /var/db.old
+             elif [ -f /var/state/glibc/passwd.db ]; then
+                 mv /var/state/glibc /var/state/glibc.old
+                 ln -sf /var/lib/misc /var/state/glibc
+                 cp -a /var/state/glibc.old/*.db /var/lib/misc/.
+                 rm -rf /var/state/glibc.old
+             fi
+         fi
+     fi
+     if [ -x /etc/init.d/nscd ]; then
+         if [ -x /usr/sbin/invoke-rc.d ]; then
+            invoke-rc.d nscd restart
+        else
+            /etc/init.d/nscd restart
+        fi
+     fi
+ fi
+Contains: libs
+Overrides:
+ non-dev-pkg-with-shlib-symlink usr/lib/libnss_db-2.2.3.so usr/lib/libnss_db.so
+ no-shlibs-control-file usr/lib/libnss_db-2.2.3.so
--- libnss-db-2.2.3pre1.orig/debian/man/makedb.pod
+++ libnss-db-2.2.3pre1/debian/man/makedb.pod
@@ -0,0 +1,57 @@
+=head1 NAME
+
+makedb - Create simple DB database from textual input.
+
+=head1 SYNOPSIS
+
+B<makedb> B<[> I<options> B<]> I<INPUT-FILE> I<OUTPUT-FILE>
+
+B<makedb> B<[> I<options> B<]> B<-o> I<OUTPUT-FILE> I<INPUT-FILE>
+
+B<makedb> B<[> I<options> B<]> B<-u> I<INPUT-FILE>
+
+=head1 DESCRIPTION
+
+This program is mainly used to generate database files for the
+libnss_db.so module for the Name Service Switch.
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<-f>, B<--fold-case>
+
+Convert key to lower case.
+
+=item B<-o>, B<--output> I<OUTPUT-FILE>
+
+Write output to file I<OUTPUT-FILE>
+
+=item B<-q>, B<--quiet>
+
+Do not print messages while building database.
+
+=item B<-u>, B<--undo>
+
+Print content of database file, one entry a line
+
+=item B<-?>, B<--help>
+
+Give help message.
+
+=item B<--usage>
+
+Give a short usage message.
+
+=item B<-V>, B<--version>
+
+Print program version.
+
+=back
+
+=head1 AUTHOR
+
+I<makedb> was written by Ulrich Drepper for the GNU C Library.
+
+This manpage was written by Ben Collins E<lt>bcollins@debian.orgE<gt> for
+the Debian GNU/Linux system.
--- libnss-db-2.2.3pre1.orig/debian/conf/default
+++ libnss-db-2.2.3pre1/debian/conf/default
@@ -0,0 +1,14 @@
+# Default settings for libnss-db
+
+# Location of files
+ETC = /etc
+
+# Databases to generate
+DBS = passwd group ethers protocols rpc services shadow netgroup
+
+# Directory where the databases are kept
+VAR_DB = @VAR_DB@
+
+# Programs used
+AWK = awk
+MAKEDB = makedb --quiet
--- libnss-db-2.2.3pre1.orig/debian/scripts/db-Makefile
+++ libnss-db-2.2.3pre1/debian/scripts/db-Makefile
@@ -0,0 +1,138 @@
+# Makefile to (re-)generate db versions of system database files.
+# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB.  If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.  */
+
+
+# XXX: Do not edit this file, it will be overwritten on upgrades. Instead
+# edit /etc/default/libnss-db.
+
+include /etc/default/libnss-db
+
+DATABASES = $(wildcard $(addprefix $(ETC)/,$(DBS)))
+
+all: $(patsubst %,$(VAR_DB)/%.db,$(notdir $(DATABASES)))
+
+
+$(VAR_DB)/passwd.db: $(ETC)/passwd
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { FS=":"; OFS=":"; cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s ", $$1; print; \
+			   printf "=%s ", $$3; print }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
+
+$(VAR_DB)/group.db: $(ETC)/group
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { FS=":"; OFS=":"; cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s ", $$1; print; \
+			   printf "=%s ", $$3; print }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
+
+$(VAR_DB)/ethers.db: $(ETC)/ethers
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s ", $$1; print; \
+			   printf "=%s ", $$2; print }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
+
+$(VAR_DB)/protocols.db: $(ETC)/protocols
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s ", $$1; print; \
+			   printf "=%s ", $$2; print; \
+			   for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+			     { printf ".%s ", $$i; print } }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
+
+$(VAR_DB)/rpc.db: $(ETC)/rpc
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s ", $$1; print; \
+			   printf "=%s ", $$2; print; \
+			   for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+			     { printf ".%s ", $$i; print } }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
+
+$(VAR_DB)/services.db: $(ETC)/services
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { FS="[ \t/]+"; cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s/%s ", $$1, $$3; print; \
+			   printf ".%s/ ", $$1; print; \
+			   printf "=%s/%s ", $$2, $$3; print; \
+			   printf "=%s/ ", $$2; print; \
+			   for (i = 4; i <= NF && !($$i ~ /^#/); ++i) \
+			     { printf ".%s/%s ", $$i, $$3; print; \
+			       printf ".%s/ ", $$i; print } }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
+
+$(VAR_DB)/shadow.db: $(ETC)/shadow
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { FS=":"; OFS=":"; cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { printf ".%s ", $$1; print }' $^ | \
+	(umask 077 && $(MAKEDB) -o $@ -)
+	@echo "done."
+	@if chgrp shadow $@ 2>/dev/null; then \
+	  chmod g+r $@; \
+	else \
+	  chown 0 $@; chgrp 0 $@; chmod 600 $@; \
+	  echo; \
+	  echo "Warning: The shadow password database $@"; \
+	  echo "has been set to be readable only by root.  You may want"; \
+	  echo "to make it readable by the \`shadow' group depending"; \
+	  echo "on your configuration."; \
+	  echo; \
+	fi
+
+$(VAR_DB)/netgroup.db: $(ETC)/netgroup
+	@echo -n "$(patsubst %.db,%,$(@F))... "
+	@$(AWK) 'BEGIN { cnt=0 } \
+		 /^[ \t]*$$/ { next } \
+		 /^[ \t]*#/ { next } \
+		 { printf "0%u ", cnt++; print } \
+		 /^[^#]/ { end=sub(/\\/, " "); \
+			   gsub(/[ \t]+/, " "); \
+			   if(end == 1) printf "%s", $$0; else print }' $^ | \
+	(umask 022 && $(MAKEDB) -o $@ -)
+	@echo "done."
--- libnss-db-2.2.3pre1.orig/debian/patches/030-no_internal_libc.patch
+++ libnss-db-2.2.3pre1/debian/patches/030-no_internal_libc.patch
@@ -0,0 +1,279 @@
+nss_db is now external to libc, so it doesn't get to use internal interfaces.
+
+diff -Nru nss_db-2.2.3pre1.orig/src/db-alias.c nss_db-2.2.3pre1/src/db-alias.c
+--- nss_db-2.2.3pre1.orig/src/db-alias.c	2001-04-30 03:07:41.000000000 +0200
++++ nss_db-2.2.3pre1/src/db-alias.c	2005-07-09 14:21:40.271666576 +0200
+@@ -23,15 +23,14 @@
+ #include <ctype.h>
+ #include <errno.h>
+ #include <paths.h>
++#include <pthread.h>
+ #include <stdio.h>
+ #include <string.h>
+ 
+-#include <bits/libc-lock.h>
+-
+ #include "nss_db.h"
+ 
+ /* Locks the static variables in this file.  */
+-__libc_lock_define_initialized (static, lock)
++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ 
+ /* Maintenance of the shared handle open on the database.  */
+ 
+@@ -46,7 +45,7 @@
+ {
+   enum nss_status status;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   status = internal_setent (_PATH_VARDB "aliases.db", &db);
+ 
+@@ -57,7 +56,7 @@
+   /* Reset the sequential index.  */
+   entidx = 0;
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ }
+@@ -67,14 +66,14 @@
+ enum nss_status
+ _nss_db_endaliasent (void)
+ {
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   internal_endent (&db);
+ 
+   /* Reset STAYOPEN flag.  */
+   keep_db = 0;
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return NSS_STATUS_SUCCESS;
+ }
+@@ -180,14 +179,14 @@
+   char buf[20];
+   DBT key;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+   key.size = snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
+   key.flags = 0;
+   status = lookup (&key, result, buffer, buflen, errnop);
+   if (status == NSS_STATUS_TRYAGAIN && *errnop == ERANGE)
+     /* Give the user a chance to get the same entry with a larger buffer.  */
+     --entidx;
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ }
+@@ -207,9 +206,9 @@
+   memcpy (&((char *) key.data)[1], name, key.size - 1);
+   key.flags = 0;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+   status = lookup (&key, result, buffer, buflen, errnop);
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ }
+diff -Nru nss_db-2.2.3pre1.orig/src/db-netgrp.c nss_db-2.2.3pre1/src/db-netgrp.c
+--- nss_db-2.2.3pre1.orig/src/db-netgrp.c	2001-04-30 03:07:41.000000000 +0200
++++ nss_db-2.2.3pre1/src/db-netgrp.c	2005-07-09 14:21:40.276665816 +0200
+@@ -21,8 +21,8 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <netgroup.h>
++#include <pthread.h>
+ #include <string.h>
+-#include <bits/libc-lock.h>
+ #include <paths.h>
+ 
+ #include "nss_db.h"
+@@ -32,7 +32,7 @@
+ 
+ 
+ /* Locks the static variables in this file.  */
+-__libc_lock_define_initialized (static, lock)
++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ 
+ /* Maintenance of the shared handle open on the database.  */
+ static DB *db;
+@@ -44,7 +44,7 @@
+ {
+   enum nss_status status;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   status = internal_setent (DBFILE, &db);
+ 
+@@ -60,7 +60,7 @@
+ 	cursor = entry = value.data;
+     }
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ 
+@@ -70,11 +70,11 @@
+ enum nss_status
+ _nss_db_endnetgrent (void)
+ {
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   internal_endent (&db);
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return NSS_STATUS_SUCCESS;
+ }
+@@ -91,11 +91,11 @@
+ {
+   int status;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   status = _nss_netgroup_parseline (&cursor, result, buffer, buflen, errnop);
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ }
+diff -Nru nss_db-2.2.3pre1.orig/src/db-open.c nss_db-2.2.3pre1/src/db-open.c
+--- nss_db-2.2.3pre1.orig/src/db-open.c	2001-04-30 03:07:41.000000000 +0200
++++ nss_db-2.2.3pre1/src/db-open.c	2005-07-09 14:21:40.277665664 +0200
+@@ -58,7 +58,7 @@
+   if (err != 0)
+     {
+       if (err > 0)
+-	__set_errno (err);
++	errno = err;
+       return NSS_STATUS_UNAVAIL;
+     }
+ 
+@@ -75,7 +75,7 @@
+  fail:
+   db->close (db, 0);
+   if (err > 0)
+-    __set_errno (err);
++    errno = err;
+   return NSS_STATUS_UNAVAIL;
+ }
+ 
+diff -Nru nss_db-2.2.3pre1.orig/src/db-XXX.c nss_db-2.2.3pre1/src/db-XXX.c
+--- nss_db-2.2.3pre1.orig/src/db-XXX.c	2001-04-30 03:07:41.000000000 +0200
++++ nss_db-2.2.3pre1/src/db-XXX.c	2005-07-09 14:21:40.269666880 +0200
+@@ -21,11 +21,10 @@
+ #include <ctype.h>
+ #include <db.h>
+ #include <netdb.h>
++#include <pthread.h>
+ #include <stdio.h>
+ #include <string.h>
+ 
+-#include <bits/libc-lock.h>
+-
+ #include "nss_db.h"
+ 
+ /* These symbols are defined by the including source file:
+@@ -53,7 +52,7 @@
+ #endif
+ 
+ /* Locks the static variables in this file.  */
+-__libc_lock_define_initialized (static, lock)
++static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ 
+ /* Maintenance of the shared handle open on the database.  */
+ 
+@@ -68,7 +67,7 @@
+ {
+   enum nss_status status;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   status = internal_setent (DBFILE, &db);
+ 
+@@ -78,7 +77,7 @@
+   /* Reset the sequential index.  */
+   entidx = 0;
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ }
+@@ -88,14 +87,14 @@
+ enum nss_status
+ CONCAT(_nss_db_end,ENTNAME) (void)
+ {
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   internal_endent (&db);
+ 
+   /* Reset STAYOPEN flag.  */
+   keep_db = 0;
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return NSS_STATUS_SUCCESS;
+ }
+@@ -227,10 +226,10 @@
+   key.data = alloca (size);						      \
+   key.size = KEYPRINTF keypattern;					      \
+   key.flags = 0;							      \
+-  __libc_lock_lock (lock);						      \
++  pthread_mutex_lock (&lock);						      \
+   status = lookup (&key, result, buffer, buflen, errnop H_ERRNO_ARG	      \
+ 		   EXTRA_ARGS_VALUE);					      \
+-  __libc_lock_unlock (lock);						      \
++  pthread_mutex_unlock (&lock);					      \
+   return status;							      \
+ }
+ 
+@@ -249,7 +248,7 @@
+   char buf[20];
+   DBT key;
+ 
+-  __libc_lock_lock (lock);
++  pthread_mutex_lock (&lock);
+ 
+   /* Loop until we find a valid entry or hit EOF.  See above for the
+      special meaning of the status value.  */
+@@ -270,7 +269,7 @@
+     }
+   while (status == NSS_STATUS_RETURN);
+ 
+-  __libc_lock_unlock (lock);
++  pthread_mutex_unlock (&lock);
+ 
+   return status;
+ }
+diff -Nru nss_db-2.2.3pre1.orig/src/Makefile.am nss_db-2.2.3pre1/src/Makefile.am
+--- nss_db-2.2.3pre1.orig/src/Makefile.am	2001-04-30 03:19:31.000000000 +0200
++++ nss_db-2.2.3pre1/src/Makefile.am	2005-07-09 14:21:51.297990320 +0200
+@@ -11,7 +11,7 @@
+ 
+ noinst_HEADERS = db-compat.h netgroup.h nss_db.h
+ 
+-INCLUDES = @DB_CFLAGS@ -D_LIBC -D_GNU_SOURCE \
++INCLUDES = @DB_CFLAGS@ -D_GNU_SOURCE \
+ 	-I../intl -DLOCALEDIR=\"$(localedir)\"
+ 
+ EXTRA_DIST = libnss_db.map
--- libnss-db-2.2.3pre1.orig/debian/patches/090-automake_AC_CANONICAL_HOST.patch
+++ libnss-db-2.2.3pre1/debian/patches/090-automake_AC_CANONICAL_HOST.patch
@@ -0,0 +1,13 @@
+Remove AC_CANONICAL_HOST for new automake
+
+diff -urN nss_db-2.2.3pre1.orig/configure.in nss_db-2.2.3pre1/configure.in
+--- nss_db-2.2.3pre1.orig/configure.in	2001-04-30 03:44:40.000000000 +0200
++++ nss_db-2.2.3pre1/configure.in	2005-07-09 12:14:20.959018624 +0200
+@@ -73,7 +73,6 @@
+ *** Unsupported Berkeley DB version detected.])
+ fi
+ 
+-AC_CANONICAL_HOST
+ slibdir=NONE
+ case "$host" in
+ *-linux*)
--- libnss-db-2.2.3pre1.orig/debian/patches/100-automake_libtool.patch
+++ libnss-db-2.2.3pre1/debian/patches/100-automake_libtool.patch
@@ -0,0 +1,18 @@
+Automake doesn't know how to compile a single file both with and without
+libtool.  So fake it.
+
+--- nss_db-2.2.orig/src/Makefile.am	2003-12-02 16:21:00.000000000 -0500
++++ nss_db-2.2/src/Makefile.am	2003-12-02 16:20:55.000000000 -0500
+@@ -27,8 +27,11 @@
+ libnss_db_la_LIBADD = @DB_LIBS@ -lnss_files
+ 
+ bin_PROGRAMS = makedb
+-makedb_SOURCES = makedb.c db-compat.c
++makedb_SOURCES = makedb.c db-compat-copy-makedb.c
+ makedb_LDADD = @DB_LIBS@ @LIBINTL@ @SELINUX_LIBS@
++db-compat-copy-makedb.c: db-compat.c
++	cp $^ $@
++	chmod -w $@
+ 
+ # To mimmick the old glibc installation as closely as possible, we
+ # shuffle the installed library and the links to it around a bit,
--- libnss-db-2.2.3pre1.orig/debian/patches/080-translations.patch
+++ libnss-db-2.2.3pre1/debian/patches/080-translations.patch
@@ -0,0 +1,259 @@
+Missing translations for makedb
+
+diff -Nru nss_db-2.2.3pre1.orig/configure.in nss_db-2.2.3pre1/configure.in
+--- nss_db-2.2.3pre1.orig/configure.in	2001-04-30 03:44:40.000000000 +0200
++++ nss_db-2.2.3pre1/configure.in	2005-07-09 16:18:38.503733128 +0200
+@@ -4,7 +4,7 @@
+ AM_CONFIG_HEADER(config.h)
+ 
+ dnl Set of available languages.
+-ALL_LINGUAS="de nl"
++ALL_LINGUAS="de nl pl sv"
+ 
+ # Check for a --with-db argument.
+ AC_ARG_WITH(db, dnl
+diff -Nru nss_db-2.2.3pre1.orig/src/Makefile.am nss_db-2.2.3pre1/src/Makefile.am
+--- nss_db-2.2.3pre1.orig/src/Makefile.am	2001-04-30 03:19:31.000000000 +0200
++++ nss_db-2.2.3pre1/src/Makefile.am	2005-07-09 16:45:04.896564760 +0200
+@@ -29,7 +29,7 @@
+ 
+ bin_PROGRAMS = makedb
+ makedb_SOURCES = makedb.c db-compat.c
+-makedb_LDADD = @DB_LIBS@ @INTLLIBS@ @SELINUX_LIBS@
++makedb_LDADD = @DB_LIBS@ @LIBINTL@ @SELINUX_LIBS@
+ 
+ # To mimmick the old glibc installation as closely as possible, we
+ # shuffle the installed library and the links to it around a bit,
+diff -Nru nss_db-2.2.3pre1.orig/po/pl.po nss_db-2.2.3pre1/po/pl.po
+--- nss_db-2.2.3pre1.orig/po/pl.po	1970-01-01 01:00:00.000000000 +0100
++++ nss_db-2.2.3pre1/po/pl.po	2005-07-09 14:12:57.788096152 +0200
+@@ -0,0 +1,112 @@
++# Polish messages for GNU nss_db.
++# Copyright (C) 2000 Free Software Foundation, Inc.
++# Piotr Roszatycki <dexter@debian.org>, 2005.
++#
++msgid ""
++msgstr ""
++"Project-Id-Version: nss_db 2.2.3pre1\n"
++"POT-Creation-Date: 2000-09-10 16:37+0200\n"
++"PO-Revision-Date: 2005-07-09 13:59+0200\n"
++"Last-Translator: Piotr Roszatycki <dexter@debian.org>\n"
++"Language-Team: Polish <debian-i18n-polish@lists.debian.org>\n"
++"MIME-Version: 1.0\n"
++"Content-Type: text/plain; charset=ISO-8859-2\n"
++"Content-Transfer-Encoding: 8-bit\n"
++
++#: src/makedb.c:68
++msgid "Convert key to lower case"
++msgstr "Zamiana klucza z wielkich na ma³e litery"
++
++#: src/makedb.c:69
++msgid "NAME"
++msgstr "PLIK"
++
++#: src/makedb.c:69
++msgid "Write output to file NAME"
++msgstr "Zapisywanie rezultatu do PLIKu"
++
++#: src/makedb.c:71
++msgid "Do not print messages while building database"
++msgstr "Omijanie komunikatów podczas tworzenia bazy danych"
++
++#: src/makedb.c:73
++msgid "Print content of database file, one entry a line"
++msgstr "Wydruk zawarto¶ci pliku bazy danych; jedna linia na pozycjê"
++
++#. Short description of program.
++#: src/makedb.c:78
++msgid "Create simple DB database from textual input."
++msgstr "Utworzenie pliku bazy danych DB na podstawie danych tekstowych."
++
++#. Strings for arguments in help texts.
++#: src/makedb.c:81
++msgid ""
++"INPUT-FILE OUTPUT-FILE\n"
++"-o OUTPUT-FILE INPUT-FILE\n"
++"-u INPUT-FILE"
++msgstr ""
++"PLIK-WEJ¦CIOWY PLIK-WYJ¦CIOWY\n"
++"-o PLIK-WYJ¦CIOWY PLIK-WEJ¦CIOWY\n"
++"-u PLIK-WEJ¦CIOWY"
++
++#: src/makedb.c:132
++msgid "wrong number of arguments"
++msgstr "z³a ilo¶æ argumentów"
++
++#: src/makedb.c:154
++#, c-format
++msgid "cannot open database file `%s': %s"
++msgstr "nie mo¿na otworzyæ pliku bazy danych `%s': %s"
++
++#: src/makedb.c:173
++#, c-format
++msgid "cannot open input file `%s'"
++msgstr "nie mo¿na otworzyæ pliku wej¶ciowego `%s'"
++
++#: src/makedb.c:187
++#, c-format
++msgid "cannot open output file `%s': %s"
++msgstr "nie mo¿na otworzyæ pliku wyj¶ciowego `%s': %s"
++
++#. We print some extra information.
++#: src/makedb.c:235
++msgid "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"
++msgstr ""
++"Ewentualne b³êdy prosimy zg³aszaæ wykorzystuj±c program `glibcbug'\n"
++"wysy³aj±c na adres <bugs@gnu.org>.\n"
++
++#: src/makedb.c:248
++#, c-format
++msgid ""
++"Copyright (C) %s Free Software Foundation, Inc.\n"
++"This is free software; see the source for copying conditions.  There is NO\n"
++"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
++msgstr ""
++"Copyright (C) %s Free Software Foundation, Inc.\n"
++"Ten program jest darmowy; warunki kopiowania s± opisane w ¼ród³ach.\n"
++"Autorzy nie daj± ¯ADNYCH gwarancji, w tym nawet gwarancji SPRZEDAWALNO¦CI\n"
++"lub PRZYDATNO¦CI DO KONKRETNYCH CELÓW.\n"
++
++#: src/makedb.c:253
++#, c-format
++msgid "Written by %s.\n"
++msgstr "Napisane przez %s.\n"
++
++#: src/makedb.c:330
++msgid "duplicate key"
++msgstr "powtórzony klucz"
++
++#: src/makedb.c:336
++#, c-format
++msgid "while writing database file: %s"
++msgstr "podczas zapisu pliku bazy danych: %s"
++
++#: src/makedb.c:348
++#, c-format
++msgid "problems while reading `%s'"
++msgstr "problem podczas czytania `%s'"
++
++#: src/makedb.c:371 src/makedb.c:389
++#, c-format
++msgid "while reading database: %s"
++msgstr "podczas odczytu bazy danych: %s"
+diff -Nru nss_db-2.2.3pre1.orig/po/sv.po nss_db-2.2.3pre1/po/sv.po
+--- libnss-db-2.2.3pre1.orig/po/sv.po
++++ libnss-db-2.2.3pre1/po/sv.po
+@@ -0,0 +1,113 @@
++# Swedish translation for libnss-db
++# Copyright (c) 2006 Free Software Foundation, Inc.
++# This file is distributed under the same license as the libnss-db package.
++# Daniel Nylander <po@danielnylander.se>, 2006.
++#
++#, fuzzy
++msgid ""
++msgstr ""
++"Project-Id-Version: libnss-db\n"
++"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
++"POT-Creation-Date: 2000-09-10 16:37+0200\n"
++"PO-Revision-Date: 2006-09-08 20:27+0000\n"
++"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
++"Language-Team: Swedish <sv@li.org>\n"
++"MIME-Version: 1.0\n"
++"Content-Type: text/plain; charset=UTF-8\n"
++"Content-Transfer-Encoding: 8bit\n"
++
++#: src/makedb.c:68
++msgid "Convert key to lower case"
++msgstr "Konvertera nyckel till gemen"
++
++#: src/makedb.c:69
++msgid "NAME"
++msgstr "NAMN"
++
++#: src/makedb.c:69
++msgid "Write output to file NAME"
++msgstr "Skriv utdata till filen NAMN"
++
++#: src/makedb.c:71
++msgid "Do not print messages while building database"
++msgstr "Visa inte meddelanden när databasen byggs"
++
++#: src/makedb.c:73
++msgid "Print content of database file, one entry a line"
++msgstr "Skriv ut innehåller i databasfilen, en post per rad"
++
++#: src/makedb.c:78
++msgid "Create simple DB database from textual input."
++msgstr "Skapa en enkelt DB-databas från textinmatning."
++
++#: src/makedb.c:81
++msgid ""
++"INPUT-FILE OUTPUT-FILE\n"
++"-o OUTPUT-FILE INPUT-FILE\n"
++"-u INPUT-FILE"
++msgstr ""
++"INDATAFIL UTDATAFIL\n"
++"-o UTDATAFIL INDATAFIL\n"
++"-u INDATAFIL"
++
++#: src/makedb.c:132
++msgid "wrong number of arguments"
++msgstr "fel antal argument"
++
++#: src/makedb.c:154
++#, c-format
++msgid "cannot open database file `%s': %s"
++msgstr "kan inte öppna databasfilen \"%s\": %s"
++
++#: src/makedb.c:173
++#, c-format
++msgid "cannot open input file `%s'"
++msgstr "kan inte öppna indatafilen \"%s\""
++
++#: src/makedb.c:187
++#, c-format
++msgid "cannot open output file `%s': %s"
++msgstr "kan inte öppna utdatafilen \"%s\": %s"
++
++#: src/makedb.c:235
++msgid "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"
++msgstr ""
++"Rapportera fel med skriptet \"glibcbug\" till <bugs@gnu.org>.\n"
++"Skicka synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
++
++#: src/makedb.c:248
++#, c-format
++msgid ""
++"Copyright (C) %s Free Software Foundation, Inc.\n"
++"This is free software; see the source for copying conditions.  There is NO\n"
++"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
++msgstr ""
++"Copyright © %s Free Software Foundation, Inc.\n"
++"Detta är fri programvara; se källkoden för kopieringsvillkor. Det finns "
++"INGEN\n"
++"garanti; inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR ETT SPECIFIKT "
++"ÄNDAMÅL.\n"
++
++#: src/makedb.c:253
++#, c-format
++msgid "Written by %s.\n"
++msgstr "Skrivet av %s.\n"
++
++#: src/makedb.c:330
++msgid "duplicate key"
++msgstr "dubblettnyckel"
++
++#: src/makedb.c:336
++#, c-format
++msgid "while writing database file: %s"
++msgstr "vid skrivning av databasfil: %s"
++
++#: src/makedb.c:348
++#, c-format
++msgid "problems while reading `%s'"
++msgstr "problem vid inläsning av \"%s\""
++
++#: src/makedb.c:371 src/makedb.c:389
++#, c-format
++msgid "while reading database: %s"
++msgstr "vid inläsning av databas: %s"
--- libnss-db-2.2.3pre1.orig/debian/patches/050-initialize_all_fields.patch
+++ libnss-db-2.2.3pre1/debian/patches/050-initialize_all_fields.patch
@@ -0,0 +1,13 @@
+Initialize all of the fields of the key to zeroes, so that we don't pass
+garbage keys in to later versions of Berkeley DB.
+
+--- nss_db-2.2/src/db-XXX.c	2005-03-29 16:13:57.103516704 -0500
++++ nss_db-2.2/src/db-XXX.c	2005-03-29 16:13:47.108821931 -0500
+@@ -225,6 +225,7 @@
+   DBT key;								      \
+   enum nss_status status;						      \
+   const size_t size = (keysize) + 1;					      \
++  memset(&key, 0, sizeof(key));						      \
+   key.data = alloca (size);						      \
+   key.size = KEYPRINTF keypattern;					      \
+   key.flags = 0;							      \
--- libnss-db-2.2.3pre1.orig/debian/patches/110-automake_install-data-local.patch
+++ libnss-db-2.2.3pre1/debian/patches/110-automake_install-data-local.patch
@@ -0,0 +1,14 @@
+Call install-slibLTLIBRARIES before install-data-local
+
+diff -Nru nss_db-2.2.3pre1.orig/src/Makefile.am nss_db-2.2.3pre1/src/Makefile.am
+--- nss_db-2.2.3pre1.orig/src/Makefile.am	2001-04-30 03:19:31.000000000 +0200
++++ nss_db-2.2.3pre1/src/Makefile.am	2005-07-09 17:02:25.599353888 +0200
+@@ -34,7 +34,7 @@
+ # To mimmick the old glibc installation as closely as possible, we
+ # shuffle the installed library and the links to it around a bit,
+ # removing all traces from libtool in the process.
+-install-data-local:
++install-data-local: install-slibLTLIBRARIES
+ 	$(mkinstalldirs) $(DESTDIR)$(libdir)
+ 	rm $(DESTDIR)$(slibdir)/libnss_db.la
+ 	rm $(DESTDIR)$(slibdir)/libnss_db.so
--- libnss-db-2.2.3pre1.orig/debian/patches/070-selinux.patch
+++ libnss-db-2.2.3pre1/debian/patches/070-selinux.patch
@@ -0,0 +1,160 @@
+Set the SELinux file creation context when opening databases for write access.
+Note that this does *not* change the context of existing files.
+
+--- nss_db-2.2/configure.in	2004-10-20 13:41:04.301436568 -0400
++++ nss_db-2.2/configure.in	2004-10-20 13:51:52.913832496 -0400
+@@ -73,6 +73,43 @@
+ *** Unsupported Berkeley DB version detected.])
+ fi
+ 
++AC_ARG_WITH(selinux,AC_HELP_STRING(--with-selinux,[enable SELinux support [[default=auto]]]),
++selinux=$withval,
++selinux=auto)
++
++libsave="$LIBS"
++if test x$selinux != xno ; then
++  AC_CHECK_HEADERS(selinux/selinux.h)
++  if test x$ac_cv_header_selinux_selinux_h = xno ; then
++    if test x$selinux = xyes ; then
++      AC_MSG_ERROR([SELinux not detected])
++    else
++      AC_MSG_WARN([SELinux not detected])
++      selinux=no
++    fi
++  fi
++fi
++
++if test x$selinux != xno ; then
++  AC_CHECK_FUNC(setfscreatecon,,[AC_CHECK_LIB(selinux,setfscreatecon)])
++  if test x$ac_cv_func_setfscreatecon = xno ; then
++    if test x$ac_cv_lib_selinux_setfscreatecon = xno ; then
++      if test x$selinux = xyes ; then
++        AC_MSG_ERROR([SELinux not detected])
++      else
++        AC_MSG_WARN([SELinux not detected])
++        selinux=no
++      fi
++    fi
++  fi
++fi
++if test x$selinux != xno ; then
++  AC_DEFINE(SELINUX,1,[Define to have makedb set SELinux file contexts on created files.])
++fi
++
++SELINUX_LIBS="$LIBS"
++LIBS="$libsave"
++
+ AC_CANONICAL_HOST
+ slibdir=NONE
+ case "$host" in
+@@ -100,5 +137,6 @@
+ 
+ AC_SUBST(DB_CFLAGS)
+ AC_SUBST(DB_LIBS)
++AC_SUBST(SELINUX_LIBS)
+ AC_SUBST(slibdir)
+ AC_OUTPUT(Makefile)
+--- nss_db-2.2/src/Makefile.am	2004-10-20 13:47:22.207986040 -0400
++++ nss_db-2.2/src/Makefile.am	2004-10-20 13:48:46.242210896 -0400
+@@ -28,7 +28,7 @@
+ 
+ bin_PROGRAMS = makedb
+ makedb_SOURCES = makedb.c db-compat.c
+-makedb_LDADD = @DB_LIBS@ @INTLLIBS@
++makedb_LDADD = @DB_LIBS@ @INTLLIBS@ @SELINUX_LIBS@
+ 
+ # To mimmick the old glibc installation as closely as possible, we
+ # shuffle the installed library and the links to it around a bit,
+--- nss_db-2.2/src/makedb.c	2004-10-20 13:52:02.814327392 -0400
++++ nss_db-2.2/src/makedb.c	2004-10-20 14:06:07.605899552 -0400
+@@ -32,6 +32,10 @@
+ #include <string.h>
+ #include <sys/stat.h>
+ 
++#ifdef SELINUX
++#include <selinux/selinux.h>
++#endif
++
+ #include "db-compat.h"
+ 
+ #define N_(Text) Text
+@@ -95,6 +99,12 @@
+ 			  int to_lowercase, int be_quiet);
+ static int print_database (DB *db);
+ 
++#ifdef SELINUX
++/* Set the SELinux file creation context for the given file. */
++static void set_file_creation_context (const char *outname, mode_t mode);
++#else
++#define set_file_creation_context(_outname,_mode)
++#endif
+ 
+ int
+ main (int argc, char *argv[])
+@@ -176,8 +186,10 @@
+ 
+   /* Open output file.  This must not be standard output so we don't
+      handle "-" and "/dev/stdout" special.  */
++  set_file_creation_context (output_name, mode);
+   status = db_open (output_name, DB_BTREE, DB_CREATE | DB_TRUNCATE, mode,
+ 		    NULL, NULL, &db_file);
++  set_file_creation_context (NULL, 0);
+   if (status)
+     error (EXIT_FAILURE, 0, gettext ("cannot open output file `%s': %s"),
+ 	   output_name, db_strerror (status));
+@@ -388,3 +400,55 @@
+ 
+   return EXIT_SUCCESS;
+ }
++
++
++#ifdef SELINUX
++static void
++set_file_creation_context (const char *outname, mode_t mode)
++{
++  static int enabled = -1, enforcing = -1;
++  security_context_t ctx;
++  /* Handle the "reset the context" case. */
++  if (outname == NULL)
++    {
++      setfscreatecon (NULL);
++      return;
++    }
++  /* Check if SELinux is enabled, and remember. */
++  if (enabled == -1)
++    {
++      enabled = is_selinux_enabled ();
++    }
++  if (enabled == 0)
++    {
++      return;
++    }
++  /* Check if SELinux is enforcing, and remember. */
++  if (enforcing == -1)
++    {
++      enforcing = security_getenforce();
++    }
++  /* Determine the context which the file should have. */
++  ctx = NULL;
++  if ((matchpathcon (outname, S_IFREG | mode, &ctx) == 0) &&
++      (ctx != NULL))
++    {
++      if (setfscreatecon (ctx) != 0)
++        {
++          if (enforcing)
++            {
++              error (EXIT_FAILURE, 0,
++                     gettext ("cannot set file creation context for `%s'"),
++                     outname);
++            }
++          else
++            {
++              error (0, 0,
++                     gettext ("cannot set file creation context for `%s'"),
++                     outname);
++            }
++        }
++      freecon (ctx);
++    }
++}
++#endif
--- libnss-db-2.2.3pre1.orig/debian/patches/060-errno.patch
+++ libnss-db-2.2.3pre1/debian/patches/060-errno.patch
@@ -0,0 +1,14 @@
+- set errno to ENOENT by default so that we don't leave stale errno values
+  around in error cases
+
+diff -Nru nss_db-2.2.3pre1.orig/src/db-XXX.c nss_db-2.2.3pre1/src/db-XXX.c
+--- nss_db-2.2.3pre1.orig/src/db-XXX.c	2001-04-30 03:07:41.000000000 +0200
++++ nss_db-2.2.3pre1/src/db-XXX.c	2005-12-15 17:33:00.000000000 +0100
+@@ -123,6 +123,7 @@
+     }
+ 
+   /* Succeed iff it matches a value that parses correctly.  */
++  *errnop = ENOENT;
+   value.flags = 0;
+   err = db->get (db, NULL, key, &value, 0);
+   if (err)
--- libnss-db-2.2.3pre1.orig/debian/patches/010-db2_upgrade_code.patch
+++ libnss-db-2.2.3pre1/debian/patches/010-db2_upgrade_code.patch
@@ -0,0 +1,23 @@
+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,7 +39,15 @@
+   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 */
++  if (err == DB_OLD_VERSION) {
++    db->close (db, 0);
++    err = db->upgrade(db, file, 0);
++    if (err)
++      return err;
++    err = db->open (db, NULL, file, NULL, type, flags, mode);
++  }
+   if (err)
+     {
+       db->close (db, 0);