diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-01-23 00:55:35 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2012-01-23 00:55:35 +0100 |
commit | d52afed8373ccb31a84089cf2dc0676ca7a3ec0a (patch) | |
tree | 0f50889378739117c968aec9b7a8ff5bbfede9b3 | |
parent | c66c5506234163ee7aa33ba4c47e8c0a549b4c78 (diff) | |
parent | 146ca95e1971f3ddeb4819f22f1e97a07a659113 (diff) | |
download | buildscripts-d52afed8373ccb31a84089cf2dc0676ca7a3ec0a.tar.gz buildscripts-d52afed8373ccb31a84089cf2dc0676ca7a3ec0a.tar.bz2 buildscripts-d52afed8373ccb31a84089cf2dc0676ca7a3ec0a.zip |
Merge branch 'master' of ssh://code.x2go.org:32032/srv/git/code.x2go.org/buildscripts
-rwxr-xr-x | bin/build-package | 61 | ||||
-rwxr-xr-x | bin/updatebuildmain | 2 | ||||
-rw-r--r-- | home/.buildscripts/itzks.conf | 3 | ||||
-rw-r--r-- | home/.dupload.conf | 37 | ||||
-rw-r--r-- | home/.dupload.conf.nwt | 18 |
5 files changed, 55 insertions, 66 deletions
diff --git a/bin/build-package b/bin/build-package index 3a891b6..f1c24de 100755 --- a/bin/build-package +++ b/bin/build-package @@ -126,23 +126,27 @@ clear_pkgdist() { 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" + [ "x$SKIP_ARCH" != "x$l_ARCH" ] && { + mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH" + rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/dupload.conf" + 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" + rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/dupload.conf" + 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 } @@ -170,11 +174,16 @@ build_packages() { git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" cd "$TEMP_DIR/$PROJECT" git checkout $CHECKOUT || git checkout master + find $PROJECT_DIR/../ -type f -maxdepth 0 -mindepth 0 | grep $PROJECT_*.orig.tar.gz &>/dev/null && cp $PROJECT_DIR/../$PROJECT_*.orig.tar.gz .. 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 - } + } + + # for Ubuntu version is the codename of the distribution release + VERSION=$l_CODENAME + # translate the version name for Debian releases [ "x$l_CODENAME" = "xsid" ] && VERSION=unstable [ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing @@ -195,10 +204,10 @@ build_packages() { [ "x$USE_SUDO" != "xyes" ] && { [ "x$EXTRA_ARCHS_ONLY" = "x" ] && { - cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { + [ "x$SKIP_ARCH" != "xamd64" ] && 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 && { + [ "x$SKIP_ARCH" != "xi386" ] && 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<&- } } @@ -211,10 +220,10 @@ build_packages() { } [ "x$USE_SUDO" = "xyes" ] && { [ "x$EXTRA_ARCHS_ONLY" = "x" ] && { - cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { + [ "x$SKIP_ARCH" != "xamd64" ] && 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 && { + [ "x$SKIP_ARCH" != "xi386" ] && 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<&- } } @@ -234,7 +243,6 @@ build_packages() { 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:])} @@ -245,20 +253,21 @@ upload_packages() { 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 - + for l_ARCH in amd64 i386; do + [ "x$SKIP_ARCH" != "x$l_ARCH" ] && { + cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH" + test -f ./dupload.conf || ln -s ~/.dupload.conf.$PREFIX ./dupload.conf + ls $PROJECT_*.changes &>/dev/null && dupload -c --to $PREFIX-$l_DIST-$l_CODENAME $PROJECT_*.changes 0<&- + } 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 - + test -f ./dupload.conf || ln -s ~/.dupload.conf.$PREFIX ./dupload.conf + ls $PROJECT_*.changes &>/dev/null && dupload -c --to $PREFIX-$l_DIST-$l_CODENAME $PROJECT_*.changes 0<&- done done done - cd - return 0 } diff --git a/bin/updatebuildmain b/bin/updatebuildmain index f4abe4e..54c3544 100755 --- a/bin/updatebuildmain +++ b/bin/updatebuildmain @@ -20,7 +20,7 @@ set -e GITPROJECT=$(basename $(pwd)) -REF=$1 +REF=${1-HEAD} # we need to be within a working copy (base folder) and we need a <REF>!!! test -z $1 || test -d ./.git || { diff --git a/home/.buildscripts/itzks.conf b/home/.buildscripts/itzks.conf index 5fd406c..f175840 100644 --- a/home/.buildscripts/itzks.conf +++ b/home/.buildscripts/itzks.conf @@ -9,8 +9,7 @@ GPG_KEY="E41B37C658842183" DISTS_SUPPORTED="debian ubuntu" BUILDS_FOR="\ -debian: lenny squeeze wheezy sid\n\ -ubuntu: lucid precise" +debian: squeeze wheezy sid" COMPONENT_MAIN="main" COMPONENT_NIGHTLY="nightly" diff --git a/home/.dupload.conf b/home/.dupload.conf deleted file mode 100644 index 8e68292..0000000 --- a/home/.dupload.conf +++ /dev/null @@ -1,37 +0,0 @@ -package config; - -### X2go/DEBIAN -$cfg{"x2go-debian-sid"} = { - fqdn => "code.x2go.org", - login => "x2go-admin", - method => "scpb", - incoming => "/srv/sites/x2go.org/packages/debian/incoming/sid", - queuedir => "/srv/sites/x2go.org/packages/debian/upload/sid", - dinstall_runs => 1, -}; -$cfg{"x2go-debian-wheezy"} = { - fqdn => "code.x2go.org", - login => "x2go-admin", - method => "scpb", - incoming => "/srv/sites/x2go.org/packages/debian/incoming/wheezy", - queuedir => "/srv/sites/x2go.org/packages/debian/upload/wheezy", - dinstall_runs => 1, -}; -$cfg{"x2go-debian-squeeze"} = { - fqdn => "code.x2go.org", - login => "x2go-admin", - method => "scpb", - incoming => "/srv/sites/x2go.org/packages/debian/incoming/squeeze", - queuedir => "/srv/sites/x2go.org/packages/debian/upload/squeeze", - dinstall_runs => 1, -}; -$cfg{"x2go-debian-lenny"} = { - fqdn => "code.x2go.org", - login => "x2go-admin", - method => "scpb", - incoming => "/srv/sites/x2go.org/packages/debian/incoming/lenny", - queuedir => "/srv/sites/x2go.org/packages/debian/upload/lenny", - dinstall_runs => 1, -}; - -1; diff --git a/home/.dupload.conf.nwt b/home/.dupload.conf.nwt index d4ba622..bcbd15c 100644 --- a/home/.dupload.conf.nwt +++ b/home/.dupload.conf.nwt @@ -34,4 +34,22 @@ $cfg{"nwt-debian-lenny"} = { dinstall_runs => 1, }; +$cfg{"nwt-ubuntu-precise"} = { + fqdn => "packages.das-netzwerkteam.de", + login => "nwt-admin", + method => "scpb", + incoming => "/srv/sites/das-netzwerkteam.de/packages/ubuntu/incoming/precise", + queuedir => "/srv/sites/das-netzwerkteam.de/packages/ubuntu/upload/precise", + dinstall_runs => 1, +}; +$cfg{"nwt-ubuntu-lucid"} = { + fqdn => "packages.das-netzwerkteam.de", + login => "nwt-admin", + method => "scpb", + incoming => "/srv/sites/das-netzwerkteam.de/packages/ubuntu/incoming/lucid", + queuedir => "/srv/sites/das-netzwerkteam.de/packages/ubuntu/upload/lucid", + dinstall_runs => 1, +}; + + 1; |