Enable the force mode of update script to handle broken /var/lib and /var/cache texmf entries

OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=168
This commit is contained in:
Dr. Werner Fink 2023-05-23 14:15:22 +00:00 committed by Git OBS Bridge
parent 025915e4b9
commit 3a45ca08eb
2 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 23 14:12:52 UTC 2023 - Dr. Werner Fink <werner@suse.de>
- Enable the force mode of update script to handle broken
/var/lib and /var/cache texmf entries (boo#1211613)
-------------------------------------------------------------------
Mon May 15 13:03:04 UTC 2023 - Andreas Schwab <schwab@suse.de>

View File

@ -20,6 +20,7 @@
#
if test -n "$1" -a "$1" = force; then
umask 022
mkdir -p /var/run/texlive
for tag in run-mktexlsr run-hyphen \
run-fmtutil.language run-fmtutil \
@ -27,6 +28,44 @@ if test -n "$1" -a "$1" = force; then
do
> /var/run/texlive/$tag
done
test -d /var/cache/texmf || {
mkdir -p /var/cache/texmf
chmod 1755 /var/cache/texmf
}
if ! id mktex > /dev/null 2>&1; then
useradd -U -d /var/cache/texmf/fonts -c "System user for mktex" -s "/usr/sbin/nologin" mktex
fi
test -d /var/cache/texmf/fonts || {
mkdir -p /var/cache/texmf/fonts/pk
mkdir -p /var/cache/texmf/fonts/source
mkdir -p /var/cache/texmf/fonts/tfm
chown -R mktex:mktex /var/cache/texmf/fonts
chmod -R 3775 /var/cache/texmf/fonts
}
test -e /var/cache/texmf/fonts/ls-R || {
echo '% ls-R -- filename database for kpathsea; do not change this line.' > /var/cache/texmf/fonts/ls-R
chmod 0664 /var/cache/texmf/fonts/ls-R
chown mktex:mktex /var/cache/texmf/fonts/ls-R
}
test -d /var/lib/texmf || {
mkdir -p /var/lib/texmf
chmod 1755 /var/lib/texmf
}
for dir in dist fonts fonts/dvipdfm fonts/dvips fonts/pdftex main md5 web2c \
web2c/aleph web2c/eptex web2c/luatex web2c/metafont web2c/pdftex \
web2c/ptex web2c/tex web2c/xetex
do
test -d /var/lib/texmf/${dir} && continue
mkdir -p /var/lib/texmf/${dir}
chmod 1755 /var/lib/texmf/${dir}
done
for lsr in /var/lib/texmf/ls-R /var/lib/texmf/dist/ls-R /var/lib/texmf/main/ls-R
do
test -e $lsr && continue
echo '% ls-R -- filename database for kpathsea; do not change this line.' > $lsr
chmod 0664 $lsr
chgrp mktex $lsr
done
fi
# Empty directory means nothing todo