gecko-dev/taskcluster/docker/recipes/install-mercurial.sh
Sebastian Hengst f3e89595f1 Backed out changeset fe7303de56be (bug 1302763) for failing webdriver tests on Linux x64 debug (geckodriver.manifest fetch failed). r=backout
--HG--
rename : taskcluster/docker/README.md => testing/docker/README.md
rename : taskcluster/docker/REGISTRY => testing/docker/REGISTRY
rename : taskcluster/docker/android-gradle-build/Dockerfile => testing/docker/android-gradle-build/Dockerfile
rename : taskcluster/docker/android-gradle-build/README.md => testing/docker/android-gradle-build/README.md
rename : taskcluster/docker/android-gradle-build/REGISTRY => testing/docker/android-gradle-build/REGISTRY
rename : taskcluster/docker/android-gradle-build/VERSION => testing/docker/android-gradle-build/VERSION
rename : taskcluster/docker/android-gradle-build/bin/after.sh => testing/docker/android-gradle-build/bin/after.sh
rename : taskcluster/docker/android-gradle-build/bin/before.sh => testing/docker/android-gradle-build/bin/before.sh
rename : taskcluster/docker/android-gradle-build/bin/build.sh => testing/docker/android-gradle-build/bin/build.sh
rename : taskcluster/docker/android-gradle-build/bin/checkout-script.sh => testing/docker/android-gradle-build/bin/checkout-script.sh
rename : taskcluster/docker/android-gradle-build/bin/checkout-sources.sh => testing/docker/android-gradle-build/bin/checkout-sources.sh
rename : taskcluster/docker/android-gradle-build/buildprops.json => testing/docker/android-gradle-build/buildprops.json
rename : taskcluster/docker/android-gradle-build/dot-config/pip/pip.conf => testing/docker/android-gradle-build/dot-config/pip/pip.conf
rename : taskcluster/docker/android-gradle-build/oauth.txt => testing/docker/android-gradle-build/oauth.txt
rename : taskcluster/docker/base-build/Dockerfile => testing/docker/base-build/Dockerfile
rename : taskcluster/docker/base-build/VERSION => testing/docker/base-build/VERSION
rename : taskcluster/docker/base-build/system-setup.sh => testing/docker/base-build/system-setup.sh
rename : taskcluster/docker/base-test/Dockerfile => testing/docker/base-test/Dockerfile
rename : taskcluster/docker/base-test/REGISTRY => testing/docker/base-test/REGISTRY
rename : taskcluster/docker/base-test/VERSION => testing/docker/base-test/VERSION
rename : taskcluster/docker/base-test/sources.list => testing/docker/base-test/sources.list
rename : taskcluster/docker/centos6-build-upd/Dockerfile => testing/docker/centos6-build-upd/Dockerfile
rename : taskcluster/docker/centos6-build-upd/REGISTRY => testing/docker/centos6-build-upd/REGISTRY
rename : taskcluster/docker/centos6-build-upd/VERSION => testing/docker/centos6-build-upd/VERSION
rename : taskcluster/docker/centos6-build/Dockerfile => testing/docker/centos6-build/Dockerfile
rename : taskcluster/docker/centos6-build/REGISTRY => testing/docker/centos6-build/REGISTRY
rename : taskcluster/docker/centos6-build/VERSION => testing/docker/centos6-build/VERSION
rename : taskcluster/docker/centos6-build/hgrc => testing/docker/centos6-build/hgrc
rename : taskcluster/docker/centos6-build/system-setup.sh => testing/docker/centos6-build/system-setup.sh
rename : taskcluster/docker/decision/Dockerfile => testing/docker/decision/Dockerfile
rename : taskcluster/docker/decision/README.md => testing/docker/decision/README.md
rename : taskcluster/docker/decision/REGISTRY => testing/docker/decision/REGISTRY
rename : taskcluster/docker/decision/VERSION => testing/docker/decision/VERSION
rename : taskcluster/docker/decision/system-setup.sh => testing/docker/decision/system-setup.sh
rename : taskcluster/docker/desktop-build/Dockerfile => testing/docker/desktop-build/Dockerfile
rename : taskcluster/docker/desktop-build/bin/build.sh => testing/docker/desktop-build/bin/build.sh
rename : taskcluster/docker/desktop-build/bin/checkout-script.sh => testing/docker/desktop-build/bin/checkout-script.sh
rename : taskcluster/docker/desktop-build/bin/checkout-sources.sh => testing/docker/desktop-build/bin/checkout-sources.sh
rename : taskcluster/docker/desktop-build/buildprops.json => testing/docker/desktop-build/buildprops.json
rename : taskcluster/docker/desktop-build/dot-config/pip/pip.conf => testing/docker/desktop-build/dot-config/pip/pip.conf
rename : taskcluster/docker/desktop-build/oauth.txt => testing/docker/desktop-build/oauth.txt
rename : taskcluster/docker/desktop-test/Dockerfile => testing/docker/desktop-test/Dockerfile
rename : taskcluster/docker/desktop-test/apport => testing/docker/desktop-test/apport
rename : taskcluster/docker/desktop-test/buildprops.json => testing/docker/desktop-test/buildprops.json
rename : taskcluster/docker/desktop-test/deja-dup-monitor.desktop => testing/docker/desktop-test/deja-dup-monitor.desktop
rename : taskcluster/docker/desktop-test/dot-files/config/pip/pip.conf => testing/docker/desktop-test/dot-files/config/pip/pip.conf
rename : taskcluster/docker/desktop-test/dot-files/config/user-dirs.dirs => testing/docker/desktop-test/dot-files/config/user-dirs.dirs
rename : taskcluster/docker/desktop-test/dot-files/config/user-dirs.locale => testing/docker/desktop-test/dot-files/config/user-dirs.locale
rename : taskcluster/docker/desktop-test/dot-files/pulse/default.pa => testing/docker/desktop-test/dot-files/pulse/default.pa
rename : taskcluster/docker/desktop-test/fonts.conf => testing/docker/desktop-test/fonts.conf
rename : taskcluster/docker/desktop-test/jockey-gtk.desktop => testing/docker/desktop-test/jockey-gtk.desktop
rename : taskcluster/docker/desktop-test/motd => testing/docker/desktop-test/motd
rename : taskcluster/docker/desktop-test/release-upgrades => testing/docker/desktop-test/release-upgrades
rename : taskcluster/docker/desktop-test/taskcluster-interactive-shell => testing/docker/desktop-test/taskcluster-interactive-shell
rename : taskcluster/docker/desktop-test/tc-vcs-config.yml => testing/docker/desktop-test/tc-vcs-config.yml
rename : taskcluster/docker/desktop-test/tester.env => testing/docker/desktop-test/tester.env
rename : taskcluster/docker/desktop1604-test/Dockerfile => testing/docker/desktop1604-test/Dockerfile
rename : taskcluster/docker/desktop1604-test/apport => testing/docker/desktop1604-test/apport
rename : taskcluster/docker/desktop1604-test/buildprops.json => testing/docker/desktop1604-test/buildprops.json
rename : taskcluster/docker/desktop1604-test/deja-dup-monitor.desktop => testing/docker/desktop1604-test/deja-dup-monitor.desktop
rename : taskcluster/docker/desktop1604-test/dot-files/config/pip/pip.conf => testing/docker/desktop1604-test/dot-files/config/pip/pip.conf
rename : taskcluster/docker/desktop1604-test/dot-files/config/user-dirs.dirs => testing/docker/desktop1604-test/dot-files/config/user-dirs.dirs
rename : taskcluster/docker/desktop1604-test/dot-files/config/user-dirs.locale => testing/docker/desktop1604-test/dot-files/config/user-dirs.locale
rename : taskcluster/docker/desktop1604-test/dot-files/pulse/default.pa => testing/docker/desktop1604-test/dot-files/pulse/default.pa
rename : taskcluster/docker/desktop1604-test/fonts.conf => testing/docker/desktop1604-test/fonts.conf
rename : taskcluster/docker/desktop1604-test/jockey-gtk.desktop => testing/docker/desktop1604-test/jockey-gtk.desktop
rename : taskcluster/docker/desktop1604-test/motd => testing/docker/desktop1604-test/motd
rename : taskcluster/docker/desktop1604-test/release-upgrades => testing/docker/desktop1604-test/release-upgrades
rename : taskcluster/docker/desktop1604-test/taskcluster-interactive-shell => testing/docker/desktop1604-test/taskcluster-interactive-shell
rename : taskcluster/docker/desktop1604-test/tc-vcs-config.yml => testing/docker/desktop1604-test/tc-vcs-config.yml
rename : taskcluster/docker/desktop1604-test/tester.env => testing/docker/desktop1604-test/tester.env
rename : taskcluster/docker/image_builder/Dockerfile => testing/docker/image_builder/Dockerfile
rename : taskcluster/docker/image_builder/REGISTRY => testing/docker/image_builder/REGISTRY
rename : taskcluster/docker/image_builder/VERSION => testing/docker/image_builder/VERSION
rename : taskcluster/docker/image_builder/build-image.sh => testing/docker/image_builder/build-image.sh
rename : taskcluster/docker/image_builder/setup.sh => testing/docker/image_builder/setup.sh
rename : taskcluster/docker/lint/Dockerfile => testing/docker/lint/Dockerfile
rename : taskcluster/docker/lint/system-setup.sh => testing/docker/lint/system-setup.sh
rename : taskcluster/docker/recipes/centos6-build-system-setup.sh => testing/docker/recipes/centos6-build-system-setup.sh
rename : taskcluster/docker/recipes/common.sh => testing/docker/recipes/common.sh
rename : taskcluster/docker/recipes/install-mercurial.sh => testing/docker/recipes/install-mercurial.sh
rename : taskcluster/docker/recipes/run-task => testing/docker/recipes/run-task
rename : taskcluster/docker/recipes/tooltool.py => testing/docker/recipes/tooltool.py
rename : taskcluster/docker/recipes/ubuntu1204-test-system-setup.sh => testing/docker/recipes/ubuntu1204-test-system-setup.sh
rename : taskcluster/docker/recipes/ubuntu1604-test-system-setup.sh => testing/docker/recipes/ubuntu1604-test-system-setup.sh
rename : taskcluster/docker/recipes/xvfb.sh => testing/docker/recipes/xvfb.sh
rename : taskcluster/docker/rust-build/Dockerfile => testing/docker/rust-build/Dockerfile
rename : taskcluster/docker/rust-build/README.md => testing/docker/rust-build/README.md
rename : taskcluster/docker/rust-build/REGISTRY => testing/docker/rust-build/REGISTRY
rename : taskcluster/docker/rust-build/VERSION => testing/docker/rust-build/VERSION
rename : taskcluster/docker/rust-build/build_cargo.sh => testing/docker/rust-build/build_cargo.sh
rename : taskcluster/docker/rust-build/build_rust.sh => testing/docker/rust-build/build_rust.sh
rename : taskcluster/docker/rust-build/build_rust_mac.sh => testing/docker/rust-build/build_rust_mac.sh
rename : taskcluster/docker/rust-build/fetch_cargo.sh => testing/docker/rust-build/fetch_cargo.sh
rename : taskcluster/docker/rust-build/fetch_rust.sh => testing/docker/rust-build/fetch_rust.sh
rename : taskcluster/docker/rust-build/package_rust.sh => testing/docker/rust-build/package_rust.sh
rename : taskcluster/docker/rust-build/repack_rust.py => testing/docker/rust-build/repack_rust.py
rename : taskcluster/docker/rust-build/splat_rust.py => testing/docker/rust-build/splat_rust.py
rename : taskcluster/docker/rust-build/task.json => testing/docker/rust-build/task.json
rename : taskcluster/docker/rust-build/tcbuild.py => testing/docker/rust-build/tcbuild.py
rename : taskcluster/docker/rust-build/upload_rust.sh => testing/docker/rust-build/upload_rust.sh
rename : taskcluster/docker/tester/Dockerfile => testing/docker/tester/Dockerfile
rename : taskcluster/docker/tester/REGISTRY => testing/docker/tester/REGISTRY
rename : taskcluster/docker/tester/VERSION => testing/docker/tester/VERSION
rename : taskcluster/docker/tester/bin/test.sh => testing/docker/tester/bin/test.sh
rename : taskcluster/docker/tester/dot-config/pip/pip.conf => testing/docker/tester/dot-config/pip/pip.conf
rename : taskcluster/docker/tester/dot-config/user-dirs.dirs => testing/docker/tester/dot-config/user-dirs.dirs
rename : taskcluster/docker/tester/dot-config/user-dirs.locale => testing/docker/tester/dot-config/user-dirs.locale
rename : taskcluster/docker/tester/dot-pulse/default.pa => testing/docker/tester/dot-pulse/default.pa
rename : taskcluster/docker/tester/tc-vcs-config.yml => testing/docker/tester/tc-vcs-config.yml
rename : taskcluster/docker/tester/tester.env => testing/docker/tester/tester.env
rename : taskcluster/docker/upload-symbols/Dockerfile => testing/docker/upload-symbols/Dockerfile
rename : taskcluster/docker/upload-symbols/README.md => testing/docker/upload-symbols/README.md
rename : taskcluster/docker/upload-symbols/bin/checkout-script.sh => testing/docker/upload-symbols/bin/checkout-script.sh
rename : taskcluster/docker/upload-symbols/bin/upload.sh => testing/docker/upload-symbols/bin/upload.sh
rename : taskcluster/docker/upload-symbols/test_exports.sh => testing/docker/upload-symbols/test_exports.sh
2016-12-19 21:15:07 +01:00

