summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-05-13 22:06:14 +0000
committerKarl Berry <karl@freefriends.org>2023-05-13 22:06:14 +0000
commit666f142d201576e5bd4c79b9649f86b5e7c73b43 (patch)
tree2eaca9e7e7212b31afcb7635eb0677ffe6e25c76 /Master/tlpkg/bin
parentd920e0a51ed6c5d72b291d6575f3530005fe8132 (diff)
tlgpg: for gnupg 2.2.x (Alma Linux 8, new server), apparently
more options (--no-tty --yes --pinentry-mode loopback) are needed for unattended signing. tlgpg-verify: for gnupg 2.2.x, apparently both the .asc and data file must be given. git-svn-id: svn://tug.org/texlive/trunk@67098 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-xMaster/tlpkg/bin/tlgpg4
-rwxr-xr-xMaster/tlpkg/bin/tlgpg-verify7
2 files changed, 8 insertions, 3 deletions
diff --git a/Master/tlpkg/bin/tlgpg b/Master/tlpkg/bin/tlgpg
index 624c61e4ec7..5dd8c7ecc6e 100755
--- a/Master/tlpkg/bin/tlgpg
+++ b/Master/tlpkg/bin/tlgpg
@@ -9,8 +9,10 @@ if test $# -eq 0; then
exit 1
fi
+# --no-tty --yes --pinentry... needed for gpg 2.2.20 (Alma Linux 8).
gpg_prog=gpg
-gpg_opts="--batch --homedir /home/texlive/.gnupg \
+gpg_opts="--batch --no-tty --yes --pinentry-mode loopback \
+ --homedir /home/texlive/.gnupg \
--passphrase-file /home/texlive/.gnupg/passphrase \
--local-user 0x06BAB6BC "
diff --git a/Master/tlpkg/bin/tlgpg-verify b/Master/tlpkg/bin/tlgpg-verify
index 1f0a6b0fb40..bebd53f3891 100755
--- a/Master/tlpkg/bin/tlgpg-verify
+++ b/Master/tlpkg/bin/tlgpg-verify
@@ -11,8 +11,10 @@ if test $# -ne 1; then
fi
if echo "$1" | grep '\.asc$' >/dev/null; then
+ data_file=`echo "$1" | sed 's/\.asc$//'`
asc_file=$1
else
+ data_file=$1
asc_file=$1.asc
fi
@@ -30,7 +32,8 @@ verify_cmd="tlgpg --status-file=$status_out --verify --verbose"
# gpg exit status is zero with expired keys,
# but we want to fail in that case.
-if $verify_cmd "$asc_file" >$verify_out 2>&1; then
+# As of gpg 2.2, apparently both asc and data files must be given.
+if $verify_cmd "$asc_file" "$data_file" >$verify_out 2>&1; then
if grep EXPKEYSIG $status_out >/dev/null; then
err="expired key"
elif grep REVKEYSIG $status_out >/dev/null; then
@@ -47,7 +50,7 @@ if test -n "$err"; then
echo "$0: moving $asc_file to $asc_file.badv." >&2
mv "$asc_file" "$asc_file".badv || exit 1
echo "$0: gpg verify command was:" >&2
- echo "$0: $verify_cmd" "$1" >&2
+ echo "$0: $verify_cmd" "$asc_file" "$data_file" >&2
echo "$0: GPG STATUS FILE OUTPUT:" >&2
cat $status_out >&2
echo "$0: GPG STDOUT/STDERR:" >&2