add overlooked ftp-rmkey.sh file
authorIan Kelling <iank@fsf.org>
Tue, 10 Jan 2023 06:44:27 +0000 (01:44 -0500)
committerIan Kelling <iank@fsf.org>
Tue, 10 Jan 2023 06:44:27 +0000 (01:44 -0500)
ftp-rmkey.sh [new file with mode: 0755]

diff --git a/ftp-rmkey.sh b/ftp-rmkey.sh
new file mode 100755 (executable)
index 0000000..5fa12f4
--- /dev/null
@@ -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 <project name> <key ID>"
+        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."