Bug#621071: nsd3: statoverride file is in a bad state after remove

2011-04-07 Thread Jeroen Schot
Hi,

On Wed, Apr 06, 2011 at 11:44:17AM +0200, S Berder wrote:
 Package: nsd3
 Version: 3.2.5-1
 Severity: important
 
 When using 'apt-get remove --purge nsd3', the /var/lib/dpkg/statoverride file 
 is left in an unstable state.
 Reproduced the problem several times by installing the package and 
 removing/purging it.
 After the remove/purge, any further install fails.
 
 After 'apt-get remove --purge nsd3' :
 # cat /var/lib/dpkg/statoverride
 
 nsd nsd 755 /var/lib/nsd3
 nsd nsd 750 /etc/nsd3
 nsd nsd 640 /etc/nsd3/nsd.conf
 [...]
 # apt-get install package
 [...]
 Preconfiguring packages ...
 dpkg: unrecoverable fatal error, aborting:
  syntax error: unknown user 'nsd' in statoverride file
 E: Sub-process /usr/bin/dpkg returned an error code (2)

This is because the postrm script removes the nsd user before it
removes the stat overrides.

Attached patch fixes this (and also suppresses a spurious warning when
/var/lib/nsd3 was empty and thus automatically removed).

Would this be a candidate for proposed-updates as it fixes an
installability bug?

Regards,
-- 
Jeroen Schot
--- debian/postrm.orig	2011-03-30 14:13:56.0 +0200
+++ debian/postrm	2011-04-07 14:35:40.0 +0200
@@ -8,13 +8,14 @@
 
 if test $1 = purge; then
 spool=/var/lib/nsd3
-deluser --quiet nsd  /dev/null || true
 rm -f $spool/nsd.db $spool/ixfr.db $spool/xfrd.state
-rmdir $spool || true
+rmdir $spool 2/dev/null || true
 
 unset_perms /var/lib/nsd3
 unset_perms /etc/nsd3/nsd.conf
 unset_perms /etc/nsd3
+
+deluser --quiet nsd  /dev/null || true
 fi
 
 exit 0


signature.asc
Description: Digital signature


Bug#621071: nsd3: statoverride file is in a bad state after remove

2011-04-07 Thread Ondřej Surý
Thanks for the patch, it is much appreciated.

I'll upload a fixed version to unstable and to stable proposed-updates.

Jeroed, feel free to clone my git repository somewhere (github /
alioth) and ask for pull requests.

O.

On Thu, Apr 7, 2011 at 14:46, Jeroen Schot sc...@a-eskwadraat.nl wrote:
 Hi,

 On Wed, Apr 06, 2011 at 11:44:17AM +0200, S Berder wrote:
 Package: nsd3
 Version: 3.2.5-1
 Severity: important

 When using 'apt-get remove --purge nsd3', the /var/lib/dpkg/statoverride 
 file is left in an unstable state.
 Reproduced the problem several times by installing the package and 
 removing/purging it.
 After the remove/purge, any further install fails.

 After 'apt-get remove --purge nsd3' :
 # cat /var/lib/dpkg/statoverride

 nsd nsd 755 /var/lib/nsd3
 nsd nsd 750 /etc/nsd3
 nsd nsd 640 /etc/nsd3/nsd.conf
 [...]
 # apt-get install package
 [...]
 Preconfiguring packages ...
 dpkg: unrecoverable fatal error, aborting:
  syntax error: unknown user 'nsd' in statoverride file
 E: Sub-process /usr/bin/dpkg returned an error code (2)

 This is because the postrm script removes the nsd user before it
 removes the stat overrides.

 Attached patch fixes this (and also suppresses a spurious warning when
 /var/lib/nsd3 was empty and thus automatically removed).

 Would this be a candidate for proposed-updates as it fixes an
 installability bug?

 Regards,
 --
 Jeroen Schot

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (GNU/Linux)

 iF4EAREIAAYFAk2dsjsACgkQltTwwNczgvFIQQD8DnnvGsZK8LF564eSdmsjkb41
 9NzdD8fBmHKxR29ddYIA/ibnX3/+Ive/fz3p0C6V/8V7oN+PAx6OX17ryMNxR4et
 =Y7D3
 -END PGP SIGNATURE-





-- 
Ondřej Surý ond...@sury.org



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#621071: nsd3: statoverride file is in a bad state after remove

2011-04-07 Thread s b
Good job guys, I admit I've been a bit lazy as didn't even looked at the
source package.

Stefan, from my Android

On Apr 7, 2011 10:14 PM, Ondřej Surý ond...@sury.org wrote:

Thanks for the patch, it is much appreciated.

I'll upload a fixed version to unstable and to stable proposed-updates.

Jeroed, feel free to clone my git repository somewhere (github /
alioth) and ask for pull requests.

O.


On Thu, Apr 7, 2011 at 14:46, Jeroen Schot sc...@a-eskwadraat.nl wrote:
 Hi,

 On Wed, Apr 06,...
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (GNU/Linux)

 iF4EAREIAAYFAk2dsjsACgkQltTwwNczgvFIQQD8DnnvGsZK8LF564eSdmsjkb41
 9NzdD8fBmHKxR29ddYIA/ibnX3/+Ive/fz3p0C6V/8V7oN+PAx6OX17ryMNxR4et
 =Y7D3
 -END PGP SIGNATURE-





--
Ondřej Surý ond...@sury.org


Bug#621071: nsd3: statoverride file is in a bad state after remove

2011-04-06 Thread S Berder
Package: nsd3
Version: 3.2.5-1
Severity: important

When using 'apt-get remove --purge nsd3', the /var/lib/dpkg/statoverride file 
is left in an unstable state.
Reproduced the problem several times by installing the package and 
removing/purging it.
After the remove/purge, any further install fails.

After 'apt-get remove --purge nsd3' :
# cat /var/lib/dpkg/statoverride

nsd nsd 755 /var/lib/nsd3
nsd nsd 750 /etc/nsd3
nsd nsd 640 /etc/nsd3/nsd.conf
[...]
# apt-get install package
[...]
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown user 'nsd' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nsd3 depends on:
ii  adduser 3.112+nmu2   add and remove users and groups
ii  libc6   2.11.2-10Embedded GNU C Library: Shared lib
ii  libssl0.9.8 0.9.8o-4squeeze1 SSL shared libraries
ii  lsb-base3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip

nsd3 recommends no packages.

nsd3 suggests no packages.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org