Accepting request 563597 from Publishing:TeXLive

- Add debug and force mode to the TeXLive update script which
  might help to fix broken systems as well as might show some
  debug messages as well.

- If zypper way of posttrans scripts are disabled do use the rpm
  %posttrans scriptlets (boo#1074128)

OBS-URL: https://build.opensuse.org/request/show/563597
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/texlive-filesystem?expand=0&rev=28
This commit is contained in:
Dominique Leuenberger 2018-01-13 20:39:46 +00:00 committed by Git OBS Bridge
commit 8fa345d1ef
3 changed files with 70 additions and 37 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Jan 11 12:41:32 UTC 2018 - werner@suse.de
- Add debug and force mode to the TeXLive update script which
might help to fix broken systems as well as might show some
debug messages as well.
-------------------------------------------------------------------
Mon Jan 8 12:55:08 UTC 2018 - werner@suse.de
- If zypper way of posttrans scripts are disabled do use the rpm
%posttrans scriptlets (boo#1074128)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 24 12:46:53 UTC 2017 - werner@suse.de Fri Nov 24 12:46:53 UTC 2017 - werner@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package texlive-filesystem # spec file for package texlive-filesystem
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -24,7 +24,7 @@
%define texlive_version 2017 %define texlive_version 2017
%define texlive_previous 2016 %define texlive_previous 2016
%define texlive_release 20170520 %define texlive_release 20170520
%define texlive_noarch 132 %define texlive_noarch 133
%define texlive_source texlive-20170520-source %define texlive_source texlive-20170520-source
%define __perl_requires %{nil} %define __perl_requires %{nil}
@ -13970,7 +13970,9 @@ fi
%posttrans %posttrans
test -f /var/run/texlive/run-update || exit 0 test -f /var/run/texlive/run-update || exit 0
%if %{with zypper_posttrans}
test -z "$ZYPP_IS_RUNNING" || exit 0 test -z "$ZYPP_IS_RUNNING" || exit 0
%endif
VERBOSE=false %{_texmfdistdir}/texconfig/update || : VERBOSE=false %{_texmfdistdir}/texconfig/update || :
rm -f /var/run/texlive/run-update rm -f /var/run/texlive/run-update

View File

@ -19,11 +19,22 @@
# Author: Werner Fink, 1997-2012,2016 # Author: Werner Fink, 1997-2012,2016
# #
if test -n "$1" -a "$1" = force; then
mkdir -p /var/run/texlive
for tag in run-mktexlsr run-hyphen \
run-fmtutil.language run-fmtutil \
run-fmtutil.refresh run-update
do
> /var/run/texlive/$tag
done
fi
# Empty directory means nothing todo # Empty directory means nothing todo
test -d /var/run/texlive || exit 0 test -d /var/run/texlive || exit 0
typeset -r OLDIFS="$IFS" typeset -r OLDIFS="$IFS"
typeset -i rc=0 typeset -i rc=0
typeset -i nl=0
: ${VERBOSE=true} : ${VERBOSE=true}
umask 022 umask 022
@ -67,6 +78,9 @@ atexit()
if test $VERBOSE = true ; then if test $VERBOSE = true ; then
exec 4> >(rotator) exec 4> >(rotator)
elif test $VERBOSE = debug ; then
log=$(mktemp --tmpdir=/tmp update.XXXXXXXX) || exit 1
exec 4> >(tee $log)
else else
exec 4> /dev/null exec 4> /dev/null
fi fi
@ -79,13 +93,13 @@ type -p mktexlsr &> /dev/null || { echo "${0##*/}: No mktexlsr in PATH ... sk
# #
for run in /var/run/texlive/run-mktexlsr* ; do for run in /var/run/texlive/run-mktexlsr* ; do
test -e $run || break test -e $run || break
test $VERBOSE = true && echo -en "\r[ ]Updating TeX hash data base." test $VERBOSE = true && { echo -en "\r[ ]Updating TeX hash data base."; let nl++; }
mktexlsr < /dev/null 1>&4 2>&4 mktexlsr < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo
rm -f /var/run/texlive/run-mktexlsr* rm -f /var/run/texlive/run-mktexlsr*
> /var/run/texlive/sync-updmap > /var/run/texlive/sync-updmap
done done
((nl == 0)) || { echo; let nl=0; }
type -p kpsewhich &> /dev/null || { echo "${0##*/}: No kpsewhich in PATH ... skipping" 1>&2; exit 0 ; } type -p kpsewhich &> /dev/null || { echo "${0##*/}: No kpsewhich in PATH ... skipping" 1>&2; exit 0 ; }
type -p md5sum &> /dev/null || { echo "${0##*/}: No md5sum in PATH ... skipping" 1>&2; exit 0 ; } type -p md5sum &> /dev/null || { echo "${0##*/}: No md5sum in PATH ... skipping" 1>&2; exit 0 ; }
@ -214,6 +228,10 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
mv -f ${OLDMD5DIR}${cfg} ${MD5DIR}${cfg} mv -f ${OLDMD5DIR}${cfg} ${MD5DIR}${cfg}
done done
md5_ldat=${MD5DIR}${cnf_ldat}
md5_ldef=${MD5DIR}${cnf_ldef}
md5_llua=${MD5DIR}${cnf_llua}
# #
# Handle hyphens # Handle hyphens
# #
@ -385,7 +403,7 @@ has_formats()
# #
# Go further # Go further
# #
for run in /var/run/texlive/run-fmtutil* ; do for run in /var/run/texlive/run-fmtutil.* /var/run/texlive/run-fmtutil ; do
test -e "$run" || break test -e "$run" || break
type -p fmtutil-sys &> /dev/null || { echo "${0##*/}: No fmtutil-sys in PATH ... skipping" 1>&2; break; } type -p fmtutil-sys &> /dev/null || { echo "${0##*/}: No fmtutil-sys in PATH ... skipping" 1>&2; break; }
option="" option=""
@ -396,53 +414,53 @@ for run in /var/run/texlive/run-fmtutil* ; do
set -- $(md5sum < ${cnf_ldat}) set -- $(md5sum < ${cnf_ldat})
echo $1 > ${md5_ldat} echo $1 > ${md5_ldat}
if has_formats ${cnf_ldat} ; then if has_formats ${cnf_ldat} ; then
test $VERBOSE = true && echo -en "\r[ ]Handle language.dat setups." test $VERBOSE = true && { echo -en "\r[ ]Handle language.dat setups."; let nl++; }
fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldat} < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldat} --no-strict < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
fi fi
if test -n "${cnf_ldef}" ; then if test -n "${cnf_ldef}" ; then
set -- $(md5sum < ${cnf_ldef}) set -- $(md5sum < ${cnf_ldef})
echo $1 > ${md5_ldef} echo $1 > ${md5_ldef}
if has_formats ${cnf_ldef} ; then if has_formats ${cnf_ldef} ; then
test $VERBOSE = true && echo -en "\r[ ]Handle language.def setups." test $VERBOSE = true && { echo -en "\r[ ]Handle language.def setups."; let nl++; }
fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldef} < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldef} --no-strict < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
fi fi
if test -n "${cnf_llua}" ; then if test -n "${cnf_llua}" ; then
set -- $(md5sum < ${cnf_llua}) set -- $(md5sum < ${cnf_llua})
echo $1 > ${md5_llua} echo $1 > ${md5_llua}
if has_formats ${cnf_llua} ; then if has_formats ${cnf_llua} ; then
test $VERBOSE = true && echo -en "\r[ ]Handle language.dat.lua setups." test $VERBOSE = true && { echo -en "\r[ ]Handle language.dat.lua setups."; let nl++; }
fmtutil-sys ${option:+$option} --byhyphen ${cnf_llua} < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --byhyphen ${cnf_llua} --no-strict < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
fi fi
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.language ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.language
;; ;;
refresh) refresh)
test $VERBOSE = true && echo -en "\r[ ]Refresh TeX formats." test $VERBOSE = true && { echo -en "\r[ ]Refresh TeX formats."; let nl++; }
fmtutil-sys ${option:+$option} --refresh < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --refresh --no-strict < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.refresh ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.refresh
;; ;;
"") "/var/run/texlive/run-fmtutil")
test $VERBOSE = true && echo -en "\r[ ]Updating TeX formats." test $VERBOSE = true && { echo -en "\r[ ]Missing TeX formats."; let nl++; }
fmtutil-sys ${option:+$option} --missing < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --missing --no-strict < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil
;; ;;
*) *)
test $VERBOSE = true && echo -en "\r[ ]Updating TeX format ${run#*fmtutil.}." test $VERBOSE = true && { echo -en "\r[ ]Updating TeX format ${run#*fmtutil.}."; let nl++; }
fmtutil-sys ${option:+$option} --byfmt "${run#*fmtutil.}" < /dev/null 1>&4 2>&4 fmtutil-sys ${option:+$option} --byfmt "${run#*fmtutil.}" < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
((rc != 0)) || rm -f "${run}" ((rc != 0)) || rm -f "${run}"
esac esac
done done
@ -451,7 +469,7 @@ for run in /var/run/texlive/run-updmap* ; do
test -e "$run" || break test -e "$run" || break
type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; } type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; }
test -e "$cnf_umap" || break test -e "$cnf_umap" || break
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings." test $VERBOSE = true && { echo -en "\r[ ]Updating TeX font mappings."; let nl++; }
while read type map; do while read type map; do
case "$type" in case "$type" in
[Aa]dd*) [Aa]dd*)
@ -481,18 +499,18 @@ for run in /var/run/texlive/run-updmap* ; do
updmap-sys --cnffile $cnf_umap --nohash < /dev/null 1>&4 2>&4 updmap-sys --cnffile $cnf_umap --nohash < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
fi fi
# test $VERBOSE = true && echo
((rc == 0)) || continue ((rc == 0)) || continue
rm -f /var/run/texlive/run-updmap* rm -f /var/run/texlive/run-updmap*
rm -f /var/run/texlive/sync-updmap* rm -f /var/run/texlive/sync-updmap*
rm -f /var/run/texlive/run-mktexlsr* rm -f /var/run/texlive/run-mktexlsr*
done done
((nl == 0)) || { echo; let nl=0; }
for run in /var/run/texlive/sync-updmap* ; do for run in /var/run/texlive/sync-updmap* ; do
test -e "$run" || break test -e "$run" || break
type -p updmap-sys &> /dev/null || break type -p updmap-sys &> /dev/null || break
test -e "$cnf_umap" || break test -e "$cnf_umap" || break
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings." test $VERBOSE = true && { echo -en "\r[ ]Updating TeX font mappings."; let nl++; }
updmap-sys --cnffile $cnf_umap --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4 updmap-sys --cnffile $cnf_umap --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
enablemaps $cnf_umap < /dev/null 1>&4 2>&4 enablemaps $cnf_umap < /dev/null 1>&4 2>&4
@ -505,14 +523,14 @@ for run in /var/run/texlive/sync-updmap* ; do
updmap-sys --cnffile $cnf_umap --nohash < /dev/null 1>&4 2>&4 updmap-sys --cnffile $cnf_umap --nohash < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
fi fi
# test $VERBOSE = true && echo
((rc == 0)) || continue ((rc == 0)) || continue
rm -f /var/run/texlive/sync-updmap* rm -f /var/run/texlive/sync-updmap*
rm -f /var/run/texlive/run-mktexlsr* rm -f /var/run/texlive/run-mktexlsr*
done done
((nl == 0)) || { echo; let nl=0; }
if test -x /usr/bin/mtxrun ; then if test -x /usr/bin/mtxrun ; then
test $VERBOSE = true && echo -en "\r[ ]Generate file database." test $VERBOSE = true && { echo -en "\r[ ]Generate file database."; let nl++; }
TEXMF=${TEXMFDIST} \ TEXMF=${TEXMFDIST} \
TEXMFCACHE=${TEXMFVAR} \ TEXMFCACHE=${TEXMFVAR} \
TEXMFCNF=${TEXMFCNFFILE%/*} \ TEXMFCNF=${TEXMFCNFFILE%/*} \
@ -533,8 +551,8 @@ if test -x /usr/bin/mtxrun ; then
LUAINPUTS="$(kpsewhich --var-value=LUAINPUTS)" \ LUAINPUTS="$(kpsewhich --var-value=LUAINPUTS)" \
/usr/bin/luaotfload-tool --update --prefer-texmf --formats=+afm --log=stdout < /dev/null 1>&4 2>&4 /usr/bin/luaotfload-tool --update --prefer-texmf --formats=+afm --log=stdout < /dev/null 1>&4 2>&4
fi fi
test $VERBOSE = true && echo
fi fi
((nl == 0)) || { echo; let nl=0; }
# #
# If texmf.cnf has changed it may contain changed memory sizes # If texmf.cnf has changed it may contain changed memory sizes
@ -542,12 +560,12 @@ fi
# #
type -p texconfig-sys &> /dev/null || exit 0 type -p texconfig-sys &> /dev/null || exit 0
if test $init = true ; then if test $init = true ; then
test $VERBOSE = true && echo -en "\r[ ]Initialize TeX configuration and font mappings." test $VERBOSE = true && { echo -en "\r[ ]Initialize TeX configuration and font mappings."; let nl++; }
updmap-sys --cnffile $cnf_umap --syncwithtrees < /dev/null 1>&4 2>&4 updmap-sys --cnffile $cnf_umap --syncwithtrees < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
texconfig-sys init < /dev/null 1>&4 2>&4 texconfig-sys init < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
# #
@ -853,34 +871,34 @@ esac
if test $omd5modes = 0 -o \ if test $omd5modes = 0 -o \
\( $md5modes = $omd5modes -a "$prtcap_nt_mfont" = "yes" -a "$md5_nt_mfont" = "yes" \) \( $md5modes = $omd5modes -a "$prtcap_nt_mfont" = "yes" -a "$md5_nt_mfont" = "yes" \)
then then
test $VERBOSE = true && echo -en "\r[ ]Set MetaFont mode." test $VERBOSE = true && { echo -en "\r[ ]Set MetaFont mode."; let nl++; }
env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys mode $PRINTER < /dev/null 1>&4 2>&4 env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys mode $PRINTER < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
set -- $(md5sum < ${cnf_mfont}) set -- $(md5sum < ${cnf_mfont})
echo $1 > ${md5_mfont} echo $1 > ${md5_mfont}
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
if test $omd5xdvi = 0 -o \ if test $omd5xdvi = 0 -o \
\( $md5xdvi = $omd5xdvi -a "$prtcap_nt_xdvi" = "yes" -a "$md5_nt_xdvi" = "yes" \) \( $md5xdvi = $omd5xdvi -a "$prtcap_nt_xdvi" = "yes" -a "$md5_nt_xdvi" = "yes" \)
then then
test $VERBOSE = true && echo -en "\r[ ]Set XDvi paper size." test $VERBOSE = true && { echo -en "\r[ ]Set XDvi paper size."; let nl++; }
env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys xdvi paper $XDVISIZE < /dev/null 1>&4 2>&4 env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys xdvi paper $XDVISIZE < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
set -- $(md5sum < ${cnf_xdvi}) set -- $(md5sum < ${cnf_xdvi})
echo $1 > ${md5_xdvi} echo $1 > ${md5_xdvi}
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
if test $omd5dvips = 0 -o \ if test $omd5dvips = 0 -o \
\( $md5dvips = $omd5dvips -a "$prtcap_nt_dvips" = "yes" -a "$md5_nt_dvips" = "yes" \) \( $md5dvips = $omd5dvips -a "$prtcap_nt_dvips" = "yes" -a "$md5_nt_dvips" = "yes" \)
then then
test $VERBOSE = true && echo -en "\r[ ]Set dvips mode and paper size." test $VERBOSE = true && { echo -en "\r[ ]Set dvips mode and paper size."; let nl++; }
env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips mode $PRINTER < /dev/null 1>&4 2>&4 env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips mode $PRINTER < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips paper $DVIPSSIZE < /dev/null 1>&4 2>&4 env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips paper $DVIPSSIZE < /dev/null 1>&4 2>&4
let rc+=$? let rc+=$?
set -- $(md5sum < ${cnf_dvips}) set -- $(md5sum < ${cnf_dvips})
echo $1 > ${md5_dvips} echo $1 > ${md5_dvips}
test $VERBOSE = true && echo ((nl == 0)) || { echo; let nl=0; }
fi fi
if test "$prtcap_nt_dvips" = "manual" -a \ if test "$prtcap_nt_dvips" = "manual" -a \
\( $md5dvips = $omd5dvips -o $omd5dvips = 0 \) \( $md5dvips = $omd5dvips -o $omd5dvips = 0 \)