[tex-live] automatic format generation for context

George N. White III gnwiii at gmail.com
Fri Jun 13 18:05:18 CEST 2008


On Fri, Jun 13, 2008 at 8:30 AM, Taco Hoekwater <taco at elvenkind.com> wrote:

> Mojca Miklavec wrote:
>>>
>>> Copies are dangerous -- over time the chances are that one or the
>>> other will get changed.  Using kpsewhich you enhance the chances that
>>> the script that gets run matches the texmf tree version.
>
> Except you need a new wrapper then to find the script. Which is
> exactly what the files in stubs/ do. As discussion is about a
> problem that has already been fixed, I suggest closing this
> thread.

Sorry, I was thinking about TL as a whole.  ConTeXt
stubs are certainly a step in the right direction, and be an
example for other scripts to follow.

The heart of the problem is ensuring that what gets into
bin/<arch> will do right things.   I see ConTeXt as a worst-case
example (lots of scripts, lots of changes), but that is
probably because I haven't considered tex4ht.  Currently
TL2008 uses symbolic links for scripts, which has drawbacks:

1) it sprinkles executable files through the texmf trees.

2) it misses newer versions installed to, e.g., texmf-local
or $HOME/texmf

In the past we have situations where a top-level script is
called and finds subroutines relative to the location of the
top-level script, so the proper target of a symbolic link
after an update may change even when the script at the
end of the link has not.

Some sites mount the texmf trees  with noexec, some scan
for ordinary files with  execute permissions.   In those cases,
symbolic links into texmf trees can't be used for scripts.  TL
needs to be suitable as a replacement for teTeX, which was
careful not to break such configurations.  In practice,
I guess many of these issues are dealt with by the linux
packagers, who tend to put executables in /usr/bin.

When I run ctx-tools --updatecontext, I end up with
new scripts in texmf-local (including some of which don't
exist in the original directory).

Using kpsewhich in TL would ensure that scripts are
found according to the TL (e.g., kpathsea) rules, which
may differ from the ways scripts are found by a
particular interpreter (e.g., lua), but also different
from the fixed symbolic links TL2008 is using.


In TL2007, copies of scripts were put in bin/<arch>, as
was done for teTeX.  TL2008 has many links into the texmf tree:

$ ls -l bin/i386-darwin/ | awk '/\.\./ {print $9,$10,$11}'
a2ping -> ../../texmf/scripts/a2ping/a2ping.pl
dviasm -> ../../texmf-dist/scripts/dviasm/dviasm.py
e2pall -> ../../texmf/scripts/tetex/e2pall.pl
ebong -> ../../texmf-dist/scripts/bengali/ebong.py
epstopdf -> ../../texmf/scripts/epstopdf/epstopdf.pl
getnonfreefonts -> ../../texmf/scripts/texlive/getnonfreefonts.pl
ht -> ../../texmf-dist/scripts/tex4ht/ht.sh
htcontext -> ../../texmf-dist/scripts/tex4ht/htcontext.sh
htlatex -> ../../texmf-dist/scripts/tex4ht/htlatex.sh
htmex -> ../../texmf-dist/scripts/tex4ht/htmex.sh
httex -> ../../texmf-dist/scripts/tex4ht/httex.sh
httexi -> ../../texmf-dist/scripts/tex4ht/httexi.sh
htxelatex -> ../../texmf-dist/scripts/tex4ht/htxelatex.sh
htxetex -> ../../texmf-dist/scripts/tex4ht/htxetex.sh
makeglossaries -> ../../texmf-dist/scripts/glossaries/makeglossaries
mk4ht -> ../../texmf-dist/scripts/tex4ht/mk4ht.pl
mkjobtexmf -> ../../texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl
pdfatfi -> ../../texmf-dist/scripts/oberdiek/pdfatfi.pl
pdfcrop -> ../../texmf-dist/scripts/pdfcrop/pdfcrop.pl
pdfthumb -> ../../texmf-dist/scripts/ppower4/pdfthumb.texlua
perltex -> ../../texmf-dist/scripts/perltex/perltex.pl
pkfix -> ../../texmf/scripts/pkfix/pkfix.pl
ppower4 -> ../../texmf-dist/scripts/ppower4/ppower4.texlua
ps2eps -> ../../texmf/scripts/ps2eps/ps2eps.pl
ps4pdf -> ../../texmf-dist/scripts/pst-pdf/ps4pdf
rungs -> ../../texmf/scripts/texlive/rungs.tlu
simpdftex -> ../../texmf/scripts/simpdftex/simpdftex
texcount -> ../../texmf-dist/scripts/texcount/TeXcount.pl
texdoc -> ../../texmf/scripts/texlive/texdoc.tlu
texdoctk -> ../../texmf/scripts/tetex/texdoctk.pl
thumbpdf -> ../../texmf-dist/scripts/thumbpdf/thumbpdf.pl
tlmgr -> ../../texmf/scripts/texlive/tlmgr.pl
vpe -> ../../texmf-dist/scripts/vpe/vpe.pl

There are far too many files with execute permissions (this
was also true for TL2007):

TL2008 complete:
$ find ./texmf-dist -type f -perm -100 | wc -l
     864

TL2007 (MacTeX)
$ find /usr/local/texlive/2007/texmf-dist -type f -perm -100 | wc -l
     749

The vast majority of these files aren't scripts.

The security issues with searching for scripts are a bit
different from just putting the script in the bin directory,
but a) there will still be scripts taken from the texmf
trees, and b) if you are using TeX in an environment
where security is an issue you need to be careful
about everything in texmf trees.

In the short term, it would be nice to follow the
ConTeXt example and have stub scripts in their
own directory so that it is easy to see what should be
copied or linked (according to site policy).

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia


More information about the tex-live mailing list