Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 865805 - dev-texlive/texlive-basic: Change a few variables in texmfcnf.lua to fix dev-texlive/texlive-context
Summary: dev-texlive/texlive-basic: Change a few variables in texmfcnf.lua to fix dev-...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-19 13:42 UTC by amano.kenji
Modified: 2023-11-18 07:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description amano.kenji 2022-08-19 13:42:30 UTC
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
Comment 1 amano.kenji 2022-08-19 13:58:34 UTC
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",
        }
    }
}
Comment 2 Florian Schmaus gentoo-dev 2023-11-17 15:04:23 UTC
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?
Comment 3 amano.kenji 2023-11-18 07:08:54 UTC
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.
Comment 4 amano.kenji 2023-11-18 07:10:01 UTC
For now, I would just use standalone ConTeXt LMTX distribution instead of ConTeXt from texlive.