Bug 2126535 - language.dat symlink replaced by post rpm scripts
Summary: language.dat symlink replaced by post rpm scripts
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: texlive
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-13 18:37 UTC by Leon Fauster
Modified: 2022-09-19 12:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-19 12:29:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Leon Fauster 2022-09-13 18:37:57 UTC
Description of problem:

Discussion appeared here (EPEL):
https://bugzilla.redhat.com/show_bug.cgi?id=2074197#c16

Solved for EPEL (in preparation):
https://bugzilla.redhat.com/show_bug.cgi?id=2115134#c5

Therefore here the bug report to be corrected upstream.


TLDR Version:

This linkage

[1] /usr/share/texlive/texmf-dist/tex/generic/config/language.dat -> /etc/texlive/tex/generic/config/language.dat

will be broken when language texlive packages execute there scripts, example:

[2] sed -i '/esperanto.*/d' %{_texdir}/texmf-dist/tex/generic/config/language.dat

---

[1]https://src.fedoraproject.org/rpms/texlive/blob/main/f/texlive.spec#_154859
[2] https://src.fedoraproject.org/rpms/texlive/blob/main/f/texlive.spec#_79711


How reproducible:

The texlive package provides in the spec file following (texlive-hyphen-base):

pushd %{buildroot}%{_texdir}/texmf-dist/tex/generic/config/
ln -s ../../../../../../..%{_sysconfdir}/texlive/tex/generic/config/language.dat language.dat

and 

%config(noreplace) %{_sysconfdir}/texlive/tex/generic/config/language.dat

so every texlive-hyphen-${LANGUAGE} package with and sed script line will destroy the above linkage.


After installation of texlive-hyphen-german (post script with just "sed -i") the symlink is substituted and diff shows:

$ diff   /usr/share/texlive/texmf-dist/tex/generic/config/language.dat /etc/texlive/tex/generic/config/language.dat
59,61d58
< german loadhyph-de-1901.tex
< ngerman loadhyph-de-1996.tex
< swissgerman loadhyph-de-ch-1901.tex



Furthermore the config adaption coming from post scripts and landing in the /usr/share/texlive/ namespace (speak all adaption)
will be overwritten if someone for example do a yum reinstall texlive-hyphen-base because only the 
%{_sysconfdir}/texlive/tex/generic/config/language.dat is tagged has %config(noreplace).



Additional info:

A quick look into fedora shows round about 106 of such post scripts lines (so a general problem).

A solution could be the usage of "sed --follow-symlinks" or the usage of the path in the %{_sysconfdir} namespace

esperanto example:

sed --follow-symlinks -i '/esperanto.*/d' %{_texdir}/texmf-dist/tex/generic/config/language.dat
or
sed -i '/esperanto.*/d' %{_sysconfdir}/texlive/tex/generic/config/language.dat

Comment 1 Than Ngo 2022-09-19 12:29:19 UTC
it is fixed in texlive-2021-61.fc38. The fix for f37 will follow.

Thanks


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