Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit 34be9ed

Browse files
committed
Merge pull request #48 from rillian/checksum
Verify checksums after downloading source.
2 parents 441bcbb + 07e7aaf commit 34be9ed

11 files changed

+99
-41
lines changed

slaves/dist/Dockerfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ RUN chown rustbuild:rustbuild /home/rustbuild
2929
# After we're done building we erase the binutils/gcc installs from CentOS to
3030
# ensure that we always use the ones that we just built.
3131
COPY dist/build_gcc.sh /build/
32-
RUN sh build_gcc.sh && rm -rf /build
32+
RUN /bin/bash build_gcc.sh && rm -rf /build
3333

3434
# We need a build of openssl which supports SNI to download artifacts from
3535
# static.rust-lang.org. This'll be used to link into libcurl below (and used
3636
# later as well), so build a copy of OpenSSL with dynamic libraries into our
3737
# generic root.
3838
COPY dist/build_openssl.sh /build/
39-
RUN sh build_openssl.sh && rm -rf /build
39+
RUN /bin/bash build_openssl.sh && rm -rf /build
4040

4141
# The `curl` binary on CentOS doesn't support SNI which is needed for fetching
4242
# some https urls we have, so install a new version of libcurl + curl which is
@@ -45,39 +45,39 @@ RUN sh build_openssl.sh && rm -rf /build
4545
# Note that we also disable a bunch of optional features of curl that we don't
4646
# really need.
4747
COPY dist/build_curl.sh /build/
48-
RUN sh build_curl.sh
48+
RUN /bin/bash build_curl.sh
4949

5050
# binutils < 2.22 has a bug where the 32-bit executables it generates
5151
# immediately segfault in Rust, so we need to install our own binutils.
5252
#
5353
# See https://github.com/rust-lang/rust/issues/20440 for more info
5454
COPY dist/build_binutils.sh /build/
55-
RUN sh build_binutils.sh && rm -rf /build
55+
RUN /bin/bash build_binutils.sh && rm -rf /build
5656

5757
# libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
5858
# only has 2.6.4, so build our own
5959
COPY dist/build_cmake.sh /build/
60-
RUN sh build_cmake.sh && rm -rf /build
60+
RUN /bin/bash build_cmake.sh && rm -rf /build
6161

6262
# tar on CentOS is too old as it doesn't understand the --exclude-vcs option
6363
# that the Rust build system passes it, so install a new version.
6464
COPY dist/build_tar.sh /build/
65-
RUN sh build_tar.sh && rm -rf /build
65+
RUN /bin/bash build_tar.sh && rm -rf /build
6666

6767
# CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
6868
COPY dist/build_python.sh /build/
69-
RUN sh build_python.sh && rm -rf /build
69+
RUN /bin/bash build_python.sh && rm -rf /build
7070

7171
# The Rust test suite requires a relatively new version of gdb, much newer than
7272
# CentOS has to offer by default, and we want it to use the newly installed
7373
# python so it's ordered here.
7474
COPY dist/build_gdb.sh /build/
75-
RUN sh build_gdb.sh && rm -rf /build
75+
RUN /bin/bash build_gdb.sh && rm -rf /build
7676

7777
# Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
7878
# cloning, so download and build it here.
7979
COPY dist/build_git.sh /build/
80-
RUN sh build_git.sh && rm -rf /build
80+
RUN /bin/bash build_git.sh && rm -rf /build
8181

8282
# Install buildbot and prep it to run
8383
RUN curl https://bootstrap.pypa.io/ez_setup.py | python

slaves/dist/build_binutils.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5-
curl https://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2 | tar xjf -
5+
VERSION=2.25.1
6+
SHA256=b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22
7+
8+
curl https://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.bz2 | \
9+
tee >(sha256sum > binutils-$VERSION.tar.bz2.sha256) | tar xjf -
10+
test $SHA256 = $(cut -d ' ' -f 1 binutils-$VERSION.tar.bz2.sha256) || exit 1
11+
612
mkdir binutils-build
713
cd binutils-build
8-
../binutils-2.25.1/configure --prefix=/rustroot
14+
../binutils-$VERSION/configure --prefix=/rustroot
915
make -j10
1016
make install
1117
yum erase -y binutils

