]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add pbuilder and git-buildpackage configuration, incl. hooks to git
authorMathias Klette <mathias.klette@profitbricks.com>
Fri, 21 Jun 2013 10:00:27 +0000 (12:00 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Fri, 21 Jun 2013 11:19:47 +0000 (13:19 +0200)
25 files changed:
.gbp.conf [new file with mode: 0644]
.pbuilder/B90dpkg-i [new file with mode: 0755]
.pbuilder/B91debc [new file with mode: 0755]
.pbuilder/C10shell [new file with mode: 0755]
.pbuilder/hooks.d/A99-shell [new file with mode: 0755]
.pbuilder/hooks.d/A99-show-advice [new file with mode: 0755]
.pbuilder/hooks.d/B01-clean-pbuilder-satisfydepends-dummy [new file with mode: 0755]
.pbuilder/hooks.d/B02-test [new file with mode: 0755]
.pbuilder/hooks.d/B90-lintian [new file with mode: 0755]
.pbuilder/hooks.d/B99-shell [new symlink]
.pbuilder/hooks.d/B99-show-advice [new file with mode: 0755]
.pbuilder/hooks.d/C10-see-above [new file with mode: 0755]
.pbuilder/hooks.d/C11-show-environment [new file with mode: 0755]
.pbuilder/hooks.d/C99-shell [new symlink]
.pbuilder/hooks.d/C99-show-advice [new file with mode: 0755]
.pbuilder/hooks.d/D01-apt-get-update [new file with mode: 0755]
.pbuilder/hooks.d/D99-shell [new symlink]
.pbuilder/hooks.d/D99-show-advice [new file with mode: 0755]
.pbuilder/hooks.d/E01-init [new file with mode: 0755]
.pbuilder/hooks.d/E99-show-advice [new file with mode: 0755]
.pbuilder/hooks.d/F10-aptconf [new file with mode: 0755]
.pbuilder/hooks.d/F99-show-advice [new file with mode: 0755]
.pbuilder/hooks.d/G10-aptconf [new file with mode: 0755]
.pbuilder/hooks.d/G99-show-advice [new file with mode: 0755]
.pbuilderrc [new file with mode: 0644]

diff --git a/.gbp.conf b/.gbp.conf
new file mode 100644 (file)
index 0000000..5fcd141
--- /dev/null
+++ b/.gbp.conf
@@ -0,0 +1,113 @@
+# Configuration file for git-buildpackage and friends
+
+[DEFAULT]
+# the default build command:
+builder = pdebuild --debbuildopts "-sa -i\.git -I.git"
+# the default clean command:
+cleaner = fakeroot debian/rules clean
+# the default branch for upstream sources:
+#upstream-branch = upstream
+# the default branch for the debian patch:
+#debian-branch = master
+# the default tag formats used:
+#upstream-tag = upstream/%(version)s
+#debian-tag = debian/%(version)s
+# use pristine-tar:
+pristine-tar = False
+# don't check if debian-branch == current branch:
+#ignore-branch = True
+# Use color when on a terminal, alternatives: on/true, off/false or auto
+#color = auto
+
+# Options only affecting git-buildpackage
+[git-buildpackage]
+# Look for a tag matching the upstream version when creating a tarball
+upstream-tree = branch
+# uncomment this to automatically GPG sign tags:
+#sign-tags = True
+# keyid to GPG sign tags with:
+#keyid = 0xdeadbeef
+# push to a remote repository after a successful tag:
+#posttag = git-push git.example.com
+# call lintian after a successful build:
+#postbuild = lintian $GBP_CHANGES_FILE
+# let package generate upstream changelog before build:
+#prebuild = GIT_DIR=$GBP_GIT_DIR debian/autogen.sh
+# use this for more svn-buildpackage like behaviour:
+export-dir = ../build-area/
+tarball-dir = ../tarballs/
+#ignore-new = True
+#export = HEAD
+# compress with bzip2
+#compression = bzip2
+# use best compression
+#compression-level = best
+# Don't send notifications, alternatives: on/true, off/false or auto
+#notify = off
+# Transparently handle submodules
+submodules = True
+
+# Options only affecting git-import-orig
+[git-import-orig]
+# set a different upstream branch to import to:
+#upstream-branch = newupstream
+# set a different branch to merge to:
+#debian-branch = dfsgclean
+# don't merge to debian branch by default:
+#merge = False
+# import filter:
+#filter = .svn
+# filter out files from tarball passed to pristine tar:
+#filter-pristine-tar = True
+# run hook after the import:
+#postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH
+# emulate old behaviour of calling dch:
+#postimport = dch -v%(version)s New Upstream Version
+# commit message:
+#import-msg = New upstream version %(version)s
+
+# Options only affecting git-import-dsc
+[git-import-dsc]
+# set a different upstream branch:
+#upstream-branch = svn-upstream
+# import filter:
+#filter = [ 'CVS', '.cvsignore' ]
+#force committer to be the same as author
+#author-is-committer = True
+#same for the date
+#author-date-is-committer-date = True
+
+# Options only affecting git-dch
+[git-dch]
+# options passed to git-log:
+#git-log = --no-merges
+# next snapshot number:
+#snapshot-number = snapshot + 1
+# include 7 digits of the commit id in the changelog enty:
+#id-length = 7
+# don't include information from meta tags:
+#meta = False
+# what tags to look for to generate bug-closing changelog entries:
+#meta-closes = Closes|LP
+# include the full commit message in the changelog:
+#full = True
+# ignore Signed-off-by: lines:
+#ignore-regex=(Signed-off|Acked)-by:
+# use author name and email from git-config:
+#git-author = True
+
+# Options only affecting gbp-pq
+[gbp-pq]
+#patch-numbers = False
+
+# Options only affecting gbp-clone
+[gbp-clone]
+#pristine-tar = True
+
+# Options only affecting gbp-
+[gbp-pull]
+#pristine-tar = True
+
+[gbp-create-remote-repo]
+# disable remote branch tracking
+#track = False
diff --git a/.pbuilder/B90dpkg-i b/.pbuilder/B90dpkg-i
new file mode 100755 (executable)
index 0000000..745b41e
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+# example file to be used with --hookdir
+#
+# try to install the resulting debs.
+
+echo "Trying to install resulting packages and test upgrades"
+set -ex
+
+PKGNAMES=$(cd /tmp/buildd && ls -1 *.deb | sed 's/_.*$//' )
+CONFLICTS=$(grep '^Conflicts:' /tmp/buildd/*/debian/control | sed 's,Conflicts: ,,;s/,//;s,([^)]*),,g')
+APT_GET="apt-get"
+BPO_SOURCES=`awk '/.*backports.*/ {print $3}' /etc/apt/sources.list | head -1`
+if [ -n "${BPO_SOURCES}" ]; then
+       APT_GET="${APT_GET} -t ${BPO_SOURCES}"
+fi
+
+remove_conflicts() {
+       for i in ${CONFLICTS}; do
+               if dpkg -s kdm | grep Status | grep -q 'install ok installed'; then
+                       ${APT_GET} remove -y --force-yes ${i}
+               fi
+       done
+}
+
+# install-remove check.
+# install packages twice this time
+# to see if that works, too.
+if ! dpkg -i /tmp/buildd/*.deb; then
+  ${APT_GET} install -y --force-yes -f
+  dpkg -i /tmp/buildd/*.deb
+  dpkg -i /tmp/buildd/*.deb
+fi
+dpkg --remove $PKGNAMES
+
+# install-purge check
+dpkg -i /tmp/buildd/*.deb
+dpkg --purge $PKGNAMES
+
+# upgrade-remove check
+${APT_GET} install -y --force-yes  $PKGNAMES || true
+remove_conflicts
+dpkg -i /tmp/buildd/*.deb
+dpkg --remove $PKGNAMES
+
+# upgrade-purge check
+${APT_GET} install -y --force-yes $PKGNAMES || true
+remove_conflicts
+dpkg -i /tmp/buildd/*.deb
+dpkg --purge $PKGNAMES
diff --git a/.pbuilder/B91debc b/.pbuilder/B91debc
new file mode 100755 (executable)
index 0000000..b52620f
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+# example file to be used with --hookdir
+#
+# 343894: a script to run debc command, contributed from q-funk.
+
+apt-get install -y --force-yes devscripts
+cd /tmp/buildd/*/debian
+cd ..
+debc
+#EOF
diff --git a/.pbuilder/C10shell b/.pbuilder/C10shell
new file mode 100755 (executable)
index 0000000..40fac64
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# invoke shell if build fails.
+
+if [ "$DEBIAN_FRONTEND" = "noninteractive" ]
+then
+    echo "Shell is only started with DEBIAN_FRONTEND not being 'noninteractive'."
+    exit 0
+fi
+
+apt-get install -y --force-yes vim less bash
+cd /tmp/buildd/*/debian/..
+/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
diff --git a/.pbuilder/hooks.d/A99-shell b/.pbuilder/hooks.d/A99-shell
new file mode 100755 (executable)
index 0000000..dd889ad
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+# invoke shell if build fails.
+
+if [ -z "$FORCE_SHELL" ]
+then
+    exit 0
+else
+    echo "### Shell is started because FORCE_SHELL contains non-empty value. Exit with Ctrl-D and pbuilder will continue."
+fi
+
+apt-get install -y --force-yes vim less bash
+cd /tmp/buildd/*/debian/..
+/bin/bash < /dev/tty > /dev/tty 2> /dev/tty
+
diff --git a/.pbuilder/hooks.d/A99-show-advice b/.pbuilder/hooks.d/A99-show-advice
new file mode 100755 (executable)
index 0000000..1edf695
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a A-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: Building package.
+###
+"
diff --git a/.pbuilder/hooks.d/B01-clean-pbuilder-satisfydepends-dummy b/.pbuilder/hooks.d/B01-clean-pbuilder-satisfydepends-dummy
new file mode 100755 (executable)
index 0000000..51f7eb3
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+dpkg -P pbuilder-satisfydepends-dummy || true
+
diff --git a/.pbuilder/hooks.d/B02-test b/.pbuilder/hooks.d/B02-test
new file mode 100755 (executable)
index 0000000..80069e9
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+
+# these are collected using ${ADDITIONAL_BUILDRESULTS[@]} in .pbuilderrc 
+
+cd /tmp/buildd/
+find . -name surefire-reports -o -name failsafe-reports -o -name unittest.log -o -name tests-0.log -o -name build.log | xargs tar czvf ./reports.tgz || true
+mkdir -p jenkins ; mv reports.tgz jenkins/ || true
+# use uid here instead of username as we might operate inside chroots
+chown -R 106 jenkins
diff --git a/.pbuilder/hooks.d/B90-lintian b/.pbuilder/hooks.d/B90-lintian
new file mode 100755 (executable)
index 0000000..b999785
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+# lintian is just noise here
+exit 0
+apt-get install -y --force-yes lintian
+cd /tmp/buildd
+su - pbuilder -c "lintian -iI *.changes"
+#exit $?
+exit 0
diff --git a/.pbuilder/hooks.d/B99-shell b/.pbuilder/hooks.d/B99-shell
new file mode 120000 (symlink)
index 0000000..9ca0605
--- /dev/null
@@ -0,0 +1 @@
+A99-shell
\ No newline at end of file
diff --git a/.pbuilder/hooks.d/B99-show-advice b/.pbuilder/hooks.d/B99-show-advice
new file mode 100755 (executable)
index 0000000..be163af
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a B-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: Post-build actions upon success.
+###
+"
diff --git a/.pbuilder/hooks.d/C10-see-above b/.pbuilder/hooks.d/C10-see-above
new file mode 100755 (executable)
index 0000000..f227e98
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "###"
+echo "###"
+echo "###               SEE ABOVE FOR WHY THE BUILD FAILED"
+echo "###"
+echo "### ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
+echo
diff --git a/.pbuilder/hooks.d/C11-show-environment b/.pbuilder/hooks.d/C11-show-environment
new file mode 100755 (executable)
index 0000000..0ef1085
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+echo "
+###
+###                        MY ENVIRONMENT
+###
+### Be aware! 
+###
+### We might use 'sudo' and this might be configured to only allow specific 
+### variables to pass into the forked process. You may want to check for any 
+### differences between environment variables given before the build started
+### and the ones you'll find below.
+###"
+env
+echo "
+###
+###                        ACTIVE MOUNTS
+###
+### This is mainly caused by the fact, that on some occasions some few builds
+### end their job before cleaning up properly. This is more likely the case 
+### for any newly created jobs with new scripts or functionalities. 
+###
+### With this output you might be able to associate such jobs to uncleanly 
+### ended jobs which may have ended before they could properly clean up their
+### environment.
+###
+### Shall you find any mounts associated to a process ID not related to it's 
+### parent Jenkins process ID and/or the process ID cannot be related to any 
+### Jenkins known-running job anymore, try to kill the job and unmount manually!
+###
+### THIS IS JUST A HINT!
+###"
+mount
+echo
diff --git a/.pbuilder/hooks.d/C99-shell b/.pbuilder/hooks.d/C99-shell
new file mode 120000 (symlink)
index 0000000..9ca0605
--- /dev/null
@@ -0,0 +1 @@
+A99-shell
\ No newline at end of file
diff --git a/.pbuilder/hooks.d/C99-show-advice b/.pbuilder/hooks.d/C99-show-advice
new file mode 100755 (executable)
index 0000000..2b6e463
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a C-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: Post-build actions upon error.
+###
+"
diff --git a/.pbuilder/hooks.d/D01-apt-get-update b/.pbuilder/hooks.d/D01-apt-get-update
new file mode 100755 (executable)
index 0000000..e84134a
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+apt-get update
+
+echo "pbuilder-debug: $PB_SUITE"
+
+if [ "$PB_SUITE" == "experimental" ] || [ ${PB_SUITE:0:3} != "dev" ] ; then
+        exit 0
+fi
+
+if ! $(grep -q $PB_SUITE /etc/apt/sources.list) ; then
+       if $(wget http://alexandria.pb.local/dev-repository/dists/$PB_SUITE/Release -o /dev/null > /dev/null 2>&1) ; then
+               echo "deb http://alexandria.pb.local/dev-repository $PB_SUITE main contrib non-free" >> /etc/apt/sources.list
+               echo "deb-src http://alexandria.pb.local/dev-repository $PB_SUITE main contrib non-free" >> /etc/apt/sources.list
+       fi
+fi
+
+apt-get update
diff --git a/.pbuilder/hooks.d/D99-shell b/.pbuilder/hooks.d/D99-shell
new file mode 120000 (symlink)
index 0000000..9ca0605
--- /dev/null
@@ -0,0 +1 @@
+A99-shell
\ No newline at end of file
diff --git a/.pbuilder/hooks.d/D99-show-advice b/.pbuilder/hooks.d/D99-show-advice
new file mode 100755 (executable)
index 0000000..94337fd
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a D-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: Unpack source and install dependencies.
+###
+"
diff --git a/.pbuilder/hooks.d/E01-init b/.pbuilder/hooks.d/E01-init
new file mode 100755 (executable)
index 0000000..00b5be4
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# FIXME: the gid 115 is hard coded which is stupid
+# FIXME: puppet should set this, based on the libvirt gid on the hostsystem
+
+addgroup --gid 115 libvirtchroot
+adduser --uid 1234 --quiet --shell /bin/sh --system --gid 115 \
+  --home /var/cache/pbuilder --no-create-home pbuilder
+
+#usermod -a -G libvirt jenkins || true
+usermod -a -G libvirt pbuilder || true
+
diff --git a/.pbuilder/hooks.d/E99-show-advice b/.pbuilder/hooks.d/E99-show-advice
new file mode 100755 (executable)
index 0000000..8d7f4e6
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a E-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: Unmount and tarball-handling.
+###
+"
diff --git a/.pbuilder/hooks.d/F10-aptconf b/.pbuilder/hooks.d/F10-aptconf
new file mode 100755 (executable)
index 0000000..d233fb2
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+if [ "$PB_SUITE" == "" ] || [ "$PB_SUITE" == "experimental" ] || [ ${PB_SUITE:0:3} != "dev" ] ; then
+       exit 0
+fi
+
+if ! $(grep -q $PB_SUITE /etc/apt/sources.list) ; then
+       if $(wget http://alexandria.pb.local/dev-repository/dists/$PB_SUITE/Release -o /dev/null > /dev/null 2>&1) ; then
+               echo "deb http://alexandria.pb.local/dev-repository $PB_SUITE main contrib non-free" >> /etc/apt/sources.list
+               echo "deb-src http://alexandria.pb.local/dev-repository $PB_SUITE main contrib non-free" >> /etc/apt/sources.list
+               apt-get update
+       fi
+fi
+
diff --git a/.pbuilder/hooks.d/F99-show-advice b/.pbuilder/hooks.d/F99-show-advice
new file mode 100755 (executable)
index 0000000..baa0612
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a F-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: User login / command execution.
+###
+"
diff --git a/.pbuilder/hooks.d/G10-aptconf b/.pbuilder/hooks.d/G10-aptconf
new file mode 100755 (executable)
index 0000000..8b8c997
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+set -e
+
+CONF=/etc/apt/apt.conf.d/01pbuilder
+
+if [ -r ${CONF} ]; then
+       exit 0
+fi
+
+cat > ${CONF} << _EOF_
+APT::Cache-Limit "16777216";
+Acquire::PDiffs "false";
+APT::Get::HideAutoRemove "1";
+_EOF_
+
+# deploy profitbricks repository signing key
+echo "-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+mQINBEzjAYgBEADOJsx4ULMjUESNaLlv4xSH3eiV+OM92L7DzceHeyWGcsy/BWtM
+ZtutruUCrD53z7y2KFjRWYC+s9N1wPwFlBA9czmmMK/CB45BNJMaAldQ8JFCqpww
+FmP2fos7SU3VGx5+pAPhWksK4i226x1FoxOqaXTNkFdYrNktsnuPStNpyfwxmodI
+1lsIpx1iLdIfwyYmxwVg2MmvEd54Osb+1eLsgVQtzairuHEiE8jd2WjpYzf1sLKK
+FTkBNhFxkpz/nYPdkh+y5WCWoz410VkybBhb+ADtF61vBBkN5zmmBNs1Z5gp9+yU
+g34JmPCpQW1R+TfFiP4BXYwDzAgJ/QB5j4vrk0RGe5ahRCnzgJANRjKuWz4eFO4v
+ZZFRBlbGMjCdDKn1YO1pjjp222MedXUqXHe6V++1z23ep1NEBCp/VRtuRSUjVbUE
+9cdvS5XvvrErwJeP6rkwttAaQnwKiU4vpjtgItjzZSUZvXlhWqNTV5qhfHVhQub7
+EQ+gbOHPqbBW2F7IlFit24xywLr6ulU1nzhXbxAFremp6qf16KrAB0Knh7h6Tnrp
+w95JK9Y436e4k/neLScDRKfiiIl2vKtqnHjbiqm8H9Yl/M2x4UDZh9KH7Hnrjcof
+Laq0qqg8fogjOKeKDiQRTZd9d0ltjj6IP/nRzAty9Y4dvOZ7owes75F3QwARAQAB
+tERQcm9maXRicmlja3MgRGViaWFuIFJlcG9zaXRvcnkgPGRlYmlhbnJlcG9AcHJv
+Zml0YnJpY2tzLmxvY2F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1HJByhqfVP33vD1VahgpjimIJMk0vRWosLsk9JN2zKdvO7DW0Z9qE9SUv4nzb
+EnFuaXmnFpuRsrRU0UhIckSSFAJ9+aDStcaVkjPLK7IWWILMTVSTxGK1DtKCN9c=
+=vF+n
+-----END PGP PUBLIC KEY BLOCK-----
+" | apt-key add -
+
+echo "alias bzip2=/usr/bin/pbzip2" > /etc/profile.d/jenkins.sh
+cat > /etc/profile.d/jenkins.sh << EOF
+alias bzip2=/usr/bin/pbzip2
+alias bunzip2=/usr/bin/pbzip2
+alias bzcat=/usr/bin/pbzip2
+alias gzip=/usr/bin/pigz
+alias gunzip=/usr/bin/pigz
+alias zcat=/usr/bin/pigz
+alias tar='tar --use-compress-program=pigz'
+EOF
+chmod +x /etc/profile.d/jenkins.sh
diff --git a/.pbuilder/hooks.d/G99-show-advice b/.pbuilder/hooks.d/G99-show-advice
new file mode 100755 (executable)
index 0000000..cfabbf2
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+echo "
+###
+###  Need more actions or preparations here?
+###  Create a F-class hook on $(hostname). See more details in 'pbuilder' man-page.
+### 
+###  Next: Apt-work (install).
+###
+"
diff --git a/.pbuilderrc b/.pbuilderrc
new file mode 100644 (file)
index 0000000..8e22546
--- /dev/null
@@ -0,0 +1,156 @@
+#!/bin/sh
+ECHO_PREFIX="### /root/.pbuilderrc: "
+MIRRORSITE="http://alexandria.pb.local/debian-mirror/"
+STABLE="squeeze"
+STABLE_CODENAME="stable"
+STABLE_PBNAME="production"
+TESTING="wheezy"
+TESTING_CODENAME="testing"
+TESTING_PBNAME="production-proposed-updates"
+UNSTABLE="sid"
+UNSTABLE_CODENAME="unstable"
+UNSTABLE_PBNAME="pre-staging"
+EXPERIMENTAL="experimental"
+EXPERIMENTAL_CODENAME="experimental"
+EXPERIMENTAL_PBNAME="experimental"
+export http_proxy="http://proxy.pb.local:3128"
+EXTRAPACKAGES="lintian vim python python-git kernel-package cpio devscripts fakeroot module-assistant debhelper html2text dctrl-tools python-support python-sqlalchemy-ext less dpatch maven2 pbzip2 pigz rsync cdbs quilt git-core wget toilet figlet openjdk-6-jdk openjdk-6-jre-headless openjdk-6-jre-lib openssh-client build-essential subversion qemu-kvm libvirt-bin cppcheck sloccount debootstrap ldap-utils pxz python-apt python-debian pixz python-argparse"
+EXTRA_REPO=""
+APTGETOPT=('--force-yes')
+: ${PB_SUITE:="pre-staging"}
+
+case "$DIST" in
+        $STABLE|$STABLE_CODENAME|$STABLE_CODENAME-proposed-updates|$STABLE_CODENAME-security|$STABLE_PBNAME)
+                DIST="$STABLE"
+        ;;
+        $TESTING|$TESTING_CODENAME|$TESTING_CODENAME-proposed-updates|$TESTING_CODENAME-security|$TESTING_PBNAME|staging)
+                DIST="$TESTING"
+        ;;
+        $UNSTABLE|$UNSTABLE_CODENAME|$UNSTABLE_CODENAME-proposed-updates|$UNSTABLE_CODENAME-security)
+                DIST="$UNSTABLE"
+        ;;
+        $UNSTABLE_PBNAME)
+                DIST="$UNSTABLE_PBNAME"
+        ;;
+        $EXPERIMENTAL|$EXPERIMENTAL_CODENAME|$EXPERIMENTAL_CODENAME-proposed-updates|$EXPERIMENTAL_CODENAME-security)
+                DIST="$EXPERIMENTAL"
+        ;;
+        *)
+                echo "$ECHO_PREFIX Unknown Distribution: $DIST"
+                exit 2
+        ;;
+esac
+
+
+
+: ${ARCH:="$(dpkg --print-architecture)"}
+
+DEBOOTSTRAPOPTS=(
+    '--variant=buildd'
+)
+
+NAME="$DIST"
+if [ -n "${ARCH}" ]; then
+    NAME="$NAME-$ARCH"
+    DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
+fi
+
+#BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
+BUILDRESULT="../result/"
+BUILDPLACE="/var/cache/pbuilder/build/"
+ADDITIONAL_BUILDRESULTS=(reports.tgz)
+BINDMOUNTS="/dev"
+
+if [ "$DIST" == "wheezy" ] ; then
+        EXTRAPACKAGES="lintian vim python python-git kernel-package cpio devscripts fakeroot module-assistant debhelper html2text dctrl-tools python-support python-sqlalchemy-ext less dpatch maven2 pbzip2 rsync cdbs quilt git-core wget toilet figlet openjdk-6-jdk openjdk-6-jre-headless openjdk-6-jre-lib openssh-client build-essential subversion qemu-kvm cppcheck sloccount debootstrap ldap-utils python-apt python-debian python-argparse"
+        BASETGZ="/var/cache/pbuilder/$NAME-$PB_SUITE-base.tgz"
+        BASEPATH="/var/cache/pbuilder/$NAME-$PB_SUITE-base.cow"
+
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST production main contrib non-free |"
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST production-approved-updates main contrib non-free |"
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST production-proposed-updates main contrib non-free |"
+        if echo ${PB_SUITE} | grep -qE "^develop-.*"
+        then
+            OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST pre-staging main contrib non-free |"
+        fi
+        if echo ${PB_SUITE} | grep -qE "^experimental-.*"
+        then
+            OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST pre-staging main contrib non-free |"
+            OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST $PB_SUITE main contrib non-free |"
+        fi
+else
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze production main contrib non-free |"
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze production-approved-updates main contrib non-free |"
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze production-proposed-updates main contrib non-free |"
+        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports main contrib non-free |"
+
+        if [ ${PB_SUITE:0:4} == "dev-" ] ; then
+                BASETGZ="/var/cache/pbuilder/$NAME-experimental-base.tgz"
+                BASEPATH="/var/cache/pbuilder/$NAME-experimental-base.cow"
+                OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze pre-staging main contrib non-free |"
+                OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports-proposed-updates main contrib non-free |"
+                OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports-pre-staging main contrib non-free |"
+                OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports-experimental main contrib non-free |"
+                OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/dev-squeeze $PB_SUITE main contrib non-free |"
+        else
+                BASETGZ="/var/cache/pbuilder/$NAME-$PB_SUITE-base.tgz"
+                BASEPATH="/var/cache/pbuilder/$NAME-$PB_SUITE-base.cow"
+                case $PB_SUITE in
+                    $STABLE_PBNAME)
+                        :
+                        ;;
+                    $TESTING_PBNAME|staging)
+                        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze staging main contrib non-free |"
+                        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports-proposed-updates main contrib non-free |"
+                        ;;
+                    $UNSTABLE|$UNSTABLE_PBNAME)
+                        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze staging main contrib non-free |"
+                        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-squeeze pre-staging main contrib non-free |"
+                        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports-proposed-updates main contrib non-free |"
+                        OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/debian-mirror profitbricks-backports-pre-staging main contrib non-free |"
+                        ;;
+                    $EXPERIMENTAL_PBNAME)
+                        :
+                        ;;
+                esac
+        fi
+fi
+
+echo "$ECHO_PREFIX All mirrors used:"
+echo -n "$ECHO_PREFIX     "
+for item in $OTHERMIRROR
+do
+    if [ "$item" != "|" ]
+    then
+        echo -n "$item "
+    else
+        echo
+        echo -n "$ECHO_PREFIX     "
+    fi
+done
+echo "
+$ECHO_PREFIX
+$ECHO_PREFIX Remember to update base images with '--override-config' when any of above mirrors have been changed!
+$ECHO_PREFIX Also remember to update base images once you've changed \$EXTRAPACKAGES!
+$ECHO_PREFIX See /etc/cron.d/jenkins for how cron daemon is doing it.
+$ECHO_PREFIX"
+
+COMPONENTS="main contrib non-free"
+
+case "$0" in
+    */pdebuild)
+        : do nothing
+    ;;
+    *)
+        #DIST=${DIST%-backports}
+        DIST=${DIST/experimental/$UNSTABLE}
+        DISTRIBUTION=$DIST
+    ;;
+esac
+
+
+
+: ${HOOKDIR:="$HOME/.pbuilder/hooks.d"}
+DEBOOTSTRAP="debootstrap"
+PKGNAME_LOGFILE="yes"
+