From b1352c1942a5b63bc37c0a2359b960fcb8dc5037 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 13 Apr 2016 07:10:41 +0000 Subject: fixes for gpg updates git-svn-id: svn://tug.org/texlive/trunk@40485 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-update-containers | 6 ++++-- Master/tlpkg/bin/tl-update-install-pkg | 6 ++++-- Master/tlpkg/bin/tl-update-tlnet | 7 +++++-- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index 6a737dd0a62..9b437e3c595 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright 2008, 2009, 2010, 2011 Norbert Preining +# Copyright 2008-2016 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # @@ -35,6 +35,7 @@ my $opt_relative = 1; my $opt_version = 0; my $opt_help = 0; my $opt_dry = 0; +my $opt_gpgcmd = "gpg --batch --homedir /home/texlive/.gnupg --passphrase-file /home/texlive/.gnupg/passphrase --armor --detach-sign --local-user 0x06BAB6BC"; TeXLive::TLUtils::process_logging_options(); GetOptions( @@ -45,6 +46,7 @@ GetOptions( "recreate" => \$opt_recreate, "relative!" => \$opt_relative, "version" => \$opt_version, + "gpgcmd=s" => \$opt_gpgcmd, "help|?" => \$opt_help) or pod2usage(1); pod2usage("-exitstatus" => 0, "-verbose" => 2) if $opt_help; @@ -388,7 +390,7 @@ sub main xsystem("$TeXLive::TLConfig::ChecksumProgram texlive.tlpdb > texlive.tlpdb.$TeXLive::TLConfig::ChecksumExtension"); # the following somehow needs to be on one line, otherwise the shell # expansion is strange! - xsystem("gpg --batch --homedir /home/texlive/.gnupg --passphrase-file /home/texlive/.gnupg/passphrase --armor --detach-sign --local-user 0x06BAB6BC texlive.tlpdb.$TeXLive::TLConfig::ChecksumExtension"); + xsystem("$opt_gpgcmd texlive.tlpdb.$TeXLive::TLConfig::ChecksumExtension"); xchdir($olddir); } else { tlwarn("chdir($opt_location/tlpkg/) for md5/checksum creation failed\n: $?"); diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg index b102c77e732..e5c7427aec2 100755 --- a/Master/tlpkg/bin/tl-update-install-pkg +++ b/Master/tlpkg/bin/tl-update-install-pkg @@ -38,6 +38,7 @@ use TeXLive::TLConfig; $opt_help = 0; $opt_verbose = 0; $opt_texlivedocs = 0; +my $opt_gpgcmd = "gpg --batch --homedir /home/texlive/.gnupg --passphrase-file /home/texlive/.gnupg/passphrase --armor --detach-sign --local-user 0x06BAB6BC"; sub usage { print <<'EOF'; @@ -65,6 +66,7 @@ GetOptions( "outputdir|o=s", "texlivedocs|t", "verbose|v", + "gpgcmd=s" => \$opt_gpgcmd, "help|h") or usage(); usage if $opt_help; @@ -238,7 +240,7 @@ sub install_files { copy ("$tmpdir/$f", $outputdir); system ("cd $outputdir && $TeXLive::TLConfig::ChecksumProgram $f >$f.$TeXLive::TLConfig::ChecksumExtension"); # keep that on one line! - system ("cd $outputdir && gpg --batch --homedir /home/texlive/.gnupg --passphrase-file /home/texlive/.gnupg/passphrase --armor --detach-sign --local-user 0x06BAB6BC $f.$TeXLive::TLConfig::ChecksumExtension"); + system ("cd $outputdir && $opt_gpgcmd $f.$TeXLive::TLConfig::ChecksumExtension"); system ('ls', '-l', "$outputdir/$f"); } @@ -265,7 +267,7 @@ sub install_files { # These tlpkg/ subdirs exist when installing via tl-update-tlnet (?), # though not when testing this script standalone. - xsystem ("cd tlpkg && rm -rf TeXLive installer tlperl translations"); + xsystem ("cd tlpkg && rm -rf TeXLive installer tlperl translations gpg"); xsystem ("mv $junkdir/$install_tl_name/tlpkg/* tlpkg/"); xsystem ("rm -rf $junkdir"); } diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet index ed61f4dce20..827c27c870b 100755 --- a/Master/tlpkg/bin/tl-update-tlnet +++ b/Master/tlpkg/bin/tl-update-tlnet @@ -20,6 +20,7 @@ scheme=full testinstall=true tlweb=/home/ftp/texlive/tlnet verbose= +gpgcmd= while test $# -gt 0; do case $1 in @@ -31,6 +32,7 @@ while test $# -gt 0; do --pretest) tlweb=/home/ftp/texlive/tlpretest;; --recreate) recreate=--recreate;; --scheme) shift; scheme=$1;; + --gpgcmd) shift; gpgcmd="--gpgcmd \"$1\"";; --testlocation) shift; tltrybase=$1;; -v|-vv|-vvv) verbose=$1;; --help) echo "ustl. sorry."; exit 0;; @@ -83,14 +85,14 @@ echo "$0: Updating $tltry in cow-shell..." cd $tltry cow-shell <