slaves/dist/build_cmake.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5-
curl https://cmake.org/files/v3.3/cmake-3.3.2.tar.gz | tar xzf -
5+
VERSION=3.3.2
6+
SHA256=e75a178d6ebf182b048ebfe6e0657c49f0dc109779170bad7ffcb17463f2fc22
7+
8+
curl https://cmake.org/files/v${VERSION%\.*}/cmake-$VERSION.tar.gz | \
9+
tee >(sha256sum > cmake-$VERSION.tar.gz.sha256) | tar xzf -
10+
test $SHA256 = $(cut -d ' ' -f 1 cmake-$VERSION.tar.gz.sha256) || exit 1
11+
612
mkdir cmake-build
713
cd cmake-build
8-
../cmake-3.3.2/configure --prefix=/rustroot
14+
../cmake-$VERSION/configure --prefix=/rustroot
915
make -j10
1016
make install

slaves/dist/build_curl.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5-
curl http://curl.haxx.se/download/curl-7.44.0.tar.bz2 | tar xjf -
5+
VERSION=7.44.0
6+
SHA256=1e2541bae6582bb697c0fbae49e1d3e6fad5d05d5aa80dbd6f072e0a44341814
7+
8+
curl http://curl.haxx.se/download/curl-$VERSION.tar.bz2 | \
9+
tee >(sha256sum > curl-$VERSION.tar.bz2.sha256) | tar xjf -
10+
test $SHA256 = $(cut -d ' ' -f 1 curl-$VERSION.tar.bz2.sha256) || exit 1
11+
612
mkdir curl-build
713
cd curl-build
8-
../curl-7.44.0/configure --prefix=/rustroot --with-ssl=/rustroot \
14+
../curl-$VERSION/configure --prefix=/rustroot --with-ssl=/rustroot \
915
--disable-sspi --disable-gopher --disable-smtp --disable-smb \
1016
--disable-imap --disable-pop3 --disable-tftp --disable-telnet \
1117
--disable-manual --disable-dict --disable-rtsp --disable-ldaps \

slaves/dist/build_gcc.sh

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5+
VERSION=4.7.4
6+
SHA256=92e61c6dc3a0a449e62d72a38185fda550168a86702dea07125ebd3ec3996282
7+
58
yum install -y wget
6-
curl https://ftp.gnu.org/gnu/gcc/gcc-4.7.4/gcc-4.7.4.tar.bz2 | tar xjf -
7-
cd gcc-4.7.4
9+
curl https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.bz2 | \
10+
tee >(sha256sum > gcc-$VERSION.tar.bz2.sha256) | tar xjf -
11+
test $SHA256 = $(cut -d ' ' -f 1 gcc-$VERSION.tar.bz2.sha256) || exit 1
12+
13+
cd gcc-$VERSION
814
./contrib/download_prerequisites
9-
mkdir ../gcc-4.7.4-build
10-
cd ../gcc-4.7.4-build
11-
../gcc-4.7.4/configure --prefix=/rustroot --enable-languages=c,c++
15+
mkdir ../gcc-$VERSION-build
16+
cd ../gcc-$VERSION-build
17+
../gcc-$VERSION/configure --prefix=/rustroot --enable-languages=c,c++
1218
make -j10
1319
make install
1420
ln -nsf gcc /rustroot/bin/cc

slaves/dist/build_gdb.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5+
VERSION=7.9.1
6+
SHA256=4994ad986726ac4128a6f1bd8020cd672e9a92aa76b80736563ef992992764ef
7+
58
yum install -y texinfo ncurses-devel
6-
curl https://ftp.gnu.org/gnu/gdb/gdb-7.9.1.tar.gz | tar xzf -
9+
curl https://ftp.gnu.org/gnu/gdb/gdb-$VERSION.tar.gz | \
10+
tee >(sha256sum > gdb-$VERSION.tar.gz.sha256) | tar xzf -
11+
test $SHA256 = $(cut -d ' ' -f 1 gdb-$VERSION.tar.gz.sha256) || exit 1
12+
713
mkdir gdb-build
814
cd gdb-build
9-
../gdb-7.9.1/configure --prefix=/rustroot
15+
../gdb-$VERSION/configure --prefix=/rustroot
1016
make -j10
1117
make install
1218
yum erase -y texinfo ncurses-devel