155 lines
4.4 KiB
Bash

#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This script installs and configures Mercurial.
set -e
# Detect OS.
if [ -f /etc/lsb-release ]; then
. /etc/lsb-release
if [ "${DISTRIB_ID}" = "Ubuntu" -a "${DISTRIB_RELEASE}" = "16.04" ]; then
HG_DEB=1
HG_DIGEST=09c7c80324158b755c23855d47caeb40b953218b1c89c7f5f21bbdea9de1d13a7ed5a7e647022ff626fb9674655baf05f6965361ccef3fa82b94d1fa8a684187
HG_SIZE=44956
HG_FILENAME=mercurial_3.9.1_amd64.deb
HG_COMMON_DIGEST=ef281d1368a8cf2363bc08c050aff3825028ba4d47d491e50e10f4c78574d5e87231a0096c7d9cb3439dd4b5172057a050e02946b4cf8b2bdf239ffd50a85d06
HG_COMMON_SIZE=1847796
HG_COMMON_FILENAME=mercurial-common_3.9.1_all.deb
elif [ "${DISTRIB_ID}" = "Ubuntu" -a "${DISTRIB_RELEASE}" = "12.04" ]; then
HG_DEB=1
HG_DIGEST=f816a6ca91129c0723527d98a2978c253a3f941f4358f9f8abd6f3ab8e8601ed3efc347828aac8f0d0762f819f9b777299e31037c39eb0c5af05aa76ac25c3bf
HG_SIZE=55144
HG_FILENAME=mercurial_3.9.1_amd64.deb
HG_COMMON_DIGEST=ac2b2fab9f19438c77147dca8df5020d10b129052e6c5f77ebe9a4c21eb0cedb1acfe25b146577bf5e9b66f3d6cfca2474f7575adfba1b3849b66bf5bc321015
HG_COMMON_SIZE=2993590
HG_COMMON_FILENAME=mercurial-common_3.9.4_all.deb
fi
CERT_PATH=/etc/ssl/certs/ca-certificates.crt
elif [ -f /etc/centos-release ]; then
CENTOS_VERSION=`rpm -q --queryformat '%{VERSION}' centos-release`
if [ "${CENTOS_VERSION}" = "6" ]; then
if [ -f /usr/bin/pip2.7 ]; then
PIP_PATH=/usr/bin/pip2.7
else
# The following RPM is "linked" against Python 2.6, which doesn't
# support TLS 1.2. Given the security implications of an insecure
# version control tool, we choose to prefer a Mercurial built using
# Python 2.7 that supports TLS 1.2. Before you uncomment the code
# below, think long and hard about the implications of limiting
# Mercurial to TLS 1.0.
#HG_RPM=1
#HG_DIGEST=68f020e5584d58855c46b5e36e7cd7d480a69effcdc927dcb1f97cb9b638d23e058ed113dbfd817a047ba0550d287cedcbec0cee67a9ef2519657339fe2f9426
#HG_SIZE=4175628
#HG_FILENAME=mercurial-3.9.1-1.x86_64.rpm
echo "We currently require Python 2.7 and /usr/bin/pip2.7 to run Mercurial"
exit 1
fi
else
echo "Unsupported CentOS version: ${CENTOS_VERSION}"
exit 1
fi
CERT_PATH=/etc/ssl/certs/ca-bundle.crt
fi
if [ -n "${HG_DEB}" ]; then
tooltool_fetch <<EOF
[
{
"size": ${HG_SIZE},
"digest": "${HG_DIGEST}",
"algorithm": "sha512",
"filename": "${HG_FILENAME}"
},
{
"size": ${HG_COMMON_SIZE},
"digest": "${HG_COMMON_DIGEST}",
"algorithm": "sha512",
"filename": "${HG_COMMON_FILENAME}"
}
]
EOF
dpkg -i ${HG_COMMON_FILENAME} ${HG_FILENAME}
elif [ -n "${HG_RPM}" ]; then
tooltool_fetch <<EOF
[
{
"size": ${HG_SIZE},
"digest": "${HG_DIGEST}",
"algorithm": "sha512",
"filename": "${HG_FILENAME}"
}
]
EOF
rpm -i ${HG_FILENAME}
elif [ -n "${PIP_PATH}" ]; then
tooltool_fetch <<EOF
[
{
"size": 4797967,
"visibility": "public",
"digest": "d96e45cafd36be692d6ce5259e18140641c24f73d4731ff767df0f39af425b0630c687436fc0f53d5882495ceacacaadd5e19f8f7c701b4b94c48631123b4666",
"algorithm": "sha512",
"filename": "mercurial-3.9.1.tar.gz"
}
]
EOF
${PIP_PATH} install mercurial-3.9.1.tar.gz
else
echo "Do not know how to install Mercurial on this OS"
exit 1
fi
chmod 644 /usr/local/mercurial/robustcheckout.py
mkdir -p /etc/mercurial
cat >/etc/mercurial/hgrc <<EOF
# By default the progress bar starts after 3s and updates every 0.1s. We
# change this so it shows and updates every 1.0s.
# We also tell progress to assume a TTY is present so updates are printed
# even if there is no known TTY.
[progress]
delay = 1.0
refresh = 1.0
assume-tty = true
[web]
cacerts = ${CERT_PATH}
[extensions]
robustcheckout = /usr/local/mercurial/robustcheckout.py
# Settings to make 1-click loaners more useful.
[extensions]
color =
histedit =
pager =
rebase =
[diff]
git = 1
showfunc = 1
[pager]
pager = LESS=FRSXQ less
attend-help = true
attend-incoming = true
attend-log = true
attend-outgoing = true
attend-status = true
EOF
chmod 644 /etc/mercurial/hgrc