Hi Julien, hi all

On Di, 13 Nov 2012, Julien Cristau wrote:
> > If the release managers agree I will upload the NMU, but it does
> > not make sense to upload a big NMU with lots of changes and then
> > it is not going into wheezy.
> > 
> The release managers won't agree to anything without seeing what changes
> you're talking about.

Sorry, I thought it is enough that the patch is in the bug report.

Anyway, here attached the diff with the take over into Debian
TeX Maint group (with agreement from the original maintainer, see
debian-tex-maint@ mailing list).

Please let me know what you think.

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
CHIPPING ONGAR (n.)
The disgust and embarrassment (or 'ongar') felt by an observer in the
presence of a person festooned with kirbies (q.v.) when they don't
know them well enough to tell them to wipe them off, invariably this
'ongar' is accompanied by an involuntary staccato twitching of the leg
(or 'chipping')
                        --- Douglas Adams, The Meaning of Liff
diff --git a/debian/changelog b/debian/changelog
index 27166da..96e510c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+latex209 (25.mar.1992-13) unstable; urgency=low
+
+  * Take over maintenance into the Debian TeX Group
+  * fix RC bug (Closes: #669382) (create files that are not removed) by:
+    - remove all maintainer scripts
+    - create the necessary code with dh_installtex
+    - add necessary build-dep on tex-common
+  * add latex209-bin.preinst to fix up old conffile so that debconf does
+    not ask unnecessary questions
+
+ -- Norbert Preining <prein...@debian.org>  Tue, 13 Nov 2012 14:50:17 +0900
+
 latex209 (25.mar.1992-12.5) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/control b/debian/control
index 58abf57..056ac89 100644
--- a/debian/control
+++ b/debian/control
@@ -1,10 +1,10 @@
 Source: latex209
 Section: tex
 Priority: optional
-Maintainer: TSUCHIYA Masatoshi <tsuch...@namazu.org>
-Build-Depends: debhelper (>> 5.0.0)
+Maintainer: Debian TeX maintainers <debian-tex-ma...@lists.debian.org>
+Build-Depends: debhelper (>> 5.0.0), tex-common (>= 3)
 Standards-Version: 3.8.4
-Uploaders: Atsuhito Kohda <ko...@debian.org>
+Uploaders: Atsuhito Kohda <ko...@debian.org>, Norbert Preining <prein...@debian.org>
 
 Package: latex209-base
 Architecture: all
diff --git a/debian/copyright b/debian/copyright
index 24811aa..308bddb 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,8 +1,8 @@
 This package was debianized by Nakahara Hayao <nakah...@mis.hiroshima-u.ac.jp>
 for Debian JP Project on Sat, 29 Nov 1997 19:33:58 +0900.
 
-Currently maintained by TSUCHIYA Masatoshi <tsuch...@namazu.org>, who
-is sponsored by Masayuki Hatta <mha...@debian.org>.
+Currently maintained by the Debian TeX Maintainer,
+former maintainer was TSUCHIYA Masatoshi <tsuch...@namazu.org>.
 
 It was downloaded from ftp.riken.go.jp (one of CTAN sites).
 URL is ftp://ftp.riken.go.jp/pub/tex-archive/obsolete/macros/latex209/distribs/latex209.tar
diff --git a/debian/latex209-base.postinst b/debian/latex209-base.postinst
deleted file mode 100644
index 2f86fdf..0000000
--- a/debian/latex209-base.postinst
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh
-# postinst script for latex209-base
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/doc/packaging-manual/
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-TEXMF=/usr/share/texmf
-
-case "$1" in
-    configure)
-	mktexlsr $TEXMF
-	;;
-    abort-upgrade|abort-remove|abort-deconfigure)
-	;;
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 0
-	;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/latex209-base.postrm b/debian/latex209-base.postrm
deleted file mode 100644
index b394982..0000000
--- a/debian/latex209-base.postrm
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /bin/sh
-# postrm script for latex209-base
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see /usr/doc/packaging-manual/
-
-TEXMF=/usr/share/texmf
-
-case "$1" in
-    remove|purge)
-	if [ -x /usr/bin/mktexlsr ]; then
-            mktexlsr $TEXMF
-        fi
-	;;
-    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-        ;;
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/latex209-bin.postinst b/debian/latex209-bin.postinst
deleted file mode 100644
index 0a323aa..0000000
--- a/debian/latex209-bin.postinst
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /bin/sh 
-# postinst script for latex209-bin
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/doc/packaging-manual/
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-update_fmtutil()
-{
-    d=/etc/texmf/fmt.d
-    f=${d}/25latex209.cnf
-    b=${d}/25latex209.bak
-    if [ ! -f ${f} ] ; then
-	if [ -f ${b} ] ; then
-	    echo "Preserved \`25latex209.bak' is found."
-	    mv -f ${b} ${f}
-	else
-	    cat <<EOF >${f}
-#
-# LaTeX 2.09
-#
-# format	engine		pattern-file	arguments
-latex209	tex		-		latex209.ini
-
-EOF
-	fi
-    fi
-    update-fmtutil
-}
-
-make_format()
-{
-    if [ -x /usr/bin/fmtutil-sys ]; then
-	UTIL=fmtutil-sys
-    else
-	UTIL=fmtutil
-    fi
-    target=$1
-    formats=/var/lib/texmf/web2c/tex
-    echo "Make the format file of \`${target}'. This may take some time. ..."
-    if ( ${UTIL} --byfmt ${target} ) ; then
-	${MT_MKTEXUPD=`kpsewhich --format='web2c files' mktexupd`} \
-	    ${formats} ${target}.fmt
-	echo "The format file of \`${target}' is built successfully." 1>&2
-    else
-	echo "The format file of \`${target}' is NOT built successfully." 1>&2
-	exit 1
-    fi
-}
-
-case "$1" in
-    configure)
-	update_fmtutil
-	make_format latex209
-	;;
-    abort-upgrade|abort-remove|abort-deconfigure)
-	;;
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 0
-	;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/latex209-bin.postrm b/debian/latex209-bin.postrm
deleted file mode 100644
index 54746f1..0000000
--- a/debian/latex209-bin.postrm
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-# postrm script for latex209-bin
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see /usr/doc/packaging-manual/
-
-case "$1" in
-    purge)
-	rm -f /etc/texmf/fmt.d/25latex209.cnf
-	rm -f /etc/texmf/fmt.d/25latex209.bak
-	if [ -x /usr/sbin/update-fmtutil ]; then
-            update-fmtutil
-        fi
-	;;
-    remove)
-	if [ -f /etc/texmf/fmt.d/25latex209.cnf ] ; then
-	    mv -f /etc/texmf/fmt.d/25latex209.cnf /etc/texmf/fmt.d/25latex209.bak
-	fi
-	if [ -x /usr/sbin/update-fmtutil ]; then
-            update-fmtutil
-        fi
-	;;
-    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-        ;;
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-	;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/latex209-bin.preinst b/debian/latex209-bin.preinst
new file mode 100644
index 0000000..eaae584
--- /dev/null
+++ b/debian/latex209-bin.preinst
@@ -0,0 +1,63 @@
+#!/bin/sh -e
+#
+# latex209-bin preinst script
+#
+#
+
+# if the config file from previous versions is present and matches the
+# md5sum, add the new dh_installtex header to make sure that no debconf
+# questions are asked, otherwise just let the user decide.
+#
+
+cnffile=/etc/texmf/fmt.d/25latex209.cnf
+bakfile=/etc/texmf/fmt.d/25latex209.bak
+correctmd=7c958ab4f8bf7a0080bc46c48d137bd1
+
+fix_it_up=0
+
+case "$1" in
+  upgrade|install)
+    old_version=$2
+    if [ -n "$old_version" ] && dpkg --compare-versions "$old_version" lt 25.mar.1992-12.6 ; then
+      if [ -r $cnffile ] ; then
+        # if an old conffile is found and matches the md5 sum, we fix it up
+        # otherwise we leave it alone
+	oldmd=`md5sum $cnffile | sed -e 's/ .*//'`
+        if [ "$oldmd" = $correctmd ] ; then
+          fix_it_up=1
+        fi
+      elif [ -r $bakfile ] ; then
+        # if the backup file is found, and matches the md5 sum, we simply delete
+        # it, as it will be reinstatiated by dpkg
+	oldmd=`md5sum $bakfile | sed -e 's/ .*//'`
+        if [ "$oldmd" = $correctmd ] ; then
+          rm $bakfile
+        else
+          mv $bakfile $cnffile
+        fi
+      fi
+      
+      if [ $fix_it_up = 1 ] ; then
+        echo '# 25latex209.cnf
+# You can change/add entries to this file and changes will be preserved
+# over upgrades, even if you have removed the main package prior
+# (not if you purged it). You should leave the following pseudo comment
+# present in the file!
+# -_- DebPkgProvidedMaps -_-
+# 
+#
+# LaTeX 2.09
+#
+# format	engine		pattern-file	arguments
+latex209	tex		-		latex209.ini
+' > $cnffile
+      fi
+    fi
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/latex209-bin.prerm b/debian/latex209-bin.prerm
deleted file mode 100644
index 168b2ac..0000000
--- a/debian/latex209-bin.prerm
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-# prerm script for latex209-bin
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/share/doc/packaging-manual/
-
-case "$1" in
-    remove|upgrade|deconfigure)
-	rm -f /var/lib/texmf/web2c/latex209.fmt
-	rm -f /var/lib/texmf/web2c/latex209.log
-	if [ -x /usr/bin/mktexlsr ]; then
-            mktexlsr
-        fi
-	;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 0
-	;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/latex209.cnf b/debian/latex209.cnf
new file mode 100644
index 0000000..b214f18
--- /dev/null
+++ b/debian/latex209.cnf
@@ -0,0 +1,6 @@
+#
+# LaTeX 2.09
+#
+# format	engine		pattern-file	arguments
+latex209	tex		-		latex209.ini
+
diff --git a/debian/rules b/debian/rules
index fd1160d..904e5fd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,9 @@ clean:
 	rm -f build-stamp
 	dh_clean
 
-build: build-stamp
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
 build-stamp:
 	touch $@
 
@@ -46,6 +48,7 @@ install-base: build
 	mv $(BASE)/splain.tex $(INI)
 	mv $(BASE)/latex.ins $(DOC)
 	cp -p readme.* $(DOC)
+	dh_installtex
 
 install-bin: prefix=$(CURDIR)/debian/latex209-bin/usr
 install-bin: DH_OPTIONS=-platex209-bin
@@ -55,6 +58,8 @@ install-bin:
 	dh_testroot
 	mkdir -p $(BIN)
 	cd $(BIN) && ln -s tex latex209
+	dh_installtex --priority=25 formatfile=debian/latex209.cnf \
+		--flavor=format:no_links
 
 install-src: prefix=$(CURDIR)/debian/latex209-src/usr
 install-src: DH_OPTIONS=-platex209-src

Reply via email to