Bug 1247168 - Install Mercurial 3.8.4 in lint image; r?dustin draft
authorGregory Szorc <gps@mozilla.com>
Tue, 19 Jul 2016 14:43:25 -0700
changeset 390188 2f28f734d3e92fd5ee41273bebce339e587542f0
parent 390187 140f80e06e26231c478803381029aa06c351077a
child 390189 7fb55f326e3abd66b15be35836c59e6d10bcce08
push id23614
push userbmo:gps@mozilla.com
push dateWed, 20 Jul 2016 19:22:19 +0000
reviewersdustin
bugs1247168
milestone50.0a1
Bug 1247168 - Install Mercurial 3.8.4 in lint image; r?dustin Like we do for the decision image, we install Mercurial 3.8.4 from deb files hosted on tooltool. This provides more control and determinism than installing via apt. As part of this change, Mercurial is upgraded from whatever was hosted in apt to 3.8.4. Since the deb packages don't provide a global hgrc, we create one ourselves. This is effectively copied from the decision image. MozReview-Commit-ID: K7gVm2Geihj
testing/docker/lint/system-setup.sh
--- a/testing/docker/lint/system-setup.sh
+++ b/testing/docker/lint/system-setup.sh
@@ -6,17 +6,16 @@ set -ve
 
 test `whoami` == 'root'
 
 mkdir -p /setup
 cd /setup
 
 apt_packages=()
 apt_packages+=('curl')
-apt_packages+=('mercurial')
 apt_packages+=('python')
 apt_packages+=('python-pip')
 apt_packages+=('sudo')
 apt_packages+=('xz-utils')
 
 apt-get update
 apt-get install -y ${apt_packages[@]}
 
@@ -26,16 +25,51 @@ locale-gen en_US.UTF-8
 dpkg-reconfigure locales
 
 tooltool_fetch() {
     cat >manifest.tt
     /build/tooltool.py fetch
     rm manifest.tt
 }
 
+# Install Mercurial
+
+cd $BUILD
+tooltool_fetch <<EOF
+[
+{
+    "size": 44878,
+    "digest": "7b1fc1217e0dcaeea852b0af2dc559b1aafb704fbee7e29cbec75af57bacb84910a7ec92b5c33f04ee98f23b3a57f1fa451173fe7c8a96f58faefe319dc7dde1",
+    "algorithm": "sha512",
+    "filename": "mercurial_3.8.4_amd64.deb"
+},
+{
+    "size": 1818422,
+    "digest": "b476e2612e7495a1c7c5adfd84511aa7479e26cc9070289513ec705fbfc4c61806ce2dbcceca0e63f2e80669be416f3467a3cebb522dcb8a6aeb62cdd3df82f2",
+    "algorithm": "sha512",
+    "filename": "mercurial-common_3.8.4_all.deb"
+}
+]
+EOF
+
+dpkg -i mercurial-common_3.8.4_all.deb mercurial_3.8.4_amd64.deb
+
+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.
+[progress]
+delay = 1.0
+refresh = 1.0
+
+[web]
+cacerts = /etc/ssl/certs/ca-certificates.crt
+EOF
+
+chmod 644 /etc/mercurial/hgrc
 
 ###
 # ESLint Setup
 ###
 
 # install node
 
 # For future reference things like this don't need to be uploaded to tooltool, as long