[neon/neon/keyring/Neon/unstable] debian: remove obsolete code, remove use of deprecated apt-key, install neon keyring into /etc/apt/trusted.gpg.d/

Jonathan Riddell null at kde.org
Wed Apr 17 15:47:14 BST 2024


Git commit b4d2826747c47dabfc64fae50917f2137786cbb6 by Jonathan Riddell.
Committed on 17/04/2024 at 14:46.
Pushed by jriddell into branch 'Neon/unstable'.

remove obsolete code, remove use of deprecated apt-key, install neon keyring into /etc/apt/trusted.gpg.d/

BUG: 482341

M  +6    -18   debian/postinst

https://invent.kde.org/neon/neon/keyring/-/commit/b4d2826747c47dabfc64fae50917f2137786cbb6

diff --git a/debian/postinst b/debian/postinst
index 5bfd1ec..f6053ab 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -14,23 +14,11 @@ if ! test -f $KEYRING; then
      touch $KEYRING
 fi
 
-# sensible default permissions if there is no keyring yet
-# (gpg will use 0600 otherwise and that will break release-upgrades later)
-ETC_KEYRING="/etc/apt/trusted.gpg"
-if [ ! -f $ETC_KEYRING ]; then
-    touch $ETC_KEYRING
-    chmod 0644 $ETC_KEYRING
-fi
-
-# during maverick we had keyrings created with mode 0600
-# but this will break tools like update-managers release-downloader
-# because it uses the trusted.gpg keyring to verify the signature (as user)
-if dpkg --compare-versions "$2" lt-nl "2010.+09.30"; then
-    chmod 0644 $ETC_KEYRING
-fi
+cp /usr/share/keyrings/neon-archive-keyring.gpg /etc/apt/trusted.gpg.d/
 
-# make sure apt knows about the new keys
-if [ -x /usr/bin/apt-key ]; then
-    /usr/bin/apt-key add /usr/share/keyrings/neon-archive-keyring.gpg
+# Deprecated file created for 'Ubuntu Local Archive One-Time Signing Key' but it creates an ugly error message
+# https://bugs.kde.org/show_bug.cgi?id=482341
+# And man apt-key deprecation notice
+if [ -e /etc/apt/trusted.gpg ]; then
+    mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/apt-trusted.gpg
 fi
-


More information about the Neon-commits mailing list