forked from pool/texlive-filesystem
HAVE_MKTEX_MEMBERS
OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=133
This commit is contained in:
parent
7a807c8ea1
commit
fe08802a26
@ -10,3 +10,16 @@
|
||||
# will be cleared from fonts not used in the last 20 days.
|
||||
#
|
||||
CLEAR_TEXMF_FONTS="no"
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
## Command:
|
||||
#
|
||||
# If above is set to yes and there are users which are member
|
||||
# of the group mktex then it might be that users have set an
|
||||
# umask which does not allow the user mktex to clear the cache
|
||||
# below /var/cache/fonts/. Setting HAVE_MKTEX_MEMBERS to "yes"
|
||||
# will allow the cron job to change the group mask hence allow
|
||||
# to clear older data.
|
||||
#
|
||||
HAVE_MKTEX_MEMBERS="no"
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 23 16:18:13 UTC 2020 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add new configuration variable HAVE_MKTEX_MEMBERS to texlive
|
||||
sysconfig file to control the behaviour of the cron job.
|
||||
- Change the cron job to clear data of other users which are
|
||||
member of the group mktex
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 11 16:03:20 UTC 2020 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
@ -15305,13 +15305,13 @@ popd
|
||||
%{_texmfvardir}/fonts/dvips/ root:root 1755
|
||||
%{_texmfvardir}/fonts/pdftex/ root:root 1755
|
||||
%{_texmfcache}/ root:root 1755
|
||||
%{_fontcache}/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/pk/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/source/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/tfm/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/ %{texusr}:%{texgrp} 3775
|
||||
%{_fontcache}/pk/ %{texusr}:%{texgrp} 3775
|
||||
%{_fontcache}/source/ %{texusr}:%{texgrp} 3775
|
||||
%{_fontcache}/tfm/ %{texusr}:%{texgrp} 3775
|
||||
EOF
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive) <<-EOF
|
||||
%{_libexecdir}/mktex/public root:%{texgrp} 0755
|
||||
%{_libexecdir}/mktex/public root:%{texgrp} 2755
|
||||
%{_texmfconfdir}/ls-R root:%{texgrp} 0664
|
||||
%{_fontcache}/ls-R %{texusr}:%{texgrp} 0664
|
||||
%{_texmfvardir}/ls-R root:%{texgrp} 0664
|
||||
@ -15325,10 +15325,10 @@ popd
|
||||
%{_texmfvardir}/fonts/dvips/ root:root 1755
|
||||
%{_texmfvardir}/fonts/pdftex/ root:root 1755
|
||||
%{_texmfcache}/ root:root 1755
|
||||
%{_fontcache}/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/pk/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/source/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/tfm/ %{texusr}:%{texgrp} 1775
|
||||
%{_fontcache}/ %{texusr}:%{texgrp} 3775
|
||||
%{_fontcache}/pk/ %{texusr}:%{texgrp} 3775
|
||||
%{_fontcache}/source/ %{texusr}:%{texgrp} 3775
|
||||
%{_fontcache}/tfm/ %{texusr}:%{texgrp} 3775
|
||||
EOF
|
||||
|
||||
%if %{with zypper_posttrans}
|
||||
@ -26869,10 +26869,10 @@ rm -f /var/run/texlive/run-update
|
||||
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/tex
|
||||
%dir %attr(1755,root,root) %{_texmfvardir}/web2c/xetex
|
||||
%dir %attr(1755,root,root) %{_texmfcache}
|
||||
%dir %attr(1775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}
|
||||
%dir %attr(1775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/pk
|
||||
%dir %attr(1775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/source
|
||||
%dir %attr(1775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/tfm
|
||||
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}
|
||||
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/pk
|
||||
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/source
|
||||
%dir %attr(3775,%{texusr},%{texgrp}) %verify(not mode) %{_fontcache}/tfm
|
||||
%dir %{_texmfvardir}/md5
|
||||
%verify(link) %{_texmfmaindir}/ls-R
|
||||
%verify(link) %{_texmfdistdir}/ls-R
|
||||
|
60
texlive.cron
60
texlive.cron
@ -14,42 +14,58 @@ type -f -p xargs >& /dev/null || exit 0
|
||||
type -f -p setpriv >& /dev/null || exit 0
|
||||
type -f -p sort >& /dev/null || exit 0
|
||||
type -f -p rm >& /dev/null || exit 0
|
||||
type -f -p seq >& /dev/null || exit 0
|
||||
type -f -p getent >& /dev/null || exit 0
|
||||
test -r /etc/sysconfig/texlive && . /etc/sysconfig/texlive
|
||||
|
||||
OLDIFS=$IFS; IFS=':;'
|
||||
VARTEXFONTS="$(kpsewhich --expand-var '$VARTEXFONTS' 2> /dev/null)"
|
||||
IFS=$OLDIFS
|
||||
|
||||
uids=$(find $VARTEXFONTS/ \( -not -type d \) -printf '%U\n' | sort -u)
|
||||
if test -n "$VARTEXFONTS" -a "$HAVE_MKTEX_MEMBERS" = yes
|
||||
then
|
||||
IFS=:
|
||||
users=($(getent group mktex))
|
||||
IFS=$OLDIFS
|
||||
typeset -i i
|
||||
typeset -i u=${#users[*]}
|
||||
let u--
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
test -d $p || continue
|
||||
for i in $(seq 3 $u)
|
||||
do
|
||||
find -P $p \( \( -type f -and -not -type l \) -and -user ${users[$i]} \) -print0 | \
|
||||
xargs -r -L100 -0 -- setpriv --reuid ${users[$i]} --regid mktex --init-groups chmod g+rw
|
||||
find -P $p \( \( -type d -and -not -type l \) -and -user ${users[$i]} \) -print0 | \
|
||||
xargs -r -L100 -0 -- setpriv --reuid ${users[$i]} --regid mktex --init-groups chmod g+rwsx
|
||||
done
|
||||
done
|
||||
unset i u
|
||||
fi
|
||||
|
||||
if test "$CLEAR_TEXMF_FONTS" = "yes" -a -n "$VARTEXFONTS"
|
||||
then
|
||||
for uid in ${uids[@]}
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
test -d $p/pk/ && find $p/pk/ \( -not -type d -and -atime +20 -and -uid $uid \) -print0
|
||||
test -d $p/tfm/ && find $p/tfm/ \( -not -type d -and -atime +60 -and -uid $uid \) -print0
|
||||
test -d $p/source/ && find $p/source/ \( -not -type d -and -atime +60 -and -uid $uid \) -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- setpriv --reuid $uid --regid mktex --init-groups rm -f)
|
||||
done
|
||||
test -d $p/pk && find -P $p/pk \( -not -type d -and -atime +20 \) -print0
|
||||
test -d $p/tfm && find -P $p/tfm \( -not -type d -and -atime +60 \) -print0
|
||||
test -d $p/source && find -P $p/source \( -not -type d -and -atime +60 \) -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- setpriv --reuid mktex --regid mktex --init-groups rm -f)
|
||||
fi
|
||||
if test -n "$VARTEXFONTS"
|
||||
then
|
||||
for uid in ${uids[@]}
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
test -d $p/pk/ && find $p/pk/ \( -not -type d -and -not -name '*.*pk' -uid $uid \) -print0
|
||||
test -d $p/tfm/ && find $p/tfm/ \( -not -type d -and -not -name '*.tfm' -uid $uid \) -print0
|
||||
test -d $p/source/ && find $p/source/ \( -not -type d -and -not -name '*.mf' -uid $uid \) -print0
|
||||
test -d $p/ && find $p/ \( -not -type d -and -path '*/[^[:alnum:]]*' -uid $uid \) -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- setpriv --reuid $uid --regid mktex --init-groups rm -vf)
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
test -d $p/ && find $p/ -depth \( -type d -and -path '*/[^[:alnum:]]*' -and -uid $uid \) -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- setpriv --reuid $uid --regid mktex --init-groups rm -vfr)
|
||||
done
|
||||
test -d $p/pk && find -P $p/pk \( -not -type d -and -not -name '*.*pk' \) -print0
|
||||
test -d $p/tfm && find -P $p/tfm \( -not -type d -and -not -name '*.tfm' \) -print0
|
||||
test -d $p/source && find -P $p/source \( -not -type d -and -not -name '*.mf' \) -print0
|
||||
test -d $p && find -P $p \( -not -type d -and -path '*/[^[:alnum:]]*' \) -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- setpriv --reuid mktex --regid mktex --init-groups rm -vf)
|
||||
for p in $VARTEXFONTS
|
||||
do
|
||||
test -d $p && find -P $p -depth \( -type d -and -path '*/[^[:alnum:]]*' \) -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- setpriv --reuid mktex --regid mktex --init-groups rm -vfr)
|
||||
fi
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user