From c70a9d62d23e2c3bd11719ef5af274c9a0c8471c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 1 Aug 2018 02:04:28 +0000 Subject: bin/tl-makeself-from-tlnet: new -- --debug option for embedded script; copy Windows support files into archive; special case installation of xz.exe, wget.exe, tar.exe if we are updating the win32 platform. https://github.com/amaxwell/tlutility/issues/65 bin/tl-try-makeself: allow args to override, default to /tmp/krit and /tmp/ki. bin/tl-try-install: allow arg to specify profile; doc. dev/profiles/TLinfra+exe.pro: new test profile with multiple platforms, including Windows. Doc updates to other *.pro. install-tl: do not output Perl warning if binary_* is specified without a value; doc. (Not yet implemented: should give our own warning.) git-svn-id: svn://tug.org/texlive/trunk@48328 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 13 ++++--- Master/tlpkg/bin/tl-makeself-from-tlnet | 65 ++++++++++++++++++++++++------- Master/tlpkg/bin/tl-try-install | 5 ++- Master/tlpkg/bin/tl-try-makeself | 33 +++++++++------- Master/tlpkg/dev/profiles/README | 7 ++-- Master/tlpkg/dev/profiles/TLinfra+exe.pro | 20 ++++++++++ Master/tlpkg/dev/profiles/TLroot.pro | 1 + 7 files changed, 105 insertions(+), 39 deletions(-) create mode 100644 Master/tlpkg/dev/profiles/TLinfra+exe.pro (limited to 'Master') diff --git a/Master/install-tl b/Master/install-tl index 82807617694..eb3bc726618 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -617,7 +617,8 @@ if ($opt_profile eq "") { my $varsdump = ""; foreach my $key (sort keys %vars) { - $varsdump .= " $key: \"" . $vars{$key} . "\"\n"; + my $val = $vars{$key} || ""; + $varsdump .= " $key: \"$val\"\n"; } log("Settings:\n" . $varsdump); @@ -1956,9 +1957,9 @@ sub read_profile { # if there are still keys in the %pro array, some unknown keys have # been written in the profile, bail out if (my @foo = keys(%pro)) { - tlwarn("Unknown key in profile $profilepath: @foo\n"); + tlwarn("Unknown key(s) in profile $profilepath: @foo\n"); tlwarn("Stopping here.\n"); - exit(1); + exit 1; } # if a profile contains *only* the selected_scheme setting without @@ -2919,11 +2920,11 @@ Here is the current list: B (prefix C) For each supported platform in TeX Live (directories under C), the -variable CI can be set. For example: +variable CI can be set with value 1. For example: - binary_x86_64-linux + binary_x86_64-linux 1 -If no C variable is specified, the default is whatever the +If no C settings are made, the default is whatever the current machine is running. In releases before 2017, many profile variables had different diff --git a/Master/tlpkg/bin/tl-makeself-from-tlnet b/Master/tlpkg/bin/tl-makeself-from-tlnet index f0b393f63cf..27edef7e264 100755 --- a/Master/tlpkg/bin/tl-makeself-from-tlnet +++ b/Master/tlpkg/bin/tl-makeself-from-tlnet @@ -13,6 +13,19 @@ # The resulting update-tlmgr-*.sh is run (by the user) in the TL # installation directory to be updated; it uses kpsewhich from PATH to # determine what to do update. +# +# Debugging/development/testing: +# - create test hierarchy; either run install-tl as you like, or: +# tl-try-install Master/tlpkg/dev/profiles/TLinfra+exe.pro # or whatever +# This creates /tmp/ki with various platforms. +# - then see tl-try-makeself: +# running that will copy tlcritical to /tmp/krit, +# run this script (tl-makeself-from-tlnet) there, +# then update /tmp/ki from /tmp/krit, that is, +# doing an update as a user would do in their installed hierarchy. +# +# update-tlmgr-r*.sh --list # list files included in archive +# update-tlmgr-r*.sh -- --debug # run embedded script with -vx and more mydir=`cd \`dirname "$0"\` && pwd` # Master/tlpkg/bin PATH=$mydir:$PATH # for tlpkginfo @@ -56,11 +69,8 @@ if test -z "$infrarev"; then fi # for i in "$ARCHIVE"/$infrapkg*.tar.xz; do - case "$i" in - *win32*) ;; - *) : "uncompressing $i" # for debugging - xz -d <"$i" | tar -xf - || exit 1;; - esac + : "uncompressing $i" # for debugging + xz -d <"$i" | tar -xf - || exit 1 done cd .. # back to the (temp) dir where we building things up @@ -75,6 +85,7 @@ cat >runme.sh <&2 tlmgr version >&2 + echo "($0: makeself creation date = $creation_date.)" >&2 exit 1 fi # echo "$0: tlmgr version says this is TeX Live $tlmgrversion" + # + # Extra-verbose debugging option. + if test "x$1" = "x--debug"; then + shift + opt_debug=1 + set -vx + : "$0: makeself creation date = $creation_date." + else + opt_debug= + fi + # if test "x$1" = "x--upgrade"; then if test "x$NETRELEASE" = "x$tlmgrversion"; then echo "$0: have TL $tlmgrversion, new version also $NETRELEASE;">&2 echo "$0: using --upgrade doesn't make sense; terminating." >&2 + echo "($0: makeself creation date = $creation_date.)" >&2 exit 1 elif test "$tlmgrversion" -lt "$MINRELEASE"; then echo "$0: upgrading from $tlmgrversion not supported;" >&2 echo "$0: can only upgrade from $MINRELEASE to $NETRELEASE." >&2 echo "$0: terminating." >&2 + echo "($0: makeself creation date = $creation_date.)" >&2 exit 1 else echo "$0: ok, doing full release upgrade " \ @@ -120,9 +145,10 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb" && test -d "$ROOT/tlpkg/tlpobj/"; then # them all. The loop below and tlmgr invocation at the end will update. mv ./master/bin . mkdir ./installer - mv ./master/tlpkg/installer/xz ./installer + mv ./master/tlpkg/installer/tar.exe ./installer + mv ./master/tlpkg/installer/xz ./installer mv ./master/tlpkg/installer/wget ./installer - mv ./master/tlpkg/installer/lz4 ./installer # could be anywhere + mv ./master/tlpkg/installer/lz4 ./installer # could be anywhere # install the architecture-independent files. (cd master && tar cf - *) | (cd "$ROOT" && tar xf -) || exit 1 @@ -144,26 +170,39 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb" && test -d "$ROOT/tlpkg/tlpobj/"; then src_tlpobj=master/tlpkg/tlpobj tlpobjs=$src_tlpobj/$infrapkg.tlpobj - # for each installed directory of binaries + if test -n "$opt_debug"; then + (: "here (`pwd`):"; ls) >&2 + (: "installer:"; ls installer) >&2 + (: "installer/wget:"; ls installer/wget) >&2 + (: "installer/xz:"; ls installer/xz) >&2 + (: "ROOT/bin=$ROOT/bin:"; ls "$ROOT"/bin) >&2 + fi + + # for each installed directory of binaries ... for a in "$ROOT"/bin/*; do test -d "$a" || continue # skip any cruft files b=`basename "$a"` # just the architecture name - echo "$0: updating $a..." + echo "$0: updating $a ..." # add the tlpobjs for this platform to the list. tlpobjs="$tlpobjs $src_tlpobj/$infrapkg.$b.tlpobj" # install the bin dir for this platform. - (cd bin && tar cf - "$b") | (cd "$ROOT/bin" && tar xf -) || exit 1 + (cd bin >&2 && tar cf - "$b") | (cd "$ROOT/bin" && tar xf -) || exit 1 - # copy the xz binaries, sometimes with .exe, for Cygwin. + # copy the xz binaries: if test -r installer/xz/xz."$b"; then cp installer/xz/xz."$b" "$t_xzdir/" || exit 1 elif test -r installer/xz/xz."$b".exe; then + # with .exe, for Cygwin. cp installer/xz/xz."$b".exe "$t_xzdir/" || exit 1 + elif test "$b" = win32 && test -r installer/xz/xz.exe; then + # annoyingly, we left .win32 out of the name, special cases all around: + cp installer/xz/xz.exe "$t_xzdir/" || exit 1 + cp installer/wget/wget.exe "$t_wgetdir/" || exit 1 + cp installer/tar.exe "$t_instdir/" || exit 1 else - echo "$0: no xz.$b[.exe] binary for $a in `pwd`/installer/xz." >&2 - ls installer/xz >&2 + echo "$0: no xz.[$b][.exe] binary for $a in `pwd`/installer/xz." >&2 exit 1 fi # diff --git a/Master/tlpkg/bin/tl-try-install b/Master/tlpkg/bin/tl-try-install index a677dbef25f..7439427d4ab 100755 --- a/Master/tlpkg/bin/tl-try-install +++ b/Master/tlpkg/bin/tl-try-install @@ -14,15 +14,16 @@ rm -rf $instdir* && echo "removed $instdir*." mydir=`cd \`dirname "$0"\` && pwd` # Master/tlpkg/bin Master=`cd $mydir/../.. && pwd` -# don't let cwd interfere +# don't let cwd or existing PATH interfere cd "$HOME" || exit 1 +PATH=/usr/local/bin:/usr/bin:/bin # /usr/local/bin for good perl on tug #Master=$tm #`cd $mydir/../.. && pwd` # thisrel=/usr/local/texlive/`date +%Y` # not necessarily, but whatever prevrel=/usr/local/texlive/`expr "$(date +%Y)" - 1` -pro=--profile=$Master/tlpkg/dev/profiles/TLinfra.pro #infra min small ... full +pro=--profile=${1-Master/tlpkg/dev/profiles/TLinfra.pro} #infra min ... full exec time $Master/install-tl $pro exec time $lp/install-tl $pro exec time $lp/install-tl $pro --repo ftp://ftp.cstug.cz/pub/tex/local/tlpretest diff --git a/Master/tlpkg/bin/tl-try-makeself b/Master/tlpkg/bin/tl-try-makeself index 536261666ec..0c2482a926d 100755 --- a/Master/tlpkg/bin/tl-try-makeself +++ b/Master/tlpkg/bin/tl-try-makeself @@ -1,27 +1,30 @@ #!/bin/sh -ex # $Id$ -# Test tl-makeself with spaces in filenames. Public domain. +# Test tl-makeself, e.g., with spaces in filenames. Public domain. +# # Assumes $lc is set to the tlcritical dir; copies from there -# to make the test directory in which we run makeself +# to make the test directory in which we run makeself and then try the +# update. # -# Although having the source in a spaceful directory is not really -# needed, might as well test that too. +# Although having the source in a spaceful directory is not +# needed, might as well test that too unless inconvenient. # to set up: -mkdir $crit; cp -r $lc/{archive,tlpkg} $crit -crit="/tmp/krit sp" -test -d "$crit" || mkdir "$crit" -rsync -a $lc/{archive,tlpkg} "$crit" +testdir=${2-"/tmp/krit"} # spc" +rm -rf "$testdir" +mkdir "$testdir" +rsync -a "$lc"/{archive,tlpkg} "$testdir" -cd "$crit" # because makeself writes to the current directory +cd "$testdir" # because makeself writes to the current directory rm -f update*sh # remove previous attempts -tl-makeself-from-tlnet "$crit" -ls -l "$crit" +tl-makeself-from-tlnet "$testdir" +ls -l "$testdir" -# Using ../dev/profiles/TLspace.pro results in: -tl="/tmp/ki sp" +# Using ../dev/profiles/TLspace.pro results in "/tmp/ki sp", +# but most of the dev/profiles just install in /tmp/ki. +tl=${1-"/tmp/ki"} # sp" cd "$tl" # Now try running the updater in the installed tree. -PATH=$tl/bin/x86_64-linux:$PATH -"$crit"/update-tlmgr-r*.sh # --quiet causes gzip error? +PATH=$tl/bin/x86_64-linux:/usr/local/bin:/usr/bin:/bin +"$testdir"/update-tlmgr-r*.sh #-- --debug diff --git a/Master/tlpkg/dev/profiles/README b/Master/tlpkg/dev/profiles/README index bb8449ec5bd..49d6bb8d30b 100644 --- a/Master/tlpkg/dev/profiles/README +++ b/Master/tlpkg/dev/profiles/README @@ -1,8 +1,9 @@ $Id$ This README and all profiles are public domain (and trivial). -Just a collection of profile files which install in /tmp/ki*, -testing various features. Most have not been updated for the 2017 -install-tl option name changes, and have not been minimized. +Just a collection of profile files which (almost all) install in +/tmp/ki*, testing various features. Most have not been updated for the +2017 install-tl option name changes (so rely on our maintaining +compatibility), and have not been minimized. tlpkg/bin/tl-try-install can use them. Happy testing. diff --git a/Master/tlpkg/dev/profiles/TLinfra+exe.pro b/Master/tlpkg/dev/profiles/TLinfra+exe.pro new file mode 100644 index 00000000000..561cdf1c296 --- /dev/null +++ b/Master/tlpkg/dev/profiles/TLinfra+exe.pro @@ -0,0 +1,20 @@ +# $Id: TLinfra.pro 44249 2017-05-08 17:26:47Z karl $ +# infrastructure only, installing several binary sets, including Windows. +selected_scheme scheme-infraonly +TEXDIR /tmp/ki +TEXMFHOME /tmp/ki/user/home +TEXMFLOCAL /tmp/ki/texmf-local +TEXMFSYSCONFIG /tmp/ki/sys/config +TEXMFSYSVAR /tmp/ki/sys/var +TEXMFCONFIG /tmp/ki/user/config +TEXMFVAR /tmp/ki/user/var +option_doc 0 +option_fmt 0 +option_src 0 +option_adjustrepo 0 +binary_armhf_linux 1 +binary_i386-cygwin 1 +binary_win32 1 +binary_x86_64-cygwin 1 +binary_x86_64-darwin 1 +binary_x86_64-linux 1 diff --git a/Master/tlpkg/dev/profiles/TLroot.pro b/Master/tlpkg/dev/profiles/TLroot.pro index 4db1cae84d6..52047792eb8 100644 --- a/Master/tlpkg/dev/profiles/TLroot.pro +++ b/Master/tlpkg/dev/profiles/TLroot.pro @@ -1,4 +1,5 @@ # $Id$ +# Install under /, instead of /tmp/ki. selected_scheme scheme-minimal TEXDIR /tl TEXMFHOME /tl/user/home -- cgit v1.2.3