Hi Bruno,

I cannot recall the last time I used a system where the 'gpg' command
was version 1. The cfarm CentOS 7 machines even have 'gpg' as version 2,
and those are probably the oldest I have access to.

Any objections to the attached patch?

In 2018 you said [1]:

>   Ubuntu 2016.04 (which is supported until April 2021,
>   that is, 3 years from now), has `gpg --version` = 1.x.
> 
> So, if it's supported until April 2021, you can assume some users will use
> it until 2025. In order to not gratuitously hurt these users, I would suggest
> keep this code until at least 2025.

So I just want to make sure the situation hasn't changed in your view
before pushing.

Collin

[1] https://lists.gnu.org/archive/html/bug-gnulib/2018-05/msg00157.html

>From 9a35ac361330b9058b475d0db0906f2e458f2012 Mon Sep 17 00:00:00 2001
Message-ID: <9a35ac361330b9058b475d0db0906f2e458f2012.1751134349.git.collin.fu...@gmail.com>
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 28 Jun 2025 10:56:56 -0700
Subject: [PATCH] gnupload: Remove checks for gpg2.

* build-aux/gnupload (GPG): Remove checks for gpg2 and use gpg
unconditionally.
---
 ChangeLog          |  6 ++++++
 build-aux/gnupload | 27 ++-------------------------
 2 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 317862e1ec..5d8e10b273 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-06-28  Collin Funk  <collin.fu...@gmail.com>
+
+	gnupload: Remove checks for gpg2.
+	* build-aux/gnupload (GPG): Remove checks for gpg2 and use gpg
+	unconditionally.
+
 2025-06-27  Paul Eggert  <egg...@cs.ucla.edu>
 
 	_Noreturn: pacify gcc -std=gnu99 -Wpedantic
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 6eac75c163..b790f7ab0b 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2025-06-10.02; # UTC
+scriptversion=2025-06-28.18; # UTC
 
 # Copyright (C) 2004-2025 Free Software Foundation, Inc.
 #
@@ -24,30 +24,7 @@ scriptversion=2025-06-10.02; # UTC
 
 set -e
 
-GPG=gpg
-# Choose the proper version of gpg, so as to avoid a
-# "gpg-agent is not available in this session" error
-# when gpg-agent is version 2 but gpg is still version 1.
-# FIXME-2020: remove, once all major distros ship gpg version 2 as /usr/bin/gpg
-gpg_agent_version=`(gpg-agent --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'`
-case "$gpg_agent_version" in
-  2.*)
-    gpg_version=`(gpg --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'`
-    case "$gpg_version" in
-      1.*)
-        if (type gpg2) >/dev/null 2>/dev/null; then
-          # gpg2 is present.
-          GPG=gpg2
-        else
-          # gpg2 is missing. Ubuntu users should install the package 'gnupg2'.
-          echo "WARNING: Using 'gpg', which is too old. You should install 'gpg2'." 1>&2
-        fi
-        ;;
-    esac
-    ;;
-esac
-
-GPG="${GPG} --batch --no-tty"
+GPG="gpg --batch --no-tty"
 conffile=.gnuploadrc
 to=
 dry_run=false
-- 
2.50.0

Reply via email to