[Collab-qa-commits] r850 - in debcluster/configs: . schroot schroot/exec.d schroot/setup.d

lucas at alioth.debian.org lucas at alioth.debian.org
Tue May 20 13:24:48 UTC 2008


Author: lucas
Date: 2008-05-20 13:24:46 +0000 (Tue, 20 May 2008)
New Revision: 850

Added:
   debcluster/configs/schroot/chroot.d/
   debcluster/configs/schroot/copyfiles-defaults
   debcluster/configs/schroot/mount-defaults
   debcluster/configs/schroot/setup.d/20copyfiles
Removed:
   debcluster/configs/schroot/setup.d/20network
   debcluster/configs/schroot/setup.d/30passwd
   debcluster/configs/schroot/setup.d/50sbuild
Modified:
   debcluster/configs/iptables.rules
   debcluster/configs/schroot/exec.d/00check
   debcluster/configs/schroot/schroot.conf
   debcluster/configs/schroot/script-defaults
   debcluster/configs/schroot/setup.d/00check
   debcluster/configs/schroot/setup.d/05file
   debcluster/configs/schroot/setup.d/05lvm
   debcluster/configs/schroot/setup.d/10mount
   debcluster/configs/schroot/setup.d/15killprocs
   debcluster/configs/schroot/setup.d/50chrootname
Log:
update configs

Modified: debcluster/configs/iptables.rules
===================================================================
--- debcluster/configs/iptables.rules	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/iptables.rules	2008-05-20 13:24:46 UTC (rev 850)
@@ -30,6 +30,7 @@
 -A OUTPUT -d 138.96.20.0/255.255.252.0 -j ACCEPT
 # toulouse
 -A OUTPUT -d 192.168.22.0/255.255.255.0 -j ACCEPT
+-A OUTPUT -d 172.16.0.0/255.255.0.0 -j ACCEPT
 # Log & drop the rest
 -A OUTPUT -j LD
 COMMIT

Added: debcluster/configs/schroot/copyfiles-defaults
===================================================================
--- debcluster/configs/schroot/copyfiles-defaults	                        (rev 0)
+++ debcluster/configs/schroot/copyfiles-defaults	2008-05-20 13:24:46 UTC (rev 850)
@@ -0,0 +1,5 @@
+/etc/group
+/etc/hosts
+/etc/passwd
+/etc/resolv.conf
+/etc/shadow

Modified: debcluster/configs/schroot/exec.d/00check
===================================================================
--- debcluster/configs/schroot/exec.d/00check	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/exec.d/00check	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,7 +1,29 @@
 #!/bin/sh
+# Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
+#
+# schroot is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# schroot is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
+set -e
+
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 if [ $1 = "exec-start" ]; then
@@ -35,6 +57,10 @@
 		echo "CHROOT_LVM_SNAPSHOT_OPTIONS=$CHROOT_LVM_SNAPSHOT_OPTIONS"
 	    fi
 	fi
+	echo "CHROOT_SESSION_CREATE=$CHROOT_SESSION_CREATE"
+	echo "CHROOT_SESSION_CLONE=$CHROOT_SESSION_CLONE"
+	echo "CHROOT_SESSION_PURGE=$CHROOT_SESSION_PURGE"
+        echo "FSTAB=$FSTAB"
         echo "SBUILD=$SBUILD"
     fi
 

Added: debcluster/configs/schroot/mount-defaults
===================================================================
--- debcluster/configs/schroot/mount-defaults	                        (rev 0)
+++ debcluster/configs/schroot/mount-defaults	2008-05-20 13:24:46 UTC (rev 850)
@@ -0,0 +1,10 @@
+# mount.defaults: static file system information for chroots.
+# Note that the mount point will be prefixed by the chroot path
+# (CHROOT_PATH)
+#
+# <file system>	<mount point>	<type>	<options>	<dump>	<pass>
+proc		/proc		proc	defaults	0	0
+/dev/pts	/dev/pts	none	rw,bind		0	0
+tmpfs		/dev/shm	tmpfs	defaults	0	0
+/home		/home		none	rw,bind		0	0
+/tmp		/tmp		none	rw,bind		0	0

Modified: debcluster/configs/schroot/schroot.conf
===================================================================
--- debcluster/configs/schroot/schroot.conf	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/schroot.conf	2008-05-20 13:24:46 UTC (rev 850)
@@ -78,6 +78,16 @@
 run-setup-scripts=true
 root-users=user
 
+[sid32-dpkg]
+type=file
+description=Debian sid 32 bits
+file=/debcluster-data/chroots/sid32-dpkg.tgz
+priority=2
+run-setup-scripts=true
+personality=linux32
+root-users=user
+
+
 [sid32-dash]
 type=file
 description=Debian sid 32 bits
@@ -87,6 +97,15 @@
 personality=linux32
 root-users=user
 
+[sid32-im]
+type=file
+description=Debian sid 32 bits
+file=/debcluster-data/chroots/sid32-im.tgz
+priority=2
+run-setup-scripts=true
+personality=linux32
+root-users=user
+
 [sid32]
 type=file
 description=Debian sid 32 bits

Modified: debcluster/configs/schroot/script-defaults
===================================================================
--- debcluster/configs/schroot/script-defaults	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/script-defaults	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,5 +1,13 @@
-# Default settings for chroot setup and exec scripts
+# Default settings for chroot setup and exec scripts.
+# See schroot-script-config(5) for further details.
 
+# Filesystems to mount inside the chroot.
+FSTAB="/etc/schroot/mount-defaults"
+
+# Files to copy from the host system into the chroot.
+COPYFILES="/etc/schroot/copyfiles-defaults"
+
+# Is sbuild installed?
 if [ -x /usr/bin/sbuild ]; then
   SBUILD="true"
 else

Modified: debcluster/configs/schroot/setup.d/00check
===================================================================
--- debcluster/configs/schroot/setup.d/00check	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/00check	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
 #
-# schroot is free software; you can redistribute it and/or modify it
+# schroot is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # schroot is distributed in the hope that it will be useful, but
@@ -12,12 +12,18 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
+set -e
+
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 if [ $1 = "setup-start" ] || [ $1 = "setup-recover" ]; then
@@ -51,6 +57,10 @@
 		echo "CHROOT_LVM_SNAPSHOT_OPTIONS=$CHROOT_LVM_SNAPSHOT_OPTIONS"
 	    fi
 	fi
+	echo "CHROOT_SESSION_CREATE=$CHROOT_SESSION_CREATE"
+	echo "CHROOT_SESSION_CLONE=$CHROOT_SESSION_CLONE"
+	echo "CHROOT_SESSION_PURGE=$CHROOT_SESSION_PURGE"
+        echo "FSTAB=$FSTAB"
         echo "SBUILD=$SBUILD"
     fi
 

Modified: debcluster/configs/schroot/setup.d/05file
===================================================================
--- debcluster/configs/schroot/setup.d/05file	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/05file	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
 #
-# schroot is free software; you can redistribute it and/or modify it
+# schroot is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # schroot is distributed in the hope that it will be useful, but
@@ -12,14 +12,18 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
 set -e
 
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 # Check file type
@@ -117,12 +121,13 @@
 	    exit 1
 	done || exit 1
 
-	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-	    echo "Purging $CHROOT_MOUNT_LOCATION"
+	if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
+	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+		echo "Purging $CHROOT_MOUNT_LOCATION"
+	    fi
+	    rm -rf "$CHROOT_MOUNT_LOCATION"
 	fi
 
-	rm -rf "$CHROOT_MOUNT_LOCATION"
-
     fi
 
 fi

Modified: debcluster/configs/schroot/setup.d/05lvm
===================================================================
--- debcluster/configs/schroot/setup.d/05lvm	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/05lvm	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
 #
-# schroot is free software; you can redistribute it and/or modify it
+# schroot is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # schroot is distributed in the hope that it will be useful, but
@@ -12,14 +12,18 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
 set -e
 
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 if [ "$AUTH_VERBOSITY" = "verbose" ]; then

Modified: debcluster/configs/schroot/setup.d/10mount
===================================================================
--- debcluster/configs/schroot/setup.d/10mount	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/10mount	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
 #
-# schroot is free software; you can redistribute it and/or modify it
+# schroot is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # schroot is distributed in the hope that it will be useful, but
@@ -12,14 +12,18 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
 set -e
 
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 # Mount a filesystem
@@ -43,19 +47,21 @@
     mount $VERBOSE $1 "$2" "$3"
 }
 
-# Unmount all filesystem under specified location
+# Unmount all filesystems under specified location
 # $1: mount base location
 do_umount_all()
 {
-    mounts="$("$LIBEXEC_DIR/schroot-listmounts" -m "$1")"
-    if [ "x$mounts" != 'x' ]; then
-        echo "$mounts" |
-        while read mountloc; do
-	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-                echo "Unmounting $mountloc"
-	    fi
-	    umount "$mountloc" || exit 1
-        done || exit 1
+    if [ -d "$1" ]; then
+	mounts="$("$LIBEXEC_DIR/schroot-listmounts" -m "$1")"
+	if [ "x$mounts" != 'x' ]; then
+            echo "$mounts" |
+            while read mountloc; do
+		if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+                    echo "Unmounting $mountloc"
+		fi
+		umount "$mountloc" || exit 1
+            done || exit 1
+	fi
     fi
 }
 
@@ -101,12 +107,15 @@
 	fi
 
 	if [ "$CHROOT_TYPE" != "plain" ]; then
