Skip to content

Commit 49a15ac

Browse files
authored
Merge pull request #217 from fbudin69500/UpdateGit
Update git
2 parents 53990df + 602fb22 commit 49a15ac

17 files changed

Lines changed: 341 additions & 155 deletions

‎browser-asmjs/Dockerfile.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM trzeci/emscripten-slim:sdk-tag-1.37.29-64bit
1+
FROM trzeci/emscripten-slim:sdk-tag-1.37.36-64bit
22
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
33

44
# Revert back to "/bin/sh" as default shell

‎common.debian‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
1313
ca-certificates \
1414
curl \
1515
file \
16-
git \
16+
gettext \
1717
gzip \
1818
zip \
1919
make \
@@ -31,15 +31,16 @@ RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
3131
pax \
3232
vim \
3333
wget \
34-
xz-utils && \
34+
xz-utils \
35+
zlib1g-dev && \
3536
apt-get clean --yes
3637

3738
ENV GOSU_VERSION 1.10
3839
RUN set -x \
39-
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
40+
&& apt-get update && rm -rf /var/lib/apt/lists/* \
4041
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
41-
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
42-
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
42+
&& curl -# -o /usr/local/bin/gosu -LO "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
43+
&& curl -# -o /usr/local/bin/gosu.asc -LO "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
4344
&& export GNUPGHOME="$(mktemp -d)" \
4445
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
4546
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \

‎common.docker‎

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,38 @@
1-
WORKDIR /usr/share
2-
RUN git clone "https://github.com/nojhan/liquidprompt.git" && \
3-
cd liquidprompt && \
4-
git checkout v_1.11
5-
COPY imagefiles/.bashrc /root/
6-
71
WORKDIR /usr/src
82

9-
COPY imagefiles/install-openssl.sh imagefiles/install-cmake.sh /dockcross/
3+
ARG GIT_VERSION=2.16.2
4+
ARG CMAKE_VERSION=3.11.0
5+
6+
COPY imagefiles/build-and-install-git.sh \
7+
imagefiles/utils.sh \
8+
imagefiles/build-and-install-openssl.sh \
9+
imagefiles/build-and-install-openssh.sh \
10+
imagefiles/build-and-install-cmake.sh \
11+
imagefiles/install-cmake-binary.sh \
12+
imagefiles/build-and-install-curl.sh \
13+
/dockcross/
14+
1015
RUN \
1116
if [ "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux-x86" ]; then \
12-
/dockcross/install-openssl.sh -32 && \
13-
/dockcross/install-cmake.sh -32 || exit 1; \
17+
/dockcross/build-and-install-openssl.sh -32 && \
18+
/dockcross/build-and-install-openssh.sh && \
19+
/dockcross/build-and-install-curl.sh && \
20+
/dockcross/build-and-install-git.sh && \
21+
/dockcross/build-and-install-cmake.sh -32 || exit 1; \
1422
else \
15-
/dockcross/install-openssl.sh && \
16-
/dockcross/install-cmake.sh || exit 1; \
23+
/dockcross/build-and-install-openssl.sh && \
24+
/dockcross/build-and-install-openssh.sh && \
25+
/dockcross/build-and-install-curl.sh && \
26+
/dockcross/build-and-install-git.sh && \
27+
/dockcross/install-cmake-binary.sh || exit 1; \
1728
fi; \
18-
rm /dockcross/install-openssl.sh /dockcross/install-cmake.sh
29+
rm /dockcross/build-and-install-git.sh \
30+
/dockcross/utils.sh \
31+
/dockcross/build-and-install-openssl.sh \
32+
/dockcross/build-and-install-openssh.sh \
33+
/dockcross/build-and-install-cmake.sh \
34+
/dockcross/install-cmake-binary.sh \
35+
/dockcross/build-and-install-curl.sh
1936

2037
COPY imagefiles/cmake.sh /usr/local/bin/cmake
2138
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
@@ -31,13 +48,19 @@ RUN \
3148
RUN if [ -e /opt/python/cp35-cp35m/bin/python ]; then \
3249
: nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \
3350
else \
34-
wget https://bootstrap.pypa.io/get-pip.py && \
51+
curl -# -LO https://bootstrap.pypa.io/get-pip.py && \
3552
python get-pip.py --ignore-installed && \
3653
rm get-pip.py || exit 1; \
3754
fi
3855

3956
RUN $([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") -m pip install --ignore-installed conan
4057

58+
WORKDIR /usr/share
59+
RUN git clone "https://github.com/nojhan/liquidprompt.git" && \
60+
cd liquidprompt && \
61+
git checkout v_1.11
62+
COPY imagefiles/.bashrc /root/
63+
4164
RUN echo "root:root" | chpasswd
4265
WORKDIR /work
4366
ENTRYPOINT ["/dockcross/entrypoint.sh"]

‎common.manylinux‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
ENV GOSU_VERSION 1.10
22
RUN set -x \
33
&& yum -y install epel-release \
4-
&& yum -y install wget gpg \
4+
&& yum -y install gpg \
5+
&& yum -y install zlib-devel gettext \
56
&& dpkgArch=$(if test $(uname -m) = "x86_64"; then echo amd64; else echo i386; fi) \
6-
&& wget -O /usr/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
7-
&& wget -O /tmp/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
7+
&& curl -o /usr/bin/gosu -LO "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
8+
&& curl -o /tmp/gosu.asc -LO "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
89
&& export GNUPGHOME="$(mktemp -d)" \
910
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
1011
&& gpg --batch --verify /tmp/gosu.asc /usr/bin/gosu \
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,19 @@
11
#!/bin/bash
2-
3-
#
4-
# Configure, build and install CMake
5-
#
6-
# Usage:
7-
#
8-
# install-cmake.sh [-32]
9-
#
10-
# Options:
11-
#
12-
# -32 Build CMake as a 32-bit executable
13-
#
14-
# Notes:
152
#
163
# * build directory is /usr/src/CMake
174
#
185
# * install directory is /usr
196
#
207
# * after installation, archive, source and build directories are removed
218
#
22-
23-
set -e
24-
set -o pipefail
9+
set -ex
2510

2611
WRAPPER=""
27-
CONFIG_FLAG=""
28-
SUFFIX=64
2912

3013
while [ $# -gt 0 ]; do
3114
case "$1" in
3215
-32)
3316
WRAPPER="linux32"
34-
CONFIG_FLAG="-m32"
35-
SUFFIX=32
3617
;;
3718
*)
3819
echo "Usage: Usage: ${0##*/} [-32]"
@@ -42,27 +23,43 @@ while [ $# -gt 0 ]; do
4223
shift
4324
done
4425

45-
cd /usr/src
26+
if ! command -v git &> /dev/null; then
27+
echo >&2 'error: "git" not found!'
28+
exit 1
29+
fi
4630

47-
# Download
48-
CMAKE_REV=v3.10.1
49-
wget --progress=bar:force https://github.com/kitware/cmake/archive/$CMAKE_REV.tar.gz -O CMake.tar.gz
50-
mkdir CMake
51-
tar -xzvf ./CMake.tar.gz --strip-components=1 -C ./CMake
31+
if [[ "${CMAKE_VERSION}" == "" ]]; then
32+
echo >&2 'error: CMAKE_VERSION env. variable must be set to a non-empty value'
33+
exit 1
34+
fi
5235

53-
mkdir /usr/src/CMake-build
36+
cd /usr/src
5437

55-
pushd /usr/src/CMake-build
38+
git clone git://cmake.org/cmake.git CMake
5639

57-
NUM_PROCESSOR=$(grep -c processor /proc/cpuinfo)
40+
(cd CMake && git checkout v$CMAKE_VERSION)
5841

59-
# Configure boostrap
60-
${WRAPPER} /usr/src/CMake/bootstrap \
61-
--parallel=$NUM_PROCESSOR \
62-
--prefix=/usr
42+
mkdir /usr/src/CMake-build
43+
cd /usr/src/CMake-build
6344

64-
# Build and Install
65-
${WRAPPER} make install -j$NUM_PROCESSOR
45+
${WRAPPER} /usr/src/CMake/bootstrap \
46+
--parallel=$(grep -c processor /proc/cpuinfo)
47+
${WRAPPER} make -j$(grep -c processor /proc/cpuinfo)
48+
49+
mkdir /usr/src/CMake-ssl-build
50+
cd /usr/src/CMake-ssl-build
51+
${WRAPPER} /usr/src/CMake-build/bin/cmake \
52+
-DCMAKE_BUILD_TYPE:STRING=Release \
53+
-DBUILD_TESTING:BOOL=ON \
54+
-DCMAKE_INSTALL_PREFIX:PATH=/usr/src/cmake-$CMAKE_VERSION \
55+
-DCMAKE_USE_OPENSSL:BOOL=ON \
56+
-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl \
57+
../CMake
58+
${WRAPPER} make -j$(grep -c processor /proc/cpuinfo) install
59+
60+
cd /usr/src/cmake-$CMAKE_VERSION
61+
rm -rf doc man
62+
find . -type f -exec install -D "{}" "/usr/{}" \;
6663

6764
# Test
6865
ctest -R CMake.FileDownload
@@ -88,8 +85,5 @@ EOF
8885

8986
# Execute test script
9087
cmake -P cmake-test-https-download.cmake
91-
rm cmake-test-https-download.cmake
92-
93-
popd
9488

95-
rm -rf CMake*
89+
rm -rf /usr/src/CMake*
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
MY_DIR=$(dirname "${BASH_SOURCE[0]}")
6+
source $MY_DIR/utils.sh
7+
8+
#
9+
# Function 'do_curl_build' and 'build_curl'
10+
# copied from https://github.com/pypa/manylinux/tree/master/docker/build_scripts
11+
#
12+
13+
CURL_ROOT=curl_7.52.1
14+
CURL_HASH=a8984e8b20880b621f61a62d95ff3c0763a3152093a9f9ce4287cfd614add6ae
15+
16+
# We had to switch to a debian mirror because we can't use TLS until we
17+
# bootstrap it with this curl + openssl
18+
CURL_DOWNLOAD_URL=http://deb.debian.org/debian/pool/main/c/curl
19+
20+
function do_curl_build {
21+
# We do this shared to avoid obnoxious linker issues where git couldn't
22+
# link properly. If anyone wants to make this build statically go for it.
23+
LIBS=-ldl CFLAGS=-Wl,--exclude-libs,ALL ./configure --with-ssl --disable-static > /dev/null
24+
make > /dev/null
25+
make install > /dev/null
26+
}
27+
28+
29+
function build_curl {
30+
local curl_fname=$1
31+
check_var ${curl_fname}
32+
local curl_sha256=$2
33+
check_var ${curl_sha256}
34+
check_var ${CURL_DOWNLOAD_URL}
35+
# Can't use curl here because we don't have it yet...we are building it.
36+
wget -q ${CURL_DOWNLOAD_URL}/${curl_fname}.orig.tar.gz
37+
check_sha256sum ${curl_fname}.orig.tar.gz ${curl_sha256}
38+
tar -zxf ${curl_fname}.orig.tar.gz
39+
(cd curl-* && do_curl_build)
40+
rm -rf curl_*
41+
}
42+
43+
cd /usr/src
44+
build_curl $CURL_ROOT $CURL_HASH
45+
46+
(cat /etc/ld.so.conf.d/usr-local.conf 2> /dev/null | grep -q "^/usr/local/lib$") ||
47+
echo '/usr/local/lib' >> /etc/ld.so.conf.d/usr-local.conf
48+
ldconfig
49+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
if ! command -v curl &> /dev/null; then
6+
echo >&2 'error: "curl" not found!'
7+
exit 1
8+
fi
9+
10+
if ! command -v tar &> /dev/null; then
11+
echo >&2 'error: "tar" not found!'
12+
exit 1
13+
fi
14+
15+
if [[ "${GIT_VERSION}" == "" ]]; then
16+
echo >&2 'error: GIT_VERSION env. variable must be set to a non-empty value'
17+
exit 1
18+
fi
19+
20+
(cat /etc/ld.so.conf.d/usr-local.conf 2> /dev/null | grep -q "^/usr/local/lib$") ||
21+
echo '/usr/local/lib' >> /etc/ld.so.conf.d/usr-local.conf
22+
ldconfig
23+
24+
cd /usr/src
25+
26+
url="https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz"
27+
echo "Downloading $url"
28+
curl -# -LO $url
29+
30+
tar xvzf git-${GIT_VERSION}.tar.gz
31+
rm -f git-${GIT_VERSION}.tar.gz
32+
33+
pushd git-${GIT_VERSION}
34+
./configure --prefix=/usr/local --with-curl
35+
make
36+
make install
37+
popd
38+
39+
ldconfig
40+
41+
rm -rf git-${GIT_VERSION}
42+
43+
# turn the detached message off
44+
git config --global advice.detachedHead false
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
OPENSSH_ROOT=V_7_6_P1
6+
7+
cd /usr/src
8+
curl -LO https://github.com/openssh/openssh-portable/archive/${OPENSSH_ROOT}.tar.gz
9+
tar -xvf ${OPENSSH_ROOT}.tar.gz
10+
rm -f ${OPENSSH_ROOT}.tar.gz
11+
12+
OPENSSH_SRC_DIR=openssh-portable-${OPENSSH_ROOT}
13+
cd ${OPENSSH_SRC_DIR}
14+
15+
autoreconf
16+
17+
./configure --prefix=/usr/local
18+
19+
make -j1 install
20+
21+
cd /usr/src
22+
rm -rf ${OPENSSH_SRC_DIR}

0 commit comments

Comments
 (0)