[tex-live] install TL from net

Reinhard Kotucha reinhard.kotucha at web.de
Wed Feb 8 02:18:50 CET 2006


Hi,
it would be nice if people can install TeXLive from the network
instead of downloading the complete ISO image.  Most people do not
need all the packages provided by TeXLive.  Also, packages can be
updated after TL has been released.

When the packages are available on the server, maybe they can be
maintained continuously and a TL release will be just a snapshot of the
packages.

There are several ways to achieve this goal, one would be to adapt the
MikTeX package tool, another one would be to use the TeXLive install
script.

I'm not familiar with the TL package management system and, even
worse, I don't have much time at the moment.

However, I installed a small TeXLive from the net successfully
yesterday by adding a few lines to install-tl.sh.

The result is quite promising, I selected "Essential programs" and
"The bare TeXLive" in the standard collections menu and "German" in
the languages menu.

With 1Mb/s DSL I got:

  $ ./install-tl.sh

  [...a lot of stuff omitted...]

  Welcome to TeX Live!

  real    9m0.713s
  user    0m5.556s
  sys     0m10.861s



That's what I've done:

I copied the content of the install-CD to a directory, removed
everything in the "archive" directory and made this directory
writable.

Then I modified install-tl.sh according to the following patch:
______________________________________________________________
*** install-tl.sh--	Tue Sep 20 01:24:49 2005
--- install-tl.sh	Tue Feb  7 23:55:16 2006
***************
*** 32,37 ****
--- 32,39 ----
  # set this for debugging...
  debug=${OVERRIDE_DEBUG-false}
  
+ NETDIR="http://tug.org/ftp/texlive/Contents/inst"
+ 
  unset CDPATH  # avoid unwanted output
  
  while test $# -gt 0; do
***************
*** 125,130 ****
--- 127,140 ----
  }
  
  
+ download()
+ {
+   if test -w $CDDIR/`dirname $1`; then
+     test -f $CDDIR/$1 || wget -N -P $CDDIR/`dirname $1` $NETDIR/$1
+   fi
+ }  
+ 
+ 
  # This is run when the user does "I" for a normal disk install.
  # 
  install_now()
***************
*** 135,143 ****
   
    echo "Initializing texmf-var..." >&2
    # additional static config files (pdftexconfig.tex, mktex.cnf, ...).
    (
      cd $TEXDIR/texmf-var || exit 1
!     unzip -qq $CDDIR/archive/texmf-var.zip
    )
  
    echo >&2
--- 145,154 ----
   
    echo "Initializing texmf-var..." >&2
    # additional static config files (pdftexconfig.tex, mktex.cnf, ...).
+   download archive/texmf-var.zip
    (
      cd $TEXDIR/texmf-var || exit 1
!     unzip -o -qq $CDDIR/archive/texmf-var.zip
    )
  
    echo >&2
***************
*** 152,157 ****
--- 163,169 ----
    for f in `sort -u $work_dir/*.list.*`
    do
     $debug || $echon "." >&2
+    download archive/$f
     if test -f $CDDIR/archive/$f
     then
      $debug && echo "  Install files from package/$f" >&2
***************
*** 162,167 ****
--- 174,180 ----
       eval this=\$p_${p}_fn
       P=`echo $p | sed -e 's/_/-/g' ` 
       F=`echo $f | sed 's/\.zip$//'`
+      download archive/$F.$this.zip
       if test -f $CDDIR/archive/$F.$this.zip; then
        $debug && echo "  Install binary programs from archive/$F.$this.zip" >&2
        (cd $TEXDIR; unzip -o -qq $CDDIR/archive/$F.$this.zip)
______________________________________________________________


I use wget with the --timestamping option (-N) so that it just mirrors
the files.  No package is downloaded twice when you install new
packages later, even if you select these packages in the menu, unless
the file has been updated on the sever.

The unzip -o option is only for testing.  Remove it if you change
anything in texmf-var.

The patch above does not alter the behaviour of the script when the
installation media is a CD.  Files are downloaded only if the archive
directory is writable, which is never the case on a CD.


BTW., a zipped version of http://tug.org/ftp/texlive/Contents/inst is
about 61.3 MB when the "archive" directory is empty.  That's still too
much but I think that the files from which the menues are derived
should be mirrored as well.

Some programs are not available for each platform.  However, the
install script assumes they are.  But when I installed vntex, I even
got messages like:

  http://tug.org/ftp/texlive/Contents/inst/archive/cm.x86_64-linux.zip
           => `/home/reinhard/texlive-2005-inst/archive/cm.x86_64-linux.zip'
  Resolving tug.org... 130.225.2.178
  Connecting to tug.org|130.225.2.178|:80... connected.
  HTTP request sent, awaiting response... 404 Not Found
  23:59:32 ERROR 404: Not Found.

cm fonts are certainly not platform dependent and if the install
script looks for files which don't exist (it checks whether a zip
file exists before it attempts to extract it) it is quite explainable
that installing from a CDROM is slow.  Or did I do something wrong?

As I said, I don't have much time now.  Anyone out there who is
interested in making something useful from it?

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the tex-live mailing list