1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/sh
set -e
set -x
DIR=$(mktemp -d)
GPG_HOME="$DIR/gnupg"
gpg_args() {
gpg=$1; shift
"$gpg" --homedir "$GPG_HOME" --batch --quiet --with-colons "$@"
}
mkdir "$GPG_HOME"
chmod 700 "$GPG_HOME"
cat $(ls /usr/share/keyrings/debian-archive-*.pgp \
| grep -vE 'debian-archive-bookworm-stable.pgp|debian-archive-keyring.pgp|debian-archive-trixie-stable.pgp') \
| gpg_args gpg1 --import
gpg_args gpg1 --list-keys
gpg_args gpg --list-keys > "$DIR/key.list.before"
migrate-pubring-from-classic-gpg "$GPG_HOME"
gpg_args gpg --list-keys > "$DIR/key.list.after"
diff -u "$DIR/key.list.before" "$DIR/key.list.after"
|