diff options
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/tl-makeself-from-tlnet | 65 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-try-install | 5 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-try-makeself | 33 |
3 files changed, 73 insertions, 30 deletions
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 <<END_RUNME # Runs in unpacked archive directory. # Created by `basename $0` at `date`. +creation_date="`date`" NETRELEASE=$NETRELEASE MINRELEASE=$MINRELEASE infrapkg=$infrapkg @@ -94,19 +105,33 @@ if test -r "$ROOT/tlpkg/texlive.tlpdb" && test -d "$ROOT/tlpkg/tlpobj/"; then if test -z "$tlmgrversion"; then echo "$0: tlmgr version did not include version, goodbye." >&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 |