summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlgpg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-17 17:43:50 +0000
committerKarl Berry <karl@freefriends.org>2020-05-17 17:43:50 +0000
commitad41eab31b79739233027df1c00bdc7951030d14 (patch)
treeae5c4967c649ae9a504705fd71a24ca47800e48c /Master/tlpkg/bin/tlgpg
parentf8c9cbfe16ae8eac7e44b3353f4d3a8bf64e3936 (diff)
tlgpg: new program for common gpg arguments for TL usage, notably --homedir.
tlgpg-verify: new script, following TLCrypto.pm for checks. tl-sign-file: use tlgpg and tlgpg-verify. tl-update-tlnet: run tlgpg-verify on the new tlnet's tlpdb, both before and installation, since we've seen it fail. git-svn-id: svn://tug.org/texlive/trunk@55180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tlgpg')
-rwxr-xr-xMaster/tlpkg/bin/tlgpg34
1 files changed, 34 insertions, 0 deletions
diff --git a/Master/tlpkg/bin/tlgpg b/Master/tlpkg/bin/tlgpg
new file mode 100755
index 00000000000..624c61e4ec7
--- /dev/null
+++ b/Master/tlpkg/bin/tlgpg
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $Id$
+# Public domain. Originally written 2016, Norbert Preining.
+# Run a gpg command for TeX Live, that is, with the TL --homedir, etc.
+# Since we want to be able to independently sign and verify, factor this out.
+
+if test $# -eq 0; then
+ echo "$0: At least one argument must be given." >&2
+ exit 1
+fi
+
+gpg_prog=gpg
+gpg_opts="--batch --homedir /home/texlive/.gnupg \
+ --passphrase-file /home/texlive/.gnupg/passphrase \
+ --local-user 0x06BAB6BC "
+
+# use the environment variables if set. This is for testing;
+# we don't define them in normal usage.
+if test -n "$TL_GNUPG"; then
+ gpg_prog=$TL_GNUPG
+fi
+if test -n "$TL_GNUPGOPTS"; then
+ gpg_opts=$TL_GNUPGOPTS
+fi
+
+if $gpg_prog $gpg_opts "$@" </dev/null; then
+ :
+else
+ echo "$0: gpg failed; command was:" >&2
+ echo "$0: $gpg_prog $gpg_opts" "$@" >&2
+ exit 1
+fi
+
+exit 0