Bug 2209220 - mtxrun --script fonts cannot work
Summary: mtxrun --script fonts cannot work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: texlive-base
Version: 38
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-23 06:52 UTC by Easior Lars
Modified: 2023-06-05 09:30 UTC (History)
2 users (show)

Fixed In Version: texlive-base-20220321-72.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-29 15:46:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Easior Lars 2023-05-23 06:52:12 UTC
After texlive-context was installed, I try to see what fonts are used for ConTeXt. The above command line cannot work while it gives:
```sh
$ mtxrun --script fonts --list
resolvers       | globbing | confusing filename, name: 'README.txt', lower: 'readme.txt', already: 'Readme.txt'
mtxrun          | unknown script 'fonts.lua' or 'mtx-fonts.lua'
```
It seems that the configuration for ConTeXt package maintained by the texlive-base group is not correct.

Reproducible: Always

Steps to Reproduce:
1. just run the above command line in your terminal: mtxrun --script fonts --list
2.
3.
Actual Results:  
$ mtxrun --script fonts --list
resolvers       | globbing | confusing filename, name: 'README.txt', lower: 'readme.txt', already: 'Readme.txt'
mtxrun          | unknown script 'fonts.lua' or 'mtx-fonts.lua'

Expected Results:  
of course, it will list all fonts available for ConTeXt but not. I also expect that the setting for ConTeXt could be soft linked to /etc/texlive/texmf, but not actually.

The configurations for ConTeXt follows:
```sh
$ mtxrun --configurations
system          | resolved | file : /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua
system          | resolved | 
system          | resolved | path + /home/easior/texmf/web2c
system          | resolved | path - /usr/bin
system          | resolved | path + /usr/bin/share/texlive/texmf-local/web2c
system          | resolved | path + /usr/bin/share/texlive/texmf-dist/web2c
system          | resolved | path + /usr/bin/share/texlive/texmf/web2c
system          | resolved | path + /usr/bin/texmf-local/web2c
system          | resolved | path + /usr/bin/texmf-dist/web2c
system          | resolved | path + /usr/bin/texmf/web2c
system          | resolved | path - /usr
system          | resolved | path - /usr/share/texlive/texmf-local/web2c
system          | resolved | path - /usr/share/texlive/texmf-dist/web2c
system          | resolved | path + /usr/share/texlive/texmf/web2c
system          | resolved | path + /usr/texmf-local/web2c
system          | resolved | path + /usr/texmf-dist/web2c
system          | resolved | path + /usr/texmf/web2c
system          | resolved | path + $SELFAUTOGRANDPARENT/texmf-local/web2c
system          | resolved | path - .
system          | resolved | path + ./share/texlive/texmf-local/web2c
system          | resolved | path + ./share/texlive/texmf-dist/web2c
system          | resolved | path + ./share/texlive/texmf/web2c
system          | resolved | path + ./texmf-local/web2c
system          | resolved | path + ./texmf-dist/web2c
system          | resolved | path + ./texmf/web2c
```

Comment 1 Easior Lars 2023-05-25 05:42:39 UTC
I found that there was a similar problem in void linux. Someone mentioned that:

