Package build directories get same owner as $WORKSPACE.
authorBrett Smith <brett@curoverse.com>
Wed, 15 Jun 2016 16:58:31 +0000 (12:58 -0400)
committerBrett Smith <brett@curoverse.com>
Wed, 15 Jun 2016 16:58:31 +0000 (12:58 -0400)
Since this script runs as root inside the Docker container, the
directory created on the previous line is normally owned by root too.
This causes trouble when the package tests run later and try to create
repository information inside the directory.  See, e.g.,
<https://ci.curoverse.com/job/build-packages-sso/23/consoleFull> for a
build that failed because of this.

No issue #.

build/run-build-packages.sh

index f07b942d4595f7025cfa6afed8dd83ec92094370..0277094d2bb33d7e60233189a0e77c1820772446 100755 (executable)
@@ -238,6 +238,7 @@ debug_echo "umask is" `umask`
 
 if [[ ! -d "$WORKSPACE/packages/$TARGET" ]]; then
   mkdir -p $WORKSPACE/packages/$TARGET
+  chown --reference="$WORKSPACE" "$WORKSPACE/packages/$TARGET"
 fi
 
 # Perl packages