]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
pbuilder: Replace Debian repositories on alexandria.pb.local by repo.pb.local.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Wed, 23 Jul 2014 11:20:18 +0000 (13:20 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Wed, 23 Jul 2014 11:20:18 +0000 (13:20 +0200)
.pbuilder/hooks.d/D01-apt-get-update
.pbuilder/hooks.d/F10-aptconf
.pbuilderrc

index e84134ae97607b8d951cc2aee84f84df9ff42ee1..88225fee8a447448793753c8b2f8f440842ddbf6 100755 (executable)
@@ -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
 
index d233fb2a81ca211cc515a34a32f84c952a49f6ef..cff5a58137dd751387656ded80aabe89b5bbffa8 100755 (executable)
@@ -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
index 7c0f38d1ff62ac1ec16706f6e2e57d55a36a75d8..25272786961a605a08f7cd3dd3f125e782f5cc11 100644 (file)
@@ -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)
                         :