slaves/dist/build_git.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5+
VERSION=2.5.3
6+
SHA256=ebf3fb0f3f286d5f193efeca88e34c40a3cb53c985a1f53de0dbf08c3e5af979
7+
58
yum install -y gettext autoconf
6-
curl https://www.kernel.org/pub/software/scm/git/git-2.5.3.tar.gz | tar xzf -
7-
cd git-2.5.3
9+
curl https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.gz | \
10+
tee >(sha256sum > git-$VERSION.tar.gz.sha256) | tar xzf -
11+
test $SHA256 = $(cut -d ' ' -f 1 git-$VERSION.tar.gz.sha256) || exit 1
12+
13+
cd git-$VERSION
814
make configure
915
./configure --prefix=/rustroot
1016
make -j10

slaves/dist/build_openssl.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

55
VERSION=1.0.2d
6+
SHA256=671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8
67

78
yum install -y setarch
8-
curl http://openssl.org/source/openssl-$VERSION.tar.gz | tar xzf -
9+
curl http://openssl.org/source/openssl-$VERSION.tar.gz | \
10+
tee >(sha256sum > openssl-$VERSION.tar.gz.sha256) | tar xzf -
11+
test $SHA256 = $(cut -d ' ' -f 1 openssl-$VERSION.tar.gz.sha256) || exit 1
12+
913
cp -r openssl-$VERSION openssl-static-64
1014
cp -r openssl-$VERSION openssl-static-32
1115
cd openssl-$VERSION

slaves/dist/build_pkgconfig.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5-
curl http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.tar.gz | tar xzf -
5+
VERSION=0.29
6+
SHA256=c8507705d2a10c67f385d66ca2aae31e81770cc0734b4191eb8c489e864a006b
7+
8+
curl http://pkgconfig.freedesktop.org/releases/pkg-config-$VERSION.tar.gz | \
9+
tee >(sha256sum > pkg-config-$VERSION.tar.gz.sha256) | tar xzf -
10+
test $SHA256 = $(cut -d ' ' -f 1 pkg-config-$VERSION.tar.gz.sha256) || exit 1
11+
612
mkdir pkg-config-build
713
cd pkg-config-build
8-
../pkg-config-0.29/configure --prefix=/rustroot --with-internal-glib
14+
../pkg-config-$VERSION/configure --prefix=/rustroot --with-internal-glib
915
make -j10
1016
make install

slaves/dist/build_python.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5+
VERSION=2.7.10
6+
SHA256=eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a
7+
58
yum install -y bzip2-devel
6-
curl https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz | tar xzf -
9+
curl https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz | \
10+
tee >(sha256sum > Python-$VERSION.tgz.sha256) | tar xzf -
11+
test $SHA256 = $(cut -d ' ' -f 1 Python-$VERSION.tgz.sha256) || exit 1
12+
713
mkdir python-build
814
cd python-build
915

1016
# Gotta do some hackery to tell python about our custom OpenSSL build, but other
1117
# than that fairly normal.
1218
CFLAGS='-I /rustroot/include' LDFLAGS='-L /rustroot/lib -L /rustroot/lib64' \
13-
../Python-2.7.10/configure --prefix=/rustroot
19+
../Python-$VERSION/configure --prefix=/rustroot
1420
make -j10
1521
make install
1622
yum erase -y bzip2-devel

slaves/dist/build_tar.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -ex
44

5-
curl https://ftp.gnu.org/gnu/tar/tar-1.28.tar.bz2 | tar xjf -
5+
VERSION=1.28
6+
SHA256=60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562
7+
8+
curl https://ftp.gnu.org/gnu/tar/tar-$VERSION.tar.bz2 | \
9+
tee >(sha256sum > tar-$VERSION.tar.bz2.sha256) | tar xjf -
10+
test $SHA256 = $(cut -d ' ' -f 1 tar-$VERSION.tar.bz2.sha256) || exit 1
11+
612
mkdir tar-build
713
cd tar-build
814

@@ -16,7 +22,7 @@ cd tar-build
1622
# requires us to do that if we're running as root (which we are). Trust me
1723
# though, "I got this".
1824
CFLAGS=-D_FORTIFY_SOURCE=0 FORCE_UNSAFE_CONFIGURE=1 \
19-
../tar-1.28/configure --prefix=/rustroot
25+
../tar-$VERSION/configure --prefix=/rustroot
2026

2127
make -j10
2228
make install

0 commit comments

Comments
 (0)