From: Jonathan McDowell Date: Sun, 29 Sep 2013 20:30:06 +0000 (+0100) Subject: Only seed initial Debian package database if key file is available. X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/f0a63a7442a69bd08130efcb03d5e4b18110b859?hp=243c905356e36f9b05b11ad72771f63196250e7a Only seed initial Debian package database if key file is available. If the Debian package detected no keyring database on installation it would seed the database with my key, from /usr/share/doc/onak/noodles.key.gz. This is against Debian policy 12.3 - packages cannot require files from /usr/share/doc/ to function. Only seed the database if the file exists, avoiding issues installing when skipping /usr/share/doc/ Fixes Debian bug #710665. --- diff --git a/debian/changelog b/debian/changelog index 4b2b410..c1a34ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ onak (0.4.1-1+bzr) unstable; urgency=low * Development build * Switch to source format 3.0 (quilt). + * Only seed initial database if key file is available. (Closes: #710665) -- Jonathan McDowell Tue, 24 Apr 2012 21:54:17 -0700 diff --git a/debian/postinst b/debian/postinst index 5b29801..b8fa63f 100644 --- a/debian/postinst +++ b/debian/postinst @@ -13,7 +13,8 @@ if [ "$1" = "configure" ]; then # if grep -q "^db_dir /var/lib/onak" /etc/onak.conf && grep -q "^db_backend db4" /etc/onak.conf && - [ ! -e /var/lib/onak/num_keydb ]; then + [ ! -e /var/lib/onak/num_keydb -a \ + -e /usr/share/doc/onak/noodles.key ]; then zcat /usr/share/doc/onak/noodles.key | onak -b add fi