Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934975 - app-text/texlive-core-2023-r9 sets some wrong symlinks
Summary: app-text/texlive-core-2023-r9 sets some wrong symlinks
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-26 19:23 UTC by Martin Väth
Modified: 2024-06-27 08:46 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 Martin Väth 2024-06-26 19:23:11 UTC
I recently reported a bug of mktexlsr to texlive upstream and learnt that mktexlsr is not supposed to be a symlink to mktexlsr.pl:
The shell script mktexlsr is faster and not supposed to be replaced by the perl script yet. In fact, the perl script is not well tested; similarly for tlmgr and perhaps a few other scripts.

The full thread starts here: https://tug.org/pipermail/tex-k/2024-June/004073.html

The fix in the ebuild is apparently just to replace the order of the following two lines in TEXLIVE_MODULE_BINSCRIPTS (or to remove the latter completely):

       texmf-dist/scripts/texlive/mktexlsr
       texmf-dist/scripts/texlive/mktexlsr.pl
Comment 1 Martin Väth 2024-06-26 22:56:03 UTC
TL developer Reinhard Kotucha commented to this bug report:


The symlink to texmf-dist/scripts/texlive/mktexlsr.pl has to be
*removed* without substitution from TEXLIVE_MODULE_BINSCRIPTS.

The Perl script is needed on Windows only because we can't execute
shell scripts there.  And it's well maintained and tested (maybe not
by Norbert because he's on Unix for reasons I understand very well).
At least no Windows user complained so far.

A symlink to the Perl script mktexlsr.pl should *never* be created on
any Unix system.

> Is there anything else which is “obviously” wrong?

No, but I'm wondering how all this can happen.  Gentoo is a source
distribution where everything is compiled from scratch.  When I
compile TeX Live on Unix myself, only a symlink to the shell script is
created. This is expected behavior.

Thus I suppose that a Gentoo developer stumbled over the Perl script
and thought that it had been overlooked by TeX Live developers, not
knowing that it's only needed on Windows.
Comment 2 Florian Schmaus gentoo-dev 2024-06-27 08:40:54 UTC
First some background:

Unfortunately we have to pass --enable-linked-scripts=no to texlive-core and rely on an alternative logic to install Tex Live's binscripts and binlinks. This predates my involvement with Tex Live packaging in Gentoo, but I believe one reason this was done, and IIRC still has to be done, is that some linked scripts are not part of app-text/texlive-core, but in dev-texlive/texlive-*.

Basically, what we do is to parse upstream's scripts.lst [1] and see if it matches a file that will be potentially installed by the Gentoo package and create the symlink.

Looking at scripts.lst, there are a few files with the same basename but different extensions. For example memoize-clean.(pl|py), memoize-extract.(pl|py).

Of course, we could simply drop the right duplicates from TEXLIVE_MODULE_BINSCRIPTS, but this has the obvious downside that issues like these could sneak in.

We may need to figure out how texlive decides that mktexlsr.pl shouldn't be used. Maybe it is texmf_other_scripts [2] as these seem to be only installed on WIN32 [3]. So we could simply not put anything that is listed in texmf_other_scripts in TEXLIVE_MODULE_BINSCRIPTS.

But let's see what the TeX Live developers have to say. I read that they are aware of this bug and just wait till the 24h grace period is over until they can comment.



1: https://git.texlive.info/texlive/tree/Build/source/texk/texlive/linked_scripts/scripts.lst
2: https://github.com/TeX-Live/texlive-source/blob/bccffde3479a4ec103b2d3a9e46fd942c5bed92e/texk/texlive/linked_scripts/Makefile.am#L103
3: https://github.com/TeX-Live/texlive-source/blob/bccffde3479a4ec103b2d3a9e46fd942c5bed92e/texk/texlive/linked_scripts/Makefile.am#L309-L318
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-27 08:46:03 UTC
(In reply to Florian Schmaus from comment #2)

(Not sure if I understand correctly, but if you mean grace period as in "can't comment after making a new account", the rule is "can't comment a URL for 24 hours after account is made").