summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-17 23:00:23 +0000
committerKarl Berry <karl@freefriends.org>2018-11-17 23:00:23 +0000
commitfe1abfbeb205f7d33ba416add2b4c0ea505c1131 (patch)
tree0ce9ec88215da928d635d8e5058b88bc129990a2 /Build/source
parent0267e085053f70eb56e95cdc62462d981023d806 (diff)
doc, sync
git-svn-id: svn://tug.org/texlive/trunk@49183 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/tests/TeXLive/TLConfig.pm14
-rw-r--r--Build/source/texk/tests/TeXLive/TLUtils.pm219
-rwxr-xr-xBuild/source/texk/texlive/w32_wrapper/runscript.tlu13
3 files changed, 119 insertions, 127 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLConfig.pm b/Build/source/texk/tests/TeXLive/TLConfig.pm
index 3efef6a5c96..3775c5b6f67 100644
--- a/Build/source/texk/tests/TeXLive/TLConfig.pm
+++ b/Build/source/texk/tests/TeXLive/TLConfig.pm
@@ -1,4 +1,3 @@
-# $Id: TLConfig.pm 48093 2018-06-26 21:03:56Z preining $
# TeXLive::TLConfig.pm - module exporting configuration values
# Copyright 2007-2018 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +5,7 @@
package TeXLive::TLConfig;
-my $svnrev = '$Revision: 48093 $';
+my $svnrev = '$Revision: 48727 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -22,7 +21,6 @@ BEGIN {
$MetaCategoriesRegexp
$CategoriesRegexp
$DefaultCategory
- $DefaultFallbackDownloader
@AcceptedFallbackDownloaders
%FallbackDownloaderProgram
%FallbackDownloaderArgs
@@ -112,11 +110,11 @@ if ($^O =~ /^MSWin/i) {
}
#
-our $DefaultFallbackDownloader = "wget";
our @AcceptedFallbackDownloaders = qw/curl wget/;
our %FallbackDownloaderProgram = ( 'wget' => 'wget', 'curl' => 'curl');
our %FallbackDownloaderArgs = (
- 'curl' => ['--user-agent', 'texlive/curl', '--retry', '10', '--fail', '--location',
+ 'curl' => ['--user-agent', 'texlive/curl', '--retry', '10',
+ '--fail', '--location',
'--connect-timeout', "$NetworkTimeout", '--silent', '--output'],
'wget' => ['--user-agent=texlive/wget', '--tries=10',
"--timeout=$NetworkTimeout", '-q', '-O'],
@@ -145,7 +143,9 @@ our %Compressors = (
"priority" => 30,
},
);
-our $CompressorExtRegexp = "(" . join("|", map { $Compressors{$_}{'extension'} } keys(%Compressors)) . ")";
+our $CompressorExtRegexp = "("
+ . join("|", map { $Compressors{$_}{'extension'} } keys %Compressors)
+ . ")";
# archive (not user) settings.
# these can be overridden by putting them into 00texlive.config.tlpsrc
@@ -225,7 +225,7 @@ our %TLPDBOptions = (
our %TLPDBSettings = (
"platform" => [ "s", "Main platform for this computer" ],
- "available_architectures" => [ "l", "All available/installed architectures" ],
+ "available_architectures" => [ "l","All available/installed architectures" ],
"usertree" => [ "b", "This tree acts as user tree" ]
);
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm
index 372009d16c1..cd9160f6804 100644
--- a/Build/source/texk/tests/TeXLive/TLUtils.pm
+++ b/Build/source/texk/tests/TeXLive/TLUtils.pm
@@ -1,4 +1,3 @@
-# $Id: TLUtils.pm 48130 2018-07-03 22:24:07Z preining $
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
# Copyright 2007-2018 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +5,7 @@
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 48130 $';
+my $svnrev = '$Revision: 49173 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -2267,8 +2266,9 @@ sub untar {
# on w32 don't extract file modified time, because AV soft can open
# files in the mean time causing time stamp modification to fail
- if (system($tar, win32() ? "xmf" : "xf", $tarfile) != 0) {
- tlwarn("untar: untarring $tarfile failed (in $targetdir)\n");
+ my $taropt = win32() ? "xmf" : "xf";
+ if (system($tar, $taropt, $tarfile) != 0) {
+ tlwarn("TLUtils::untar: $tar $taropt $tarfile failed (in $targetdir)\n");
$ret = 0;
} else {
$ret = 1;
@@ -2344,16 +2344,20 @@ Return 0 if failure, nonzero if success.
=cut
sub setup_programs {
- my ($bindir, $platform) = @_;
+ my ($bindir, $platform, $tlfirst) = @_;
my $ok = 1;
+ debug("setup_programs: preferring " . ($tlfirst ? "TL" : "system") . " versions\n");
+
my $isWin = ($^O =~ /^MSWin/i);
if ($isWin) {
- setup_windows_one('tar', "$bindir/tar.exe", "--version", 1);
+ # we need to make sure that we use our own tar, since
+ # Windows system tar is stupid bsdtar ...
+ setup_one("w32", 'tar', "$bindir/tar.exe", "--version", 1);
$platform = "exe";
} else {
- # tar needs to be provided by the system!
+ # tar needs to be provided by the system, we not even check!
$::progs{'tar'} = "tar";
if (!defined($platform) || ($platform eq "")) {
@@ -2372,14 +2376,14 @@ sub setup_programs {
# do not warn on errors
push @working_downloaders, $dltype if
setup_one(($isWin ? "w32" : "unix"), $defprog,
- "$bindir/$dltype/$defprog.$platform", "--version", 1);
+ "$bindir/$dltype/$defprog.$platform", "--version", $tlfirst);
}
$::progs{'working_downloaders'} = [ @working_downloaders ];
my @working_compressors;
for my $defprog (sort {$Compressors{$a}{'priority'} <=> $Compressors{$b}{'priority'}} keys %Compressors) {
# do not warn on errors
if (setup_one(($isWin ? "w32" : "unix"), $defprog,
- "$bindir/$defprog/$defprog.$platform", "--version", 1)) {
+ "$bindir/$defprog/$defprog.$platform", "--version", $tlfirst)) {
push @working_compressors, $defprog;
# also set up $::{'compressor'} if not already done
# this selects the first one, but we might reset this depending on
@@ -2422,7 +2426,7 @@ END_COMPRESSOR_BAD
$::progs{'compressor'} = $ENV{'TEXLIVE_COMPRESSOR'};
}
- if ($::opt_verbosity >= 2) {
+ if ($::opt_verbosity >= 1) {
require Data::Dumper;
use vars qw($Data::Dumper::Indent $Data::Dumper::Sortkeys
$Data::Dumper::Purity); # -w pain
@@ -2436,149 +2440,123 @@ END_COMPRESSOR_BAD
}
sub setup_one {
- my ($what, $p, $def, $arg, $donotwarn) = @_;
- if ($what eq "unix") {
- return(setup_unix_one($p, $def, $arg, $donotwarn));
+ my ($what, $p, $def, $arg, $tlfirst) = @_;
+ my $setupfunc = ($what eq "unix") ? \&setup_unix_tl_one : \&setup_windows_tl_one ;
+ if ($tlfirst) {
+ if (&$setupfunc($p, $def, $arg)) {
+ return(1);
+ } else {
+ return(setup_system_one($p, $arg));
+ }
} else {
- return(setup_windows_one($p, $def, $arg, $donotwarn));
+ if (setup_system_one($p, $arg)) {
+ return(1);
+ } else {
+ return(&$setupfunc($p, $def, $arg));
+ }
+ }
+}
+
+sub setup_system_one {
+ my ($p, $arg) = @_;
+ my $nulldev = nulldev();
+ debug("trying to set up system $p, arg $arg\n");
+ my $ret = system("$p $arg >$nulldev 2>&1");
+ if ($ret == 0) {
+ debug("program $p found in the path\n");
+ $::progs{$p} = $p;
+ return(1);
+ } else {
+ debug("program $p not usable from path\n");
+ return(0);
}
}
-sub setup_windows_one {
- my ($p, $def, $arg, $donotwarn) = @_;
+sub setup_windows_tl_one {
+ my ($p, $def, $arg) = @_;
debug("(w32) trying to set up $p, default $def, arg $arg\n");
- my $ready = 0;
+
if (-r $def) {
my $prog = conv_to_w32_path($def);
my $ret = system("$prog $arg >nul 2>&1"); # on windows
if ($ret == 0) {
+ debug("Using shipped $def for $p (tested).\n");
$::progs{$p} = $prog;
- $ready = 1;
+ return(1);
} else {
tlwarn("Setting up $p with $def as $prog didn't work\n");
system("$prog $arg");
+ return(0);
}
} else {
debug("Default program $def not readable?\n");
+ return(0);
}
- return($ready) if ($ready);
- # still here, try plain name without any specification
- debug("trying to test for plain prog name $p\n");
- $ret = system("$p $arg >nul 2>&1");
- if ($ret == 0) {
- debug("program $p seems to be in the path!\n");
- $::progs{$p} = $p;
- return(1);
- }
- return(0);
}
-
# setup one prog on unix using the following logic:
# - if the shipped one is -x and can be executed, use it
# - if the shipped one is -x but cannot be executed, copy it. set -x
# . if the copy is -x and executable, use it
-# . if the copy is not executable, GOTO fallback
# - if the shipped one is not -x, copy it, set -x
# . if the copy is -x and executable, use it
-# . if the copy is not executable, GOTO fallback
-# - if nothing shipped, GOTO fallback
-#
-# fallback:
-# if prog is found in PATH and can be executed, use it.
-#
-# Return 0 if failure, 1 if success.
-#
-sub setup_unix_one {
- my ($p, $def, $arg, $donotwarn) = @_;
+sub setup_unix_tl_one {
+ my ($p, $def, $arg) = @_;
our $tmp;
- my $test_fallback = 0;
- ddebug("trying to set up $p, default $def, arg $arg\n");
+ debug("(unix) trying to set up $p, default $def, arg $arg\n");
if (-r $def) {
- my $ready = 0;
if (-x $def) {
ddebug("default $def has executable permissions\n");
# we have to check for actual "executability" since a "noexec"
# mount option may interfere, which is not taken into account by -x.
- $::progs{$p} = $def;
- if ($arg ne "notest") {
- my $ret = system("'$def' $arg >/dev/null 2>&1" ); # we are on Unix
- if ($ret == 0) {
- $ready = 1;
- debug("Using shipped $def for $p (tested).\n");
- } else {
- ddebug("Shipped $def has -x but cannot be executed, "
- . "trying tmp copy.\n");
- }
+ my $ret = system("'$def' $arg >/dev/null 2>&1" ); # we are on Unix
+ if ($ret == 0) {
+ $::progs{$p} = $def;
+ debug("Using shipped $def for $p (tested).\n");
+ return(1);
} else {
- # do not test, just return
- $ready = 1;
- debug("Using shipped $def for $p (not tested).\n");
+ ddebug("Shipped $def has -x but cannot be executed, "
+ . "trying tmp copy.\n");
}
}
- if (!$ready) {
- # out of some reasons we couldn't execute the shipped program
- # try to copy it to a temp directory and make it executable
- #
- # create tmp dir only when necessary
- $tmp = TeXLive::TLUtils::tl_tmpdir() unless defined($tmp);
- # probably we are running from uncompressed media and want to copy it to
- # some temporary location
- copy($def, $tmp);
- my $bn = basename($def);
- $::progs{$p} = "$tmp/$bn";
- chmod(0755,$::progs{$p});
- # we do not check the return value of chmod, but check whether
- # the -x bit is now set, the only thing that counts
- if (! -x $::progs{$p}) {
- # hmm, something is going really bad, not even the copy is
- # executable. Fall back to normal path element
- $test_fallback = 1;
- ddebug("Copied $p $::progs{$p} does not have -x bit, strange!\n");
- } else {
- # check again for executability
- if ($arg ne "notest") {
- my $ret = system("$::progs{$p} $arg > /dev/null 2>&1");
- if ($ret == 0) {
- # ok, the copy works
- debug("Using copied $::progs{$p} for $p (tested).\n");
- } else {
- # even the copied prog is not executable, strange
- $test_fallback = 1;
- ddebug("Copied $p $::progs{$p} has x bit but not executable?!\n");
- }
- } else {
- debug("Using copied $::progs{$p} for $p (not tested).\n");
- }
- }
- }
- } else {
- # hope that we can find in the global PATH
- $test_fallback = 1;
- }
- if ($test_fallback) {
- # all our playing around and copying did not succeed, try PATH.
- $::progs{$p} = $p;
- if ($arg ne "notest") {
- my $ret = system("$p $arg >/dev/null 2>&1");
+ # we are still here
+ # out of some reasons we couldn't execute the shipped program
+ # try to copy it to a temp directory and make it executable
+ #
+ # create tmp dir only when necessary
+ $tmp = TeXLive::TLUtils::tl_tmpdir() unless defined($tmp);
+ # probably we are running from uncompressed media and want to copy it to
+ # some temporary location
+ copy($def, $tmp);
+ my $bn = basename($def);
+ my $tmpprog = "$tmp/$bn";
+ chmod(0755,$tmpprog);
+ # we do not check the return value of chmod, but check whether
+ # the -x bit is now set, the only thing that counts
+ if (! -x $tmpprog) {
+ # hmm, something is going really bad, not even the copy is
+ # executable. Fall back to normal path element
+ ddebug("Copied $p $tmpprog does not have -x bit, strange!\n");
+ return(0);
+ } else {
+ # check again for executability
+ my $ret = system("$tmpprog $arg > /dev/null 2>&1");
if ($ret == 0) {
- debug("Using system $p (tested).\n");
+ # ok, the copy works
+ debug("Using copied $tmpprog for $p (tested).\n");
+ $::progs{$p} = $tmpprog;
+ return(1);
} else {
- if ($donotwarn) {
- debug("$0: initialization of $p failed but ignored!\n");
- } else {
- tlwarn("$0: Initialization failed (in setup_unix_one):\n");
- tlwarn("$0: could not find a usable $p.\n");
- tlwarn("$0: Please install $p and try again.\n");
- }
- return 0;
+ # even the copied prog is not executable, strange
+ ddebug("Copied $p $tmpprog has x bit but not executable?!\n");
+ return(0);
}
- } else {
- debug ("Using system $p (not tested).\n");
}
+ } else {
+ # default program is not readable
+ return(0);
}
- return 1;
}
@@ -3787,9 +3765,8 @@ sub check_on_working_mirror {
=cut
sub give_ctan_mirror_base {
- my @backbone = qw!http://www.ctan.org/tex-archive
- http://www.tex.ac.uk/tex-archive
- http://dante.ctan.org/tex-archive!;
+ # only one backbone has existed for a while (2018).
+ my @backbone = qw!http://www.ctan.org/tex-archive!;
# start by selecting a mirror and test its operationality
my $mirror = query_ctan_mirror();
@@ -4343,8 +4320,14 @@ passed in C<$r>. If passed undef or empty string, die.
sub repository_to_array {
my $r = shift;
my %r;
- die "internal error, repository_to_array passed nothing (caller="
- . caller . ")" if (!$r);
+ if (!$r) {
+ # either empty string or undef was passed
+ # before 20181023 we die here, now we return
+ # an empty array
+ return %r;
+ }
+ #die "internal error, repository_to_array passed nothing (caller="
+ # . caller . ")" if (!$r);
my @repos = split (' ', $r);
if ($#repos == 0) {
# only one repo, this is the main one!
diff --git a/Build/source/texk/texlive/w32_wrapper/runscript.tlu b/Build/source/texk/texlive/w32_wrapper/runscript.tlu
index da2c1cf5e9f..3356ed09dd9 100755
--- a/Build/source/texk/texlive/w32_wrapper/runscript.tlu
+++ b/Build/source/texk/texlive/w32_wrapper/runscript.tlu
@@ -1,7 +1,7 @@
-local svnrevision = string.match("$Revision: 48059 $", "%d+") or "0"
-local svndate = string.match("$Date: 2018-06-20 05:55:23 +0200 (Wed, 20 Jun 2018) $", "[-%d]+") or "2009-12-04"
+local svnrevision = string.match("$Revision: 48877 $", "%d+") or "0"
+local svndate = string.match("$Date: 2018-10-10 09:25:30 +0200 (Wed, 10 Oct 2018) $", "[-%d]+") or "2009-12-04"
local bannerstr = "runscript wrapper utility (rev. " ..
svnrevision .. ", " .. svndate .. ")\n" ..
"usage: runscript script-name [arguments]\n" ..
@@ -270,6 +270,9 @@ local docstr = [[
2018/06/20
- support also scripts in trees other than TEXMFDIST:
https://tug.org/pipermail/tex-live/2018-June/041922.html
+ 2018/10/10
+ - support cluttex scripts
+
]]
-- HELPER SUBROUTINES --
@@ -762,6 +765,12 @@ elseif progname == 'tlperl' then
elseif progname == 'latexdef' then
progname = 'texdef'
argline = ' --tex latex ' .. argline
+elseif progname == 'cllualatex' then
+ progname = 'cluttex'
+ argline = ' --engine=lualatex ' .. argline
+elseif progname == 'clxelatex' then
+ progname = 'cluttex'
+ argline = ' --engine=xelatex ' .. argline
end
-- general case