I'm about to NMU xmltex with the attached patch (actually made by Frank
Küster), since Steve Langasek tells me it is urgent because other
release critical bugs are depending on this.

-- 
Fundamental truth #4: Typing URLs always introduces errors. Always copy
+paste.
diff -ru xmltex-1.9.untouched/Makefile xmltex-1.9/Makefile
--- xmltex-1.9.untouched/Makefile	2006-01-06 18:10:22.000000000 +0000
+++ xmltex-1.9/Makefile	2006-01-06 18:30:30.000000000 +0000
@@ -7,7 +7,8 @@
 
 ## ----------------------------------------------------------------------
 prefix		= 
-confdir		= $(prefix)/etc/texmf/$(package)
+etctexmf	= $(prefix)/etc/texmf
+confdir		= $(etctexmf)/$(package)
 sharedir	= $(prefix)/usr/share/texmf/tex/$(package)
 
 ## ----------------------------------------------------------------------
@@ -16,12 +17,15 @@
 		dvips -o manual.ps manual
 
 install:
-		install -m 0755 -d $(confdir)
-		install -m 0644 *.ini xmltex.cfg $(confdir)
+		install -m 0755 -d $(etctexmf)/texmf.d
+		install -m 0755 -d $(etctexmf)/fmt.d
+		install -m 0644 debian/20xmltex.cnf $(etctexmf)/texmf.d
+		install -m 0644 debian/40xmltex.cnf $(etctexmf)/fmt.d
 		install -m 0755 -d $(sharedir)/base
 		install -m 0644 *.xmt xmltex.tex $(sharedir)/base
