summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/install-tl
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-22 03:01:52 +0000
committerNorbert Preining <norbert@preining.info>2023-03-22 03:01:52 +0000
commitcbbc6dbdbf08b70a7e7d8d184ca51c57c835415a (patch)
tree97ded8ca7095c54f6ff9b661be6b93f80bf792c4 /systems/texlive/tlnet/install-tl
parentde9a0afa47c2ee09e1d4704821cad2b231d36b3f (diff)
CTAN sync 202303220301
Diffstat (limited to 'systems/texlive/tlnet/install-tl')
-rwxr-xr-xsystems/texlive/tlnet/install-tl132
1 files changed, 78 insertions, 54 deletions
diff --git a/systems/texlive/tlnet/install-tl b/systems/texlive/tlnet/install-tl
index 4e182cc7c1..cbf3677bd3 100755
--- a/systems/texlive/tlnet/install-tl
+++ b/systems/texlive/tlnet/install-tl
@@ -1,16 +1,18 @@
#!/usr/bin/env perl
-# $Id: install-tl 63919 2022-07-17 17:49:31Z karl $
-# Copyright 2007-2022
+# $Id: install-tl 66578 2023-03-12 17:33:10Z karl $
+# Copyright 2007-2023
# Reinhard Kotucha, Norbert Preining, Karl Berry, Siep Kroonenberg.
# This file is licensed under the GNU General Public License version 2
# or any later version.
#
+# TeX Live standalone installer.
+#
# Be careful when changing wording: *every* normal informational message
# output here must be recognized by the long grep in tl-update-tlnet.
use strict; use warnings;
-my $svnrev = '$Revision: 63919 $';
+my $svnrev = '$Revision: 66578 $';
$svnrev =~ m/: ([0-9]+) /;
$::installerrevision = ($1 ? $1 : 'unknown');
@@ -145,7 +147,7 @@ use Pod::Usage;
use POSIX ();
use TeXLive::TLUtils qw(platform platform_desc sort_archs
- which getenv win32 unix info log debug tlwarn ddebug tldie
+ which getenv wndws unix info log debug tlwarn ddebug tldie
member process_logging_options rmtree wsystem
mkdirhier make_var_skeleton make_local_skeleton install_package copy
install_packages dirname setup_programs native_slashify forward_slashify);
@@ -163,7 +165,7 @@ eval {
debug("Encode::Locale is loaded.\n");
};
if ($@) {
- if (win32) {
+ if (wndws()) {
die ("For Windows, Encode::Locale is required.\n");
}
@@ -177,7 +179,7 @@ binmode (STDIN, ':encoding(console_in)');
binmode (STDOUT, ':encoding(console_out)');
binmode (STDERR, ':encoding(console_out)');
-if (win32) {
+if (wndws()) {
require TeXLive::TLWinGoo;
TeXLive::TLWinGoo->import( qw(
&admin
@@ -349,7 +351,7 @@ if ((defined $ARGV[0]) && $ARGV[0] eq "-from_ext_gui") {
select(STDOUT); $| = 1;
# windows: suppress console windows when invoking other programs
- Win32::SetChildShowWindow(0) if win32();
+ Win32::SetChildShowWindow(0) if wndws();
}
# If we find a file installation.profile we ask the user whether we should
@@ -433,7 +435,7 @@ if ($opt_help) {
# theoretically we could make a subroutine with all the same
# painful checks as we do in tlmgr, but let's not bother until people ask.
my @noperldoc = ();
- if (win32() || $ENV{"NOPERLDOC"}) {
+ if (wndws() || $ENV{"NOPERLDOC"}) {
@noperldoc = ("-noperldoc", "1");
}
@@ -473,7 +475,7 @@ if ($opt_version) {
print "\nTLPOBJ: " . TeXLive::TLPOBJ->module_revision();
print "\nTLTREE: " . TeXLive::TLTREE->module_revision();
print "\nTLUtils: " . TeXLive::TLUtils->module_revision();
- print "\nTLWinGoo: " . TeXLive::TLWinGoo->module_revision() if win32();
+ print "\nTLWinGoo: " . TeXLive::TLWinGoo->module_revision() if wndws();
print "\n";
}
exit 0;
@@ -526,7 +528,7 @@ if ($opt_profile) { # not allowed if in_place
}
}
-if ($opt_nonadmin and win32()) {
+if ($opt_nonadmin and wndws()) {
non_admin();
}
@@ -928,7 +930,7 @@ sub final_remote_init {
}
$opt_scheme = "" if $opt_in_place;
$vars{'instopt_portable'} = $opt_portable;
- $vars{'instopt_adjustpath'} = 1 if win32();
+ $vars{'instopt_adjustpath'} = 1 if wndws();
log("Installer revision: $::installerrevision\n");
log("Database revision: " . $tlpdb->config_revision . "\n");
@@ -1007,7 +1009,7 @@ sub update_default_src_doc_install {
sub do_installation {
- if (win32()) {
+ if (wndws()) {
non_admin() if !$vars{'tlpdbopt_w32_multi_user'};
}
if ($vars{'instopt_portable'}) {
@@ -1030,7 +1032,7 @@ sub do_installation {
# making the root read-only automatically locks everything below it.
# do TEXDIR now, before it loses its final slash
mkdirhier "$vars{'TEXDIR'}";
- if (win32()) {
+ if (wndws()) {
TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXDIR'});
}
# check for free disk space
@@ -1045,7 +1047,9 @@ sub do_installation {
tlwarn("$0: Insufficient disk space\n$msg\n"
." but continuing anyway per envvar TEXLIVE_INSTALL_NO_DISKCHECK\n");
} else {
- tldie("$0: DISK SPACE INSUFFICIENT!\n$msg\nAborting installation.\n");
+ tldie("$0: DISK SPACE INSUFFICIENT!\n$msg\nAborting installation.\n"
+ . " To skip the check, set the environment variable\n"
+ . " TEXLIVE_INSTALL_NO_DISKCHECK=1\n");
}
}
}
@@ -1056,7 +1060,7 @@ sub do_installation {
my $oldlocal = -d $vars{'TEXMFLOCAL'};
make_local_skeleton "$vars{'TEXMFLOCAL'}";
mkdirhier "$vars{'TEXMFSYSCONFIG'}";
- if (win32()) {
+ if (wndws()) {
TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXMFSYSVAR'});
TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXMFLOCAL'}) unless $oldlocal;
TeXLive::TLWinGoo::maybe_make_ro ($vars{'TEXMFSYSCONFIG'});
@@ -1224,16 +1228,16 @@ operations might be disturbed.\n\n";
# Step 2: Setup the PATH, switch to the new Perl
- my $pathsep = (win32)? ';' : ':';
+ my $pathsep = (wndws())? ';' : ':';
my $plat_bindir = "$TEXDIR/bin/$vars{'this_platform'}";
my $perl_bindir = "$TEXDIR/tlpkg/tlperl/bin";
my $perl_libdir = "$TEXDIR/tlpkg/tlperl/lib";
- my $progext = (win32)? '.exe' : '';
+ my $progext = (wndws())? '.exe' : '';
debug("Prepending $plat_bindir to PATH\n");
$ENV{'PATH'} = $plat_bindir . $pathsep . $ENV{'PATH'};
- if (win32) {
+ if (wndws()) {
debug("Prepending $perl_bindir to PATH\n");
$ENV{'PATH'} = "$perl_bindir" . "$pathsep" . "$ENV{'PATH'}";
$ENV{'PATH'} =~ s!/!\\!g;
@@ -1244,7 +1248,7 @@ operations might be disturbed.\n\n";
debug(" $dir\n");
}
debug("\n");
- if (win32) {
+ if (wndws()) {
$ENV{'PERL5LIB'} = $perl_libdir;
}
@@ -1254,7 +1258,7 @@ operations might be disturbed.\n\n";
my $usedtlpdb = $opt_in_place ? $tlpdb : $localtlpdb;
- if (win32()) {
+ if (wndws()) {
debug("Actual environment:\n" . `set` ."\n\n");
debug("Effective TEXMFCNF: " . `kpsewhich -expand-path=\$TEXMFCNF` ."\n");
}
@@ -1267,7 +1271,7 @@ operations might be disturbed.\n\n";
}
# we have to generate the various config file. That could be done with
- # texconfig generate * but Win32 does not have texconfig. But we have
+ # texconfig generate * but Windows does not have texconfig. But we have
# $localtlpdb and this is simple code, so do it directly, i.e., duplicate
# the code from the various generate-*.pl scripts
@@ -1323,7 +1327,7 @@ operations might be disturbed.\n\n";
}
# option settings in launcher.ini
- if (win32() && !$vars{'instopt_portable'}) {
+ if (wndws() && !$vars{'instopt_portable'}) {
if ($vars{'tlpdbopt_file_assocs'} != 1 || !$vars{'instopt_adjustpath'}) {
# create higher priority tlaunch.ini with adjusted settings
# whether or not launcher mode (desktop integration 2)
@@ -1335,7 +1339,7 @@ operations might be disturbed.\n\n";
# now rerun mktexlsr for updmap-sys and tlmgr paper letter updates.
wsystem("re-running", "mktexlsr", $TEXMFSYSVAR, $TEXMFSYSCONFIG) && exit(1);
- if (win32() and !$vars{'instopt_portable'} and !$opt_in_place) {
+ if (wndws() and !$vars{'instopt_portable'} and !$opt_in_place) {
if ($vars{'tlpdbopt_desktop_integration'} != 2) {
create_uninstaller($vars{'TEXDIR'});
} else {
@@ -1345,12 +1349,22 @@ operations might be disturbed.\n\n";
}
}
- # luatex/context setup.
+ # lmtx/context setup. The story here is that in 2023, the lmtx binary
+ # for x86_64-linux was too new to run on the system where we build TL.
+ # (luametatex: /lib64/libm.so.6: version `GLIBC_2.23' not found)
+ # So we have to try running it to see it succeeds, not just test for
+ # the program's existence. And since it exits nonzero given no args,
+ # we have to specify --version. Hope it keeps working like that ...
+ my $lmtx = "$plat_bindir/luametatex$progext";
if (exists($install{"context"}) && $install{"context"} == 1
- && -x "$plat_bindir/texlua$progext"
- && !exists $ENV{"TEXLIVE_INSTALL_NO_CONTEXT_CACHE"}) {
+ && !exists $ENV{"TEXLIVE_INSTALL_NO_CONTEXT_CACHE"}
+ && TeXLive::TLUtils::system_ok("$lmtx --version")
+ ) {
info("setting up ConTeXt cache: ");
$errcount += run_postinst_cmd("mtxrun --generate");
+ $errcount += run_postinst_cmd("context --luatex --generate");
+ } else {
+ debug("skipped ConTeXt cache setup\n");
}
# all formats option
@@ -1413,7 +1427,7 @@ sub do_tlpdb_postactions {
}
}
# windows: alert the system about changed file associations
- if (win32) { TeXLive::TLWinGoo::update_assocs(); }
+ if (wndws()) { TeXLive::TLWinGoo::update_assocs(); }
info ("finished with package-specific postactions\n");
return $ret;
} # do_tlpdb_postactions
@@ -1458,8 +1472,8 @@ sub rewrite_tlaunch_ini {
sub do_path_adjustments {
my $ret = 0;
info ("running path adjustment actions\n");
- if (win32()) {
- TeXLive::TLUtils::w32_add_to_path($vars{'TEXDIR'}.'/bin/win32',
+ if (wndws()) {
+ TeXLive::TLUtils::w32_add_to_path($vars{'TEXDIR'} . '/bin/windows',
$vars{'tlpdbopt_w32_multi_user'});
broadcast_env();
} else {
@@ -1518,7 +1532,7 @@ sub do_texmf_cnf {
push @changedtmf, "TEXMFHOME = $vars{'TEXMFHOME'}\n";
}
} elsif ($line =~ m/^OSFONTDIR/) {
- if (win32()) {
+ if (wndws()) {
push @changedtmf, "OSFONTDIR = \$SystemRoot/fonts//;\$LOCALAPPDATA/Microsoft/Windows/Fonts//\n";
}
}
@@ -1571,7 +1585,7 @@ EOF
# external perl for third-party scripts?
# the wrapper batchfile has set the environment variable extperl
# to its version if available and 0 otherwise.
- if (win32) {
+ if (wndws()) {
my $use_ext = 0;
if (!$vars{'instopt_portable'} &&
defined $ENV{'extperl'} && $ENV{'extperl'} =~ /^(\d+\.\d+)/) {
@@ -1612,6 +1626,11 @@ EOF
$luavalue =~ s/\$SELFAUTOPARENT/selfautoparent:/g;
print TMFLUA " $luavalue\n";
}
+ if ($vars{'instopt_portable'}) {
+ print TMFLUA " TEXMFHOME = \"\$TEXMFLOCAL\",\n";
+ print TMFLUA " TEXMFVAR = \"\$TEXMFSYSVAR\",\n";
+ print TMFLUA " TEXMFCONFIG = \"\$TEXMFSYSCONFIG\",\n";
+ }
print TMFLUA " },\n";
print TMFLUA " },\n";
if (!$vars{"instopt_write18_restricted"}) {
@@ -1771,7 +1790,7 @@ sub set_texlive_default_dirs {
set_var_from_alternatives("TEX_PREFIX", \$tex_prefix,
($opt_in_place ? abs_path($::installerdir) : undef),
$tlprefixenv,
- (win32() ? getenv('SystemDrive') . '/texlive' : '/usr/local/texlive'));
+ (wndws() ? getenv('SystemDrive') . '/texlive' : '/usr/local/texlive'));
#
set_var_from_alternatives("TEXDIR", \$vars{'TEXDIR'},
$opt_texdir,
@@ -1865,15 +1884,20 @@ sub calc_depends {
}
}
- # if programs for arch=win32 are installed we also have to install
- # tlperl.win32 which provides the "hidden" perl that will be used
+ #
+ # ensure that packages listed in InstallExtraRequiredPackages are installed
+ for my $p (@TeXLive::TLConfig::InstallExtraRequiredPackages) {
+ $install{$p} = 1;
+ }
+
+ # if programs for arch=windows are installed we also have to install
+ # tlperl.windows which provides the "hidden" perl that will be used
# to run all the perl scripts.
- # Furthermore we install tlgs.win32 and tlpsv.win32, too
- if (grep(/^win32$/,@archs)) {
- $install{"tlperl.win32"} = 1;
- $install{"tlgs.win32"} = 1;
+ # Furthermore we install tlgs.windows
+ if (grep(/^windows$/,@archs)) {
+ $install{"tlperl.windows"} = 1;
+ $install{"tlgs.windows"} = 1;
# tlpsv is gone
- # $install{"tlpsv.win32"} = 1;
}
# loop over all the packages until it is getting stable
@@ -1901,10 +1925,10 @@ sub calc_depends {
foreach $a (@archs) {
$install{"$foo.$a"} = 1 if defined($tlpdb->get_package("$foo.$a"));
}
- } elsif ($p_dep =~ m/^(.*)\.win32$/) {
- # a win32 package should *only* be installed if we are installing
- # the win32 arch
- if (grep(/^win32$/,@archs)) {
+ } elsif ($p_dep =~ m/^(.*)\.windows$/) {
+ # a windows package should *only* be installed if we are installing
+ # the windows arch
+ if (grep(/^windows$/,@archs)) {
$install{$p_dep} = 1;
}
} else {
@@ -1999,7 +2023,7 @@ END_EXPLICIT_MIRROR
$vars{"tlpdbopt_$o"} = $tlpdb->option($o)
if (!defined($profiledata{"tlpdbopt_$o"}));
}
- if (win32()) {
+ if (wndws()) {
# below, we really mean (start) menu integration.
# 2016: always menu shortcuts, never desktop shortcuts, whatever the setting
# 2017: new option value 2: launcher instead of menu.
@@ -2078,7 +2102,7 @@ sub initialize_collections {
++$vars{'n_collections_selected'};
}
}
- if ($vars{"binary_win32"}) {
+ if ($vars{"binary_windows"}) {
$vars{"collection-wintools"} = 1;
++$vars{'n_collections_selected'};
}
@@ -2372,7 +2396,7 @@ sub do_install_packages {
tlwarn("Or you can restart by running the installer with:\n");
my $repostr = ($opt_location ? " --repository $location" : "");
my $args = "--profile $profile_name [YOUR-EXTRA-ARGS]";
- if (win32()) {
+ if (wndws()) {
tlwarn(" install-tl-windows.bat$repostr $args\n");
} else {
tlwarn(" install-tl$repostr $args\n");
@@ -2542,11 +2566,11 @@ sub import_settings_from_old_tlpdb {
= $previoustlpdb->option_pkg("00texlive.installation", "install_srcfiles");
$vars{'tlpdbopt_create_formats'}
= $previoustlpdb->option_pkg("00texlive.installation", "create_formats");
- $vars{'tlpdbopt_desktop_integration'} = 1 if win32();
+ $vars{'tlpdbopt_desktop_integration'} = 1 if wndws();
$vars{'instopt_adjustpath'}
= $previoustlpdb->option_pkg("00texlive.installation", "path");
$vars{'instopt_adjustpath'} = 0 if !defined($vars{'instopt_adjustpath'});
- $vars{'instopt_adjustpath'} = 1 if win32();
+ $vars{'instopt_adjustpath'} = 1 if wndws();
$vars{'tlpdbopt_sys_bin'}
= $previoustlpdb->option_pkg("00texlive.installation", "sys_bin");
$vars{'tlpdbopt_sys_man'}
@@ -2569,7 +2593,7 @@ sub import_settings_from_old_tlpdb {
#
# try to import paper settings
my $xdvi_paper;
- if (!win32()) {
+ if (!wndws()) {
$xdvi_paper = TeXLive::TLPaper::get_paper("xdvi");
}
my $pdftex_paper = TeXLive::TLPaper::get_paper("pdftex");
@@ -2643,8 +2667,8 @@ sub select_scheme {
# we have first set all collection-* keys to zero and than
# set to 1 only those which are required by the scheme
# since now scheme asks for collection-wintools we set its vars value
- # to 1 in case we are installing win32 binaries
- if ($vars{"binary_win32"}) {
+ # to 1 in case we are installing windows binaries
+ if ($vars{"binary_windows"}) {
$vars{"collection-wintools"} = 1;
++$vars{'n_collections_selected'};
}
@@ -2809,7 +2833,7 @@ sub create_welcome {
push @::welcome_arr, __(
"See %s/index.html for links to documentation.\nThe TeX Live web site (https://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at https://tug.org/usergroups.html.",
$::vars{'TEXDIR'});
- if (win32()
+ if (wndws()
|| ($vars{'instopt_adjustpath'}
&& $vars{'tlpdbopt_desktop_integration'} != 2)) {
; # don't tell them to make path adjustments on Windows,
@@ -3468,7 +3492,7 @@ Omit creating the ConTeXt cache. This is useful for redistributors.
=item C<TEXLIVE_INSTALL_NO_DISKCHECK>
If set to 1, omit free disk space check. By default, if a
-POSIX-compliant C<df> program (supporting C<-P>) is available, the
+POSIX-compliant C<df> program (supporting C<-Pk>) is available, the
installer checks for available disk space in the selected installation
location, and will abort installation if there is insufficient disk
space, plus a margin of 100MB. An equivalent check is made on Windows
@@ -3576,7 +3600,7 @@ This script and its documentation were written for the TeX Live
distribution (L<https://tug.org/texlive>) and both are licensed under the
GNU General Public License Version 2 or later.
-$Id: install-tl 63919 2022-07-17 17:49:31Z karl $
+$Id: install-tl 66578 2023-03-12 17:33:10Z karl $
=cut
# to remake HTML version: pod2html --cachedir=/tmp install-tl >/tmp/itl.html