From 1d76c69b90858511f6cb444b618e6e204e4bf4e9 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Sat, 12 Feb 2022 20:12:05 +0900 Subject: [PATCH] signbot,distbot: Unify command line options for specifying GPG keys Signbot and distbot require a GPG key to be specified on the command line, but they don't use the same command line option for this. This commit modifies signbot and distbot so they both require the GPG key to be specified using the `--gpg-key` option. --- README.md | 6 +++--- distbot.sh | 4 ++-- signbot.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f2eaed8..46617aa 100644 --- a/README.md +++ b/README.md @@ -251,10 +251,10 @@ listening on *pub/buildbot_amd64* will see the message. Signbots are started as shown below. - $ ./signbot.sh --key + $ ./signbot.sh --gpg-key The purpose of signbot is to sign Debian packages, so you need to tell it which key to -use using the `--key` option. The key must be a key-id from the default GPG key ring. +use using the `--gpg-key` option. The key must be a key-id from the default GPG key ring. By default, signbots are load-balanced the same way as the buildbots. If you want to sign packages going to one repository with a different key than packages going to a different repository, you will have to start two signbots with differing `--endpoint` and @@ -267,7 +267,7 @@ Distbot has a few more options, but most of them are fairly self-explanatory. $ ./distbot.sh --name deb.example.org \ --output /srv/www/deb \ --arch amd64,i386 \ - --gpgkey \ + --gpg-key \ --description "My repository" Like signbot, distbot needs a GPG key id. Unlike the signbot key, which is used to sign diff --git a/distbot.sh b/distbot.sh index dc28898..0403ecf 100755 --- a/distbot.sh +++ b/distbot.sh @@ -294,7 +294,7 @@ main() { "The codename of the distribution (default: stable)" opt_add_arg "a" "arch" "rv" "" \ "Comma separated list of supported architectures" - opt_add_arg "k" "gpgkey" "rv" "" \ + opt_add_arg "k" "gpg-key" "rv" "" \ "The GPG key used for signing" opt_add_arg "d" "description" "rv" "" \ "Description of the repository" @@ -310,7 +310,7 @@ main() { publish_to=$(opt_get "publish-to") name=$(opt_get "name") arch=$(opt_get "arch") - gpgkey=$(opt_get "gpgkey") + gpgkey=$(opt_get "gpg-key") desc=$(opt_get "description") if ! looks_like_a_repository "$path"; then diff --git a/signbot.sh b/signbot.sh index d61e3c2..b04609b 100755 --- a/signbot.sh +++ b/signbot.sh @@ -171,7 +171,7 @@ main() { opt_add_arg "e" "endpoint" "v" "pub/signbot" "The IPC endpoint to listen on" opt_add_arg "w" "watch" "v" "builds" "The topic to watch for build messages" opt_add_arg "p" "publish-to" "v" "signs" "The topic to publish signs under" - opt_add_arg "k" "key" "rv" "" "Fingerprint of the key to sign with" + opt_add_arg "k" "gpg-key" "rv" "" "Fingerprint of the key to sign with" if ! opt_parse "$@"; then return 1 @@ -180,7 +180,7 @@ main() { endpoint=$(opt_get "endpoint") watch=$(opt_get "watch") publish_to=$(opt_get "publish-to") - key=$(opt_get "key") + key=$(opt_get "gpg-key") if ! inst_start dispatch_tasks "$endpoint" "$watch" "$publish_to" "$key"; then return 1 -- 2.47.3