Having return { content = { variables = { TEXMFSYSVAR = "/var/lib/texmf", TEXMFDIST = "selfautodir:share/texmf-dist", TEXMFSYSCONFIG = "/etc/texmf", } } } in /usr/share/texmf-local/web2c/texmfcnf.lua overrides those variables in /usr/share/texmf-dist/web2c/texmfcnf.lua. Without changing those variables, `mtxrun --generate` can't make dev-texlive/texlive-context work. Arch Linux just sets TEXMFSYSVAR="/var/lib/texmf", TEXMFDIST="selfautodir:share/texmf-dist", and TEXMFSYSCONFIG="/etc/texmf" in its own version of /usr/share/texmf-dist/web2c/texmfcnf.lua. Reproducible: Always
Since selfautoparent resolves to . instead of / in texlive 2021, this version of /usr/share/texmf-local/web2c/texmfcnf.lua also works especially when offset installation is used. return { content = { variables = { TEXMFSYSVAR = "selfautodir:../var/lib/texmf", TEXMFDIST = "selfautodir:share/texmf-dist", TEXMFSYSCONFIG = "selfautodir:../etc/texmf", } } }
We are currently working on TeX Live 2023 for Gentoo and like to see if we can fix this issue there. But first, we have to understand the issue. You bug reports starts with what should be changed, but not does not, unless I am missing it, elaborate on the root issue. Looking in /usr/share/texmf-dist/web2c/texmfcnf.lua from the TeX Live 2021 and 2023 ebuilds we find TEXMFSYSVAR = "selfautoparent:texmf-var" TEXMFDIST = "selfautoparent:texmf-dist" TEXMFSYSCONFIG = "selfautoparent:texmf-config" you seem to suggest to change those to absolute path. But I wonder if texmf-{var,dist,config}, which appears to be symbolic references, shouldn't also work but does not resolve (correctly). If so, then we should fix this instead of working around the issue. Can you elaborate a bit more on the root cause?
I executed install.sh from ConTeXt LMTX distribution in /data/Downloads/context-linux-64. $ ./install.sh mtxrun | forcing cache reload resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/user/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/etc/texmf/web2c' from specification '/etc/texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/data/Downloads/context-linux-64/share/texmf/web2c' from specification 'selfautodir:/share/texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/user/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/etc/texmf/web2c' from specification '/etc/texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/data/Downloads/context-linux-64/share/texmf/web2c' from specification 'selfautodir:/share/texmf/web2c' If you want to run ConTeXt everywhere, you need to adapt the path, like: export PATH=/data/Downloads/context-linux-64/tex/texmf-linux-64/bin:$PATH From /data/Downloads/context-linux-64/tex/texmf-context/web2c/texlivecnf.lua, I found TEXMFSYSVAR = "selfautoparent:texmf-var" TEXMFDIST = "selfautoparent:texmf-dist" TEXMFSYSCONFIG = "selfautoparent:texmf-config" Because I don't know the intention of upstream, I also don't know the root cause, either. I think we will have to contact the upstream developers.
For now, I would just use standalone ConTeXt LMTX distribution instead of ConTeXt from texlive.