From cd61fbd3639dee2a405f879e6bd3bd1222d5112ac7caec02ec838eb23fc46536 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 2 Oct 2020 07:42:34 +0000 Subject: [PATCH] Add detection of changes in configuration files as well as handle linked engines OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=138 --- texlive-filesystem.changes | 7 ++++++ update.texlive | 45 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/texlive-filesystem.changes b/texlive-filesystem.changes index 79ab324..80f993a 100644 --- a/texlive-filesystem.changes +++ b/texlive-filesystem.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 2 07:39:05 UTC 2020 - Dr. Werner Fink + +- Enhance update script to detect user changes in configuration + files to warn the user. Also run texlinks script to be sure + that local configuration fits the linked engines (boo#1176557) + ------------------------------------------------------------------- Tue Apr 28 06:46:38 UTC 2020 - Dr. Werner Fink diff --git a/update.texlive b/update.texlive index 5763226..1159d32 100644 --- a/update.texlive +++ b/update.texlive @@ -120,6 +120,8 @@ unset KPSE_DOT || true : ${TEXMFDIST:=$(kpsewhich --expand-path='$TEXMFDIST' 2> /dev/null)} : ${TEXMFVAR:=$(kpsewhich --var-value=TEXMFVAR 2> /dev/null)} : ${TEXMFCNFFILE:=$(kpsewhich texmf.cnf 2> /dev/null)} +: ${FMTUTILCNFFILE:=$(kpsewhich fmtutil.cnf 2> /dev/null)} +: ${TEXLUACNFFILE:=$(kpsewhich -format=web2c texmfcnf.lua 2> /dev/null)} : ${TEXMFSYSCONFIG:=$(kpsewhich --expand-path='$TEXMFSYSCONFIG' 2> /dev/null)} : ${TEXMFLSR:=$(kpsewhich --show-path=ls-R 2> /dev/null)} : ${WEB2C:=$TEXMFVAR/web2c} @@ -133,6 +135,39 @@ if test ! -e "$TEXMFCNFFILE" ; then exit 0 fi +# +# Check for old configurations and inform system admin to check those +# +typeset -i mail=0 +typeset -a list=() +for cnf in ${TEXMFCNFFILE} ${FMTUTILCNFFILE} ${TEXLUACNFFILE} +do + test -e ${cnf}.rpmnew || continue + list[mail++]=${cnf} +done +if ((mail > 0)) +then + mailx -s "TeXLive Update: Warning about changed configurations" root@localhost <<-EOF + Hello, + + the update script has found one or more changed configuration files: + + $(for cnf in ${list[@]}; do echo " ${cnf}"; done) + + Please (if required) port the changes to the files with suffix .rpmnew! + Always move those rpmnew files to the original location: + + $(for cnf in ${list[@]}; do echo " mv ${cnf}.rpmnew ${cnf}"; done) + + afterwards run as root: + + /usr/share/texmf/texconfig/update force + + to get your configuration work again. + EOF +fi +unset mail list cnf + # # Check for scriplets # @@ -193,6 +228,16 @@ do done unset hyp suffix +# +# Be sure that the TeX Links do fit the configuration in fmtutil.cnf +# +if type -p texlinks &> /dev/null +then + test $VERBOSE = true && { echo -en "\r[ ]Updating TeX links"; let nl++; } + texlinks < /dev/null 1>&4 2>&4 + ((nl == 0)) || { echo; let nl=0; } +fi + init=false typeset -i yes=0 while read format engine language rest