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

David Carlisle d.p.carlisle at gmail.com
Thu Dec 14 12:17:44 CET 2017


On 14 December 2017 at 09:58, Liviu Ionescu <ilg at livius.net> wrote:
>
>
>> 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.
>


It's not so much new features as fixes/updates to old features, for
example ther's been quite a bit of work standardising graphics
inclusion in latex in last couple of years
(bringing the features of latex/pdflatex/luatex/xetex/dvips/xdvipdfmx
etc in to some kind of documented order. For the vast majority of
people of course the code works just as before
but in general maintenance is easier if everyone moves forward to the
new versions.

> ---
>
> 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.


I suspect that you could use one of the standard schemes rather than
enumerating all those packages.
In a travis CI setup for completely automated install to generate
documents on github checkin I use a profile that looks like

selected_scheme scheme-basic
TEXDIR /tmp/texlive
TEXMFCONFIG /tmp/texlivetexmf-config
TEXMFHOME /tmp/texlive/texmf
TEXMFLOCAL /tmp/texlive/texmf-local
TEXMFSYSCONFIG /tmp/texlive/texmf-config
TEXMFSYSVAR /tmp/texlive/texmf-var
TEXMFVAR /tmp/texlive/texmf-var
option_doc 0
option_src 0


scheme-basic is quite small, but works OK for the documents I need
there.  The full script used by the travis Ci is


#!/bin/bash


# See if there is a cached version of TL available
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH


if [ ! -f /tmp/texlive/bin/x86_64-linux/pdflatex ]; then
  # Obtain TeX Live
  wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
  tar -xzf install-tl-unx.tar.gz
  cd install-tl-20*

  # Install a minimal system
  ./install-tl --profile=../support/texlive.profile

tlmgr install collection-fontsrecommended

# Keep no backups (not required, simply makes cache bigger)
tlmgr option -- autobackup 0

fi




>
> what I do now is the following:
>
> ```bash
> function do_texlive() {
>
>   echo
>   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"
>   XBB_TEXLIVE_HISTORIC_URL="http://ftp.math.utah.edu/pub/tex/historic"
>   XBB_TEXLIVE_FOLDER="install-tl"
>   XBB_TEXLIVE_ARCHIVE="install-tl-unx.tar.gz"
>   XBB_TEXLIVE_URL="${XBB_TEXLIVE_HISTORIC_URL}/systems/texlive/2016/${XBB_TEXLIVE_ARCHIVE}"
>   XBB_TEXLIVE_PREFIX="/opt/texlive"
>
>   XBB_TEXLIVE_REPO_URL="${XBB_TEXLIVE_HISTORIC_URL}/systems/texlive/2016/tlnet-final"
>
>   download "${XBB_TEXLIVE_ARCHIVE}" "${XBB_TEXLIVE_URL}"
>
> # Create the texlive.profile used to automate the install.
> # These definitions are specific to TeX Live 2016.
> tmp_profile=$(mktemp)
>
> # Note: __EOF__ is not quoted to allow local substitutions.
> cat <<__EOF__ >> "${tmp_profile}"
> # texlive.profile, copied from MacTex
> TEXDIR ${XBB_TEXLIVE_PREFIX}
> TEXMFCONFIG ~/.texlive/texmf-config
> TEXMFHOME ~/texmf
> TEXMFLOCAL ${XBB_TEXLIVE_PREFIX}/texmf-local
> TEXMFSYSCONFIG ${XBB_TEXLIVE_PREFIX}/texmf-config
> TEXMFSYSVAR ${XBB_TEXLIVE_PREFIX}/texmf-var
> 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
> __EOF__
>
>   (
>     mkdir -p "${XBB_TEXLIVE_FOLDER}"
>     cd "${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 ]
>     then
>       cat "${XBB_TEXLIVE_PREFIX}"/install-tl.log > &2
>     fi
>     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.
>
>
> regards,
>
> Liviu
>


More information about the texhax mailing list