Bug 1409260 - Remove unused scripts from the desktop-build images. r?dustin draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 17 Oct 2017 15:07:43 +0900
changeset 681926 4d5eb75799565b83e72fe6e4a1b4648462e4e2f5
parent 681925 39c5e962cf8df727aaf4c627010e6a9bd23938f2
child 681927 0b21f5f8d868f51165d133ba7ed557346122216e
push id84949
push userbmo:mh+mozilla@glandium.org
push dateTue, 17 Oct 2017 21:31:20 +0000
reviewersdustin
bugs1409260, 1309593
milestone58.0a1
Bug 1409260 - Remove unused scripts from the desktop-build images. r?dustin AFAICT, the last use of the build.sh script was removed in bug 1309593, and checkout-sources.sh is only used from that script.
taskcluster/docker/desktop-build/bin/build.sh
taskcluster/docker/desktop-build/bin/checkout-sources.sh
deleted file mode 100644
--- a/taskcluster/docker/desktop-build/bin/build.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/bash -vex
-
-set -x -e -v
-
-# Relative path to in-tree script
-: JOB_SCRIPT                ${JOB_SCRIPT:=taskcluster/scripts/builder/build-linux.sh}
-
-script_args="${@}"
-
-# TODO: when bug 1093833 is solved and tasks can run as non-root, reduce this
-# to a simple fail-if-root check
-if [ $(id -u) = 0 ]; then
-    # each of the caches we have mounted are owned by root, so update that ownership
-    # to 'worker'
-    for cache in /builds/worker/.tc-vcs /builds/worker/workspace /builds/worker/tooltool-cache; do
-        if [ -d $cache ]; then
-            # -R probably isn't necessary forever, but it fixes some poisoned
-            # caches for now
-            chown -R worker:worker $cache
-        fi
-    done
-
-    # ..then drop privileges by re-running this script
-    exec su worker -c "/builds/worker/bin/build.sh $script_args"
-fi
-
-####
-# The default build works for any fx_desktop_build based mozharness job:
-# via build-linux.sh
-####
-
-. $HOME/bin/checkout-sources.sh
-
-script=$WORKSPACE/build/src/$JOB_SCRIPT
-chmod +x $script
-exec $script $script_args
deleted file mode 100644
--- a/taskcluster/docker/desktop-build/bin/checkout-sources.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /bin/bash -vex
-
-set -x -e
-
-# Inputs, with defaults
-
-# mozharness builds use two repositories: gecko (source)
-# and build-tools (miscellaneous) for each, specify *_REPOSITORY.  If the
-# revision is not in the standard repo for the codebase, specify *_BASE_REPO as
-# the canonical repo to clone and *_HEAD_REPO as the repo containing the
-# desired revision.  For Mercurial clones, only *_HEAD_REV is required; for Git
-# clones, specify the branch name to fetch as *_HEAD_REF and the desired sha1
-# as *_HEAD_REV.
-
-: GECKO_REPOSITORY              ${GECKO_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
-: GECKO_BASE_REPOSITORY         ${GECKO_BASE_REPOSITORY:=${GECKO_REPOSITORY}}
-: GECKO_HEAD_REPOSITORY         ${GECKO_HEAD_REPOSITORY:=${GECKO_REPOSITORY}}
-: GECKO_HEAD_REV                ${GECKO_HEAD_REV:=default}
-: GECKO_HEAD_REF                ${GECKO_HEAD_REF:=${GECKO_HEAD_REV}}
-
-: TOOLS_REPOSITORY              ${TOOLS_REPOSITORY:=https://hg.mozilla.org/build/tools}
-: TOOLS_BASE_REPOSITORY         ${TOOLS_BASE_REPOSITORY:=${TOOLS_REPOSITORY}}
-: TOOLS_HEAD_REPOSITORY         ${TOOLS_HEAD_REPOSITORY:=${TOOLS_REPOSITORY}}
-: TOOLS_HEAD_REV                ${TOOLS_HEAD_REV:=default}
-: TOOLS_HEAD_REF                ${TOOLS_HEAD_REF:=${TOOLS_HEAD_REV}}
-: TOOLS_DISABLE                 ${TOOLS_DISABLE:=false}
-
-: WORKSPACE                     ${WORKSPACE:=/builds/worker/workspace}
-
-set -v
-
-# check out tools where mozharness expects it to be ($PWD/build/tools and $WORKSPACE/build/tools)
-if [ ! "$TOOLS_DISABLE" = true ]
-then
-    tc-vcs checkout $WORKSPACE/build/tools $TOOLS_BASE_REPOSITORY $TOOLS_HEAD_REPOSITORY $TOOLS_HEAD_REV $TOOLS_HEAD_REF
-
-    if [ ! -d build ]; then
-        mkdir -p build
-        ln -s $WORKSPACE/build/tools build/tools
-    fi
-fi
-
-# TODO - include tools repository in EXTRA_CHECKOUT_REPOSITORIES list
-for extra_repo in $EXTRA_CHECKOUT_REPOSITORIES; do
-    BASE_REPO="${extra_repo}_BASE_REPOSITORY"
-    HEAD_REPO="${extra_repo}_HEAD_REPOSITORY"
-    HEAD_REV="${extra_repo}_HEAD_REV"
-    HEAD_REF="${extra_repo}_HEAD_REF"
-    DEST_DIR="${extra_repo}_DEST_DIR"
-
-    tc-vcs checkout ${!DEST_DIR} ${!BASE_REPO} ${!HEAD_REPO} ${!HEAD_REV} ${!HEAD_REF}
-done
-
-export GECKO_DIR=$WORKSPACE/build/src
-tc-vcs checkout $GECKO_DIR $GECKO_BASE_REPOSITORY $GECKO_HEAD_REPOSITORY $GECKO_HEAD_REV $GECKO_HEAD_REF