]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
extract_storage: dist of ANDBD must be not dev_feature* but pre-staging
authorDongsu Park <dongsu.park@profitbricks.com>
Fri, 17 Jan 2014 13:47:17 +0000 (14:47 +0100)
committerDongsu Park <dongsu.park@profitbricks.com>
Fri, 17 Jan 2014 13:47:17 +0000 (14:47 +0100)
A yet another bug on building a kernel image from a feature branch.
So far profitbricks-linux-image-storage has been built successfully.
However, its subtask building profitbricks-andbd-modules-storage
has always failed.

Its reason was apt sources list having enabled only dev-repository,
where ANDBD modules are normally not built at all. This could result
in an error case, where installation process of ANDBD module package
tries to find a bogus kernel version, such as 2.6.32.

Even though there would exist any feature branch of ANDBD that matches
exactly with the name of feature branch of linux-storage, we could not
have any way to determine at all, whether the two feature branches
should match with each other. There's no point of using $TARGET_NAME
for configuring distribution of the ANDBD module package.

Therefore the solution is to always add a pre-staging repository
to apt sources list. Then linux-storage from a feature branch can be
installed with andbd-modules from the pre-staging (develop) branch.

(Tested only under my local pbuilder environment)

extract_storage_kernel+modules.sh

index ee6c4bd657eca868ddb0accd24524157f6175362..bfa0b035eeeea1da655004136099684d25d90197 100755 (executable)
@@ -55,9 +55,16 @@ case $DISTRIBUTION in
        [ -n "$PB_SUITE" ] && export TARGET_NAME=$PB_SUITE || export TARGET_NAME="experimental"
        LAST_DEVELOP_BUILD_NO=$(get_last_target_build_no develop)
        BUILD_NUMBER="$LAST_DEVELOP_BUILD_NO.$(printf %03d $BUILD_NUMBER)"
+
+       # kernel images must be installed from a branch-specific distribution
+       # under dev-repository. However, ANDBD modules must be installed from
+       # the pre-staging distribution, because ANDBD modules must have not
+       # been built into packages under a particular distribution.
        FEATURE_APTCMD="
        echo \"deb http://alexandria.pb.local/dev-repository $TARGET_NAME main contrib non-free\" \
-       > /etc/apt/sources.list.d/profitbricks-linux-image-storage-$TARGET_NAME.list
+       > /etc/apt/sources.list.d/profitbricks-linux-image-storage-$TARGET_NAME.list ; \
+       echo \"deb http://alexandria.pb.local/profitbricks-repository pre-staging main contrib non-free\" \
+       > /etc/apt/sources.list.d/profitbricks-linux-image-storage-develop.list
        "
        FEATURE_VERSCMD="
        export FEATURE_VERSION=\`apt-cache showpkg profitbricks-linux-image-storage -a \