From 4624d267ff83f197bbce4cf296d291465069296c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 27 Feb 2024 16:39:22 +0000 Subject: infrastructure changes for making the context 2024 update git-svn-id: svn://tug.org/texlive/trunk@70188 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/c2l | 14 +-- Master/tlpkg/bin/ctan2tl | 3 + Master/tlpkg/bin/tlcom | 29 +++++++ Master/tlpkg/bin/tlpkginfo | 7 +- Master/tlpkg/libexec/ctan2tds | 133 ++++++++++++++++++++++------- Master/tlpkg/tlpsrc/context-legacy.tlpsrc | 7 +- Master/tlpkg/tlpsrc/context-texlive.tlpsrc | 15 +++- Master/tlpkg/tlpsrc/context.tlpsrc | 15 ++-- 8 files changed, 177 insertions(+), 46 deletions(-) create mode 100755 Master/tlpkg/bin/tlcom (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/bin/c2l b/Master/tlpkg/bin/c2l index 11ce4c4b4f8..aa98c937f47 100755 --- a/Master/tlpkg/bin/c2l +++ b/Master/tlpkg/bin/c2l @@ -74,9 +74,9 @@ sub main { amd64-freebsd i386-freebsd i386-linux i386-solaris x86_64-linux x86_64-linuxmusl x86_64-solaris)) { - system ("$0 $p") && die "norbert/$p failed"; + system ("$0 $p") && die "github/$p failed"; } - print "$0: norbert updates done.\n"; + print "$0: gh (github/norbert) update done.\n"; exit 0; } elsif ($arg eq "cg" || $arg eq "moj" || $arg eq "mojca") { @@ -84,18 +84,22 @@ sub main { )) { system ("$0 $p") && die "cg/$p failed"; } - print "$0: cg (contextgarden) updates done.\n"; + print "$0: cg (contextgarden/mojca) updates done.\n"; exit 0; } elsif ($arg eq "all") { - for my $p (qw(aarch dar cg norbert)) { + for my $p (qw(dar cg norbert)) { system ("$0 $p") && die "all/$p failed"; } print "$0: all updates done.\n"; exit 0; + + } elsif ($arg =~ /^(lmtx|luametatex)$/) { + print ("tl-update-bindir $arg\n"); + exec ("tl-update-bindir", $arg); } - if (-d "$TLROOT/Master/bin/$arg") { + if (-d "$TLROOT/Master/bin/$arg") { # platform name print ("tl-update-bindir $arg\n"); exec ("tl-update-bindir", $arg); } diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl index 91f4b43b6d0..6fa11dab89b 100755 --- a/Master/tlpkg/bin/ctan2tl +++ b/Master/tlpkg/bin/ctan2tl @@ -9,6 +9,9 @@ unset CDPATH # avoid extraneous output LC_ALL=C; export LC_ALL # avoid problems with diff, comm, etc umask 022 +# to avoid the svn hit on every run when developing. +TLPKGINFO_CATALOGUE_NO_UPDATE=1; export TLPKGINFO_CATALOGUE_NO_UPDATE + mydir=`cd \`dirname $0\` && pwd` # Master/tlpkg/bin libexec=`cd $mydir/../libexec && pwd` # Master/tlpkg/libexec PATH=$mydir:$libexec:$PATH # we call lots of our other tools diff --git a/Master/tlpkg/bin/tlcom b/Master/tlpkg/bin/tlcom new file mode 100755 index 00000000000..0d93bedfea4 --- /dev/null +++ b/Master/tlpkg/bin/tlcom @@ -0,0 +1,29 @@ +#!/bin/sh +# $Id$ +# Commit after TL package update. We rely on PATH to deal with trunk vs. +# branch. (See c2a and c2b.) + +test $# -eq 0 && cd / +/bin/pwd >/dev/null || exit 1 + +msg=`echo "$1" | sed "s/^-m//"` +shift + +dirlist=${TMPDIR-/tmp}/`id -u`.tlplace.dirs +tlroot=`tail -n 1 $dirlist | sed 's,/Master.*,,'` +if test ! -d "$tlroot/Master"; then + echo "$0: failed to get tlroot from $dirlist: $tlroot" >&2 + exit 1 +fi +echo "$tlroot" +sleep 1 + +svn commit -m"$msg" `cat $dirlist` \ + "$tlroot"/Master/tlpkg/bin/tlpkg-ctan-check \ + "$tlroot"/Master/tlpkg/bin/tlpkginfo \ + "$tlroot"/Master/tlpkg/libexec/ctan2tds \ + "$tlroot"/Master/tlpkg/bin/ctan2tl \ + "$tlroot"/Master/tlpkg/bin/c2lx \ + "$tlroot"/Master/tlpkg/tlpsrc/ \ + "$tlroot"/TODO \ + "$@" diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 80dd592bc6f..b89e8f8eef6 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -240,6 +240,11 @@ sub find_ctan_dir { # not in Catalogue as yet, 27apr16. $ctan_dir = "macros/cstex/base"; + } elsif ($pkgname eq "context-legacy") { + # We use the same mirrored .zip for context and context-legacy, + # so the value here is irrelevant. Just avoid the warning below. + $ctan_dir = "/nonesuch"; + } elsif ($pkgname eq "cs") { # For cs, we need to unpack from multiple tarballs, # so copy the entire cstex directory. @@ -422,7 +427,7 @@ sub prepare { #warn "prepare: initial tds_path for $pkg = $tds_path\n"; # various exceptions to tds.zip location ... - if ($pkg eq "context") { + if ($pkg =~ /^context(-legacy)?$/) { $tds_path = "/home/ftp/mirror/www.pragma-ade.nl/context/latest/cont-tmf.zip"; } elsif ($pkg eq "cmexb") { diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 5089d3b0b40..0765de43f12 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1714,6 +1714,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'coloredbelts' => '&POST_onelevel', 'context' => '&POSTcontext', 'context-games' => '&POSTcontext_games', + 'context-legacy' => '&POSTcontext_legacy', 'coordsys' => '&POSTcoordsys', 'couleurs-fr' => '&POST_onelevel', 'create-theorem' => '&POST_onelevel', @@ -6776,39 +6777,37 @@ sub POSTcmcyr { &SYSTEM ("$MV $DEST/fonts/source/public/cmcyr/cmcsc{8,9,10}.mf ."); } + +# ConTeXt is complicated. Procedure for updating: +# 1. c2a context # change code here as needed until good, then: +# 1b. c2a context p # place new files in svn; don't commit yet. +# 2. tl-update-bindir lmtx # update luametatex binaries; +# # possibly no_lmtx_platforms in context.tlpsrc +# # will need to be updated. Then commit: +# 3. tlcom "context $version" +# 4. tl-update-tlpdb -v # because we need to clean new context files for: +# 5. c2a context-legacy # until good, then: +# 6. c2a context-legacy p +# 7. tlcom "context-legacy $version" +# 8. if needed, update context-legacy by hand. +# sub POSTcontext { - print "POST$package - rearrange, remove\n"; + print "POST$package - remove context-legacy etc. files, rearrange for TL\n"; + print "*** See POSTcontext in ctan2tds for ConTeXt update procedure.\n"; &xchdir ($DEST); - # put files in context subdirs. - &mv_with_mkdir ("colors/icc/context", "tex/context/colors/icc"); - &mv_with_mkdir ("README.adoc", "doc/context"); + &context_common_removals (); - # clean up files Hans wants in his distribution but are confusing or - # problematic in TeX Live. - &SYSTEM ("$RM -rf colors"); # nonfree - &SYSTEM ("$RM -rf fonts/truetype/hoekwater/lm/");# lmtypewriter10-regular.ttf - &SYSTEM ("$RM -rf fonts/data/tests/"); # texmfhome.otf - &SYSTEM ("$RM -rf source"); # entire engine source - &SYSTEM ("$RM -rf web2c/"); # context*cnf*, texlive*cnf.lua - # nonfree (first two) and unused (jmn) fonts. - &SYSTEM ("find -name \*koeiel\* -o -name \*lucida\* -o -name jmn" - . "| xargs rm -rfv"); + # remove the mkii files we put into context-legacy. + &remove_files_of_pkg ("context-legacy"); - # mkii removals -# &SYSTEM ("$RM -rf doc/context/scripts/mkii/"); -# &SYSTEM ("$RM -rf fonts/enc/"); -# &SYSTEM ("$RM -rf fonts/map/"); -# &SYSTEM ("$RM -rf scripts/context/ruby/"); -# &SYSTEM ("$RM -rf scripts/context/stubs/"); -# &SYSTEM ("$RM -rf tex/context/*/mkii/"); # base, fonts, etc. -# &SYSTEM ("$RM -rf metapost/context/base/mpii/"); - - # mptopdf removals, since that is a separate package. - print "still POST$package - removing mptopdf since separate package\n"; - chomp (my @mptopdf_files = `tlpfiles mptopdf | sed 's,[^/]*/,,'`); - &SYSTEM ("$RM -f @mptopdf_files "); - &SYSTEM ("$RM doc/context/scripts/mkii/mptopdf.man"); + # remove mkii stuff that we omit from context-legacy, or may be new, etc. + &SYSTEM ("$RM -rf doc/context/scripts/mkii/"); + &SYSTEM ("$RM -rf tex/context/*/mkii/"); # base, fonts, etc. + + # move some files to context subdirs for tl. + &mv_with_mkdir ("colors/icc/context", "tex/context/colors/icc"); + &mv_with_mkdir ("context-readme.txt", "doc/context"); print "still POST$package - copy user-level .lua to windows\n"; my $w_bindir = "$TOPDEST/bin/windows"; @@ -6823,7 +6822,7 @@ sub POSTcontext { &SYSTEM ("$CP $luafile $w_bindir/"); &bindirs_symlink ($luafile, $luafile); } - # but i386-netbsd is not supported. + # but i386-netbsd is not supported in TL. my $i386_netbsd_bindir = "$TOPDEST/bin/i386-netbsd"; &SYSTEM ("$RM $i386_netbsd_bindir/context.lua"); &SYSTEM ("$RM $i386_netbsd_bindir/mtxrun.lua"); @@ -6833,7 +6832,7 @@ sub POSTcontext { my $mandest = "$TOPDEST/texmf-dist/doc/man/man1"; &xmkdir ($mandest); for my $exec (@exec) { - # we only want mkiv man pages + # we only keep mkiv man pages here, mkii in context-legacy. my $mansrc = "mkiv/$exec.man"; &SYSTEM ("$CP $mansrc $mandest/$exec.1"); } @@ -6852,6 +6851,80 @@ sub POSTcontext { &POST_preserve_bin ("luametatex", "context", "mtxrun"); } +sub POSTcontext_legacy { + print "POST$package - just keeping mkii\n"; + + &context_common_removals (); + + # remove the mkiv and newer files we have in context. + # The context package should be committed first, and tlpdb updated, + # before committing context-legacy, so new files get removed here. + &remove_files_of_pkg ("context"); + + # files we move for context, hence must remove explicitly from + # original location in the zip. + &SYSTEM ("$RM -r colors/icc/context"); + &SYSTEM ("$RM context-readme.txt"); + &SYSTEM ("$RM doc/context/scripts/mkii/mptopdf.*"); + + print "still POST$package - user-level executable man pages\n"; + # we only keep mkii man pages here, mkiv in context. + &xchdir ("$DEST/doc/context/scripts/mkii"); + my $mandest = "$TOPDEST/texmf-dist/doc/man/man1"; + &xmkdir ($mandest); + for my $exec ("texexec", "texmfstart") { + &SYSTEM ("$CP $exec.man $mandest/$exec.1"); + } + &tl_man_to_pdf (); +} + + +# Some files we remove from both context and context-legacy. +sub context_common_removals { + print "\t context_common_removals\n"; + # mptopdf is its own package. + &remove_files_of_pkg ("mptopdf"); + + # remove files Hans wants in his distribution but are confusing or + # problematic in TeX Live. + &SYSTEM ("$RM -rf colors"); # nonfree + &SYSTEM ("$RM -rf fonts/truetype/hoekwater/lm/");# lmtypewriter10-regular.ttf + &SYSTEM ("$RM -rf fonts/data/tests/"); # texmfhome.otf + &SYSTEM ("$RM -rf scripts/context/stubs/"); # install/setup + &SYSTEM ("$RM -rf source"); # entire engine source + &SYSTEM ("$RM -rf web2c/"); # context*cnf*, texlive*cnf.lua + + # nonfree (first two) and unused (jmn) fonts. + &SYSTEM ("find -name \*koeiel\* -o -name \*lucida\* -o -name jmn" + . "| xargs rm -rfv"); + } + +# Remove all files from PKG (as reported by the tlpfiles script). +# Used for ConTeXt. +# +sub remove_files_of_pkg { + my ($pkg) = @_; + print "\t RM files for package $pkg\n"; + + # find files for PKG. + chomp (my @files = `tlpfiles $pkg`); + die "no files for package $pkg?" if (! @files); + + # files are given relative to the root, so cd there. + my $cwd = getcwd (); + &xchdir ($TOPDEST); + for my $f (@files) { + #print " $f"; + # there are too many special cases even to warn. + unlink ($f) || print "remove_files_of_pkg: unlink($f) failed: $!"; + } + print "\n"; + + # remove any now-empty directories and cd back. + $RMDIR_EMPTY; + &xchdir ($cwd); +} + # Called for the ConTeXt scripts, though conceivably could be used for # other things. Make a symlink in each Unix bindir (Windows is not # handled here) to EXEC, assuming its location is relative to cwd. diff --git a/Master/tlpkg/tlpsrc/context-legacy.tlpsrc b/Master/tlpkg/tlpsrc/context-legacy.tlpsrc index 7625d5b6b96..618a1eac14e 100644 --- a/Master/tlpkg/tlpsrc/context-legacy.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-legacy.tlpsrc @@ -1,3 +1,8 @@ +shortdesc The ConTeXt macro package, MkII +longdesc In TeX Live, ConTeXt MkII is split from current ConTeXt (MkIV +longdesc and newer.) See https://contextgarden.net and +longdesc https://pragma-ade.com for information about ConTeXt. + depend context depend metapost depend pdftex @@ -22,12 +27,12 @@ depend mptopdf docpattern d texmf-dist/doc/context/scripts/mkii docpattern f texmf-dist/doc/man/man1/texmfstart.* +docpattern f texmf-dist/doc/man/man1/texexec.* runpattern d texmf-dist/bibtex/bst/context/mkii runpattern d texmf-dist/context/data/texfont runpattern d texmf-dist/metapost/context/base/mpii runpattern d texmf-dist/scripts/context/ruby -runpattern d texmf-dist/scripts/context/stubs runpattern d texmf-dist/tex/context/base/mkii runpattern d texmf-dist/tex/context/bib runpattern d texmf-dist/tex/context/fonts/mkii diff --git a/Master/tlpkg/tlpsrc/context-texlive.tlpsrc b/Master/tlpkg/tlpsrc/context-texlive.tlpsrc index d9b5a4b65a4..5f22c8dcc45 100644 --- a/Master/tlpkg/tlpsrc/context-texlive.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-texlive.tlpsrc @@ -1,3 +1,16 @@ shortdesc TeX Live-specific helpers for ConTeXt (caches, papersize) -longdesc The code is in the directory texmf-dist/tex/context/texlive. +longdesc The files are in the directory texmf-dist/tex/context/texlive. runpattern d texmf-dist/tex/context/texlive + +# these point to stubs, which were handwritten by us, hence include both +# the stubs (under the dir above) and the executable links here. +binpattern f bin/${ARCH}/contextjit +binpattern f bin/${ARCH}/luatools +binpattern f bin/${ARCH}/mtxrunjit + +# The luatools man page, on the other hand, is part of the original +# context distribution, so include it in the context package. +#docpattern +f texmf-dist/doc/man/man1/luatools.* +# these don't exist. +#docpattern +f texmf-dist/doc/man/man1/contextjit.* +#docpattern +f texmf-dist/doc/man/man1/mtxrunjit.* diff --git a/Master/tlpkg/tlpsrc/context.tlpsrc b/Master/tlpkg/tlpsrc/context.tlpsrc index dabf92922e7..dee03cb2809 100644 --- a/Master/tlpkg/tlpsrc/context.tlpsrc +++ b/Master/tlpkg/tlpsrc/context.tlpsrc @@ -10,6 +10,7 @@ depend luajittex depend lm depend lm-math depend amsfonts +depend context-companion-fonts depend manfnt-font depend mflogo-font depend stmaryrd @@ -29,15 +30,14 @@ execute addMap original-context-symbol.map ##### end of postprocessing specs -# autopatterns do not seem to work right, so, explicitly: +# list everything explicitly, to avoid clashes with context-legacy. runpattern d texmf-dist/context runpattern +!d texmf-dist/context/data/texfont -docpattern d texmf-dist/doc/context -docpattern +!d texmf-dist/doc/context/scripts/mkii runpattern d texmf-dist/fonts/afm/hoekwater/context runpattern d texmf-dist/fonts/cid/fontforge runpattern d texmf-dist/fonts/enc/dvips/context runpattern d texmf-dist/fonts/map/dvips/context +runpattern d texmf-dist/fonts/map/luatex/context runpattern d texmf-dist/fonts/map/pdftex/context runpattern d texmf-dist/fonts/misc/xetex/fontmapping/context runpattern d texmf-dist/fonts/tfm/hoekwater/context @@ -45,7 +45,6 @@ runpattern d texmf-dist/fonts/type1/hoekwater/context runpattern d texmf-dist/metapost/context runpattern +!d texmf-dist/metapost/context/base/mpii runpattern d texmf-dist/scripts/context -runpattern +!d texmf-dist/scripts/context/stubs runpattern +!d texmf-dist/scripts/context/ruby runpattern d texmf-dist/tex/context runpattern +!d texmf-dist/tex/context/base/mkii @@ -76,9 +75,12 @@ docpattern +!d texmf-dist/doc/context/third # The whole sample/ directory should not be in the runtime, being # full of random and short filenames, but live with it until complaints. +# context doc tree. +docpattern d texmf-dist/doc/context +docpattern +!d texmf-dist/doc/context/scripts/mkii + # context man pages where man expects them docpattern +f texmf-dist/doc/man/man1/context.* -docpattern +f texmf-dist/doc/man/man1/luatools.* docpattern +f texmf-dist/doc/man/man1/mtx-* docpattern +f texmf-dist/doc/man/man1/mtxrun.* @@ -90,10 +92,7 @@ tlpsetvar no_lmtx_platforms \ i386-netbsd # binpattern f/!${no_lmtx_platforms} bin/${ARCH}/context -binpattern f/!${no_lmtx_platforms} bin/${ARCH}/contextjit binpattern f/!${no_lmtx_platforms} bin/${ARCH}/context.lua binpattern f/!${no_lmtx_platforms} bin/${ARCH}/luametatex -binpattern f/!${no_lmtx_platforms} bin/${ARCH}/luatools binpattern f/!${no_lmtx_platforms} bin/${ARCH}/mtxrun -binpattern f/!${no_lmtx_platforms} bin/${ARCH}/mtxrunjit binpattern f/!${no_lmtx_platforms} bin/${ARCH}/mtxrun.lua -- cgit v1.2.3