Subject: Re: bug#902: devuan-keyring: Archive keys not installed below /etc/apt/trusted.gpg.d

From: Mark Hindley <[email-masked]>
Date: Sat, 9 Aug 2025 18:04:22 +0100

Olaf,

Thanks for this.

I propose the attached changes which

 - restore installation of keys in /etc/apt/trusted.gpg
 - change the keys to ascii armoured (as Debian already does)
 - handles the renamed conffiles.

Boian,

Any comments?

Mark

diff --git a/Makefile b/Makefile
index 391fa64..35b5fe8 100644
--- a/Makefile
+++ b/Makefile
@@ -8,10 +8,13 @@ INDIVIDUAL_KEYS := $(wildcard public_keys/individual/*.pgp)
 ARCHIVE_KEYS := $(wildcard public_keys/archive/*.pgp)
 REMOVED_KEYS := $(wildcard public_keys/removed/*.pgp)
 
-all: keyrings/devuan-archive-keyring.pgp keyrings/devuan-keyring.pgp keyrings/devuan-removed-keys.pgp
+all: keyrings/devuan-archive-keyring.pgp keyrings/devuan-keyring.pgp keyrings/devuan-removed-keys.pgp $(patsubst %.pgp,%.asc,$(ARCHIVE_KEYS))
 
 .DELETE_ON_ERROR:
 
+%.asc : %.pgp
+	gpg --armor --export --no-default-keyring --keyring $< > $@
+
 keyrings/gnupg:
 	install -m700 -d $@
 
@@ -49,6 +52,6 @@ refresh: | keyrings/gnupg
 	done
 
 clean:
-	rm -fr keyrings
+	rm -fr keyrings public_keys/archive/*.asc
 
 .PHONY: clean refresh
diff --git a/debian/changelog b/debian/changelog
index 5fb94a8..a851aba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devuan-keyring (2025.08.09) unstable; urgency=medium
+
+  * Restore installation of keys (now ascii armoured, as Debian) in
+    /etc/apt/trusted.gpg.d. (Closes: #902)
+
+ -- Mark Hindley <[email-masked]>  Sat, 09 Aug 2025 14:58:32 +0100
+
 devuan-keyring (2025.07.30) unstable; urgency=medium
 
   [ Boian Bonev ]
diff --git a/debian/install b/debian/install
index 92b5554..17299a5 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
 keyrings/devuan-*.pgp /usr/share/keyrings
 keyrings/devuan-*.gpg /usr/share/keyrings
+public_keys/archive/*.asc /etc/apt/trusted.gpg.d
diff --git a/debian/maintscript b/debian/maintscript
new file mode 100644
index 0000000..34172df
--- /dev/null
+++ b/debian/maintscript
@@ -0,0 +1,7 @@
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-2016-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-2016-archive.asc 2025-08-09
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-2022-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-2022-archive.asc 2025-08-09
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-amprolla-2022-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-amprolla-2022-archive.asc 2025-08-09
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-daedalus-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-daedalus-archive.asc 2025-08-09
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-dak-2025-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-dak-2025-archive.asc 2025-08-09
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-excalibur-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-excalibur-archive.asc
+mv_conffile /etc/apt/trusted.gpg.d/devuan-keyring-freia-archive.gpg /etc/apt/trusted.gpg.d/devuan-keyring-freia-archive.asc