[NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?

Michal Vlasák lahcim8 at gmail.com
Wed Aug 24 22:21:00 CEST 2022

On Tue Aug 23, 2022 at 3:11 AM CEST, Max Chernoff wrote:
> > On Sunday, August 21st, 2022 at 7:13 PM, Michal Vlasák <lahcim8 at gmail.com> wrote:
> > >
> > > There is documentation about how it can be used. I hope its obvious how
> > > I got "texmf" (texmf-context.zip, unzip, delete some files I didn't want
> > > to take up space), 
> One suggestion: instead of unpacking and committing "texmf-context.zip",
> I'd recommend adding 
>    https://github.com/contextgarden/context-mirror/
> as a git submodule. That way, it's easy to keep the files up-to-date, your
> repo will use less space, and there's a clearer separation between your
> package files and ConTeXt itself.

Yes, you are right that would be much better.

Unfortunately it seems that git submodules are not included in archives
created by `git archive` (which is also what Github uses for the
automatic release zip / tars that I have linked above). As I wanted the
published tarballs / zips self-contained ("offline only"), I would need
to use some script to generate custom archives that I would upload to
Github as release assets. This would require special care both from me
and the hypothetical packagers who would have to use the less
discoverable asset instead of the standard "git(hub) archive" way.

Anyway I think that a much better solution can be made once luametatex
source code becomes available - then there wouldn't be a reason to
resort to commiting binaries into version control and/or unnecessarily
restrict to Linux only.

Or rather no solution would be needed at all, since the "mtxrun" and
"context" wrapper commands and "texmfcnf.lua" files will be probably
specific for each packaging target (different directories on different
distros, and Unix vs Windows), and thus the matter of packagers. And
copying a binary and a directory with runtime files is the usual task of
an install step of "package descriptions", so maybe even a Makefile like
I had wouldn't be needed.

> > > A bit of a disclaimer: I don't really recommend pursuing this further.
> > > Some time ago I was also that foolish to try to package TeX for Linux
> > > distributions. Unfortunately I think that the result will never by
> > > optimal - as demonstrated by the previous discussions, the usual
> > > purposes of packages (to integrate software into the system) don't apply
> > > much to TeX / ConTeXt - there one wants something more or less self
> > > contained (so that updates are under control, no random non-essential
> > > libraries brake things, etc.).
> Well packaging the files into .rpm/.deb isn't really a bad idea; what's
> bad is the weird modifications that distros make, plus the fact that
> nearly every distro delays updates by quite some time. I generally agree
> that installing TeX straight from the source is better, although I can
> see why some users prefer to install from their distro repos.

One benefit of the fact that ConTeXt LMTX is not packaged anywhere came
to my mind: when someone has a problem with ConTeXt there is a very high
chance that it isn't because they are using a very old version. In
contrast to MkIV where one can imagine up to 4 year old installs (say up
to 1 year delay in TeX Live and 3 years in the distro for the "stable"


More information about the ntg-context mailing list