]> git.corax.cc Git - foundry/commitdiff
signbot,distbot: Unify command line options for specifying GPG keys
authorMatthias Kruk <m@m10k.eu>
Sat, 12 Feb 2022 11:12:05 +0000 (20:12 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 12 Feb 2022 11:12:05 +0000 (20:12 +0900)
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
distbot.sh
signbot.sh

index f2eaed854569fe7f8133097acc1016861a603f9e..46617aa2298c9f350bffb383d7fe3ffe0579dc94 100644 (file)
--- 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 <keyid>
+    $ ./signbot.sh --gpg-key <keyid>
 
 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 <keyid>              \
+                   --gpg-key <keyid>              \
                    --description "My repository"
 
 Like signbot, distbot needs a GPG key id. Unlike the signbot key, which is used to sign
index dc288985f1df94e76fded1eaa64a1d72018ec609..0403ecfb655f538c58ce3a929d7eed89eeeae649 100755 (executable)
@@ -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
index d61e3c22b8d9f6e6b051666e2d626eedd9dde64c..b04609b4adbb4ca6ebaae49aad8fa9da63beab51 100755 (executable)
@@ -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