Control: tags -1 + patch Laurent Bigonville <bi...@debian.org> writes:
> The bug (maintainer script modifying conffile) that bring us to this > situation (prompting the user for a file he has not modified himself) > is not happening in the version in wheezy and the root cause is fixed > (bug #684392) in sid. > > The user will still be prompted when upgrading from squeeze (that's > why I didn't close that bug) BUT chances, in a normal situation, that > the user didn't changed that file by himself is close to zero, as that > file is controlling which part of the NUT software > (client/server/standalone) is running. > > If somebody want to provide a patch, I would apply it with joy but I'm > quite busy now and I'm not sure how to do that properly (handling > upgrade being aborted,...). Please find attached a patch that should fix this bug. It implements the dirty hack in nut-client.preinst. With this patch applied, upgrades from squeeze go without smoothly without prompting. Cheers,
diff -Nru nut-2.6.4/debian/changelog nut-2.6.4/debian/changelog --- nut-2.6.4/debian/changelog 2012-08-12 20:39:01.000000000 +0200 +++ nut-2.6.4/debian/changelog 2012-11-23 21:13:23.000000000 +0100 @@ -1,3 +1,11 @@ +nut (2.6.4-2.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older + versions of the postinst (Closes: #677054) + + -- Sébastien Villemot <sebast...@debian.org> Fri, 23 Nov 2012 21:12:51 +0100 + nut (2.6.4-2) unstable; urgency=low * debian/rules: Stop the nut-client before nut-server on systems using static diff -Nru nut-2.6.4/debian/nut-client.preinst nut-2.6.4/debian/nut-client.preinst --- nut-2.6.4/debian/nut-client.preinst 1970-01-01 01:00:00.000000000 +0100 +++ nut-2.6.4/debian/nut-client.preinst 2012-11-23 21:14:42.000000000 +0100 @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Revert /etc/nut/nut.conf mangling done by older versions of the postinst +# See #677054 +if [ "$1" = "install" -o "$1" = "upgrade" ] \ + && dpkg --compare-versions "$2" lt "2.6.4-2" \ + && [ -f /etc/nut/nut.conf ] \ + && [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = f9b571ae65952e3a761fac2202633478 ]; then + sed -i 's/^MODE=none$/MODE = none/' /etc/nut/nut.conf +fi + +#DEBHELPER#
-- .''`. Sébastien Villemot : :' : Debian Developer `. `' http://www.dynare.org/sebastien `- GPG Key: 4096R/381A7594
pgp7m0E2vtbO6.pgp
Description: PGP signature