Control: tag 681567 + patch

On Sat, 14 Jul 2012 12:42:03 +0200, Andreas Beckmann wrote:

> during a test with piuparts I noticed your package failed to install,
> remove+purge, and install again.
 
> This is often a problem with the home directory of a system user:
> the user is not deleted during purge (which is fine), but the home
> directory is removed. Since the user already exists on the next
> installation, adduser won't recreate the home.

That's exactly the case here: in postrm/purge the user account is not
deleted but just disabled; but the home directory is deleted. So at
the second install the directory is not created.

Since there's already a codepath to deal with an exisiting user, I
suggest to (re)create the directory there --> attached patch.


Any comments 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: Page&Plant: House Of Love
diff -Nru opennebula-3.4.1/debian/changelog opennebula-3.4.1/debian/changelog
--- opennebula-3.4.1/debian/changelog	2012-06-03 19:18:27.000000000 +0200
+++ opennebula-3.4.1/debian/changelog	2012-07-28 18:16:43.000000000 +0200
@@ -1,3 +1,13 @@
+opennebula (3.4.1-3.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "fails to install, purge, and install again":
+    opennebula-common.postinst: make sure that the homedir of the oneadmin
+    user exists.
+    (Closes: #681567)
+
+ -- gregor herrmann <gre...@debian.org>  Sat, 28 Jul 2012 18:09:06 +0200
+
 opennebula (3.4.1-3) unstable; urgency=low
 
   * Add support for noVNC to SelfService and Sunstone UI:
diff -Nru opennebula-3.4.1/debian/opennebula-common.postinst opennebula-3.4.1/debian/opennebula-common.postinst
--- opennebula-3.4.1/debian/opennebula-common.postinst	2012-06-03 19:18:27.000000000 +0200
+++ opennebula-3.4.1/debian/opennebula-common.postinst	2012-07-28 18:15:52.000000000 +0200
@@ -19,6 +19,8 @@
         ONEHOME=`getent passwd $ONE_USER | cut -f6 -d:`
 	# Renable user (give him a shell)
         usermod --shell /bin/bash $ONE_USER
+        # Make sure ONEHOME exists, might have been removed on previous purge
+        mkdir -p $ONEHOME
     fi
 }
 

Attachment: signature.asc
Description: Digital signature

Reply via email to