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