Bug#537866: creating nssdb during package build

Timo Aaltonen tjaalton at ubuntu.com
Sat Dec 1 10:46:04 UTC 2012


	Hi

  So, something like this is needed. Fedora ships the old bdb-based db's together with the library ('nss'), and the new sqlite-based shared db's in a separate package ('nss-sysinit'), which also includes libnsssysinit.so and a script to enable the shared db's. We'd probably needs something similar, like libnss3-sysinit or such.

handling of the empty password could be nicer, but this at least works :)

diff --git a/debian/rules b/debian/rules
index eed45de..f3802f5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -83,6 +83,15 @@ override_dh_auto_install: $(PREPROCESS_FILES:.in=)
                $(foreach bin,certutil cmsutil crlutil modutil pk12util shlibsign signtool signver ssltap pwdecrypt, \
                $(DISTDIR)/bin/$(bin))
 
+       # Create the empty certificate databases, with empty passphrase
+       echo "\n" > /tmp/password
+       install -m 755 -d debian/libnss3/etc/pki/nssdb
+       LD_LIBRARY_PATH=$(DISTDIR)/lib $(DISTDIR)/bin/certutil -N -d debian/libnss3/etc/pki/nssdb \
+               -f /tmp/password
+       LD_LIBRARY_PATH=$(DISTDIR)/lib $(DISTDIR)/bin/certutil -N -d sql:debian/libnss3/etc/pki/nssdb \
+               -f /tmp/password
+       chmod 644 debian/libnss3-sysinit/etc/pki/nssdb/*
+
 override_dh_strip:
        dh_strip -a --dbg-package=libnss3-dbg
        $(foreach lib,libsoftokn3.so libfreebl3.so libnssdbm3.so, \



More information about the pkg-mozilla-maintainers mailing list