Skip to contentSkip to conversation

A few script updates

PATCH Applied Uwe Kleine-König 2 participants 5 messages Feb 28, 2025

lore
Share & tools
lore
#0 lore raw

cover A few script updates

Hello,

these modifications to the scripts in the pgpkeys repo helped me during my efforts around the PGP keyring.

Best regards
Uwe

Uwe Kleine-König (3):
Make scripts executable
korg-{refresh,update}-pgpkeys: Use /usr/bin/gpg as default path for
gpg
korg-update-pgpkeys: Pass additional arguments of --refresh to gpg

 scripts/korg-refresh-keys   | 2 +-
 scripts/korg-update-pgpkeys | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 scripts/korg-refresh-keys
 mode change 100644 => 100755 scripts/korg-update-pgpkeys

base-commit: ec49467dc0fd7d01d046d30c7e5cf90fb06321b4

Signature · 1 line
2.47.1
#1 lore raw

PATCH 1/3 Make scripts executable

While they are not designed to be executed directly, making them executable simplifies their usage.

---
 scripts/korg-refresh-keys   | 0
 scripts/korg-update-pgpkeys | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 scripts/korg-refresh-keys
 mode change 100644 => 100755 scripts/korg-update-pgpkeys
scripts/korg-refresh-keys +0 -0
old mode 100644
new mode 100755
scripts/korg-update-pgpkeys +0 -0
old mode 100644
new mode 100755
Signature · 1 line
2.47.1
#2 lore raw

PATCH 2/3 korg-{refresh,update}-pgpkeys: Use /usr/bin/gpg as default path for gpg

In reply to Uwe Kleine-König

The scripts in wotmate.git use gpg and not gpg2, too. Also on my system there is no gpg2.

---
 scripts/korg-refresh-keys   | 2 +-
 scripts/korg-update-pgpkeys | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/korg-refresh-keys +1 -1
index d66b489341b0..cde93620b10d 100755
@@ -16,7 +16,7 @@ IMPORTFLAGS="--import-options import-clean --import-options merge-only"
 
 # Make sure this points to your gpg v2 binary. You can also add other
 # flags here, such as --homedir
-GPGBIN="/usr/bin/gpg2 --batch"
+GPGBIN="/usr/bin/gpg --batch"
 
 # Run with -q from cron to silence most output
 [[ $1 == '-q' ]] && Q='-q'
scripts/korg-update-pgpkeys +1 -1
index 651e3d84a81a..4dc9be07c157 100755
@@ -33,7 +33,7 @@ if [[ ! -d $WOTMATEDIR ]]; then
 fi
 
 GPGTMPHOME=$(mktemp -d)
-GPG="/usr/bin/gpg2 --batch --homedir ${GPGTMPHOME}"
+GPG="/usr/bin/gpg --batch --homedir ${GPGTMPHOME}"
 GPGCONF="/usr/bin/gpgconf --homedir ${GPGTMPHOME}"
 
 echo "Importing current pgpkeys.git"
Signature · 1 line
2.47.1
#3 lore raw

PATCH 3/3 korg-update-pgpkeys: Pass additional arguments of --refresh to gpg

In reply to Uwe Kleine-König

This allows to update selected keys from the keyserver only and pass additional options.

Usage is for example:

    korg-update-pgpkeys --refresh --keyserver keyserver.ubuntu.com --keyserver-options no-self-sigs-only E2DCDD9132669BD6
---
 scripts/korg-update-pgpkeys | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/korg-update-pgpkeys +1 -1
index 4dc9be07c157..4d516b2fa5c8 100755
@@ -40,7 +40,7 @@ echo "Importing current pgpkeys.git"
 $GPG -q --import $PGPKEYSDIR/keys/*.asc
 if [[ $1 == '--refresh' ]]; then
     echo "Refreshing from $KEYSERVER"
-    $GPG --keyserver $KEYSERVER --refresh
+    $GPG --keyserver $KEYSERVER "$@"
 else
     echo "Importing the new key"
     $GPG --import --import-options import-clean $1
Signature · 1 line
2.47.1
#4 lore raw
In reply to Uwe Kleine-König
Quoted 6 lines · Uwe Kleine-König

these modifications to the scripts in the pgpkeys repo helped me during my efforts around the PGP keyring.

Best regards
Uwe

Quoted 7 lines

Uwe Kleine-König (3):
Make scripts executable
korg-{refresh,update}-pgpkeys: Use /usr/bin/gpg as default path for
gpg
korg-update-pgpkeys: Pass additional arguments of --refresh to gpg

[...]

Applied, thanks!

[1/3] Make scripts executable

      commit: ab07e31dd78aad215260345c55fd358e2d7a6061
[2/3] korg-{refresh,update}-pgpkeys: Use /usr/bin/gpg as default path for gpg
      commit: 1a02a40c3b9421881af80d894734f8cdc8ed66ce
[3/3] korg-update-pgpkeys: Pass additional arguments of --refresh to gpg
      commit: 5c1fae61a2e9d7c8352e9c7711a8b85e83374266

Best regards,

Signature · 1 line
Konstantin Ryabitsev <[email protected]>