[X2go-Commits] buildscripts.git - master (branch) updated: b3fe0e552cfb0e5e51901830b9e9685d23b04467

X2go dev team git-admin at x2go.org
Wed Dec 21 00:32:52 CET 2011


The branch, master has been updated
       via  b3fe0e552cfb0e5e51901830b9e9685d23b04467 (commit)
       via  db9cf4ebce4eaa26767ea30dee085021a4aec242 (commit)
       via  0aa148fdd5fec10290622f32bede3c640a0a153a (commit)
       via  62b47aba27c20caf5d4fb2dea10c3ea1a724d3dd (commit)
       via  baf582456e485e2e4272c0b888f9ccdb10cde499 (commit)
       via  2533ac9afb98f8e5b236fec73f1b985ab94f8ff6 (commit)
       via  e6e6baf406e705c81f806b86e1352bf070cce6ad (commit)
       via  75d856f630b7727fde9ea229ee57fc9c2c8f92dc (commit)
       via  d1659d8b5c52da9ea26e047032c40016bfb40018 (commit)
       via  7f417c90d26e9d726c5119f6a34c888630801e2b (commit)
       via  cafd51ba494ce0c291c9824b899524570a694051 (commit)
       via  6235c8ac2c251e791c840b2dfac6f7728bbe6cc4 (commit)
       via  c6d48e375b5e34650cad09bac3dbccc0c4ce84cc (commit)
       via  ce2de750f79f0d35840aad8656838d0f4483a4a1 (commit)
       via  70bdcc007b9f18e05b1a28c5bf7afbf97e16e79a (commit)
       via  833fa376dd9722cbf8dc49f0b29802d30a455e31 (commit)
       via  56fbf618ff5f39415281a37a81336a3262d8a4f5 (commit)
      from  1cecebabde5d02107ce23e458c04cafcda730714 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b3fe0e552cfb0e5e51901830b9e9685d23b04467
Merge: 1cecebabde5d02107ce23e458c04cafcda730714 db9cf4ebce4eaa26767ea30dee085021a4aec242
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Dec 21 00:26:56 2011 +0100

    take build scripts from NWT build site, reworked structure, much more generic

commit db9cf4ebce4eaa26767ea30dee085021a4aec242
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Dec 21 00:18:15 2011 +0100

    add a PREFIX-public git-remote site for each public location

commit 0aa148fdd5fec10290622f32bede3c640a0a153a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Dec 21 00:10:17 2011 +0100

    manage several dupload configs

commit 62b47aba27c20caf5d4fb2dea10c3ea1a724d3dd
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Dec 21 00:02:55 2011 +0100

    fixed scripts, configured other build servers

commit baf582456e485e2e4272c0b888f9ccdb10cde499
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Dec 20 21:26:26 2011 +0100

    reworked buildscripts completely, so that they can be used for several projects

commit 2533ac9afb98f8e5b236fec73f1b985ab94f8ff6
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Dec 20 17:01:53 2011 +0100

    fix

commit e6e6baf406e705c81f806b86e1352bf070cce6ad
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Dec 20 16:56:30 2011 +0100

    more fixes

commit 75d856f630b7727fde9ea229ee57fc9c2c8f92dc
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Dec 20 16:50:59 2011 +0100

    fix BUILDS_FOR mechanism

commit d1659d8b5c52da9ea26e047032c40016bfb40018
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Dec 20 16:00:36 2011 +0100

    add some improvements (tmp permission fix, always-build-native-packages-fix)

commit 7f417c90d26e9d726c5119f6a34c888630801e2b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Dec 19 22:10:54 2011 +0100

    add git-remote at end of nwt-gitcreate script

commit cafd51ba494ce0c291c9824b899524570a694051
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Dec 12 01:43:36 2011 +0100

    key change

commit 6235c8ac2c251e791c840b2dfac6f7728bbe6cc4
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Dec 12 01:33:58 2011 +0100

    gpg key added, OTHERMIRROR set to ''

commit c6d48e375b5e34650cad09bac3dbccc0c4ce84cc
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Dec 12 00:48:23 2011 +0100

    build for all Debian releases and for Ubuntu LTS releases

commit ce2de750f79f0d35840aad8656838d0f4483a4a1
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Dec 11 23:57:59 2011 +0100

    allow building from subpaths

commit 70bdcc007b9f18e05b1a28c5bf7afbf97e16e79a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Dec 11 23:54:32 2011 +0100

    fix repos name

commit 833fa376dd9722cbf8dc49f0b29802d30a455e31
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Dec 11 23:15:31 2011 +0100

    fixing paths in nwt-gitcreate

commit 56fbf618ff5f39415281a37a81336a3262d8a4f5
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Dec 11 22:16:39 2011 +0100

    initial commit

-----------------------------------------------------------------------

Summary of changes:
 bin/build+upload-all-packages                 |    1 +
 bin/build+upload-package                      |    1 +
 bin/build-all-packages                        |   59 ++++++
 bin/build-package                             |  278 +++++++++++++++++++++++++
 bin/gitcreate                                 |   26 +++
 bin/{x2go-gitrevno => gitrevno}               |    4 +-
 bin/{x2go-pkgneedsbuild => pkgneedsbuild}     |    4 +-
 bin/{x2go-tarballrelease => tarballrelease}   |    8 +-
 bin/{x2go-updatebuildmain => updatebuildmain} |    6 +-
 bin/upload-all-packages                       |    1 +
 bin/upload-package                            |    1 +
 home/.buildscripts/itzks.conf                 |   18 ++
 home/.buildscripts/nwt.conf                   |   21 ++
 home/.buildscripts/x2go.conf                  |   20 ++
 home/.dupload.conf.itzks                      |   37 ++++
 home/.dupload.conf.nwt                        |   37 ++++
 home/{.dupload.conf => .dupload.conf.x2go}    |    0
 home/.pbuilderrc                              |    7 +-
 18 files changed, 513 insertions(+), 16 deletions(-)
 create mode 120000 bin/build+upload-all-packages
 create mode 120000 bin/build+upload-package
 create mode 100755 bin/build-all-packages
 create mode 100755 bin/build-package
 create mode 100755 bin/gitcreate
 copy bin/{x2go-gitrevno => gitrevno} (88%)
 copy bin/{x2go-pkgneedsbuild => pkgneedsbuild} (91%)
 copy bin/{x2go-tarballrelease => tarballrelease} (91%)
 copy bin/{x2go-updatebuildmain => updatebuildmain} (81%)
 create mode 120000 bin/upload-all-packages
 create mode 120000 bin/upload-package
 create mode 100644 home/.buildscripts/itzks.conf
 create mode 100644 home/.buildscripts/nwt.conf
 create mode 100644 home/.buildscripts/x2go.conf
 create mode 100644 home/.dupload.conf.itzks
 create mode 100644 home/.dupload.conf.nwt
 copy home/{.dupload.conf => .dupload.conf.x2go} (100%)

