[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-74-gac51d65

Andreas Beckmann debian at abeckmann.de
Sat Jul 21 15:56:24 UTC 2012


The following commit has been merged in the develop branch:
commit 0000ccfa46825ea948e6208f10770f29223b9e98
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri Jul 20 17:18:53 2012 +0200

    new custom script post_setup_forbid_home
    
    replace /home with a file to prevent creating any home directories there
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/custom-scripts/scripts/post_setup_forbid_home b/custom-scripts/scripts/post_setup_forbid_home
new file mode 100755
index 0000000..93edb8d
--- /dev/null
+++ b/custom-scripts/scripts/post_setup_forbid_home
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+case ${PIUPARTS_OBJECTS%%=*} in
+	dpkg)
+		# skip while creating the tarball
+		exit 0
+		;;
+esac
+
+case $PIUPARTS_DISTRIBUTION in
+	lenny|squeeze)
+		exit 0
+		;;
+esac
+
+if [ -d /home ]; then
+	echo "Disabling /home"
+	mv /home /home.orig
+	echo "This is a dummy file to prevent creating directories in /home" > /home
+	chmod 000 /home
+fi
diff --git a/debian/changelog b/debian/changelog
index 8c75151..e7ef6a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,8 @@ piuparts (0.46) UNRELEASED; urgency=low
     - Separate build and install targets.
     - Adjust for new layout, cleanup, simplify.
   * New helper script: master-bin/reclassify_bugged.
+  * New custom script post_setup_forbid_home: replace /home with a file to
+    prevent creating home directories there.  (Closes: #677332)
 
  -- Holger Levsen <holger at debian.org>  Thu, 21 Jun 2012 22:25:57 +0200
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list