-		install -m 0755 -d $(sharedir)/templates
-		install -m 0644 debian/*.cnf $(sharedir)/templates
+		install -m 0755 -d $(sharedir)/config
+		install -m 0644 xmltex.cfg $(sharedir)/config
+		install -m 0644 *.ini $(sharedir)/config
 
 distclean:
 		rm -f $(addprefix manual.,toc log aux dvi ps)
diff -ru xmltex-1.9.untouched/debian/changelog xmltex-1.9/debian/changelog
--- xmltex-1.9.untouched/debian/changelog	2006-01-06 18:10:22.000000000 +0000
+++ xmltex-1.9/debian/changelog	2006-01-06 19:19:58.000000000 +0000
@@ -1,3 +1,23 @@
+xmltex (1.9-11.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * All the changes are actually by Frank Kuster <[EMAIL PROTECTED]>
+    from mail sent to the #338327 bug. I'm doing the NMU because
+    Steve Langasek indicated it is urgent to get this fixed, since other
+    RC bugs wait for this to be fixed. I've done my best to test it (i.e.,
+    package builds and installs, and packages depending on it install
+    without trouble).
+  * Drop special handling of the configuration files in texmf.d and
+    fmt.d, and make them conffiles (since they don't seem to have changed
+    for long, this should be safe) (closes: #340076)
+  * Move ini files to /usr/share/texmf/tex/xmltex/config, in accordance
+    with TeX Policy on configuration files, and to allow the fmtutil
+    configuration snippet to be treated as a conffile; drop dh_link
+    (closes: #345223)
+  * Call fmtutil-sys if it is available (closes: #338327)
+
+ -- Lars Wirzenius <[EMAIL PROTECTED]>  Fri,  6 Jan 2006 21:19:00 +0200
+
 xmltex (1.9-11) unstable; urgency=low
 
   * debian/postinst: Do not check for the created format files, because
diff -ru xmltex-1.9.untouched/debian/rules xmltex-1.9/debian/rules
--- xmltex-1.9.untouched/debian/rules	2006-01-06 18:10:22.000000000 +0000
+++ xmltex-1.9/debian/rules	2006-01-06 18:30:30.000000000 +0000
@@ -45,7 +45,7 @@
 		dh_installchangelogs
 		dh_installexamples
 		dh_installman
-		dh_link
+#		dh_link
 		dh_compress
 		dh_fixperms
 		dh_installdeb
Only in xmltex-1.9.untouched/debian: xmltex.links
diff -ru xmltex-1.9.untouched/debian/xmltex.postinst xmltex-1.9/debian/xmltex.postinst
--- xmltex-1.9.untouched/debian/xmltex.postinst	2006-01-06 18:10:22.000000000 +0000
+++ xmltex-1.9/debian/xmltex.postinst	2006-01-06 18:30:30.000000000 +0000
@@ -7,6 +7,9 @@
 
 set -e
 
+fmtutil=fmtutil
+if [ -x /usr/bin/fmtutil-sys ]; then fmtutil=fmtutil-sys; fi
+
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
 #        * <old-postinst> `abort-upgrade' <new version>
@@ -33,43 +36,43 @@
    echo $* 1>&2
 }
 
-installconf () {
-    # mv on disable file or copy template
-    while [ $# -gt 0 ]; do
-        conffile=$1
-        shift
-        if [ -f $conffile ] ; then
-           :
-        elif [ -f $conffile.disable ]; then
-            mv $conffile.disable $conffile
-        else
-            cp $TMPLDIR/`basename $conffile` $conffile
-        fi
-    done
-}
-
-checkconf ( ) {
-    # Treat old conffiles
-    if [ -f $TEXMFDIR/20xmltex ] ; then
-        mv $TEXMFDIR/20xmltex $TEXMFDIR/20xmltex.cnf
-    fi
-
-    if [ -f /etc/texmf/xmltex.cfg ] ; then
-        mv -f /etc/texmf/xmltex.cfg /etc/texmf/xmltex/xmltex.cfg
-    fi
+# installconf () {
+#     # mv on disable file or copy template
+#     while [ $# -gt 0 ]; do
+#         conffile=$1
+#         shift
+#         if [ -f $conffile ] ; then
+#            :
+#         elif [ -f $conffile.disable ]; then
+#             mv $conffile.disable $conffile
+#         else
+#             cp $TMPLDIR/`basename $conffile` $conffile
+#         fi
+#     done
+# }
+
+# checkconf ( ) {
+#     # Treat old conffiles
+#     if [ -f $TEXMFDIR/20xmltex ] ; then
+#         mv $TEXMFDIR/20xmltex $TEXMFDIR/20xmltex.cnf
+#     fi
+
+#     if [ -f /etc/texmf/xmltex.cfg ] ; then
+#         mv -f /etc/texmf/xmltex.cfg /etc/texmf/xmltex/xmltex.cfg
+#     fi
 
-    # copy template files
-    installconf $TEXMFDIR/20xmltex.cnf $FMTDIR/40xmltex.cnf
+#     # copy template files
+#     installconf $TEXMFDIR/20xmltex.cnf $FMTDIR/40xmltex.cnf
     
-}
+# }
 
 checkfmt ( ) {
     format=$1
     baseformat=$(basename $1 .efmt)
     if ! kpsewhich $format > /dev/null ; then
         warn "WARNING: $format not found, attempting to reconstruct ..."
-        echo "running 'fmtutil --byfmt $baseformat'" >> $MYTMP
-        fmtutil --byfmt $baseformat >> $MYTMP
+        echo "running '$fmtutil --byfmt $baseformat'" >> $MYTMP
+        $fmtutil --byfmt $baseformat >> $MYTMP
         if kpsewhich $format > /dev/null ; then
             warn "Success"
         else
@@ -84,14 +87,14 @@
     local goterror
     goterror=false
 
-    if ! fmtutil --byfmt xmltex >> $MYTMP
+    if ! $fmtutil --byfmt xmltex >> $MYTMP
     then
-        warn "ERROR: xmltex fmtutil failed" 1>&2
+        warn "ERROR: xmltex $fmtutil failed" 1>&2
         goterror=true
     fi
-    if ! fmtutil --byfmt pdfxmltex >> $MYTMP
+    if ! $fmtutil --byfmt pdfxmltex >> $MYTMP
     then
-        warn "ERROR: pdfxmltex fmtutil failed" 1>&2
+        warn "ERROR: pdfxmltex $fmtutil failed" 1>&2
         goterror=true
     fi
     if $goterror; then
@@ -101,47 +104,48 @@
     fi
 }
 
-xmltexfmtcheck ( ) {
-    # check whether it actually worked, since the texconfig program
-    # doesn't exit non-zero
-
-    if grep -q '^xmltex[[:space:]]*tex' $FMTDIR/40xmltex.cnf; then
-	xml_fmt="xmltex.fmt";
-    else
-	xml_fmt="xmltex.efmt";
-    fi;
-
-    if grep -q '^pdfxmltex[[:space:]]*pdftex' $FMTDIR/40xmltex.cnf; then
-	pdf_fmt="pdfxmltex.fmt";
-    else
-	pdf_fmt="pdfxmltex.efmt";
-    fi;
-
-
-    # file exists test
-    local goterror
-    goterror=false
-    if ! kpsewhich $xml_fmt > /dev/null ; then
-        warn "ERROR: XMLTeX memory dump ($xml_fmt) cannot be found"
-        goterror=true
-    fi
-    if ! kpsewhich $pdf_fmt > /dev/null ; then
-        warn "ERROR: PDFXMLTeX memory dump ($pdf_fmt) cannot be found"
-        goterror=true
-    fi
-
-    if $goterror; then
-        return -1
-    else
-        return 0
-    fi
-}
+# bad and previously unused 
+# xmltexfmtcheck ( ) {
+#     # check whether it actually worked, since the texconfig program
+#     # doesn't exit non-zero
+
+#     if grep -q '^xmltex[[:space:]]*tex' $FMTDIR/40xmltex.cnf; then
+# 	xml_fmt="xmltex.fmt";
+#     else
+# 	xml_fmt="xmltex.efmt";
+#     fi;
+
+#     if grep -q '^pdfxmltex[[:space:]]*pdftex' $FMTDIR/40xmltex.cnf; then
+# 	pdf_fmt="pdfxmltex.fmt";
+#     else
+# 	pdf_fmt="pdfxmltex.efmt";
+#     fi;
+
+
+#     # file exists test
+#     local goterror
+#     goterror=false
+#     if ! kpsewhich $xml_fmt > /dev/null ; then
+#         warn "ERROR: XMLTeX memory dump ($xml_fmt) cannot be found"
+#         goterror=true
+#     fi
+#     if ! kpsewhich $pdf_fmt > /dev/null ; then
+#         warn "ERROR: PDFXMLTeX memory dump ($pdf_fmt) cannot be found"
+#         goterror=true
+#     fi
+
+#     if $goterror; then
+#         return -1
+#     else
+#         return 0
+#     fi
+# }
 
 
 
 case "$1" in
     configure)
-        checkconf
+#         checkconf
 
         update-fmtutil
 
@@ -157,8 +161,8 @@
 	    rm $MYTMP
             echo "Done."
         else
-	    echo "Trying fmtutil --all"
-	    if fmtutil --all >>$MYTMP; then
+	    echo "Trying $fmtutil --all"
+	    if $fmtutil --all >>$MYTMP; then
 		rm $MYTMP
 		echo "   done."
             else

Reply via email to