X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/49a647b963d16c7035d514ea6a09a11afe3a5d19..44c95f99098fa6c6acbfa82d4b6cbc6015eb6e39:/build/run-build-packages-one-target.sh diff --git a/build/run-build-packages-one-target.sh b/build/run-build-packages-one-target.sh index 16c7129d9b..7f75624af6 100755 --- a/build/run-build-packages-one-target.sh +++ b/build/run-build-packages-one-target.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 read -rd "\000" helpmessage < - Distribution to build packages for (default: debian7) + Distribution to build packages for (default: debian8) --command Build command to execute (default: use built-in Docker image command) --test-packages - Run package install test script "test-packages-$target.sh" + Run package install test script "test-packages-[target].sh" --debug Output debug information (default: false) --only-build @@ -48,7 +51,7 @@ if [ $? -ne 0 ]; then exit 1 fi -TARGET=debian7 +TARGET=debian8 COMMAND= DEBUG= @@ -72,6 +75,7 @@ while [ $# -gt 0 ]; do ;; --debug) DEBUG=" --debug" + ARVADOS_DEBUG="1" ;; --command) COMMAND="$2"; shift @@ -98,7 +102,8 @@ if [[ -n "$test_packages" ]]; then if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.deb')" ]] ; then (cd $WORKSPACE/packages/$TARGET - dpkg-scanpackages . 2> >(grep -v 'warning' 1>&2) | gzip -c > Packages.gz + dpkg-scanpackages . 2> >(grep -v 'warning' 1>&2) | tee Packages | gzip -c > Packages.gz + apt-ftparchive -o APT::FTPArchive::Release::Origin=Arvados release . > Release ) fi @@ -145,10 +150,6 @@ if test -z "$packages" ; then libarvados-perl" case "$TARGET" in - centos6) - packages="$packages python27-python-arvados-fuse - python27-python-arvados-python-client python27-python-arvados-cwl-runner" - ;; *) packages="$packages python-arvados-fuse python-arvados-python-client python-arvados-cwl-runner" @@ -174,11 +175,14 @@ docker_volume_args=( if [[ -n "$test_packages" ]]; then for p in $packages ; do + if [[ -n "$ONLY_BUILD" ]] && [[ "$p" != "$ONLY_BUILD" ]]; then + continue + fi echo echo "START: $p test on $IMAGE" >&2 if docker run --rm \ "${docker_volume_args[@]}" \ - --env ARVADOS_DEBUG=1 \ + --env ARVADOS_DEBUG=$ARVADOS_DEBUG \ --env "TARGET=$TARGET" \ --env "WORKSPACE=/arvados" \ "$IMAGE" $COMMAND $p @@ -193,9 +197,17 @@ if [[ -n "$test_packages" ]]; then else echo echo "START: build packages on $IMAGE" >&2 + # Move existing packages and other files into the processed/ subdirectory + if [[ ! -e "${WORKSPACE}/packages/${TARGET}/processed" ]]; then + mkdir -p "${WORKSPACE}/packages/${TARGET}/processed" + fi + set +e + mv -f ${WORKSPACE}/packages/${TARGET}/* ${WORKSPACE}/packages/${TARGET}/processed/ 2>/dev/null + set -e + # Build packages if docker run --rm \ "${docker_volume_args[@]}" \ - --env ARVADOS_DEBUG=1 \ + --env ARVADOS_DEBUG=$ARVADOS_DEBUG \ --env "ONLY_BUILD=$ONLY_BUILD" \ "$IMAGE" $COMMAND then