tests/ascii-armored-keys: convert key to armored using gpg instead of sed

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-08-20 08:02:11 +02:00
parent 1c67ac111a
commit 44cf2f94a6
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -13,9 +13,7 @@ rmdir /etc/apt/trusted.gpg.d
mkdir /etc/apt/trusted.gpg.d
for f in /usr/share/keyrings/*.gpg; do
name=$(basename "$f" .gpg)
gpg --enarmor < "/usr/share/keyrings/$name.gpg" \
| sed 's/ PGP ARMORED FILE/ PGP PUBLIC KEY BLOCK/;/^Comment: /d' \
> "/etc/apt/trusted.gpg.d/$name.asc"
gpg --no-default-keyring --keyring="/usr/share/keyrings/$name.gpg" --armor --output="/etc/apt/trusted.gpg.d/$name.asc" --export
rm "/usr/share/keyrings/$name.gpg"
done
{{ CMD }} --mode=root --variant=apt {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }}