From 5ac2a735f063e855b3c9b8d9f185f45bb03328da Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Sun, 13 Nov 2016 19:11:35 +0100
Subject: [PATCH] Add initial support for x32 and add vs76 as an x32 buildd

---
 .../files/schroot-setup.d/99porterbox-extra-sources        |  2 +-
 modules/schroot/files/setup-all-dchroots                   | 12 ++++++++++--
 scripts/setup-buildd                                       | 14 ++++++++++++++
 scripts/setup-common                                       |  3 +++
 4 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/modules/schroot/files/schroot-setup.d/99porterbox-extra-sources b/modules/schroot/files/schroot-setup.d/99porterbox-extra-sources
index 6a5feca..558308e 100755
--- a/modules/schroot/files/schroot-setup.d/99porterbox-extra-sources
+++ b/modules/schroot/files/schroot-setup.d/99porterbox-extra-sources
@@ -40,7 +40,7 @@ if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
   debugmirror=${DEBUGMIRROR:-http://debug.mirrors.debian.org/debian-debug/}
 
   case "$SUITE_ARCH" in
-    powerpcspe|ppc64|sparc64)
+    powerpcspe|ppc64|sparc64|x32)
       if [ "$SUITE_ARCH" = "sparc64" ]; then
         portsmirror="http://deb.debian.org/debian-ports"
       else
diff --git a/modules/schroot/files/setup-all-dchroots b/modules/schroot/files/setup-all-dchroots
index a547faa..2b29dde 100755
--- a/modules/schroot/files/setup-all-dchroots
+++ b/modules/schroot/files/setup-all-dchroots
@@ -70,7 +70,7 @@ get_suites() {
       mips64el)
         echo "sid stretch"
         ;;
-      powerpcspe|ppc64|sparc64)
+      powerpcspe|ppc64|sparc64|x32)
         echo "sid"
         ;;
       ia64)
@@ -114,7 +114,7 @@ case `hostname` in
             mipsel)
                 archs="$archs mips64el"
                 ;;
-            powerpcspe|sparc64)
+            powerpcspe|sparc64|x32)
                 if [ "$DPKGARCH" = "sparc64" -a "$MODE" = "porterbox" ]; then
                     extra="$extra -m http://deb.debian.org/debian-ports"
                 else
@@ -148,6 +148,14 @@ case `hostname` in
                     raverin|ravirin)
                         extra_buildd="$extra_buildd -o buildd -O buildd"
                         ;;
+
+                    # +------------------------------------------------+
+                    # | x32                                            |
+                    # +------------------------------------------------+
+
+                    vs76)
+                        extra_buildd="$extra_buildd -o buildd -O buildd"
+                        ;;
                 esac
                 ;;
         esac
diff --git a/scripts/setup-buildd b/scripts/setup-buildd
index 76115b4..d424fbe 100755
--- a/scripts/setup-buildd
+++ b/scripts/setup-buildd
@@ -74,6 +74,20 @@ case "$hostname" in
 		;;
 
 	# +----------------------------------------------------------------+
+	# | x32                                                            |
+	# +----------------------------------------------------------------+
+
+	vs76)
+		num_users=1
+		# Dual-core machine
+		DEB_BUILD_OPTIONS="parallel=2"
+		suites="sid experimental"
+		sign_with=C1B9AE24
+		mailuser=vs76
+		mailfqdn=buildd.eu
+		;;
+
+	# +----------------------------------------------------------------+
 	# | Unknown                                                        |
 	# +----------------------------------------------------------------+
 
diff --git a/scripts/setup-common b/scripts/setup-common
index d7b83d3..0d90c8d 100644
--- a/scripts/setup-common
+++ b/scripts/setup-common
@@ -108,6 +108,9 @@ case "$arch" in
 	hppa|powerpcspe|ppc64|sparc64)
 		admin_mail="glaubitz@debian.org,jrtc27@jrtc27.com"
 		;;
+	x32)
+		admin_mail="glaubitz@debian.org"
+		;;
 	*)
 		die "$arch architecture is unsupported"
 		;;
-- 
2.10.2

