Debian Bug report logs - #689537
pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd

version graph

Package: pdnsd; Maintainer for pdnsd is Debian QA Group <packages@qa.debian.org>; Source for pdnsd is src:pdnsd.

Reported by: Andreas Beckmann <debian@abeckmann.de>

Date: Wed, 3 Oct 2012 19:15:01 UTC

Severity: serious

Tags: patch

Found in version pdnsd/1.2.8-par-2.3

Fixed in version pdnsd/1.2.8-par-3

Done: gregor herrmann <gregoa@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Mahyuddin Susanto <udienz@ubuntu.com>:
Bug#689537; Package pdnsd. (Wed, 03 Oct 2012 19:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Beckmann <debian@abeckmann.de>:
New Bug report received and forwarded. Copy sent to Mahyuddin Susanto <udienz@ubuntu.com>. (Wed, 03 Oct 2012 19:15:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Andreas Beckmann <debian@abeckmann.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
Date: Wed, 03 Oct 2012 21:12:45 +0200
[Message part 1 (text/plain, inline)]
Package: pdnsd
Version: 1.2.8-par-2.3
Severity: serious
User: debian-qa@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package modifies conffiles.
This is forbidden by the policy, see
http://www.debian.org/doc/debian-policy/ch-files.html#s-config-files

10.7.3: "[...] The easy way to achieve this behavior is to make the
configuration file a conffile. [...] This implies that the default
version will be part of the package distribution, and must not be
modified by the maintainer scripts during installation (or at any
other time)."

debsums reports modification of the following files,
from the attached log (scroll to the bottom...):

  debsums: missing file /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd (from pdnsd package)

This file is missing after the following sequence:
  install
  remove (dont purge)
  install

Deleted conffiles are not restored on package updates/reinstallation.
That is a local modification that is preserved by dpkg.

cheers,

Andreas
[pdnsd_1.2.8-par-2.3.log.gz (application/x-gzip, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Mahyuddin Susanto <udienz@ubuntu.com>:
Bug#689537; Package pdnsd. (Fri, 05 Oct 2012 09:03:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to intrigeri <intrigeri@boum.org>:
Extra info received and forwarded to list. Copy sent to Mahyuddin Susanto <udienz@ubuntu.com>. (Fri, 05 Oct 2012 09:03:07 GMT) Full text and rfc822 format available.

Message #10 received at 689537@bugs.debian.org (full text, mbox):

From: intrigeri <intrigeri@boum.org>
To: Andreas Beckmann <debian@abeckmann.de>
Cc: 689537@bugs.debian.org
Subject: Re: Bug#689537: pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
Date: Fri, 05 Oct 2012 10:59:13 +0200
Hi,

Andreas Beckmann wrote (03 Oct 2012 19:12:45 GMT) :
> Version: 1.2.8-par-2.3

> during a test with piuparts I noticed your package modifies conffiles.
[...]
>   debsums: missing file /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd (from pdnsd
> package)

> This file is missing after the following sequence:
>   install
>   remove (dont purge)
>   install

In case it might help, I currently have 1.2.8-par-2.3 installed, and
that file is missing here. My etckeeper git -d log tells me that file
was deleted by the upgrade from 1.2.8-par-2 to 1.2.8-par-2.1, who
knows why.



Information forwarded to debian-bugs-dist@lists.debian.org, Mahyuddin Susanto <udienz@ubuntu.com>:
Bug#689537; Package pdnsd. (Fri, 05 Oct 2012 09:12:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Beckmann <debian@abeckmann.de>:
Extra info received and forwarded to list. Copy sent to Mahyuddin Susanto <udienz@ubuntu.com>. (Fri, 05 Oct 2012 09:12:03 GMT) Full text and rfc822 format available.

Message #15 received at 689537@bugs.debian.org (full text, mbox):

From: Andreas Beckmann <debian@abeckmann.de>
To: intrigeri <intrigeri@boum.org>
Cc: 689537@bugs.debian.org
Subject: Re: Bug#689537: pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
Date: Fri, 05 Oct 2012 11:08:43 +0200
On 2012-10-05 10:59, intrigeri wrote:
> In case it might help, I currently have 1.2.8-par-2.3 installed, and
> that file is missing here. My etckeeper git -d log tells me that file
> was deleted by the upgrade from 1.2.8-par-2 to 1.2.8-par-2.1, who
> knows why.

because the prerm unconditionally deletes that conffile, so it also gets
lost on plain upgrades - or even a reinstallation.

and while we are at mishandling conffiles: /etc/default/pdnsd is also
shipped as a conffile but modified by maintainer scripts (using a
debconf answer ...)


Andreas



Bug 689537 cloned as bug 690368 Request was from Stuart Prescott <stuart@debian.org> to control@bugs.debian.org. (Sat, 13 Oct 2012 11:09:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Mahyuddin Susanto <udienz@ubuntu.com>:
Bug#689537; Package pdnsd. (Sat, 13 Oct 2012 11:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stuart Prescott <stuart@debian.org>:
Extra info received and forwarded to list. Copy sent to Mahyuddin Susanto <udienz@ubuntu.com>. (Sat, 13 Oct 2012 11:15:03 GMT) Full text and rfc822 format available.

Message #22 received at 689537@bugs.debian.org (full text, mbox):

From: Stuart Prescott <stuart@debian.org>
To: 689537@bugs.debian.org
Subject: Bug#689537: pdnsd: Patch to fix conffile removal
Date: Sat, 13 Oct 2012 11:55:48 +0100
[Message part 1 (text/plain, inline)]
Control: tag 689537 +patch

Attached is a patch that fixes the conffile removal.

-- 
Stuart Prescott    http://www.nanonanonano.net/   stuart@nanonanonano.net
Debian Developer   http://www.debian.org/         stuart@debian.org
GPG fingerprint    BE65 FD1E F4EA 08F3 23D4 3C6D 9FE8 B8CD 71C5 D1A8
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB  891D BBC1 7EBB 1396 F2F7
[pdnsd_1.2.8-par-2.4.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) patch. Request was from Stuart Prescott <stuart@debian.org> to 689537-submit@bugs.debian.org. (Sat, 13 Oct 2012 11:15:03 GMT) Full text and rfc822 format available.

Reply sent to gregor herrmann <gregoa@debian.org>:
You have taken responsibility. (Fri, 19 Oct 2012 20:51:06 GMT) Full text and rfc822 format available.

Notification sent to Andreas Beckmann <debian@abeckmann.de>:
Bug acknowledged by developer. (Fri, 19 Oct 2012 20:51:06 GMT) Full text and rfc822 format available.

Message #29 received at 689537-close@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: 689537-close@bugs.debian.org
Subject: Bug#689537: fixed in pdnsd 1.2.8-par-3
Date: Fri, 19 Oct 2012 20:47:42 +0000
Source: pdnsd
Source-Version: 1.2.8-par-3

We believe that the bug you reported is fixed in the latest version of
pdnsd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 689537@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
gregor herrmann <gregoa@debian.org> (supplier of updated pdnsd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 19 Oct 2012 22:36:35 +0200
Source: pdnsd
Binary: pdnsd
Architecture: source amd64
Version: 1.2.8-par-3
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: gregor herrmann <gregoa@debian.org>
Description: 
 pdnsd      - Proxy DNS Server
Closes: 689537 690368
Changes: 
 pdnsd (1.2.8-par-3) unstable; urgency=low
 .
   * QA upload.
 .
   [ Stuart Prescott ]
   * Only remove /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd on purge
     (Closes: #689537).
   * Remove now-empty prerm maintainer script template.
 .
   [ gregor herrmann ]
   * Set maintainer to "Debian QA Group <packages@qa.debian.org>"
     (cf. #689563)
   * Fix "postinst overwrites admin changes to /etc/default/pdnsd":
     - install default file below /usr/share
     - copy it to /etc/default in postinst if necessary
     - preserver also "Manual" value in config
     - remove it in postinst/purge
     (Closes: #690368)
Checksums-Sha1: 
 37aeaed98c74add90db51a8d2ed36bf804d4b145 1854 pdnsd_1.2.8-par-3.dsc
 3122779ae291ce4611b5b27676afc1b99d752810 28508 pdnsd_1.2.8-par-3.debian.tar.gz
 10f87aa7b78e7024814ccc083412d370ad136284 304714 pdnsd_1.2.8-par-3_amd64.deb
Checksums-Sha256: 
 4d1366eedacf5c93d7d8fc28b7dc895c04e9ea76800b81a26a441e2c0e82e30e 1854 pdnsd_1.2.8-par-3.dsc
 637ba9ae00f0faaa639297516c644bb480c29154af9a967da42e0b877038317c 28508 pdnsd_1.2.8-par-3.debian.tar.gz
 b1ae8c04060679788deae1ee105120d102b88ca9e5bd6b7788e7702ae2b3035a 304714 pdnsd_1.2.8-par-3_amd64.deb
Files: 
 3675257c6e174d07a2eb563a95a06341 1854 net optional pdnsd_1.2.8-par-3.dsc
 b3039c2982c90af6984339f85d33184c 28508 net optional pdnsd_1.2.8-par-3.debian.tar.gz
 400928832c98181fdaf469a5153738b5 304714 net optional pdnsd_1.2.8-par-3_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQgboKAAoJELs6aAGGSaoGuGoQAKCbQcyqwdtBMZVUJpW11PTH
9XlsbX0zMiNBli58Re/SJ4Fl5fh60ULM5lTqY6xw4gyravq3SvHohJczkP7a8Sl8
VcLXr+p8Ckwe4eQQuJQv+SGGRpYmPQ9CvaCAKNf/L8e5Cnb1RHEstS4/apXsqNbr
94ZjIfXvULFbSaj0brhhWr1lld+sKvAX2aemiqSr3vJUv3jc0KPL2KC6y8fxJRHP
4AVB00e1AHHPHZCMOaPXdxE/ZHlY0NCY4rjjtQcfGk5tysiUeK20ryHKp6Pej28V
wfYIOGcUrgYHtIcKfrcwkmBz1J42OS1mO4jWp1HeyhVWpnREljVgdJ/Tzpx4/WER
jRA+zFjUMHl2aFKnJJ9irqro4YbaA97sN5xcsADCBmfSZvrEi2/cF2lqGIrEzlxn
n6hYDTZ9BPJK7OYgG5EhVqCMtp8cDTxzVMLI5wmR4O06EsJFBYPrFQedhxePjkHM
Umxjnc8BlBeTNC4d/WTGllwXOPOBdQZMmt1cWEqC06T9TZPvqqLVIQGKhhufwXXq
bA3CPIuxxPpL8y4O3yCwpUYnqpXYSaHt3qQ4BojX3qGOoaFGsmAvzcR5Hk/XtWcA
qhTGWbF9NmuuKCaQWJl7YiwbTojod7y5nEPPSrOtOIhQgQsxRbEDM8HP5zx1rASt
Jl8ii08st4d8zKufuB17
=mJcX
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#689537; Package pdnsd. (Sun, 21 Oct 2012 22:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Beckmann <debian@abeckmann.de>:
Extra info received and forwarded to list. Copy sent to Debian QA Group <packages@qa.debian.org>. (Sun, 21 Oct 2012 22:21:03 GMT) Full text and rfc822 format available.

Message #34 received at 689537@bugs.debian.org (full text, mbox):

From: Andreas Beckmann <debian@abeckmann.de>
To: 689537@bugs.debian.org
Subject: Re: Bug#689537: pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
Date: Mon, 22 Oct 2012 00:16:19 +0200
With the prerm script gone this issue is fixed for squeeze->sid upgrades
(and squeeze->wheezy upgrades once 1.2.8-par-3 migrates to wheezy), but
the problem (missing conffile) will still exist if the user had any
version from 1.2.8-par-2, ..., 1.2.8-par-2.3 installed.

I don't see an easy solution for this ... as
  old-prerm upgrade new-version
is the very first step of the upgrade, there is no hacking around this
by deleting a buggy maintainer script during
  new-preinst upgrade old-version

Maybe this could work:
ship another copy of the file in /usr/share and in the postinst do

if dpkg --compare-versions $upgrade_from ge 1.2.8-par-2~ &&
   dpkg --compare-versions $upgrade_from lt 1.2.8-par-4~
then
  target=/etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
  source=/usr/share/.../002_NetMan_pdnsd
  if [ ! -e $target ]; then
    echo restoring $target
    cp $source $target
  fi
fi

but it's only upgrades from pdnsd/testing that are affected


Andreas



Information forwarded to debian-bugs-dist@lists.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#689537; Package pdnsd. (Mon, 22 Oct 2012 17:39:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian QA Group <packages@qa.debian.org>. (Mon, 22 Oct 2012 17:39:05 GMT) Full text and rfc822 format available.

Message #39 received at 689537@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Andreas Beckmann <debian@abeckmann.de>, 689537@bugs.debian.org
Subject: Re: Bug#689537: pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
Date: Mon, 22 Oct 2012 19:38:23 +0200
[Message part 1 (text/plain, inline)]
On Mon, 22 Oct 2012 00:16:19 +0200, Andreas Beckmann wrote:

> With the prerm script gone this issue is fixed for squeeze->sid upgrades
> (and squeeze->wheezy upgrades once 1.2.8-par-3 migrates to wheezy), but
> the problem (missing conffile) will still exist if the user had any
> version from 1.2.8-par-2, ..., 1.2.8-par-2.3 installed.
> 
> I don't see an easy solution for this ... as
>   old-prerm upgrade new-version
> is the very first step of the upgrade, there is no hacking around this
> by deleting a buggy maintainer script during
>   new-preinst upgrade old-version

Right, when upgrading from one of those versions the file gets
removed. (And not even reinstalling helps, and dpkg-query knows about
the conffile ...)
 
> Maybe this could work:
> ship another copy of the file in /usr/share and in the postinst do
> 
> if dpkg --compare-versions $upgrade_from ge 1.2.8-par-2~ &&
>    dpkg --compare-versions $upgrade_from lt 1.2.8-par-4~
> then
>   target=/etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
>   source=/usr/share/.../002_NetMan_pdnsd
>   if [ ! -e $target ]; then
>     echo restoring $target
>     cp $source $target
>   fi
> fi
> 
> but it's only upgrades from pdnsd/testing that are affected

Should work; not sure if it's worth the effort ...


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 03 Dec 2012 07:26:55 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 04:14:09 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.