[texhax] install-tl via script (was Download errors from ftp://tug.org)

Liviu Ionescu ilg at livius.net
Thu Dec 14 10:58:31 CET 2017

> On 14 Dec 2017, at 11:08, David Carlisle <d.p.carlisle at gmail.com> wrote:
> Not directly related to your connection issues, but do you have to
> install tl2016?

It took me quite some time to fix the details of the tl2016 install script, and initially I used the main download url, but when you published the 2017 version, my install script failed, because the profile I used was no longer compatible.

> If you have it and need to preserve a stable build environment it's
> reasonable to keep using it, but installing it
> on a new machine  or making a docker image (for others to install?) is
> rather unfortunate.

I guess I was not clear enough about the use case: I need stable build environments (macOS, linux32, linux64, win32, win64) to build various binary distributions, like cross compilers, debuggers, emulators, etc.

these binary distributions also include PDF manuals (GCC manuals, OpenOCD manual, QEMU manual, etc), that I build together with the executables.

> For people uploading bug fixes to ctan for assorted packages, seeing
> copies of old code being installed
> from the "historic" archives is rather depressing to see. It  just
> re-distributes old bugs and increases the
> overall maintenance issues.

I seriously doubt that the manuals I build (GCC manuals, OpenOCD manual, QEMU manual, etc) really use recent TexLive features, so the 2016 distribution should be fine.


my major complain with the current install procedure is that it focuses more on interactive installs, and less on batch installs, or at least the documentation I read was not clear enough.

what I would need is a simple method to specify in a script that I need the 'common' set of packages, without having to enumerate all of them, as I have to do now in a profile.

what I do now is the following:

function do_texlive() {

  echo "Installing texlive..."

  cd "${XBB_BUILD}"

  # https://www.tug.org/texlive/acquire-netinstall.html

  # The master is
  # ftp://tug.org/historic, and it is mirrored at
  # ftp://ftp.math.utah.edu/pub/tex/historic and
  # http://www.math.utah.edu/pub/tex/historic.

  # XBB_TEXLIVE_HISTORIC_URL="ftp://tug.org/historic"



# Create the texlive.profile used to automate the install.
# These definitions are specific to TeX Live 2016.

# Note: __EOF__ is not quoted to allow local substitutions.
cat <<__EOF__ >> "${tmp_profile}"
# texlive.profile, copied from MacTex
TEXMFCONFIG ~/.texlive/texmf-config
TEXMFVAR ~/.texlive/texmf-var
# binary_universal-darwin 1
binary_universal-darwin 0
binary_x86_64-darwin 1
collection-basic 1
collection-bibtexextra 1
collection-binextra 1
collection-context 1
collection-fontsextra 1
collection-fontsrecommended 1
collection-fontutils 1
collection-formatsextra 1
collection-games 1
collection-genericextra 1
collection-genericrecommended 1
collection-htmlxml 1
collection-humanities 1
collection-langafrican 1
collection-langarabic 1
collection-langchinese 1
collection-langcjk 1
collection-langcyrillic 1
collection-langczechslovak 1
collection-langenglish 1
collection-langeuropean 1
collection-langfrench 1
collection-langgerman 1
collection-langgreek 1
collection-langindic 1
collection-langitalian 1
collection-langjapanese 1
collection-langkorean 1
collection-langother 1
collection-langpolish 1
collection-langportuguese 1
collection-langspanish 1
collection-latex 1
collection-latexextra 1
collection-latexrecommended 1
collection-luatex 1
collection-mathextra 1
collection-metapost 1
collection-music 1
collection-omega 1
collection-pictures 1
collection-plainextra 1
collection-pstricks 1
collection-publishers 1
collection-science 1
collection-texworks 1
collection-xetex 1
in_place 0
option_adjustrepo 0
option_autobackup 1
option_backupdir tlpkg/backups
option_desktop_integration 1
option_doc 1
option_file_assocs 1
option_fmt 1
option_letter 1
option_menu_integration 1
option_path 0
option_post_code 1
option_src 1
option_sys_bin /usr/local/bin
option_sys_info /usr/local/share/info
option_sys_man /usr/local/share/man
option_w32_multi_user 1
option_write18_restricted 1
portable 0

    mkdir -p "${XBB_TEXLIVE_FOLDER}"

    tar x -v --strip-components 1 -f "${XBB_DOWNLOAD}/${XBB_TEXLIVE_ARCHIVE}"

    ls -lL

    mkdir -p "${XBB_TEXLIVE_PREFIX}"

    export PATH="${XBB}/bin":${PATH}

    set +e
    "./install-tl" \
      -repository "${XBB_TEXLIVE_REPO_URL}" \
      -no-gui \
      -lang en \
      -profile "${tmp_profile}"
    if [ -f "${XBB_TEXLIVE_PREFIX}"/install-tl.log ]
      cat "${XBB_TEXLIVE_PREFIX}"/install-tl.log > &2
    set -e

  hash -r

the texlive.profile file was copied from a MacTex install, and I have no idea how to control an install script without such a file.

if you know of a better method to install TL via a script, please let me know.



More information about the texhax mailing list