This page describes the current process of updating packages in TeX Live.
The basic premise is to take TL updates from CTAN. At present, on the machine where updates will be done, you need to have:
You will most likely also want to set up a nightly cron job to do rm -rf /your/tex/live/root/Build/tmp.*, and also svn -q update, to keep things in sync.
Given the above, running the script tlpkg-ctan-check --check compares a number of TL packages against a local CTAN tree and reports any that are out of date; each line starting with # in the output is one such package. If all packages are up to date, there will be no output.
Let's use poemscol as an example, as it is a standard LaTeX package with no funny tricks. The basic command is ctan2tl.
Typing ctan2tl is too long. Therefore there is a script tlpkg/bin/c2l to do the same thing. Furthermore, it also accepts platform names (and various abbreviations thereof), and calls tl-update-bindir on them. More importantly, it rearranges the output so that important diagnostics and added/removed files are visible at the beginning. This makes it possible to know whether the commit should be done without plowing through the painfully verbose full output. (E.g., if run in an Emacs compilation buffer, you won't have to scroll unless investigation is needed.) It is ugly and would need work for anyone but karl to use it, but it is there.
For commits, c2l accepts a first argument p (for place) which runs ctan2tl -p. There is no dash since then Emacs word commands will delete it without leaving the dash behind.
And yet, running c2l twice also got too long. So there is also a script tlpkg/bin/c2a (a for auto) which automatically runs c2l -p if there are no new or removed files in an update. It accepts a final argument p to do the place when there are such changes.
Furthermore, a script ~karl/bin/tlcom (sorry, but it has paths hardwired to avoid surprises) does the commit with all the relevant files and directories mentioned above.
So, in practice, the process for updating packages is:
c2a somepkg # and consider the output #c2a somepkg p # needed only if files were removed or added tlcom 'somepkg (DDmonYY)'
Anything that gets run several times a day has to be optimized to within an inch of its life, so that's what I (karl) have done. I run c2a with Emacs M-x compile (long since bound to a key) and then tlcom in an Emacs shell buffer. A update with no complications takes less than a minute.
Another script: tlpkg/bin/c2lx. This is for importing the various LaTeX releases: with first argument 3, LaTeX3 (l3kernel et al.); with first argument e LaTeX2e (latex et al.); with first argument dev latex-dev (latex-base-dev et al.). It also accepts abbreviations for some non-LaTeX collections, such as jxu for Xu's packages (beaulivre et al.) and minim-all for the minim* packages. See the script for the complete list.
The exact list of packages for each is at the beginning of the script. It runs ctan2tl on each package and shows a summary at the end of the output, so you have to scroll to the end and check that all happened as it should.
c2lx also accepts an additional argument p to do the --place.
The reason to use this is that it is best to update the core LaTeX packages as a set; if there's an error of some kind (e.g., missing files) with one of its packages, best not to update anything.
The tlpkg-ctan-check script used above should be updated whenever a new package is added to TL, that is, upload to CTAN. Here's the story:
To remove a package from the TeX Live sources, use the tlprm script. It doesn't actually remove anything, or commit any changes, just tells you the actions to take. Please read and understand the output.
If you want to add a new package that is not presently in TL, do more or less the same as above, only at the "if everything looks good" stage, also add it to one of the collections (Master/tlpkg/tlpsrc/collection-*) and the tlpkg-ctan-check script. If you don't know which collection it belongs in, ask.
Also, some packages need a special execute directive; the most common case is packages including Type1 fonts, which should have an addMap or (unlikely) addMixedMap line. See the main infrastructure documentation for all the possibilities, and/or the existing *.tlpsrc files.
Incidentally, if you come across a TeX package in TL that is not on CTAN, please encourage the authors to upload it to CTAN. Our ultimate goal is for everything in TL to come from CTAN.
The description above is only for the usual TeX-world packages: LaTeX styles, fonts, etc. Packages which contain compiled executables are updated differently. Full documentation on building TeX Live.
Packages which contain scripts (non-compiled executables) are updated with the process as above. Packages with new scripts require editing ctan2tds.pl to do the right thing.
The best way to mirror CTAN is to use rsync. Here is a skeleton of the command used on tug.org (of course you'll probably want to redirect the output, etc.):
cd /my/ctan/mirror/directory nice /usr/local/bin/rsync -avz --delete --delete-excluded \ --exclude='.in.*' --exclude=.htaccess \ rsync://$CTAN_MIRROR/ \ $CTAN_LOCAL_DIR
If the CTAN mirror is only for TL update purposes, more can be excluded:
nice rsync -avz --delete --delete-excluded \ --exclude='.in.*' --exclude=.htaccess \ --exclude=/nonfree \ --include='/obsolete/{biblio,macros/latex,fonts/wasy}' --exclude=/obsolete \ --exclude=/systems --exclude=/tools --exclude=/usergrps --exclude=/web \ rsync://$CTAN_MIRROR/ \ $CTAN_LOCAL_DIR
Caveat on discerning which packages to update: the ctan-ann list is not complete. Uploads to CTAN are often made without an announcement. This is one reason that tlpkg-ctan-check exists.