The diff of changes is:
diff --git a/bin/build+upload-all-packages b/bin/build+upload-all-packages
new file mode 120000
index 0000000..b8c12b0
--- /dev/null
+++ b/bin/build+upload-all-packages
@@ -0,0 +1 @@
+build-all-packages
\ No newline at end of file
diff --git a/bin/build+upload-package b/bin/build+upload-package
new file mode 120000
index 0000000..2b48fdc
--- /dev/null
+++ b/bin/build+upload-package
@@ -0,0 +1 @@
+build-package
\ No newline at end of file
diff --git a/bin/build-all-packages b/bin/build-all-packages
new file mode 100755
index 0000000..86e72be
--- /dev/null
+++ b/bin/build-all-packages
@@ -0,0 +1,59 @@
+#!/bin/bash 
+
+# Copyright (C) 2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+#
+# This 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.
+#
+# This 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.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+COMPONENT_MAIN="main"
+COMPONENT_NIGHTLY="nightly"
+
+LIB_PACKAGES_NIGHTLY=
+LIB_PACKAGES_MAIN=
+APP_PACKAGES_NIGHTLY=
+APP_PACKAGES_MAIN=
+
+PREFIX=$(echo `basename $0` | cut -d"-" -f1)
+test -f ~/.buildscripts/$PREFIX.conf && . ~/.buildscripts/$PREFIX.conf || { echo "$0 has no valid context prefix..."; exit -1; }
+
+test -z $1 && { echo "usage: $(basename $0) [{$COMPONENT_MAIN,$COMPONENT_NIGHTLY}]"; exit -1; }
+
+COMPONENT=${1:-""}
+
+# build the newest code... (nightly-builds)
+[ "x$COMPONENT" = "x$COMPONENT_NIGHTLY" ] || [ -z $COMPONENT ] && {
+    echo -e $LIB_PACKAGES_NIGHTLY $APP_PACKAGES_NIGHTLY | while read pkg comp checkout; do
+	if [ "x$(basename $0)" = "x$PREFIX-build-all-packages" ]; then
+		$PREFIX-build-package $pkg $comp $checkout
+	elif [ "x$(basename $0)" = "x$PREFIX-upload-all-packages" ]; then
+		$PREFIX-upload-package $pkg $comp $checkout
+	elif [ "x$(basename $0)" = "x$PREFIX-build+upload-all-packages" ]; then
+		$PREFIX-build-package $pkg $comp $checkout && $PREFIX-upload-package $pkg $comp $checkout
+	fi
+    done
+}
+
+# build all packages tagged as build-main
+[ "x$COMPONENT" = "x$COMPONENT_MAIN" ] || [ -z $COMPONENT ] && {
+    echo -e $LIB_PACKAGES_MAIN $APP_PACKAGES_MAIN | while read pkg comp checkout; do
+	if [ "x$(basename $0)" = "x$PREFIX-build-all-packages" ]; then
+		$PREFIX-build-package $pkg $comp $checkout
+	elif [ "x$(basename $0)" = "x$PREFIX-upload-all-packages" ]; then
+		$PREFIX-upload-package $pkg $comp $checkout
+	elif [ "x$(basename $0)" = "x$PREFIX-build+upload-all-packages" ]; then
+		$PREFIX-build-package $pkg $comp $checkout && $PREFIX-upload-package $pkg $comp $checkout
+	fi
+    done
+}
diff --git a/bin/build-package b/bin/build-package
new file mode 100755
index 0000000..8a1f94f
--- /dev/null
+++ b/bin/build-package
@@ -0,0 +1,278 @@
+#!/bin/bash
+
+# Copyright (C) 2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+#
+# This programme 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.
+#
+# This programme 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.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+GIT_USER="gituser"
+GIT_HOSTNAME="git.mydomain.org"
+
+DEBEMAIL="firstname.lastname at mydomain.org"
+DEBFULLNAME="Firstname Lastname"
+GPG_KEY=
+DISTS_SUPPORTED="debian ubuntu"
+BUILDS_FOR="\
+debian: squeeze wheezy sid\n\
+ubuntu: lucid precise\n\
+"
+
+COMPONENT_MAIN="main"
+COMPONENT_NIGHTLY="nightly"
+REPOS_SERVER="packages.mydomain.org"
+PACKAGES_WITHOUT_OTHERMIRROR="keyring"
+
+test -z $1 && { echo "usage: $(basename $0) [<subpath>/]<git-project> {main,main/<codename>,nightly,nightly/<codename>} [<git-checkout>]"; exit -1; }
+
+PREFIX=$(echo `basename $0` | cut -d"-" -f1)
+test -f ~/.buildscripts/$PREFIX.conf && . ~/.buildscripts/$PREFIX.conf || { echo "$0 has no valid context prefix..."; exit -1; }
+
+set -ex
+
+set_vars() {
+	USE_SUDO="yes"
+	PDEBUILD="pdebuild --pbuilder qemubuilder"
+	TEMP_BASE="$HOME/tmp/"
+	mkdir -p "$TEMP_BASE"
+	chmod 2770 "$TEMP_BASE"
+
+	# first argv is the name of the Git project
+	PROJECT_PATH="$1"
+	PROJECT_PATH=${PROJECT_PATH/%.git/}
+	PROJECT="$(basename $PROJECT_PATH)"
+
+	# grab repository component area from command line (2nd argv) or guess it
+	ARGV2_COMPONENT="$(echo "$2/" | cut -d"/" -f1)"
+	ARGV2_CODENAME="$(echo "$2/" | cut -d"/" -f2)"
+	COMPONENT="${ARGV2_COMPONENT:-${COMPONENT:-$COMPONENT_NIGHTLY}}"
+	CODENAMES="${ARGV2_CODENAME:-${CODENAMES}}"
+	[ -n "$ARGV2_CODENAME" ] && FORCE_BUILD=0 || FORCE_BUILD=-1
+	if [ "x$COMPONENT" = "x$COMPONENT_MAIN" ]; then
+		CHECKOUT="${3:-build-main}"
+	elif [ "x$COMPONENT" = "x$COMPONENT_NIGHTLY" ]; then
+		CHECKOUT="${3:-master}"
+		DATE="~${DATE:-$(date +%Y%m%d)}"
+	else
+		echo "error: no such package component area for this Git project. Aborting..."
+		exit -1
+	fi
+	# the DATE might be given as ,,today'' from the command line
+	[ "x$DATE" = "xtoday" ] && DATE="~$(date +%Y%m%d)"
+
+	# setting paths
+	PROJECT_DIR="$HOME/build/$COMPONENT/$PROJECT"
+	PKGDIST="$HOME/pkg-dist/$COMPONENT/$PROJECT"
+
+	# build for other architectures than amd64/i386
+	EXTRA_ARCHS="${EXTRA_ARCHS:-}"
+	EXTRA_ARCHS_ONLY="${EXTRA_ARCHS_ONLY:-}"
+
+	# creating paths
+	mkdir -p "$TEMP_BASE"
+	mkdir -p "$PROJECT_DIR"
+	mkdir -p "$PKGDIST"
+
+	return 0
+}
+
+prepare_workspace() {
+	# in any case remove the BUILDS_FOR file
+	rm -f "$PROJECT_DIR/BUILDS_FOR"
+
+	# make sure our local working copy is up to date...
+
+	if [ -d "$PROJECT_DIR/.git" ]; then 
+		cd "$PROJECT_DIR" && git reset --hard
+		git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT
+		git pull origin $CHECKOUT
+		# and again, get the $CHECKOUT refspec in pure state
+		git reset --hard
+	else
+		cd "$(dirname $PROJECT_DIR)"
+		git clone git://$GIT_HOSTNAME/$PROJECT_PATH.git
+		cd "$PROJECT"
+		git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT;
+	fi
+	cd "$PROJECT_DIR"
+
+	# by default we build for all current debian versions
+	test -f BUILDS_FOR || echo -e "$BUILDS_FOR" > BUILDS_FOR
+	return 0
+}
+
+clear_pkgdist() {
+	# pkgdist directory cleanup
+	cat "$PROJECT_DIR/BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do
+		l_DIST="$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])"
+		l_CODENAMES="${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])}"
+		echo "$DISTS_SUPPORTED" | grep $l_DIST >/dev/null && {
+			for l_CODENAME in $l_CODENAMES; do
+
+				# in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip
+				# the wrong distribution here...
+				test -z $CODENAMES || echo $line | grep $CODENAMES || break
+
+				if [ "x$EXTRA_ARCHS_ONLY" = "x" ]; then
+					for l_ARCH in amd64 i386; do
+						mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH"
+						rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.changes"
+						rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.upload"
+						rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.build"
+						rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.dsc"
+						rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.tar.gz"
+						rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/*.deb"
+					done
+				fi
+				for l_EXTRA_ARCH in $EXTRA_ARCHS; do 
+					mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH"
+					rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.changes"
+					rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.upload"
+					rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.build"
+					rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.dsc"
+					rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.tar.gz"
+					rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/*.deb"
+				done
+			done
+		}
+	done
+	return 0
+}
+
+build_packages() {
+	# use pbuilder for building all variants of this package
+	cat "$PROJECT_DIR/BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do
+		l_DIST="$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])"
+		l_CODENAMES="${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])}"
+		echo "$DISTS_SUPPORTED" | grep $l_DIST >/dev/null && {
+			for l_CODENAME in $l_CODENAMES; do
+
+				# in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip
+				# the wrong distribution here...
+				test -z $CODENAMES || echo $line | grep $CODENAMES || break
+
+				TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)"
+				mkdir -p "$TEMP_DIR/$PROJECT"
+				chmod 2770 "$TEMP_DIR" -Rf
+
+				cd "$PROJECT_DIR"
+				git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/"
+				cd "$TEMP_DIR/$PROJECT"
+				git checkout $CHECKOUT || git checkout master
+				GITREV=$(gitrevno)
+				# we always build native packages for our repos
+				test -f debian/source/format && cat debian/source/format | egrep '^3.0.*\(quilt\)$' >/dev/null && {
+					echo "3.0 (native)" > debian/source/format
+				}
+				# translate the version name for Debian releases
+				[ "x$l_CODENAME" = "xsid" ] && VERSION=unstable
+				[ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing
+				[ "x$l_CODENAME" = "xsqueeze" ] && VERSION=stable
+				[ "x$l_CODENAME" = "xlenny" ] && VERSION=oldstable
+				
+				# modify the section for non-main package builds
+				[ "x$COMPONENT" != "xmain" ] || {
+					mv debian/control debian/control.tmp
+					cat debian/control.tmp | sed  "s#Section:[\ ]*\(.*\)#Section: $COMPONENT/\1#g" > debian/control
+				}
+				
+				# modify changelog for this build
+				dch --distribution $VERSION --force-distribution -l "+$l_CODENAME~$COMPONENT$DATE~$GITREV~build" "Auto-built $l_DIST $l_CODENAME package for $REPOS_SERVER repository."
+				mkdir -p $PKGDIST/$l_DIST/$l_CODENAME/{amd64,i386}
+				OTHERMIRROR=""
+				echo $PACKAGE_WITHOUT_OTHERMIRROR | grep $PROJECT >/dev/null || OTHERMIRROR="deb http://$REPOS_SERVER/$l_DIST $l_CODENAME $COMPONENT"
+				
+				[ "x$USE_SUDO" != "xyes" ] && {
+					[ "x$EXTRA_ARCHS_ONLY" = "x" ] && {
+						cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
+							DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/amd64" 0<&-
+						}
+						cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
+							DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386  $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/i386"  -- --binary-arch 0<&-
+						}
+					}
+					for extra_arch in $EXTRA_ARCHS; do
+						mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch"
+						cat debian/control | egrep "Architecture.*(any|$extra_arch)" >/dev/null && {
+							DIST=$l_DIST CODENAME=$l_CODENAME ARCH=$extra_arch $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" -- --binary-arch 0<&-
+						}
+					done
+				}
+				[ "x$USE_SUDO" = "xyes" ] && {
+					[ "x$EXTRA_ARCHS_ONLY" = "x" ] && {
+						cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
+							sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 0<&-
+						}
+						cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
+							sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386  OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386  -- --binary-arch 0<&-
+						}
+					}
+					for extra_arch in $EXTRA_ARCHS; do
+						mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch"
+						cat debian/control | egrep "Architecture.*(any|$extra_arch)" >/dev/null && {
+							sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=$extra_arch OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" -- --binary-arch 0<&-
+						}
+					done
+				}
+				rm -Rf "$TEMP_DIR"
+			done
+		}
+	done
+	return 0
+}
+
+upload_packages() {
+	# dupload the new packages to the reprepro repository
+	cd "$PKGDIST"
+	cat "$PROJECT_DIR/BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do
+		l_DIST=$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])
+		l_CODENAMES=${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])}
+		for l_CODENAME in $l_CODENAMES; do
+
+			# in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip
+			# the wrong distribution here...
+			test -z $CODENAMES || echo $line | grep $CODENAMES || break
+
+			if [ "x$EXTRA_ARCHS_ONLY" = "x" ]; then	
+				for l_ARCH in amd64 i386; do 
+					cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH"
+					ls "$PROJECT_*.changes" &>/dev/null && dupload -c ~/.dupload.conf.$PREFIX --to $PREFIX-$l_DIST-$l_CODENAME "$PROJECT_*.changes"
+					cd -
+				done
+			fi
+			for l_EXTRA_ARCH in $EXTRA_ARCHS; do 
+				cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH"
+				ls "$PROJECT_*.changes" &>/dev/null && dupload -c ~/.dupload.conf.$PREFIX --to $PREFIX-$l_DIST-$l_CODENAME "$PROJECT_*.changes"
+				cd -
+			done
+		done
+	done
+	cd -
+	return 0
+}
+
+### MAIN ###
+set_vars $@ && {
+	if [ "x$(basename $0)" = "x$PREFIX-build-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-package" ]; then
+		cd $PROJECT_DIR && pkgneedsbuild $CHECKOUT || [ "$FORCE_BUILD" -eq 0 ] && {
+			prepare_workspace && {
+				clear_pkgdist
+				build_packages
+			}
+		}
+	fi
+	if [ "x$(basename $0)" = "x$PREFIX-upload-package" ] || [ "x$(basename $0)" = "x$PREFIX-build+upload-package" ]; then
+		upload_packages
+	fi
+}
diff --git a/bin/gitcreate b/bin/gitcreate
new file mode 100755
index 0000000..3d93faf
--- /dev/null
+++ b/bin/gitcreate
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -xe
+
+GIT_USER=
+GIT_HOSTNAME=
+GIT_SSH_PORT=22
+
+PREFIX=$(echo `basename $0` | cut -d"-" -f1)
+. ~/.buildscripts/$PREFIX.conf
+
+
+for pkg in "$@"; do
+	subdir=$(dirname $pkg)/
+	pkg=$(basename $pkg)
+	ssh -l$GIT_USER $GIT_HOSTNAME "cd ~/git && ./setup-repository ${subdir}${pkg} '$pkg upstream project'"
+	ssh -l$GIT_USER $GIT_HOSTNAME "cd ~/git && ./update-repository-posixacls ${subdir}${pkg}"
+	test -d "$pkg" && cd "$pkg"
+	echo "$pkg: MASTER BRANCH" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} master 
+	git branch | grep upstream &>/dev/null && echo "$pkg: RELEASE BRANCH" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} upstream
+	git branch | grep pristine-tar &>/dev/null && echo "$pkg: PRISTINE-TAR" && git push ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg} pristine-tar
+	echo "$pkg: PUSHING TAGS" && git push --tags ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg}
+	git remote | grep origin >/dev/null || git remote add origin ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg}
+	git remote add ${PREFIX}-public ssh://$GIT_USER@$GIT_HOSTNAME:$GIT_SSH_PORT/~/git/${subdir}${pkg}
+	cd ..
+done
diff --git a/bin/x2go-gitrevno b/bin/gitrevno
similarity index 88%
copy from bin/x2go-gitrevno
copy to bin/gitrevno
index 7065da2..2f121ff 100755
--- a/bin/x2go-gitrevno
+++ b/bin/gitrevno
@@ -2,12 +2,12 @@
 
 # Copyright (C) 2010-2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 #
-# Python X2go is free software; you can redistribute it and/or modify
+# This 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.
 #
-# Python X2go is distributed in the hope that it will be useful,
+# This 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.
diff --git a/bin/x2go-pkgneedsbuild b/bin/pkgneedsbuild
similarity index 91%
copy from bin/x2go-pkgneedsbuild
copy to bin/pkgneedsbuild
index 700a3f7..2a192eb 100755
--- a/bin/x2go-pkgneedsbuild
+++ b/bin/pkgneedsbuild
@@ -2,12 +2,12 @@
 
 # Copyright (C) 2010-2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 #
-# Python X2go is free software; you can redistribute it and/or modify
+# This 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.
 #
-# Python X2go is distributed in the hope that it will be useful,
+# This 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.
diff --git a/bin/x2go-tarballrelease b/bin/tarballrelease
similarity index 91%
copy from bin/x2go-tarballrelease
copy to bin/tarballrelease
index 2779b60..1b58077 100755
--- a/bin/x2go-tarballrelease
+++ b/bin/tarballrelease
@@ -2,12 +2,12 @@
 
 # Copyright (C) 2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 #
-# Python X2go is free software; you can redistribute it and/or modify
+# This is free software; you can redistribute it and/or modify
 # it under the tBerms 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.
 #
-# Python X2go is distributed in the hope that it will be useful,
+# This 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.
@@ -41,7 +41,3 @@ git clone . "$TEMP_DIR/${PROJECT}_$RELEASE"
 ( set -e; cd "$TEMP_DIR" && find "${PROJECT}_$RELEASE" -type f | sed 's/^\.*\/*//' | sort > "$MANIFEST" )
 mkdir -p "$TARGETDIR/_releases_/source/${PROJECT}/"
 tar c -C "$TEMP_DIR" --owner 0 --group 0 --numeric-owner --no-recursion --files-from "$MANIFEST" | gzip -n > "$TARGETDIR/_releases_/source/${PROJECT}/${PROJECT}_$RELEASE.tar.gz"
-
-
-
-
diff --git a/bin/x2go-updatebuildmain b/bin/updatebuildmain
similarity index 81%
copy from bin/x2go-updatebuildmain
copy to bin/updatebuildmain
index 3716ed4..f4f4917 100755
--- a/bin/x2go-updatebuildmain
+++ b/bin/updatebuildmain
@@ -2,12 +2,12 @@
 
 # Copyright (C) 2010-2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 #
-# Python X2go is free software; you can redistribute it and/or modify
+# This 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.
 #
-# Python X2go is distributed in the hope that it will be useful,
+# This 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.
@@ -25,7 +25,7 @@ REF=$1
 # we need to be within a working copy (base folder) and we need a <REF>!!!
 test -z $1 || test -d ./.git || {
   echo "usage: $(basename $0) <REF>"
-  echo "Call this command from within the base folder of an X2go Git project's working copy..."
+  echo "Call this command from within the base folder of a Git project's working copy..."
   exit -1
 }
 
diff --git a/bin/upload-all-packages b/bin/upload-all-packages
new file mode 120000
index 0000000..b8c12b0
--- /dev/null
+++ b/bin/upload-all-packages
@@ -0,0 +1 @@
+build-all-packages
\ No newline at end of file
diff --git a/bin/upload-package b/bin/upload-package
new file mode 120000
index 0000000..2b48fdc
--- /dev/null
+++ b/bin/upload-package
@@ -0,0 +1 @@
+build-package
\ No newline at end of file
diff --git a/home/.buildscripts/itzks.conf b/home/.buildscripts/itzks.conf
new file mode 100644
index 0000000..f1df69d
--- /dev/null
+++ b/home/.buildscripts/itzks.conf
@@ -0,0 +1,18 @@
+# buildscripts configuration for ITZKS build server
+GIT_USER=itzks
+GIT_HOSTNAME=code.it-zukunft-schule.de
+GIT_SSH_PORT=32032
+
+DEBEMAIL=itzks-packages at it-zukunft-schule.de
+DEBFULLNAME="ITZKS Packages"
+GPG_KEY="E41B37C658842183"
+
+DISTS_SUPPORTED="debian ubuntu"
+BUILDS_FOR="\
+debian: lenny squeeze wheezy sid\n\
+ubuntu: lucid precise"
+
+COMPONENT_MAIN="main"
+COMPONENT_NIGHTLY="nightly"
+REPOS_SERVER="packages.it-zukunft-schule.de"
+PACKAGE_WITHOUT_OTHERMIRROR="itzks-keyring"
diff --git a/home/.buildscripts/nwt.conf b/home/.buildscripts/nwt.conf
new file mode 100644
index 0000000..845377d
--- /dev/null
+++ b/home/.buildscripts/nwt.conf
@@ -0,0 +1,21 @@
+# buildscripts configuration for NWT build server
+
+GIT_USER=nwt
+GIT_HOSTNAME=code.das-netzwerkteam.de
+GIT_SSH_PORT=32032
+
+DEBEMAIL=debian at das-netzwerkteam.de
+DEBFULLNAME="NWT Packages"
+GPG_KEY="4DC41CF116990FF8"
+DISTS_SUPPORTED="debian ubuntu"
+BUILDS_FOR="\
+debian: lenny squeeze wheezy sid\n\
+ubuntu: lucid precise"
+
+COMPONENT_MAIN="main"
+COMPONENT_NIGHTLY="nightly"
+REPOS_SERVER="packages.das-netzwerkteam.de"
+PACKAGE_WITHOUT_OTHERMIRROR="nwt-keyring"
+
+
+
diff --git a/home/.buildscripts/x2go.conf b/home/.buildscripts/x2go.conf
new file mode 100644
index 0000000..e8e9dcd
--- /dev/null
+++ b/home/.buildscripts/x2go.conf
@@ -0,0 +1,20 @@
+# buildscripts configuration for X2Go build server
+
+GIT_USER=x2go
+GIT_HOSTNAME=code.x2go.org
+GIT_SSH_PORT=32032
+
+DEBEMAIL=git-admin at x2go.org
+DEBFULLNAME="X2go Git Administrator"
+GPG_KEY="F4A7678C9C6B0B2B"
+DISTS_SUPPORTED="debian"
+BUILDS_FOR="\
+debian: squeeze wheezy sid"
+
+COMPONENT_MAIN="main"
+COMPONENT_NIGHTLY="heuler"
+REPOS_SERVER="packages.x2go.org"
+PACKAGE_WITHOUT_OTHERMIRROR="x2go-keyring"
+
+
+
diff --git a/home/.dupload.conf.itzks b/home/.dupload.conf.itzks
new file mode 100644
index 0000000..7e25854
--- /dev/null
+++ b/home/.dupload.conf.itzks
@@ -0,0 +1,37 @@
+package config;
+
+### itzks/DEBIAN
+$cfg{"itzks-debian-sid"} = {
+        fqdn => "packages.it-zukunft-schule.de",
+        login => "itzks-admin",
+        method => "scpb",
+        incoming => "/srv/sites/it-zukunft-schule.de/packages/debian/incoming/sid",
+        queuedir => "/srv/sites/it-zukunft-schule.de/packages/debian/upload/sid",
+        dinstall_runs => 1,
+};
+$cfg{"itzks-debian-wheezy"} = {
+        fqdn => "packages.it-zukunft-schule.de",
+        login => "itzks-admin",
+        method => "scpb",
+        incoming => "/srv/sites/it-zukunft-schule.de/packages/debian/incoming/wheezy",
+        queuedir => "/srv/sites/it-zukunft-schule.de/packages/debian/upload/wheezy",
+        dinstall_runs => 1,
+};
+$cfg{"itzks-debian-squeeze"} = {
+        fqdn => "packages.it-zukunft-schule.de",
+        login => "itzks-admin",
+        method => "scpb",
+        incoming => "/srv/sites/it-zukunft-schule.de/packages/debian/incoming/squeeze",
+        queuedir => "/srv/sites/it-zukunft-schule.de/packages/debian/upload/squeeze",
+        dinstall_runs => 1,
+};
+$cfg{"itzks-debian-lenny"} = {
+        fqdn => "packages.it-zukunft-schule.de",
+        login => "itzks-admin",
+        method => "scpb",
+        incoming => "/srv/sites/it-zukunft-schule.de/packages/debian/incoming/lenny",
+        queuedir => "/srv/sites/it-zukunft-schule.de/packages/debian/upload/lenny",
+        dinstall_runs => 1,
+};
+
+1;
diff --git a/home/.dupload.conf.nwt b/home/.dupload.conf.nwt
new file mode 100644
index 0000000..d4ba622
--- /dev/null
+++ b/home/.dupload.conf.nwt
@@ -0,0 +1,37 @@
+package config;
+
+### nwt/DEBIAN
+$cfg{"nwt-debian-sid"} = {
+        fqdn => "packages.das-netzwerkteam.de",
+        login => "nwt-admin",
+        method => "scpb",
+        incoming => "/srv/sites/das-netzwerkteam.de/packages/debian/incoming/sid",
+        queuedir => "/srv/sites/das-netzwerkteam.de/packages/debian/upload/sid",
+        dinstall_runs => 1,
+};
+$cfg{"nwt-debian-wheezy"} = {
+        fqdn => "packages.das-netzwerkteam.de",
+        login => "nwt-admin",
+        method => "scpb",
+        incoming => "/srv/sites/das-netzwerkteam.de/packages/debian/incoming/wheezy",
+        queuedir => "/srv/sites/das-netzwerkteam.de/packages/debian/upload/wheezy",
+        dinstall_runs => 1,
+};
+$cfg{"nwt-debian-squeeze"} = {
+        fqdn => "packages.das-netzwerkteam.de",
+        login => "nwt-admin",
+        method => "scpb",
+        incoming => "/srv/sites/das-netzwerkteam.de/packages/debian/incoming/squeeze",
+        queuedir => "/srv/sites/das-netzwerkteam.de/packages/debian/upload/squeeze",
+        dinstall_runs => 1,
+};
+$cfg{"nwt-debian-lenny"} = {
+        fqdn => "packages.das-netzwerkteam.de",
+        login => "nwt-admin",
+        method => "scpb",
+        incoming => "/srv/sites/das-netzwerkteam.de/packages/debian/incoming/lenny",
+        queuedir => "/srv/sites/das-netzwerkteam.de/packages/debian/upload/lenny",
+        dinstall_runs => 1,
+};
+
+1;
diff --git a/home/.dupload.conf b/home/.dupload.conf.x2go
similarity index 100%
copy from home/.dupload.conf
copy to home/.dupload.conf.x2go
diff --git a/home/.pbuilderrc b/home/.pbuilderrc
index 74992ea..ca86228 100644
--- a/home/.pbuilderrc
+++ b/home/.pbuilderrc
@@ -7,7 +7,7 @@ BASEDIRECTORY="/srv/pbuilder/cache"
 DIST=${DIST:-debian}
 CODENAME=${CODENAME:-sid}
 ARCH=${ARCH:-amd64}
-COMPONENT="${COMPONENT:-heuler}"
+COMPONENT="${COMPONENT:-nightly}"
 
 # pbuilder options
 BASETGZ="$BASEDIRECTORY/base-$DIST-$CODENAME-$ARCH.tgz"
@@ -15,8 +15,9 @@ DISTRIBUTION="$CODENAME"
 BUILDRESULT="$BASEDIRECTORY/$DIST-$CODENAME-$ARCH/result/"
 APTCACHE="$BASEDIRECTORY/$DIST-$CODENAME-$ARCH/aptcache/"
 
-BUILDRESULTUID=x2go-admin
-BUILDRESULTGID=x2go
+BUILDRESULTUID=$(id -u)
+BUILDRESULTGID=$(id -g)
+
 # this needs to be disabled
 CCACHEDIR=
 APTCACHEHARDLINK="yes"


hooks/post-receive
-- 
buildscripts.git (buildscripts upstream project)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "buildscripts.git" (buildscripts upstream project).




More information about the x2go-commits mailing list