Package: jadetex Version: 3.13-3.2 Severity: serious Tags: patch Justification: Violates policy 10.7.3
Every time the postinst is called with "configure", be it upon upgrade, install after remove, or dpkg-reconfigure, the file /etc/texmf/fmt.d/40jadetex.cnf is restored. If the file is deleted or renamed by adding an additional suffix, it is restored. This violates Policy 10.7.3, ,---- | Configuration file handling must conform to the following behavior: | | * local changes must be preserved during a package upgrade, `---- The attached patch fixes this behavior. 40jadetex.cnf is made a conffile, and just left on the system when jadetex is removed, but not purged. fmtutil has no problem with this, it simply ignores formats in fmtutil.cnf for which the ini files cannot be found. I have added one additional feature in the patch: It uses fmtutil-sys if it is available, fmtutil otherwise. This is the script to be used with teTeX-3.0, now in experimental, but it's not important at all, because I've patched fmtutil in teTeX-3.0 to do the right thing. Regards, Frank -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (900, 'testing') Architecture: i386 (i686) Kernel: Linux 2.4.27 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages jadetex depends on: ii debianutils 2.8.4 Miscellaneous utilities specific t ii tetex-bin 3.0-2 The teTeX binary files ii tetex-extra 3.0-2 Additional library files of teTeX -- no debconf information
diff -Nur jadetex-3.13.orig/debian/changelog jadetex-3.13/debian/changelog --- jadetex-3.13.orig/debian/changelog 2005-03-16 08:10:47.000000000 +0100 +++ jadetex-3.13/debian/changelog 2005-03-15 22:30:33.000000000 +0100 @@ -1,11 +1,12 @@ -jadetex (3.13-3) unstable; urgency=low +jadetex (3.13-3.2) unstable; urgency=low + * NMU version number for local testing * New Maintainer. (Closes: #288204) * debian/control: Update Standards-Version. * Acknowledge NMU. (Closes: #266630). * debian/control: Drop Build-Dependency to openjade1.3, use openjade. - -- OHURA Makoto <[EMAIL PROTECTED]> Sat, 15 Jan 2005 16:20:53 +0900 + -- Frank Küster <[EMAIL PROTECTED]> Tue, 15 Mar 2005 18:05:45 +0100 jadetex (3.13-2.1) unstable; urgency=high diff -Nur jadetex-3.13.orig/debian/postinst jadetex-3.13/debian/postinst --- jadetex-3.13.orig/debian/postinst 2005-03-16 08:10:47.000000000 +0100 +++ jadetex-3.13/debian/postinst 2005-03-16 08:14:19.000000000 +0100 @@ -56,8 +56,10 @@ make_and_check_fmt ( ) { local fmt fmt=$1 + fmtutil=fmtutil + if [ -x /usr/bin/fmtutil-sys ]; then fmtutil=fmtutil-sys; fi - if [ ! -f /etc/texmf/jadetex/$fmt.ini ]; then + if ! kpsewhich --progname=jadetex jadetex.ini; then warn "/etc/texmf/jadetex/$fmt.ini not found, skipping $fmt memory dump" warn "If you wish to use JadeTeX, you will have to create the dump manually" warn "or else purge then reinstall this package to restore default configuration." @@ -65,14 +67,9 @@ elif [ ! -f ${FMTCNF} ]; then warn "$FMTCNF is missing but should be there; report this bug please" return 1 - elif ! grep -qw "^$fmt" ${FMTCNF}; then - warn "$FMTCNF doesn't contain '$fmt', skipping memory dump" - warn "If you wish to use JadeTeX, you will have to create the dump manually" - warn "or else purge then reinstall this package to restore default configuration." - return 0 else - log "running 'fmtutil --cnffile ${FMTCNF} --byfmt $fmt'..." - if ! fmtutil --cnffile ${FMTCNF} --byfmt $fmt >> $MYTMPFILE; then + log "running '$fmtutil --byfmt $fmt'..." + if ! $fmtutil --byfmt $fmt >> $MYTMPFILE; then warn "ERROR: $fmt fmtutil failed" return 1 elif ! kpsewhich $fmt.fmt > /dev/null ; then @@ -125,30 +122,7 @@ MYTMPFILE=`mktemp -t jadetex-postinst.XXXXXX` : > $MYTMPFILE - # new fmt.d handling; we have to handle this in postinst rather - # than conffiles so that we can disable it when pkg is removed - # - # first we check if the file or any jadetex.cnf file is already there, - # if not, is there is a disabled version of the script available? - # if not, is there a globbed version of the disabled file available? - # if not, copy in the file from the template area - if [ -f ${FMTDIR}/40jadetex.cnf ]; then - : - elif ls ${FMTDIR}/*jadetex.cnf 2>/dev/null; then - FMTCNF=`ls ${FMTDIR}/*jadetex.cnf | tail -1` - elif [ -f ${FMTDIR}/40jadetex.cnf.disable ]; then - mv ${FMTDIR}/40jadetex.cnf.disable ${FMTCNF} - else - OLD=`ls -1 ${FMTDIR}/*jadetex.cnf* 2>/dev/null | tail -1` - if [ ${OLD} -a -f ${OLD} ]; then - FMTCNF=`echo $OLD | sed -e 's/.cnf.*/.cnf/'` - warn "re-enabling $FMTCNF from $OLD" - mv ${OLD} ${FMTCNF} - else - cp ${TEMPLDIR}/fmtutil.cnf ${FMTCNF} - fi - fi - + # 40jadetex.cnf is now a conffile update-fmtutil update-texmf diff -Nur jadetex-3.13.orig/debian/rules jadetex-3.13/debian/rules --- jadetex-3.13.orig/debian/rules 2005-03-16 08:10:47.000000000 +0100 +++ jadetex-3.13/debian/rules 2005-03-15 18:04:35.000000000 +0100 @@ -9,7 +9,7 @@ docdir := $(prefix)/usr/share/doc/$(package) mandir := $(prefix)/usr/share/man texdir := $(prefix)/usr/share/texmf/tex/$(package) -templdir := $(texdir)/config-templates +fmtdir := $(prefix)/etc/texmf/fmt.d confdir := $(prefix)/etc/texmf/$(package) texmfdir := $(prefix)/etc/texmf/texmf.d @@ -51,7 +51,7 @@ rm -rf $(prefix) $(make_dir) $(bindir) $(docdir) $(mandir)/man1 \ - $(texdir)/base $(confdir) $(templdir) $(texmfdir) + $(texdir)/base $(confdir) $(fmtdir) $(texmfdir) # conffile handling ln -sf /etc/texmf/jadetex $(texdir)/config @@ -64,7 +64,7 @@ echo $(subst $(prefix),,$(texmfdir))/96JadeTeX.cnf >> debian/conffiles # the fmtutil snippet is managed in the postinst - $(install_file) debian/fmtutil.cnf $(templdir)/ + $(install_file) debian/fmtutil.cnf $(fmtdir)/40jadetex.cnf $(install_file) jadetex.1 pdfjadetex.1 $(mandir)/man1/
-- Frank Küster Inst. f. Biochemie der Univ. Zürich Debian Developer