[Debian-tex-commits] SVN tex-common commit + diffs: r2950 - in tex-common/trunk: doc scripts

Frank Küster frank at alioth.debian.org
Sun Jun 10 20:57:26 UTC 2007


Author: frank
Date: 2007-06-10 20:57:25 +0000 (Sun, 10 Jun 2007)
New Revision: 2950

Modified:
   tex-common/trunk/doc/TeX-on-Debian.sgml
   tex-common/trunk/scripts/update-fontlang
   tex-common/trunk/scripts/update-fontlang.1
Log:
implement a workaround for the fork bomb problem in update-fontlang,
first documentation attempt


Modified: tex-common/trunk/doc/TeX-on-Debian.sgml
===================================================================
--- tex-common/trunk/doc/TeX-on-Debian.sgml	2007-06-10 09:09:19 UTC (rev 2949)
+++ tex-common/trunk/doc/TeX-on-Debian.sgml	2007-06-10 20:57:25 UTC (rev 2950)
@@ -369,7 +369,7 @@
           <file>updmap.cfg</file> or <file>language.dat</file> is it necessary
           to edit existing files.
         </p>
-
+	
          <sect1 id="sec-texmfcnf-and-update-texmf">
           <heading>
             <file>texmf.cnf</file> and <prgn>update-texmf</prgn>
@@ -472,6 +472,51 @@
       
 	  </p>
 	
+         <sect1 id="jadetex-xmltex-specialcase">
+	   <heading>A special case in <prgn>update-fmtutil</prgn>:
+	   Formats which are based on other formats</heading>
+	   <p>
+	     The JadeTeX and xmlTeX formats are built on top of LaTeX
+	     and therefore require special treatment.  This is done
+	     automatically for the Debian packages for these formats.
+	     However, local administrators who similarly base their
+	     custom formats on LaTeX (or any other format) might need
+	     to take special care, in particular when dist-upgrading.
+	   </p>
+	   <p>
+	     JadeTeX is based on LaTeX such that during format
+	     generation, the LaTeX format dump is preloaded with this
+	     line in <file>fmtutil.cnf</file>:
+<example>
+jadetex		etex	language.dat	&latex jadetex.ini
+</example>
+             This is problematic if the package which provides LaTeX
+             (currently <package>texlive-latex-base</package>) is
+             upgraded at the same time as the package which provides
+             the executables
+             (currently <package>texlive-base-bin</package>).  In this
+             dpkg run, <package>texlive-base-bin</package> will be
+             configured while <package>texlive-latex-base</package> is
+             unpacked but unconfigured and might have
+             a <file>10texlive-latex-base.cnf.dpkg-new</file> file
+             in <file>/etc/texmf/fmt.d</file>.
+             <package>texlive-base-bin</package> will
+             call <prgn>update-fmtutil</prgn>  just before it executes
+             <tt>fmtutil --all</tt>, and because of
+             the <file>dpkg-new</file> file information for LaTeX will
+             not be included.  If JadeTeX would still be included, its
+             format generation would consequently fail.
+	   </p>
+	   <p>
+	     <prgn>update-fmtutil</prgn> knows about this problem and
+	     will ignore JadeTeX and xmlTeX if LaTeX is not
+	     available.  It does not know which other (locally
+	     defined) formats are also based on LaTeX, though.  To
+	     prevent failures (and actually a possible fork bomb, see
+	     Debian Bug #427562), local administrators should manually
+	     disable such formats before upgrading TeX Live packages.
+	   </p>
+
          <sect1 id="sec-user-config-files">
           <heading>
 	    Per user configuration changes

Modified: tex-common/trunk/scripts/update-fontlang
===================================================================
--- tex-common/trunk/scripts/update-fontlang	2007-06-10 09:09:19 UTC (rev 2949)
+++ tex-common/trunk/scripts/update-fontlang	2007-06-10 20:57:25 UTC (rev 2950)
@@ -111,6 +111,11 @@
     printf "\n${PCC}${PCC}${PCC} From file: $file\n" >>"$tempfile"
     cat "$file" >>"$tempfile"
     echo "${CC}${CC}${CC} End of file: $file" >>"$tempfile"
+    case $file in
+      *10texlive-latex-base.cnf)
+	seen_latex="true"
+	;;
+    esac
 }
 
 do_not_include_file()
@@ -139,7 +144,35 @@
         echo "$(basename "$file")$(dirname "$file")"
     done
 }
+# check_special_jadetex_xmltex <file path>
+#
+# special case for jadetex and xmltex: If no latex format information
+# is included so far (seen_latex is still "false"), then we cannot
+# generate the jadetex or xmltex formats, and may not include them in
+# fmtutil.cnf.  Even if both packages depend on tl-latex-base this is
+# still needed, because if tl-base-bin and tl-latex-base are upgraded
+# at the same time, the latex information is not included while
+# tl-base-bin is configured and runs "fmtutil --all" (see bug #427562).
+check_special_jadetex_xmltex()
+{
+  [ $progname = "update-fmtutil" ] || return 0
+  
+  file=$1
 
+  case $file in
+    *40jadetex.cnf|*40xmltex.cnf)
+      if [ $seen_latex = "true" ]; then
+	return 0
+      else
+	return 1
+      fi
+      ;;
+    *)
+      return 0 ;;
+  esac
+  
+}
+
 # handle_file <file path>
 #
 # <file path> must point to an update-fontlang configuration file (such as
@@ -162,7 +195,9 @@
             | xargs -0r cat \
             | grep -E "^$(basename "$file" ".$EXT")\$" >/dev/null;
 	then
+	  if check_special_jadetex_xmltex $file; then
             include_file "$file"
+	  fi
         else
             do_not_include_file "$file"
         fi
@@ -562,6 +597,7 @@
 
 # From now on, $tempfile must be deleted on exit; therefore, cleanup() should
 # be used.
+seen_latex="false"
 
 if [ $syswide_mode = 1 ]; then
     find "$SYSWIDE_CONFDIR"             -maxdepth 1 -type f -name '*.'${EXT}

Modified: tex-common/trunk/scripts/update-fontlang.1
===================================================================
--- tex-common/trunk/scripts/update-fontlang.1	2007-06-10 09:09:19 UTC (rev 2949)
+++ tex-common/trunk/scripts/update-fontlang.1	2007-06-10 20:57:25 UTC (rev 2950)
@@ -101,7 +101,10 @@
 file. This way, local changes to the configuration can be preserved
 while the package is in state 'rc' (that is, the package is removed, but its
 configuration files are still present).  For details about this mechanism,
-package maintainers should consult the Debian TeX Policy.
+package maintainers should consult the Debian TeX Policy.  As a
+special case, the files for JadeTeX and xmlTeX are only included if
+there is already a file for the LaTeX format (see \fITeX on Debian\fP
+for details).
 
 The user-specific mode provides a way for a non-admin user to override
 system-wide settings.  In this mode,




More information about the Debian-tex-commits mailing list