From cbb50a7bff75caadde7a46cb6bafe42f458ad320 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 18 Feb 2020 22:31:29 +0000 Subject: l3build (18feb20) git-svn-id: svn://tug.org/texlive/trunk@53834 c570f23f-e606-0410-a88d-b1316a301751 --- .../texlive/linked_scripts/l3build/l3build.lua | 2 +- .../ptex-fontmaps/kanji-config-updmap.pl | 59 +++++++++++++---- .../ptex-fontmaps/kanji-fontmap-creator.pl | 4 +- .../texk/texlive/linked_scripts/texlive/tlmgr.pl | 77 +++++++--------------- .../texlive/linked_scripts/tlshell/tlshell.tcl | 8 +-- 5 files changed, 79 insertions(+), 71 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua index 2c244c1ea57..03521ce612e 100644 --- a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua +++ b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2020-02-03" +release_date = "2020-02-17" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") diff --git a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl index 230b0a9a029..541c4329a7a 100755 --- a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl +++ b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-config-updmap.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # kanji-config-updmap: setup Japanese font embedding -# Version 20190506.0 +# Version 20200217.0 # # formerly known as updmap-setup-kanji # @@ -22,7 +22,7 @@ use Getopt::Long qw(:config no_autoabbrev ignore_case_always); use strict; my $prg = "kanji-config-updmap"; -my $version = '20190506.0'; +my $version = '20200217.0'; my $updmap_real = "updmap"; my $updmap = $updmap_real; @@ -255,6 +255,12 @@ sub ReadDatabase { next if ($l =~ m/^\s*$/); # skip empty line next if ($l =~ m/^\s*#/); # skip comment line $l =~ s/\s*#.*$//; # skip comment after '#' + if ($l =~ m/^JA\*\((\d+)\):\s*(.*):\s*(.*)$/) { # no -04 map + $representatives{'ja'}{$2}{'priority'} = $1; + $representatives{'ja'}{$2}{'file'} = $3; + $representatives{'ja'}{$2}{'nojis04'} = 1; + next; + } if ($l =~ m/^JA\((\d+)\):\s*(.*):\s*(.*)$/) { $representatives{'ja'}{$2}{'priority'} = $1; $representatives{'ja'}{$2}{'file'} = $3; @@ -275,6 +281,13 @@ sub ReadDatabase { $representatives{'ko'}{$2}{'file'} = $3; next; } + if ($l =~ m/^JA-AI0\*:\s*(.*):\s*(.*)$/) { # no -04 map + $representatives{'ja'}{$1}{'priority'} = 9999; # lowest + $representatives{'ja'}{$1}{'file'} = $2; + $representatives{'ja'}{$1}{'nojis04'} = 1; + $ai0flags{'ja'}{$1} = 1; + next; + } if ($l =~ m/^JA-AI0:\s*(.*):\s*(.*)$/) { $representatives{'ja'}{$1}{'priority'} = 9999; # lowest $representatives{'ja'}{$1}{'file'} = $2; @@ -311,10 +324,11 @@ sub ReadDatabase { sub kpse_miscfont { my ($file) = @_; - chomp(my $foo = `kpsewhich -format=miscfont $file`); - # for GitHub repository diretory structure + my $foo = ''; + # first, prioritize GitHub repository diretory structure + $foo = "database/$file" if (-f "database/$file"); if ($foo eq "") { - $foo = "database/$file" if (-f "database/$file"); + chomp($foo = `kpsewhich -format=miscfont $file`); } return $foo; } @@ -366,17 +380,32 @@ sub gen_mapfile { sub GetStatus { my $opt_mode = shift; - my $val = `$updmap_real --quiet --showoption ${opt_mode}Embed`; - my $STATUS; + my $val; + my $STATUS = ""; + my $VARIANT = ""; + + # fetch jaEmbed/scEmbed/tcEmbed/koEmbed + $val = `$updmap_real --quiet --showoption ${opt_mode}Embed`; if ($val =~ m/^${opt_mode}Embed=([^()\s]*)(\s+\()?/) { $STATUS = $1; } else { die "Cannot find status of current ${opt_mode}Embed setting via updmap --showoption!\n"; } + # fetch jaVariant + if ($opt_mode eq "ja") { + $val = `$updmap_real --quiet --showoption ${opt_mode}Variant`; + if ($val =~ m/^${opt_mode}Variant=([^()\s]*)(\s+\()?/) { + $VARIANT = $1; # should be '' or '-04' + } else { + die "Cannot find status of current ${opt_mode}Variant setting via updmap --showoption!\n"; + } + } - my $testmap = gen_mapfile($opt_mode, $STATUS); + my $testmap = gen_mapfile($opt_mode, "$STATUS$VARIANT"); + $VARIANT = "" if ($VARIANT eq ""); # for printing if (check_mapfile($testmap)) { print "CURRENT family for $opt_mode: $STATUS"; + print " (variant: $VARIANT)" if ($opt_mode eq "ja"); print " (AI0)" if ($ai0flags{$opt_mode}{$STATUS}); print "\n"; } else { @@ -410,10 +439,16 @@ sub SetupMapFile { print " (AI0)" if ($ai0flags{$opt_mode}{$rep}); print " for $opt_mode\n"; system("$updmap --quiet --nomkmap --nohash --setoption ${opt_mode}Embed $rep"); - if ($opt_jis) { - system("$updmap --quiet --nomkmap --nohash --setoption jaVariant -04"); - } else { - system("$updmap --quiet --nomkmap --nohash --setoption jaVariant \"\""); + if ($opt_mode eq "ja") { + if ($opt_jis && $representatives{'ja'}{$rep}{'nojis04'}) { + print STDERR "WARNING: No -04 map available, option --jis2004 ignored!\n"; + $opt_jis = 0; + } + if ($opt_jis) { + system("$updmap --quiet --nomkmap --nohash --setoption jaVariant -04"); + } else { + system("$updmap --quiet --nomkmap --nohash --setoption jaVariant \"\""); + } } } else { die "NOT EXIST $MAPFILE\n"; diff --git a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl index dd8e72970dc..0189360e236 100755 --- a/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl +++ b/Build/source/texk/texlive/linked_scripts/ptex-fontmaps/kanji-fontmap-creator.pl @@ -2,7 +2,7 @@ # # kanji-fontmap-creator # (c) 2012-2014 Norbert Preining -# Version: 20190506.0 +# Version: 20200217.0 # Licenced under the GPLv2 or any higher version # # gui to create map files for (kanji-config-)updmap @@ -41,7 +41,7 @@ my $opt_help = 0; my $opt_version = 0; my $prg = "kanji-fontmap-creator"; -my $version = "20190506.0"; +my $version = "20200217.0"; # # global vars configuring operation diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index a7dd9c05ced..76113849bdc 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,12 +1,12 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 53746 2020-02-10 10:14:56Z preining $ +# $Id: tlmgr.pl 53820 2020-02-17 03:23:13Z preining $ # # Copyright 2008-2020 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. -my $svnrev = '$Revision: 53746 $'; -my $datrev = '$Date: 2020-02-10 11:14:56 +0100 (Mon, 10 Feb 2020) $'; +my $svnrev = '$Revision: 53820 $'; +my $datrev = '$Date: 2020-02-17 04:23:13 +0100 (Mon, 17 Feb 2020) $'; my $tlmgrrevision; my $tlmgrversion; my $prg; @@ -4657,7 +4657,7 @@ sub action_option { $ret |= $F_WARNING; } } - } elsif ($what =~ m/^showall$/i) { + } elsif ($what =~ m/^(showall|help)$/i) { if ($opts{'json'}) { my $json = $localtlpdb->options_as_json(); print("$json\n"); @@ -7006,12 +7006,13 @@ sub setup_one_remotetlpdb { ddebug("loc copy found!\n"); # we found the tlpdb matching the current location # check for the remote hash - my $path = "$location/$InfraLocation/$DatabaseName.$TeXLive::TLConfig::ChecksumExtension"; + my $path = "$location/$InfraLocation/$DatabaseName"; ddebug("remote path of digest = $path\n"); - - my ($ret,$msg) - = TeXLive::TLCrypto::verify_checksum($loc_copy_of_remote_tlpdb, $path); - if ($ret == $VS_CONNECTION_ERROR) { + my ($verified, $status) + = TeXLive::TLCrypto::verify_checksum_and_check_return($loc_copy_of_remote_tlpdb, $path, + $is_main, 1); # the 1 means local copy mode! + # deal with those cases that need special treatment + if ($status == $VS_CONNECTION_ERROR) { info(<new(root => $location, tlpdbfile => $loc_copy_of_remote_tlpdb); $local_copy_tlpdb_used = 1; - } elsif ($ret == $VS_UNSIGNED) { - # we require the main database to be signed, but allow for - # subsidiary to be unsigned - if ($is_main) { - tldie("$prg: main database at $location is not signed: $msg\n"); - } - # the remote database has not be signed, warn - debug("$prg: remote database is not signed, continuing anyway!\n"); - } elsif ($ret == $VS_GPG_UNAVAILABLE) { - # no gpg available - debug("$prg: no gpg available for verification, continuing anyway!\n"); - } elsif ($ret == $VS_PUBKEY_MISSING) { - # pubkey missing - debug("$prg: $msg, continuing anyway!\n"); - } elsif ($ret == $VS_CHECKSUM_ERROR) { - # no problem, checksum is wrong, we need to get new tlpdb - } elsif ($ret == $VS_SIGNATURE_ERROR) { - # umpf, signature error - # TODO should we die here? Probably yes because one of - # checksum file or signature file has changed! - tldie("$prg: verification of checksum for $location failed: $msg\n"); - } elsif ($ret == $VS_EXPKEYSIG) { - # do nothing, try to get new tlpdb and hope sig is better? - tlwarn("Verification problem of the TL database at $location:\n"); - tlwarn("--> $VerificationStatusDescription{$ret}\n"); - # debug("$prg: good signature bug gpg key expired, continuing anyway!\n"); - } elsif ($ret == $VS_REVKEYSIG) { - # do nothing, try to get new tlpdb and hope sig is better? - tlwarn("Verification problem of the TL database at $location:\n"); - tlwarn("--> $VerificationStatusDescription{$ret}\n"); - #debug("$prg: good signature but from revoked gpg key, continuing anyway!\n"); - } elsif ($ret == $VS_VERIFIED) { + } elsif ($status == $VS_VERIFIED || $status == $VS_EXPKEYSIG || $status == $VS_REVKEYSIG) { $remotetlpdb = TeXLive::TLPDB->new(root => $location, tlpdbfile => $loc_copy_of_remote_tlpdb); $local_copy_tlpdb_used = 1; - # we did verify this tlpdb, make sure that is recorded - $remotetlpdb->is_verified(1); - } else { - tldie("$prg: unexpected return value from verify_checksum: $ret\n"); + # if verification was successful, make sure that is recorded + $remotetlpdb->verification_status($status); + $remotetlpdb->is_verified($verified); } + # nothing to do in the else case + # we tldie already in the verify_checksum_and_check_return + # for all other cases } } if (!$local_copy_tlpdb_used) { @@ -8417,7 +8389,7 @@ Synonym for L. =item B