Control: tag 681146 + patch

On Wed, 11 Jul 2012 00:37:58 +0200, Andreas Beckmann wrote:

> Looks like the home directory is removed but the user remains, so the
> next installation won't recreate the missing homedirectory and using
> the homeless user fails later on.

Actually this looks all good in the postinst/postrm, and on my first
try I couldn't reproduce this bug.

Then I looked closer:
 
> >>From the attached log (scroll to the bottom...):
> 
>   /usr/sbin/deluser: In order to use the --remove-home, --remove-all-files, 
> and --backup features,
>   you need to install the `perl-modules' package. To accomplish that, run
>   apt-get install perl-modules.

Here we are. After making a chroot "perl-free" I got the same error.
(And then the user doesn't get removed etc.)

Since we can't guarantee perl-modules to be installed at postrm time,
and the directory is removed manually anyway, I suggest to delete the
"--remove-home" part from the postinst file.

Proposed patch attached; comments welcome before I NMU.


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
   `-   NP: hons: molly's got a rider
diff -u bitlbee-3.0.5/debian/changelog bitlbee-3.0.5/debian/changelog
--- bitlbee-3.0.5/debian/changelog
+++ bitlbee-3.0.5/debian/changelog
@@ -1,3 +1,14 @@
+bitlbee (3.0.5-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "fails to install, purge, and install again":
+    remove --remove-home option from deluser call in bitlbee-common.postrm.
+    The option needs perl-modules which is not guaranteed to be there, and the
+    directory gets removed manually anyway.
+    (Closes: #681146)
+
+ -- gregor herrmann <gre...@debian.org>  Thu, 26 Jul 2012 18:44:36 +0200
+
 bitlbee (3.0.5-1) unstable; urgency=low
 
   * New upstream release.
diff -u bitlbee-3.0.5/debian/bitlbee-common.postrm bitlbee-3.0.5/debian/bitlbee-common.postrm
--- bitlbee-3.0.5/debian/bitlbee-common.postrm
+++ bitlbee-3.0.5/debian/bitlbee-common.postrm
@@ -14,3 +14,3 @@
 
-deluser --system --remove-home bitlbee || true
+deluser --system bitlbee || true
 rm -rf /var/lib/bitlbee ## deluser doesn't seem to do this for homedirs in /var

Attachment: signature.asc
Description: Digital signature

Reply via email to