summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2011-04-21 14:43:02 +0200
committerX2go Administrator <x2go-admin@ymir.das-netzwerkteam.de>2011-04-21 14:44:08 +0200
commit71a163e11f80a2df73783675d3658e06a42ad41c (patch)
tree9541bee423d261abec310074d15c896c0efbe66c
parent9361351bd5360af0f0fec49bb953c94463667856 (diff)
downloadbuildscripts-71a163e11f80a2df73783675d3658e06a42ad41c.tar.gz
buildscripts-71a163e11f80a2df73783675d3658e06a42ad41c.tar.bz2
buildscripts-71a163e11f80a2df73783675d3658e06a42ad41c.zip
switching over to pbuilder-uml (user-mode-linux)
-rwxr-xr-xbin/pdebuild-user-mode-linux1
-rwxr-xr-xbin/x2go-buildpackage24
-rw-r--r--home/.pbuilderrc19
3 files changed, 32 insertions, 12 deletions
diff --git a/bin/pdebuild-user-mode-linux b/bin/pdebuild-user-mode-linux
index 6e8f468..42b118b 100755
--- a/bin/pdebuild-user-mode-linux
+++ b/bin/pdebuild-user-mode-linux
@@ -34,6 +34,7 @@ export PBCURRENTCOMMANDLINEOPERATION="pdebuild"
PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p')
PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
ARCHITECTURE=${ARCHITECTURE-$(dpkg-architecture -qDEB_HOST_ARCH)}
+DEBOOTSTRAPOPTS="--arch=$ARCHITECTURE"
if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
if [ ! readlink -f .. ]; then
diff --git a/bin/x2go-buildpackage b/bin/x2go-buildpackage
index b7311e8..683f57f 100755
--- a/bin/x2go-buildpackage
+++ b/bin/x2go-buildpackage
@@ -22,20 +22,27 @@ set -x
test -z $1 && { echo usage: <x2go-git-project> [main|heuler]; exit -1; }
+PDEBUILD="pdebuild-user-mode-linux"
+TEMP_BASE="$HOME/tmp/"
+
PACKAGE=$1
-COMPONENT=${2-heuler}
+CHECKOUT=${2-master}
+COMPONENT=${3-heuler}
PACKAGE_DIR=$(pwd)/$PACKAGE
DIST_SUPPORTED="debian ubuntu"
PKGDIST="$(pwd)/../pkg-dist/$PACKAGE"
+# in any case remove the BUILDS_FOR file
+rm -f $PACKAGE_DIR/BUILDS_FOR
+
# make sure our local working copy is up to date...
-test -d $PACKAGE_DIR/.git && { cd $PACKAGE_DIR && git reset --hard; git pull; } || git clone git://code.x2go.org/$PACKAGE.git
+test -d $PACKAGE_DIR/.git && { cd $PACKAGE_DIR && git reset --hard; git pull; git checkout $CHECKOUT; } || { git clone git://code.x2go.org/$PACKAGE.git && cd $PACKAGE_DIR && git checkout $CHECKOUT; }
cd $PACKAGE_DIR
# by default we build for all current debian versions
test -f BUILDS_FOR || cat > BUILDS_FOR <<EOF
-debian: sid wheezy squeeze lenny
+debian: sid wheezy squeeze
#ubuntu: lucid maverick natty
EOF
@@ -63,10 +70,11 @@ cat BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do
CODENAMES=$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z])
echo "$DIST_SUPPORTED" | grep $l_DIST >/dev/null && {
for l_CODENAME in $CODENAMES; do
- TEMP_DIR="$(mktemp -d)"
+ TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)"
mkdir -p $TEMP_DIR/$PACKAGE
- git clone git://code.x2go.org/$PACKAGE.git $TEMP_DIR/$PACKAGE/
+ git clone git://code.x2go.org/$PACKAGE.git $TEMP_DIR/$PACKAGE/
cd $TEMP_DIR/$PACKAGE
+ git checkout $CHECKOUT
# translate the version name for Debian releases
[ "x$l_CODENAME" = "xsid" ] && VERSION=unstable
[ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing
@@ -80,12 +88,12 @@ cat BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do
}
# modify changelog for this build
- DEBEMAIL=git-admin@x2go.org DEBFULLNAME="X2go Git Administrator" dch --distribution $VERSION --force-distribution -l "+$l_CODENAME" "Auto-built $l_DIST $l_CODENAME package for packages.x2go.org repository."
+ DEBEMAIL=git-admin@x2go.org DEBFULLNAME="X2go Git Administrator" dch --distribution $VERSION --force-distribution -l "+$l_CODENAME~$COMPONENT" "Auto-built $l_DIST $l_CODENAME package for packages.x2go.org repository."
cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
- sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 pdebuild --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME
+ DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME
}
cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
- sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 pdebuild --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME
+ DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 $PDEBUILD --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME
}
cd -
rm -Rf $TEMP_DIR
diff --git a/home/.pbuilderrc b/home/.pbuilderrc
index f82191a..519643e 100644
--- a/home/.pbuilderrc
+++ b/home/.pbuilderrc
@@ -1,10 +1,20 @@
#!/bin/bash
+BASEDIRECTORY="/srv/pbuilder/cache"
+
DIST=${DIST-debian}
CODENAME=${CODENAME-sid}
ARCH=${ARCH-amd64}
+BUILDRESULTUID=x2go-admin
+BUILDRESULTGID=x2go
+CCACHEDIR=
+APTCACHEHARDLINK="no"
+USE_DEBUILD_INTERNAL="yes"
+PRESERVE_BUILDPLACE="yes"
+
if [ "x$ARCH" = "xi386" ]; then
DEBBUILDOPTS="-B"
+ DEBOOTSTRAPOPTS="--arch=$ARCH"
fi
if [ -n "${DIST}" ] && [ -n "${CODENAME}" ] && [ -n "${ARCH}" ]; then
@@ -14,10 +24,11 @@ if [ -n "${DIST}" ] && [ -n "${CODENAME}" ] && [ -n "${ARCH}" ]; then
MIRRORSITE="http://ftp.de.debian.org/debian"
OTHERMIRROR="deb http://code.x2go.org/debian $CODENAME main"
fi
- BASETGZ="`dirname $BASETGZ`/base-$DIST-$CODENAME-$ARCH.tgz"
+ BASETGZ="$BASEDIRECTORY/base-$DIST-$CODENAME-$ARCH.tgz"
DISTRIBUTION="$CODENAME"
- BUILDRESULT="/var/cache/pbuilder/$DIST-$CODENAME-$ARCH/result/"
- APTCACHE="/var/cache/pbuilder/$DIST-$CODENAME-$ARCH/aptcache/"
+ BUILDRESULT="$BASEDIRECTORY/$DIST-$CODENAME-$ARCH/result/"
+ APTCACHE="$BASEDIRECTORY/$DIST-$CODENAME-$ARCH/aptcache/"
+ ARCHITECTURE="$ARCH"
fi
-
export OTHERMIRROR
+