[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

please consider including debian-edu-archive-keys handling



reassign 390449 debian-edu-archive-keyring 2010.01.05
thanks

Hi debian-edu,

soon-to-be 5 years later a response to your wishlist bug against apt -
and then it's even a reassigning back to you…
d'oh! Life can be hard at times… ;)


APT has gained well before squeeze the possibility for
keyring packages to drop their keyrings into a fragments directory
instead of mangling with apt-file which is not only prune for errors,
but could possibly override user-configuration (see #558784).

Long story short, attached is a prelimited patch to enable your
keyring package to use this fragments directory.
Prelimited in the sense that it isn't tested and that you might want
to change a bit/everything depending on what you like.

If you have further questions on how to implement this feel free
to ask me, but make sure to at least cc me in that case, thanks!

(No, this hasn't been adopted by anyone with a keyring in debian main yet,
 even through it works and is used at least by some third-party archives and
 a small debian-derivative (aptosid) currently with success.
 Hopefully in the near future i will be able to create a patch for
 debian-archive-keyring through, so you are not completely alone)


Best regards

David Kalnischkies
diff -ru debian-edu-archive-keyring-2010.01.05-bak//debian/control debian-edu-archive-keyring-2010.01.05/debian/control
--- debian-edu-archive-keyring-2010.01.05-bak//debian/control	2011-09-15 11:30:03.106463458 +0200
+++ debian-edu-archive-keyring-2010.01.05/debian/control	2011-09-15 11:42:22.542219237 +0200
@@ -11,7 +11,8 @@
 
 Package: debian-edu-archive-keyring
 Architecture: all
-Depends: gnupg, apt
+Depends: apt (>= 0.7.25.1), gpgv
+Recommends: gnupg
 Description: GnuPG archive keys of the Debian Edu archive
  The Debian Edu project digitally signs its Release files. This package
  contains the archive keys used for that.
diff -ru debian-edu-archive-keyring-2010.01.05-bak//debian/postinst debian-edu-archive-keyring-2010.01.05/debian/postinst
--- debian-edu-archive-keyring-2010.01.05-bak//debian/postinst	2011-09-15 11:30:03.106463458 +0200
+++ debian-edu-archive-keyring-2010.01.05/debian/postinst	2011-09-15 11:46:37.284034528 +0200
@@ -2,7 +2,13 @@
 
 set -e
 
-if [ -x /usr/bin/apt-key ]; then
-    # "apt-key update" only uses /usr/share/keyrings/debian-archive-*.gpg, so we use "apt-key add"
-    apt-key add /usr/share/keyrings/debian-edu-archive-keyring.gpg
+if [ "$1" = 'configure' ]; then
+	if dpkg --compare-versions '2010.01.05' '>=' "$2" && which gpg > /dev/null; then
+		TRUSTEDFILE='/etc/apt/trusted.gpg'
+		eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
+		eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
+		if [ -e "$TRUSTEDFILE" ]; then
+			apt-key --keyring "$TRUSTEDFILE" del A26FF456 2>/dev/null || :
+		fi
+	fi
 fi
diff -ru debian-edu-archive-keyring-2010.01.05-bak//debian/rules debian-edu-archive-keyring-2010.01.05/debian/rules
--- debian-edu-archive-keyring-2010.01.05-bak//debian/rules	2011-09-15 11:30:03.106463458 +0200
+++ debian-edu-archive-keyring-2010.01.05/debian/rules	2011-09-15 11:42:59.617755730 +0200
@@ -34,6 +34,8 @@
 	$(install_dir) debian/tmp/usr/share/keyrings/
 	$(install_file) keyrings/debian-edu-archive-keyring.gpg debian/tmp/usr/share/keyrings/
 	$(install_file) keyrings/debian-edu-archive-removed-keys.gpg debian/tmp/usr/share/keyrings/
+	$(install_dir) debian/tmp/etc/apt/trusted.gpg.d/
+	$(install_file) keyrings/debian-edu-archive-keyring.gpg debian/tmp/etc/apt/trusted.gpg.d/
 
 	$(install_dir) debian/tmp/usr/share/doc/debian-edu-archive-keyring/
 	$(install_file) README debian/tmp/usr/share/doc/debian-edu-archive-keyring/

Reply to: