etc: Add buildd profile-template from sbuild
authorRoger Leigh <rleigh@debian.org>
Fri, 29 Apr 2011 10:29:24 +0000 (11:29 +0100)
committerRoger Leigh <rleigh@debian.org>
Fri, 29 Apr 2011 10:29:24 +0000 (11:29 +0100)
etc/profile-templates/buildd/all/config [new file with mode: 0644]
etc/profile-templates/buildd/all/copyfiles [new file with mode: 0644]
etc/profile-templates/buildd/all/nssdatabases [new file with mode: 0644]
etc/profile-templates/buildd/freebsd/fstab [new file with mode: 0644]
etc/profile-templates/buildd/linux/fstab [new file with mode: 0644]

diff --git a/etc/profile-templates/buildd/all/config b/etc/profile-templates/buildd/all/config
new file mode 100644 (file)
index 0000000..95e1567
--- /dev/null
@@ -0,0 +1,19 @@
+
+if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
+    case $CHROOT_NAME in
+        *-*-*-*-sbuild*)
+        SUITE_BASE=$(echo $CHROOT_NAME | cut -f1 -d-)
+        SUITE_VARIANT=$(echo $CHROOT_NAME | cut -f2,3 -d-)
+        ;;
+        *-*-*-sbuild*)
+        SUITE_BASE=$(echo $CHROOT_NAME | cut -f1 -d-)
+        SUITE_VARIANT=$(echo $CHROOT_NAME | cut -f2 -d-)
+        ;;
+        *-*-sbuild*)
+        SUITE_BASE=$(echo $CHROOT_NAME | cut -f1 -d-)
+        if [ ${SUITE_BASE} != "sid" ]; then
+            SUITE_VARIANT="proposed-updates"
+        fi
+        ;;
+    esac
+fi
diff --git a/etc/profile-templates/buildd/all/copyfiles b/etc/profile-templates/buildd/all/copyfiles
new file mode 100644 (file)
index 0000000..fe18fb3
--- /dev/null
@@ -0,0 +1,6 @@
+# Files to copy into the chroot from the host system.
+#
+# <source and destination>
+/etc/hosts
+/etc/resolv.conf
+/etc/networks
diff --git a/etc/profile-templates/buildd/all/nssdatabases b/etc/profile-templates/buildd/all/nssdatabases
new file mode 100644 (file)
index 0000000..815ddce
--- /dev/null
@@ -0,0 +1,6 @@
+# System databases to copy into the chroot from the host system.
+#
+# <database name>
+passwd
+shadow
+group
diff --git a/etc/profile-templates/buildd/freebsd/fstab b/etc/profile-templates/buildd/freebsd/fstab
new file mode 100644 (file)
index 0000000..164925d
--- /dev/null
@@ -0,0 +1,3 @@
+dev            /dev            devfs   rw,bind         0       0
+dev            /dev/fd         fdescfs rw,bind         0       0
+/home/buildd/build-trees       /build  nullfs  rw      0       0
diff --git a/etc/profile-templates/buildd/linux/fstab b/etc/profile-templates/buildd/linux/fstab
new file mode 100644 (file)
index 0000000..8ebf49d
--- /dev/null
@@ -0,0 +1,3 @@
+/dev/pts       /dev/pts        none    rw,bind         0       0
+tmpfs          /dev/shm        tmpfs   defaults        0       0
+/home/buildd/build-trees       /build  none    rw,bind 0       0