-	    do_mount "-t proc"    "proc"     "${CHROOT_PATH}/proc"
-	    do_mount "-t sysfs"    "sysfs"     "${CHROOT_PATH}/sys"
-	    do_mount "-o rw,bind" "/dev/pts" "${CHROOT_PATH}/dev/pts"
-	    do_mount "-t tmpfs"   "tmpfs"    "${CHROOT_PATH}/dev/shm"
-	    do_mount "-o rw,bind" "/home"    "${CHROOT_PATH}/home"
-	    do_mount "-o rw,bind" "/tmp"     "${CHROOT_PATH}/tmp"
+	    if [ -n "$FSTAB" ]; then
+		if [ -f "$FSTAB" ]; then
+		    "$LIBEXEC_DIR/schroot-mount" $VERBOSE \
+			-f "$FSTAB" -m "$CHROOT_PATH"
+		else
+		    echo "fstab file '$FSTAB' does not exist"
+		    exit 1
+		fi
+	    fi
 	fi
 
     elif [ $1 = "setup-stop" ]; then

Modified: debcluster/configs/schroot/setup.d/15killprocs
===================================================================
--- debcluster/configs/schroot/setup.d/15killprocs	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/15killprocs	2008-05-20 13:24:46 UTC (rev 850)
@@ -2,9 +2,9 @@
 # Copyright © 2007  Kees Cook <kees at outflux.net>
 # Copyright © 2007  Roger Leigh <rleigh at debian.org>
 #
-# schroot is free software; you can redistribute it and/or modify it
+# schroot is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # schroot is distributed in the hope that it will be useful, but
@@ -13,14 +13,18 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
 set -e
 
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 # Kill all processes that were run from within the chroot environment

