From 3bda10d498002b926d8ce144ac2caf299a5349d9 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 10 Jan 2023 01:44:27 -0500 Subject: [PATCH] add overlooked ftp-rmkey.sh file --- ftp-rmkey.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 ftp-rmkey.sh diff --git a/ftp-rmkey.sh b/ftp-rmkey.sh new file mode 100755 index 0000000..5fa12f4 --- /dev/null +++ b/ftp-rmkey.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# This places a key in the GNU expired keyring at +# /home/gatekpr/expired-gnu-keys.gpg. It is useful for when a +# maintainer may not wish to use the FTP upload system, or their +# registered key has expired, so that their key still stays in the +# GNU keyring (so old signatures are still verifiable) +# +# written by baughj, 2006.04.05 + +PACKAGES=/home/gatekpr/packages +EXPIRED_KEYRING=/home/gatekpr/expired-gnu-keys.gpg + +if ( ([ "$1" = "" ]) || ([ "$2" = "" ]) ) +then + echo "ftp-rmkey.sh " + exit +fi + +if ! [ -d $PACKAGES/$1 ] +then + echo "ERROR: $1 isn't a known package." + exit -1 +fi + +echo "Importing old key into $EXPIRED_KEYRING..." +pgpg $1 --export $2 | gpg --no-default-keyring --keyring $EXPIRED_KEYRING --import + +echo "Removing key..." +pgpg $1 --delete-key $2 + +echo "Make sure to remove the email address from $PACKAGES/$1/email." -- 2.25.1