Bugzilla – Bug 1212571
texlive-scheme-small produces broken installation
Last modified: 2024-01-29 13:41:00 UTC
$ docker run --rm -it opensuse/tumbleweed bash # zypper in texlive-scheme-small ... (651/651) Installing: texlive-scheme-small-2023.208.svn54191-59.1.noarch ...[done] find: '/etc/texmf/ls-R': No such file or directory update: This TeXLive installation is broken! update: Only programs are found but no init file(s) at all. You might install update: e.g. texlive-collection-latex or any other texlive-collection package. Executing %posttrans scripts ...............................................[done] texlive-scheme-medium works well. But this is for a container, so would prefer to minimize size. Error msg is from: https://github.com/bmwiedemann/openSUSE/blob/master/packages/t/texlive-filesystem/update.texlive#L320 ls-R and formats are missing. Tried the following: # mkdir -p /var/run/texlive # > /var/run/texlive/run-fmtutil.refresh # /usr/share/texmf/texconfig/update find: '/etc/texmf/ls-R': No such file or directory [ ]Updating TeX hash data base. [ ]Updating TeX links update: This TeXLive installation is broken! update: Only programs are found but no init file(s) at all. You might install update: e.g. texlive-collection-latex or any other texlive-collection package. # > /etc/texmf/ls-R # chown mktex:mktex /etc/texmf/ls-R # texhash mktexlsr: Updating /etc/texmf... mktexlsr: Updating /mktexlsr... [...] # mkdir -p /var/run/texlive # > /var/run/texlive/run-fmtutil.refresh # /usr/share/texmf/texconfig/update [ ]Updating TeX links update: This TeXLive installation is broken! update: Only programs are found but no init file(s) at all. You might install update: e.g. texlive-collection-latex or any other texlive-collection package. fmtutil.cnf is filled in, so also tried: 07f292c96f0f:/ # fmtutil-sys --all fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order): fmtutil: /etc/texmf/web2c/fmtutil.cnf fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes: fmtutil: /etc/texmf/web2c/fmtutil.cnf fmtutil [INFO]: writing formats under /var/lib/texmf/web2c fmtutil [INFO]: --- remaking euptex with euptex [...] fmtutil [INFO]: --- remaking amstex with pdftex fmtutil [WARNING]: You seem to have no formats defined in your fmtutil.cnf files! fmtutil [INFO]: disabled formats: 1 fmtutil [INFO]: not available formats: 54 fmtutil [INFO]: total formats: 55 fmtutil [INFO]: exiting with status 0
Hmmm ... texlive/2023> rpm -qvf /etc/texmf/ls-R texlive-filesystem-2023.198-0.noarch texlive/2023> zypper info --requires texlive-scheme-small | grep texlive-collection-basic texlive-collection-basic >= 2023 texlive/2023> zypper info --requires texlive-collection-basic | grep texlive-scripts texlive-scripts >= 2023 and finally texlive/2023> rpm -q -R texlive-scripts | grep texlive-filesystem texlive-filesystem >= 2023 texlive-filesystem >= 2023 texlive-filesystem >= 2023 ... also texlive-kpathsea and texlive-kpathsea-bin are required Please try as root VERBOSE=debug /usr/share/texmf/texconfig/update force and attach the resulting /tmp/update.<random_string>
Created attachment 868616 [details] After VERBOSE=debug /usr/share/texmf/texconfig/update force
(In reply to Istvan Beregszaszi from comment #2) > Created attachment 868616 [details] > After VERBOSE=debug /usr/share/texmf/texconfig/update force Call as root mktexlsr --verbose and show output here, thanks.
# mktexlsr --verbose mktexlsr: Updating /etc/texmf... TeX::LSR: ls-R file does not exists, skipping: /etc/texmf/ls-R mktexlsr: Updating /usr/local/share/texmf... mktexlsr: cannot read files, skipping: /usr/local/share/texmf mktexlsr: Updating /usr/share/texmf... TeX::LSR: ls-R file does not exists, skipping: /usr/share/texmf/ls-R mktexlsr: Updating /var/cache/texmf/fonts... mktexlsr: Updating /var/cache/texmf/fonts/texmf... mktexlsr: cannot read files, skipping: /var/cache/texmf/fonts/texmf mktexlsr: Updating /var/lib/texmf... TeX::LSR: ls-R file does not exists, skipping: /var/lib/texmf/ls-R mktexlsr: Done. # ls -l /usr/share/texmf/ls-R lrwxrwxrwx. 1 root root 24 Jul 5 13:37 /usr/share/texmf/ls-R -> /var/lib/texmf/main/ls-R # ls -l /var/lib/texmf/main/ls-R ls: cannot access '/var/lib/texmf/main/ls-R': No such file or directory
... strange as rpm -qvl texlive-filesystem | grep ls-R -rw-rw-r-- 1 root mktex 67 Jul 5 13:37 /etc/texmf/ls-R lrwxrwxrwx 1 root root 24 Jul 5 13:37 /usr/share/texmf/ls-R -> /var/lib/texmf/main/ls-R -rw-rw-r-- 1 mktex mktex 67 Jul 5 13:37 /var/cache/texmf/fonts/ls-R -rw-rw-r-- 1 root mktex 494341 Jul 5 13:37 /var/lib/texmf/dist/ls-R -rw-rw-r-- 1 root mktex 67 Jul 5 13:37 /var/lib/texmf/ls-R -rw-rw-r-- 1 root mktex 494341 Jul 5 13:37 /var/lib/texmf/main/ls-R and I guess that texlive-filesystem is installed due to the dependencies ... or do you have set a package lock .. please check rpm -q texlive-filesystem ls -l /etc/texmf/ls-R
# rpm -q texlive-filesystem texlive-filesystem-2023.208-60.1.noarch # ls -l /etc/texmf/ls-R ls: cannot access '/etc/texmf/ls-R': No such file or directory Running in fresh opensuse/tumbleweed:latest container, so everything's default. This is a wild guess, but maybe these files owned by the mktex group could not install? # rpm -qvl texlive-filesystem | grep mktex | grep ^- -rw-rw-r-- 1 root mktex 67 Jul 5 13:37 /etc/texmf/ls-R -rw-rw-r-- 1 mktex mktex 67 Jul 5 13:37 /var/cache/texmf/fonts/ls-R -rw-rw-r-- 1 root mktex 494341 Jul 5 13:37 /var/lib/texmf/dist/ls-R -rw-rw-r-- 1 root mktex 67 Jul 5 13:37 /var/lib/texmf/ls-R -rw-rw-r-- 1 root mktex 494341 Jul 5 13:37 /var/lib/texmf/main/ls-R None of them exists (except for /var/cache/texmf/fonts/ls-R, but seems it was generated later.)
... that would be mean that the dependencies Requires(pre): user(mktex) Requires(pre): group(mktex) of texlive-filesystem are not fulfilled or in other words the package system-user-mktex has not been installed or not done its job during installation texlive/2023> rpm -q --whatprovides 'user(mktex)' system-user-mktex-1.0.0-2.7.noarch ... texlive/2023> rpm -qf /usr/lib/sysusers.d/system-user-mktex.conf system-user-mktex-1.0.0-2.7.noarch ... what I wonder is that a missing user/group does not break the installation of texlive-scheme-small
Normal installation in a minimal Tumbleweed VM (no TeXLive beside one font) requires with texlive-scheme-small automagic system-user-mktex and I see localhost:~ # grep mktex /etc/passwd mktex:x:467:467:System user for mktex:/var/cache/texmf/fonts/usr/sbin/nologin ... seems to be a container problem here
Created attachment 868617 [details] zypper in --force texlive-filesystem User/group is correct: # rpm -q --whatprovides 'group(mktex)' system-user-mktex-1.0.0-2.7.noarch However, force reinstalling texlive-filesystem reveals failed calls to /usr/bin/setpriv (see attachment). Replacing busybox-util-linux with util-linux fixes the issue.
Indeed in post scriplet of texlive-filesystem there is shell code which does for dir in %{_texmfconfdir} \ %{_fontcache} \ %{_texmfvardir} \ %{_texmfvardir}/dist \ %{_texmfvardir}/main do test "$dir" = %{_fontcache} && user=%{texusr} || user=root setpriv --reuid $user --regid %{texgrp} --init-groups /bin/sh -ec " tmp=\$(mktemp ${dir}/ls-R.XXXXXX) chmod 0664 \${tmp} echo '%% ls-R -- filename database for kpathsea; do not change this line.' > \${tmp} mv \${tmp} ${dir}/ls-R" || error=1 done
texlive-scheme-medium and up pulls in standard util-linux through transitive dependencies, so that's why it worked. Filed a ticket upstream for good measure. https://bugs.busybox.net/show_bug.cgi?id=15712 Thank you for the help!
This setpriv approach I've choosen due to a bug report and suggestion of the security people here around.
Maybe I should add a conflict to busybox many builtins are not usable, also having TeXLive installed requires a powerful system which (IMHO) should make use of a powerful shell and powerful tools (like setpriv from util-linux, as well as ed from ed, find from findutils, sed from sed, and grep from grep)
This is an autogenerated message for OBS integration: This bug (1212571) was mentioned in https://build.opensuse.org/request/show/1142250 Factory / texlive-filesystem
(In reply to OBSbugzilla Bot from comment #14) > This is an autogenerated message for OBS integration: > This bug (1212571) was mentioned in > https://build.opensuse.org/request/show/1142250 Factory / texlive-filesystem Try to avoid the missing features of setpriv from util-linux by require util-linux instead of /usr/bin/setpriv (we really depend on that)