]> Savannah Git Hosting - gnulib.git/commitdiff
announce-gen: Modernize GnuPG key retrieval suggestions.
authorSimon Josefsson <simon@josefsson.org>
Mon, 14 Mar 2022 10:13:45 +0000 (11:13 +0100)
committerSimon Josefsson <simon@josefsson.org>
Mon, 14 Mar 2022 10:14:08 +0000 (11:14 +0100)
Based on patch by Darshit Shah in:
https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00022.html

* build-aux/announce-gen (usage): Add --gpg-key-email and
--gpg-keyring-url.
(main): Support the new options.
(main): Don't suggest 'gpg --keyserver' since the situation with
public key servers is complicated and GnuPG version dependent.

ChangeLog
build-aux/announce-gen

index 0586a854d6e68b0ba77d521c4b9553d264fac06f..e68ce4546bdcc07f6b479da423099fdc0350777e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-03-14  Simon Josefsson  <simon@josefsson.org>
+
+       announce-gen: Modernize GnuPG key retrieval suggestions.  Based on
+       patch by Darshit Shah in:
+       https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00022.html
+       * build-aux/announce-gen (usage): Add --gpg-key-email and
+       --gpg-keyring-url.
+       (main): Support the new options.
+       (main): Don't suggest 'gpg --keyserver' since the situation with
+       public key servers is complicated and GnuPG version dependent.
+
 2022-03-13  Ben Pfaff  <blp@cs.stanford.edu>
 
        Document Automake 1.14 requirement in NEWS, too, since it had been
index 5c35e3d5649ebbc962bc531f4e9875451914dfca..d88dda944e0307bc09bfbb0ec3e2cc05e039b870 100755 (executable)
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2022-01-27 18:48'; # UTC
+my $VERSION = '2022-03-14 10:08'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -90,6 +90,10 @@ The following are optional:
                                 VERSION is the result of running git describe
                                 in the gnulib source directory.
                                 required if gnulib is in TOOL_LIST.
+   --gpg-key-email=EMAIL        The email address of the key used to
+                                sign the tarballs
+   --gpg-keyring-url=URL        URL pointing to keyring containing the key used
+                                to sign the tarballs
    --no-print-checksums         do not emit SHA1 or SHA256 checksums
    --archive-suffix=SUF         add SUF to the list of archive suffixes
    --mail-headers=HEADERS       a space-separated list of mail headers, e.g.,
@@ -377,6 +381,8 @@ sub get_tool_versions ($$)
   my $bootstrap_tools;
   my $gnulib_version;
   my $print_checksums_p = 1;
+  my $gpg_key_email;
+  my $gpg_keyring_url;
 
   # Reformat the warnings before displaying them.
   local $SIG{__WARN__} = sub
@@ -395,6 +401,8 @@ sub get_tool_versions ($$)
      'previous-version=s' => \$prev_version,
      'current-version=s'  => \$curr_version,
      'gpg-key-id=s'       => \$gpg_key_id,
+     'gpg-key-email=s'    => \$gpg_key_email,
+     'gpg-keyring-url=s'  => \$gpg_keyring_url,
      'url-directory=s'    => \@url_dir_list,
      'news=s'             => \@news_file,
      'srcdir=s'           => \$srcdir,
@@ -534,12 +542,25 @@ and the corresponding tarball.  Then, run a command like this:
   gpg --verify $tarballs[0].sig
 
 If that command fails because you don't have the required public key,
-then run this command to import it:
+or that public key has expired, try the following commands to update
+or refresh it, and then rerun the 'gpg --verify' command.
+EOF
+  if ($gpg_key_email) {
+    print <<EOF;
 
-  gpg --keyserver keys.gnupg.net --recv-keys $gpg_key_id
+  gpg --locate-external-key $gpg_key_email
+EOF
+    }
+  print <<EOF;
 
-and rerun the 'gpg --verify' command.
+  gpg --recv-keys $gpg_key_id
 EOF
+    if ($gpg_keyring_url) {
+      print <<EOF;
+
+  wget -q -O- '$gpg_keyring_url' | gpg --import -
+EOF
+    }
 
   my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version);
   @tool_versions