Added: debcluster/configs/schroot/setup.d/20copyfiles
===================================================================
--- debcluster/configs/schroot/setup.d/20copyfiles	                        (rev 0)
+++ debcluster/configs/schroot/setup.d/20copyfiles	2008-05-20 13:24:46 UTC (rev 850)
@@ -0,0 +1,86 @@
+#!/bin/sh
+# Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
+#
+# schroot is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# schroot is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
+
+set -e
+
+if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
+fi
+
+if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+  VERBOSE="--verbose"
+fi
+
+# Copy a file if the source and destination differ
+# $1: source file
+# $2: destination file
+copy_file()
+{
+    if [ -r "$1" ]; then
+	if [ -r "$2" ]; then
+
+            # Device and inode
+	    da=$(/usr/bin/stat --format="%d %i" "$1")
+	    db=$(/usr/bin/stat --format="%d %i" "$2")
+
+            # Content
+	    ca=$(/usr/bin/md5sum "$1" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/')
+	    cb=$(/usr/bin/md5sum "$2" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/')
+
+	    # Copy if files are different
+	    if [ "$da" != "$db" ]; then
+		if [ "$ca" != "$cb" ]; then
+		    cp $VERBOSE "$1" "$2"
+		fi
+	    fi
+
+	else
+
+	    # Copy if destination file does not exist
+	    cp $VERBOSE "$1" "$2"
+
+	fi
+
+    else
+	echo "W: Not copying nonexistent file: $file"
+    fi
+}
+
+if [ $1 = "setup-start" ] || [ $1 = "setup-recover" ]; then
+
+    if [ -n "$COPYFILES" ]; then
+	if [ -f "$COPYFILES" ]; then
+	    while read file; do
+		if echo "$file" | grep -q '^/'; then
+		    copy_file "$file" "${CHROOT_PATH}$file"
+		else
+		    echo "W: Not copying file with relative path: $file"
+		fi
+	    done < "$COPYFILES"
+	else
+	    echo "copyfiles file '$COPYFILES' does not exist"
+	    exit 1
+	fi
+    fi
+
+fi
+


Property changes on: debcluster/configs/schroot/setup.d/20copyfiles
___________________________________________________________________
Name: svn:executable
   + *

Deleted: debcluster/configs/schroot/setup.d/20network
===================================================================
--- debcluster/configs/schroot/setup.d/20network	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/20network	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
-#
-# schroot is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# schroot is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
-
-if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
-fi
-
-if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-  VERBOSE="--verbose"
-fi
-
-if [ $1 = "setup-start" ] || [ $1 = "setup-recover" ]; then
-  cp $VERBOSE /etc/resolv.conf "${CHROOT_PATH}/etc/resolv.conf"
-fi
-

Deleted: debcluster/configs/schroot/setup.d/30passwd
===================================================================
--- debcluster/configs/schroot/setup.d/30passwd	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/30passwd	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,32 +0,0 @@
-#!/bin/sh
-# Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
-#
-# schroot is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# schroot is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
-
-if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
-fi
-
-if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-  VERBOSE="--verbose"
-fi
-
-#if [ $1 = "setup-start" ] || [ $1 = "setup-recover" ]; then
-#  cp $VERBOSE /etc/passwd "${CHROOT_PATH}/etc/passwd"
-#  cp $VERBOSE /etc/shadow "${CHROOT_PATH}/etc/shadow"
-#  cp $VERBOSE /etc/group  "${CHROOT_PATH}/etc/group"
-#fi
-

Modified: debcluster/configs/schroot/setup.d/50chrootname
===================================================================
--- debcluster/configs/schroot/setup.d/50chrootname	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/50chrootname	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,9 +1,9 @@
 #!/bin/sh
-# Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
+# Copyright © 2005-2008  Roger Leigh <rleigh at debian.org>
 #
-# schroot is free software; you can redistribute it and/or modify it
+# schroot is free software: you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # schroot is distributed in the hope that it will be useful, but
@@ -12,12 +12,18 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
+# along with this program.  If not, see
+# <http://www.gnu.org/licenses/>.
+#
+#####################################################################
 
+set -e
+
 if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
+    . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$2" = "ok" ]; then
+    echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
+    exit 1
 fi
 
 if [ $1 = "setup-start" ] || [ $1 = "setup-recover" ]; then

Deleted: debcluster/configs/schroot/setup.d/50sbuild
===================================================================
--- debcluster/configs/schroot/setup.d/50sbuild	2008-05-09 21:56:07 UTC (rev 849)
+++ debcluster/configs/schroot/setup.d/50sbuild	2008-05-20 13:24:46 UTC (rev 850)
@@ -1,87 +0,0 @@
-#!/bin/sh
-# Copyright © 2005-2007  Roger Leigh <rleigh at debian.org>
-#
-# schroot is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# schroot is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA  02111-1307  USA
-
-if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
-  . "$CHROOT_SCRIPT_CONFIG"
-fi
-
-if [ $1 = "setup-start" ] && [ "$SBUILD" = "true" ]; then
-
-    # If the session user is a member of the sbuild group, make sure
-    # that the chroot environment has the sbuild build directory
-    # exists, and has the correct ownership permissions.
-
-    if getent group $(id -G "${AUTH_USER}") | \
-	sed -e 's/^\([^:]*\):.*$/\1/' | \
-	grep -q '^sbuild$'; then
-
-	if [ ! -d "${CHROOT_PATH}/home/${AUTH_USER}" ]; then
-	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-		echo "Creating user home directory: ${CHROOT_PATH}/home/${AUTH_USER}"
-	    fi
-	    mkdir -p "${CHROOT_PATH}/home/${AUTH_USER}"
-
-	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-		echo "Setting ownership of ${CHROOT_PATH}/home/${AUTH_USER} to ${AUTH_USER}:sbuild"
-	    fi
-	    chown "${AUTH_USER}:sbuild" "${CHROOT_PATH}/home/${AUTH_USER}"
-	fi
-
-	if [ ! -d "${CHROOT_PATH}/build/${AUTH_USER}" ]; then
-	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-		echo "Creating sbuild build directory: ${CHROOT_PATH}/build/${AUTH_USER}"
-	    fi
-	    mkdir -p "${CHROOT_PATH}/build/${AUTH_USER}"
-	fi
-
-	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-	    echo "Setting ownership of ${CHROOT_PATH}/build/${AUTH_USER} to ${AUTH_USER}:sbuild"
-	fi
-	chown "${AUTH_USER}:sbuild" "${CHROOT_PATH}/build/${AUTH_USER}"
-
-	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-	    echo "Setting permissions of ${CHROOT_PATH}/build/${AUTH_USER} to 770"
-	fi
-	chmod 770 "${CHROOT_PATH}/build/${AUTH_USER}"
-
-	if [ ! -d "${CHROOT_PATH}/var/lib/sbuild/srcdep-lock" ]; then
-	    if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-		echo "Creating srcdep-lock directory: ${CHROOT_PATH}/var/lib/sbuild/srcdep-lock"
-	    fi
-	    mkdir -p "${CHROOT_PATH}/var/lib/sbuild/srcdep-lock"
-	fi
-
-	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-	    echo "Setting ownership of ${CHROOT_PATH}/var/lib/sbuild to root:sbuild"
-	fi
-	chown -R root:sbuild "${CHROOT_PATH}/var/lib/sbuild"
-
-	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-	    echo "Setting permissions of ${CHROOT_PATH}/var/lib/sbuild to 02775"
-	fi
-	chmod -R 02775 "${CHROOT_PATH}/var/lib/sbuild"
-
-    else
-
-	if [ "$AUTH_VERBOSITY" = "verbose" ]; then
-	    echo "User ${AUTH_USER} is not in group sbuild; skipping sbuild setup"
-	fi
-
-    fi
-
-fi




More information about the Collab-qa-commits mailing list