From: Benjamin Drung Date: Wed, 23 Jul 2014 11:20:18 +0000 (+0200) Subject: pbuilder: Replace Debian repositories on alexandria.pb.local by repo.pb.local. X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=c94cd1eb63a079f208adca0fb42f535c4419b9bb;p=profitbricks%2Fjenkins-build-scripts.git pbuilder: Replace Debian repositories on alexandria.pb.local by repo.pb.local. --- diff --git a/.pbuilder/hooks.d/D01-apt-get-update b/.pbuilder/hooks.d/D01-apt-get-update index e84134a..88225fe 100755 --- a/.pbuilder/hooks.d/D01-apt-get-update +++ b/.pbuilder/hooks.d/D01-apt-get-update @@ -10,9 +10,8 @@ if [ "$PB_SUITE" == "experimental" ] || [ ${PB_SUITE:0:3} != "dev" ] ; then 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 + if $(wget -q --spider "http://repo.pb.local/pb-debian-dev/dists/${DIST}-$PB_SUITE/Release") ; then + echo "deb http://repo.pb.local/pb-debian-dev ${DIST}-$PB_SUITE main contrib non-free" >> /etc/apt/sources.list fi fi diff --git a/.pbuilder/hooks.d/F10-aptconf b/.pbuilder/hooks.d/F10-aptconf index d233fb2..cff5a58 100755 --- a/.pbuilder/hooks.d/F10-aptconf +++ b/.pbuilder/hooks.d/F10-aptconf @@ -7,9 +7,8 @@ if [ "$PB_SUITE" == "" ] || [ "$PB_SUITE" == "experimental" ] || [ ${PB_SUITE: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 + if $(wget -q --spider "http://repo.pb.local/pb-debian-dev/dists/${DIST}-$PB_SUITE/Release") ; then + echo "deb http://repo.pb.local/pb-debian-dev ${DIST}-$PB_SUITE main contrib non-free" >> /etc/apt/sources.list apt-get update fi fi diff --git a/.pbuilderrc b/.pbuilderrc index 7c0f38d..2527278 100644 --- a/.pbuilderrc +++ b/.pbuilderrc @@ -1,6 +1,6 @@ #!/bin/sh ECHO_PREFIX="### /root/.pbuilderrc: " -MIRRORSITE="http://alexandria.pb.local/debian-mirror/" +MIRRORSITE="http://repo.pb.local/debian" STABLE="squeeze" STABLE_CODENAME="stable" STABLE_PBNAME="production" @@ -66,41 +66,35 @@ if [ "$DIST" == "wheezy" ] ; then 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 |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian $DIST main contrib non-free |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian ${DIST}-proposed 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 |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian-dev ${DIST}-dev main contrib non-free |" fi if echo ${PB_SUITE} | grep -qE "^wheezy-dev-.*" then BASETGZ="/var/cache/pbuilder/$NAME-experimental-wheezy-base.tgz" BASEPATH="/var/cache/pbuilder/$NAME-experimental-wheezy-base.cow" - OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/pb-$DIST pre-staging main contrib non-free |" - if wget -q --spider "http://alexandria.pb.local/dev-$DIST/dists/$PB_SUITE/Release"; then + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian-dev ${DIST}-dev main contrib non-free |" + if wget -q --spider "http://repo.pb.local/pb-debian-dev/dists/${DIST}-$PB_SUITE/Release"; then # Only add the wheezy-dev-* repository if it already exist # It will not exist for the first package that targets this repository. - OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/dev-$DIST $PB_SUITE main contrib non-free |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian-dev ${DIST}-$PB_SUITE main contrib non-free |" fi 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 |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian squeeze main contrib non-free |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian squeeze-proposed 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 |" - if wget -q --spider "http://alexandria.pb.local/dev-squeeze/dists/$PB_SUITE/Release"; then - # Only add the dev-* repository if it already exist + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian-dev squeeze-dev main contrib non-free |" + if wget -q --spider "http://repo.pb.local/pb-debian-dev/dists/${DIST}-$PB_SUITE/Release"; then + # Only add the ${DIST}-* repository if it already exist # It will not exist for the first package that targets this repository. - OTHERMIRROR="$OTHERMIRROR deb http://alexandria.pb.local/dev-squeeze $PB_SUITE main contrib non-free |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian-dev ${DIST}-$PB_SUITE main contrib non-free |" fi else BASETGZ="/var/cache/pbuilder/$NAME-$PB_SUITE-base.tgz" @@ -110,14 +104,11 @@ else : ;; $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 |" + echo "Error: Staging is gone. Please contact DC Ops (contact person: Benjamin Drung)" >&2 + exit 1 ;; $UNSTABLE|$UNSTABLE_PBNAME|develop-squeeze) - 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 |" + OTHERMIRROR="$OTHERMIRROR deb http://repo.pb.local/pb-debian-dev squeeze-dev main contrib non-free |" ;; $EXPERIMENTAL_PBNAME) :