]> Savannah Git Hosting - gnulib.git/commitdiff
maintainer-makefile: Improve GnuPG announce-gen options.
authorSimon Josefsson <simon@josefsson.org>
Mon, 14 Mar 2022 10:14:50 +0000 (11:14 +0100)
committerSimon Josefsson <simon@josefsson.org>
Mon, 14 Mar 2022 10:14:50 +0000 (11:14 +0100)
* top/maint.mk (gpg_key_emil): New variable.
(gpg_keyring_url): New variable.
(announcement): Pass them as --gpg-key-email and
--gpg-keyring-url.

ChangeLog
top/maint.mk

index e68ce4546bdcc07f6b479da423099fdc0350777e..1f60d9a44c9a16ee8f3d1f363ae852c992e53ce6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,12 @@
        (main): Don't suggest 'gpg --keyserver' since the situation with
        public key servers is complicated and GnuPG version dependent.
 
+       maintainer-makefile: Improve GnuPG announce-gen options.
+       * top/maint.mk (gpg_key_emil): New variable.
+       (gpg_keyring_url): New variable.
+       (announcement): Pass them as --gpg-key-email and
+       --gpg-keyring-url.
+
 2022-03-13  Ben Pfaff  <blp@cs.stanford.edu>
 
        Document Automake 1.14 requirement in NEWS, too, since it had been
index 92cef425cf350409214c6ed62c8fa1030a71e110..b9f483bf973f64b09195b7279e9a03620f6fc9f2 100644 (file)
@@ -1391,6 +1391,11 @@ gpg_key_ID ?=                                                            \
      && git cat-file tag v$(VERSION)                                   \
         | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null    \
         | $(AWK) '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
+gpg_key_email ?=                                                       \
+  $$(gpg --list-key --with-colons $(gpg_key_ID) 2>/dev/null            \
+       | $(AWK) -F: '/^uid/ {print $$10; exit}'                        \
+       | $(SED) -n 's/.*<\(.*\)>/\1/p')
+gpg_keyring_url ?= https://savannah.gnu.org/project/release-gpgkeys.php?group=$(PACKAGE)&download=1
 
 translation_project_ ?= coordinator@translationproject.org
 
@@ -1421,6 +1426,10 @@ announcement: NEWS ChangeLog $(rel-files)
            --prev=$(PREV_VERSION)                                      \
            --curr=$(VERSION)                                           \
            --gpg-key-id=$(gpg_key_ID)                                  \
+           $$(test -n "$(gpg_key_email)" &&                            \
+              echo --gpg-key-email="$(gpg_key_email)")                 \
+           $$(test -n "$(gpg_keyring_url)" &&                          \
+              echo --gpg-keyring-url="$(gpg_keyring_url)")             \
            --srcdir=$(srcdir)                                          \
            --news=$(srcdir)/NEWS                                       \
            --bootstrap-tools=$(bootstrap-tools)                        \