build-aux/announce-gen: amending gpg --verify command line

Ineiev <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <aonF+8tCN8bn201m@manas>
Hello,

When verifying detached signatures, the path to the signed file
should be supplied in the command line; in fact, gpg emits
a warning when it's absent, like

  gpg: assuming signed data in 'file.tar.gz'

Using the shorter form is a bad habit, it allows for an unintended
behavior when the .sig file contains a non-detached signature.

diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 356c034b2..829496a8a 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -652,7 +652,7 @@ Use a .sig file to verify that the corresponding file (without the
 .sig suffix) is intact.  First, be sure to download both the .sig file
 and the corresponding tarball.  Then, run a command like this:

-  gpg --verify $tarballs[0].sig
+  gpg --verify $tarballs[0].sig $tarballs[0]

 EOF
   my $gpg_fingerprint = `LC_ALL=C gpg --fingerprint $gpg_key_id | grep -v ^sub`;
@@ -695,7 +695,7 @@ As a last resort to find the key, you can try the official GNU
 keyring:

   wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
-  gpg --keyring gnu-keyring.gpg --verify $tarballs[0].sig
+  gpg --keyring gnu-keyring.gpg --verify $tarballs[0].sig $tarballs[0]
 EOF

   print <<EOF;
signature.asc (application/pgp-signature, 525 B)
-----BEGIN PGP SIGNATURE-----

iQFPBAEBCAA5FiEEvZ1N7nsv8cvvLuDE4KzT4Mvnh0oFAmqJxfUbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJEOCs0+DL54dKRiQIAKTSmhlS0vr2jYXdJrD/
ZEKFMk+OolUMe3Ly7eiGMDMdaqFhrZ1qDb8QRYm/AxSqloINjLvVRNz/8N0XNaAs
RoOciIbR9oKSNNiLKmwl8bUbXVhdHnhZrYzpHlZbGnYW/UCLcynBh2pbzWAaWDKf
XYIP+MpjEtyM1Rrg/ih45JVmkryOfIlYL6MtB98b+d29bJQGkOhRQqpsKYoBhkJ0
dCJcUA0Z5Xd3rqiC5Q7iWRBu/tIkU6zDswCMsyDWbbd3xyT3HS4IvEf30UZ46oq7
L9RJMekI9+nel7v1wNYBjbdf2A4fKoaC5bLvzBqRu7qwpsAtNs5Jp/WqbpapsTsn
aXQ=
=iXHg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.