I just looked into this a bit more, and apparently SELFAUTOPARENT is just 2 directories up from the location of kpsewhich (or some other executable that serves a similar role, I'm not sure). In a manually installed texlive disribution, this would end up being the texlive root directory. However, void puts kpsewhich in /usr/bin, so SELFAUTOPARENT is would be set to /. But, separately to that, there seems to be bug in ConTeXt's file.collapsepath which causes it to collapse /usr/bin/../.. into ..

Comment 2 Easior Lars 2023-05-25 05:48:16 UTC
It would be helpful to read the following command line show some weird message:
```sh
mtxrun --generate
resolvers       | resolving | variable 'SELFAUTOLOC' set to '/usr/bin'
resolvers       | resolving | variable 'SELFAUTODIR' set to '/usr'
resolvers       | resolving | variable 'SELFAUTOPARENT' set to '.'
resolvers       | resolving | variable 'TEXMFCNF' set to ''
resolvers       | resolving | variable 'TEXMF' set to ''
resolvers       | resolving | variable 'TEXOS' set to 'usr'
resolvers       | resolving |
resolvers       | resolving | using configuration specification 'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texlive/texmf-local/web2c,selfautoloc:/share/texlive/texmf-dist/web2c,selfautoloc:/share/texlive/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf-dist/web2c,selfautoloc:/texmf/web2c,selfautodir:,selfautodir:/share/texlive/texmf-local/web2c,selfautodir:/share/texlive/texmf-dist/web2c,selfautodir:/share/texlive/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf-dist/web2c,selfautodir:/texmf/web2c,$SELFAUTOGRANDPARENT/texmf-local/web2c,selfautoparent:,selfautoparent:/share/texlive/texmf-local/web2c,selfautoparent:/share/texlive/texmf-dist/web2c,selfautoparent:/share/texlive/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf-dist/web2c,selfautoparent:/texmf/web2c}'
resolvers       | resolving |
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/root/texmf/web2c' from specification 'home:texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on weird path '/usr/bin' from specification 'selfautoloc:'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/share/texlive/texmf-local/web2c' from specification 'selfautoloc:/share/texlive/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/share/texlive/texmf-dist/web2c' from specification 'selfautoloc:/share/texlive/texmf-dist/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/share/texlive/texmf/web2c' from specification 'selfautoloc:/share/texlive/texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/texmf-local/web2c' from specification 'selfautoloc:/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/texmf-dist/web2c' from specification 'selfautoloc:/texmf-dist/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/texmf/web2c' from specification 'selfautoloc:/texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on weird path '/usr' from specification 'selfautodir:'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/share/texlive/texmf-local/web2c' from specification 'selfautodir:/share/texlive/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/share/texlive/texmf-dist/web2c' from specification 'selfautodir:/share/texlive/texmf-dist/web2c'
resolvers       | resolving | found regular configuration file '/usr/share/texlive/texmf-dist/web2c/texmfcnf.lua'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/share/texlive/texmf/web2c' from specification 'selfautodir:/share/texlive/texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/texmf-local/web2c' from specification 'selfautodir:/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/texmf-dist/web2c' from specification 'selfautodir:/texmf-dist/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/texmf/web2c' from specification 'selfautodir:/texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path '$SELFAUTOGRANDPARENT/texmf-local/web2c' from specification '$SELFAUTOGRANDPARENT/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on weird path '.' from specification 'selfautoparent:'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path './share/texlive/texmf-local/web2c' from specification 'selfautoparent:/share/texlive/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path './share/texlive/texmf-dist/web2c' from specification 'selfautoparent:/share/texlive/texmf-dist/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path './share/texlive/texmf/web2c' from specification 'selfautoparent:/share/texlive/texmf/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path './texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path './texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c'
resolvers       | resolving | looking for regular 'texmfcnf.lua' on given path './texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers       | resolving |
resolvers       | resolving | loading configuration file 'selfautodir:/share/texlive/texmf-dist/web2c/texmfcnf.lua'
resolvers       | resolving |
resolvers       | resolving | locating list of 'home:.texlive2022/texmf-config' (runtime) (tree:///home:.texlive2022/texmf-config)
```

Comment 3 Tom "spot" Callaway 2023-05-26 13:52:04 UTC
Good catch. I think this will be resolved in the latest texlive-base update, with the config fixes I now get useful output when I run: mtxrun --script fonts --list --all

Comment 4 Fedora Update System 2023-05-26 13:54:48 UTC
FEDORA-2023-38094d905c has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-38094d905c

Comment 5 Fedora Update System 2023-05-27 01:32:33 UTC
FEDORA-2023-38094d905c has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-38094d905c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-38094d905c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Easior Lars 2023-05-28 03:16:41 UTC
After installation of the fix FEDORA-2023-38094d905c, the script mtxrun works. The old luatex ccache should be manually remove by
```sh
$ rm -rf ~/.cache/texlive
```
but in TeX Live 2023, the following command line
```sh
$ mtxrun --script cache --erase
```
do the same thing.

Comment 7 Easior Lars 2023-05-28 03:17:40 UTC
There are some suggestions on improvements for texlive-base:
1. Could you make a soft link from /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua to /etc/texlive/web2c/texmfcnf.lua? All configurations should be placed into the directory of /etc. 
2. Could you adjust the texmfcnf.lua such that there is a user-defined configuration file for ConTeXt engine, e.g. ~/.texmf-config/web2c/texmfcnf.lua? Actually, without this modification, the environment variable OSFONTDIR is necessary for ConTeXt. 
3. Could you adjust the directory structure of /usr/share/texlive according to Linux FHS, e.g. /usr/share/texmf /usr/local/share/texmf, /etc/texmf... In my memory during I used the texlive on gentoo box, they followed the rule of FHS.

Comment 8 Fedora Update System 2023-05-31 01:35:03 UTC
FEDORA-2023-38094d905c has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Tom "spot" Callaway 2023-06-05 09:30:30 UTC
(In reply to Easior Lars from comment #7)
> There are some suggestions on improvements for texlive-base:
> 1. Could you make a soft link from
> /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua to
> /etc/texlive/web2c/texmfcnf.lua? All configurations should be placed into
> the directory of /etc. 

I will make this change in Fedora Rawhide, it will be picked up in Fedora 39+.

> 2. Could you adjust the texmfcnf.lua such that there is a user-defined
> configuration file for ConTeXt engine, e.g.
> ~/.texmf-config/web2c/texmfcnf.lua? Actually, without this modification, the
> environment variable OSFONTDIR is necessary for ConTeXt. 

Could you suggest a specific change to texmfcnf.lua that would resolve this for you?

> 3. Could you adjust the directory structure of /usr/share/texlive according
> to Linux FHS, e.g. /usr/share/texmf /usr/local/share/texmf, /etc/texmf... In
> my memory during I used the texlive on gentoo box, they followed the rule of
> FHS.

We used to do this, but some things expected to find the standard texlive layout and when they did not find it, they broke in weird ways. I'm reluctant to make this already challenging packageset more complex just to make FHS happy. :)


Note You need to log in before you can comment on or make changes to this bug.