Skip to content

Commit

Permalink
Merge pull request #58 from emqx/chore-4.4-bump-git-version
Browse files Browse the repository at this point in the history
[4.4] bump git version on el7 to 2.38.1
  • Loading branch information
id authored Dec 7, 2022
2 parents ba221f2 + 3755fc7 commit 43a7d87
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- [debian9 , "linux/amd64,linux/arm64"]
- [el8 , "linux/amd64,linux/arm64"]
- [el7 , "linux/amd64,linux/arm64"]
- [al2 , "linux/amd64,linux/arm64"]
- [amzn2 , "linux/amd64,linux/arm64"]
- [raspbian10 , "linux/arm64"]
- [raspbian9 , "linux/arm64"]
- [alpine3.15.1, "linux/amd64,linux/arm64"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- [debian9 , "linux/amd64,linux/arm64"]
- [el8 , "linux/amd64,linux/arm64"]
- [el7 , "linux/amd64,linux/arm64"]
- [al2 , "linux/amd64,linux/arm64"]
- [amzn2 , "linux/amd64,linux/arm64"]
- [raspbian10 , "linux/arm64"]
- [raspbian9 , "linux/arm64"]
- [alpine3.15.1, "linux/amd64,linux/arm64"]
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- [debian9 , "linux/amd64,linux/arm64"]
- [el8 , "linux/amd64,linux/arm64"]
- [el7 , "linux/amd64,linux/arm64"]
- [al2 , "linux/amd64,linux/arm64"]
- [amzn2 , "linux/amd64,linux/arm64"]
- [raspbian10 , "linux/arm64"]
- [raspbian9 , "linux/arm64"]
- [alpine3.15.1, "linux/amd64,linux/arm64"]
Expand Down
18 changes: 11 additions & 7 deletions al2/Dockerfile → amzn2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,23 @@ RUN yum install -y \

RUN yum groupinstall -y "Development Tools"

# cleanup
RUN yum clean packages && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*

WORKDIR /

COPY get-cmake.sh /get-cmake.sh
RUN /get-cmake.sh build

# make python3 the default as the last step to not break yum
RUN alternatives --install /usr/bin/python python /usr/bin/python2 1 && \
alternatives --install /usr/bin/python python /usr/bin/python3 2
alternatives --install /usr/bin/python python /usr/bin/python3 2 && \
alternatives --set python /usr/bin/python3 && \
alternatives --install /usr/bin/pip pip /usr/bin/pip2 1 && \
alternatives --install /usr/bin/pip pip /usr/bin/pip3 2 && \
alternatives --set pip /usr/bin/pip3 && \
sed 's/python/python2/g' -i /usr/bin/yum

# cleanup
RUN yum clean packages && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*

# Elixir complains if runs without UTF-8
ENV LC_ALL=C.UTF-8
Expand Down
36 changes: 24 additions & 12 deletions el7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN yum install -y autoconf \
libatomic \
libtool \
ncurses-devel \
python3 \
python3-pip \
systemd \
unixODBC-devel \
unzip \
Expand Down Expand Up @@ -40,11 +42,20 @@ RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++
ADD install-openssl11.sh /install-openssl11.sh
RUN /install-openssl11.sh

COPY get-git.sh /get-git.sh
RUN /get-git.sh

WORKDIR /

ENV GIT_VERSION=2.38.1 DEVELOPER_CFLAGS='-std=gnu99'
RUN curl -L -o /tmp/git.tar.gz "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" \
&& tar zxf /tmp/git.tar.gz -C /tmp \
&& cd "/tmp/git-${GIT_VERSION}/" \
&& make configure \
&& ./configure --prefix=/usr \
&& make all \
&& make install \
&& cd / \
&& rm -rf /tmp/git.tar.gz "/tmp/git-${GIT_VERSION}/" \
&& git --version

RUN curl -L -o /tmp/automake-1.14.tar.gz http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz \
&& tar -zxvf /tmp/automake-1.14.tar.gz -C /tmp \
&& cd /tmp/automake-1.14 \
Expand All @@ -64,17 +75,18 @@ RUN env OPENSSL_ROOT_DIR=/usr/local/openssl /get-cmake.sh build
RUN sed -i -e '/override_install_langs/d' /etc/yum.conf && \
yum -q -y reinstall glibc-common

RUN yum install -y python3
## we do not want python2 anymore
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN ln -sf /usr/bin/pip3 /usr/bin/pip

## yum needs python2
RUN sed 's/python/python2/g' -i /usr/bin/yum
RUN alternatives --install /usr/bin/python python /usr/bin/python2 1 && \
alternatives --install /usr/bin/python python /usr/bin/python3 2 && \
alternatives --set python /usr/bin/python3 && \
alternatives --install /usr/bin/pip pip /usr/bin/pip2 1 && \
alternatives --install /usr/bin/pip pip /usr/bin/pip3 2 && \
alternatives --set pip /usr/bin/pip3 && \
sed 's/python/python2/g' -i /usr/bin/yum

# cleanup
RUN yum clean packages \
&& rm -rf /tmp/* /var/tmp/*
RUN yum clean packages && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*

ENV BASH_ENV=/opt/rh/devtoolset-8/enable \
ENV=/opt/rh/devtoolset-8/enable \
Expand Down
15 changes: 7 additions & 8 deletions el8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,19 @@ RUN yum install -y \

RUN yum groupinstall -y "Development Tools"

RUN yum install -y python3

## we do not want python2 anymore
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN ln -sf /usr/bin/pip3 /usr/bin/pip

WORKDIR /

COPY get-cmake.sh /get-cmake.sh
RUN /get-cmake.sh build

RUN alternatives --set python /usr/bin/python3 && \
alternatives --install /usr/bin/pip pip /usr/bin/pip3 2 && \
alternatives --set pip /usr/bin/pip3

# cleanup
RUN yum clean packages \
&& rm -rf /tmp/* /var/tmp/*
RUN yum clean packages && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*

# Elixir complains if runs without UTF-8
ENV LC_ALL=C.UTF-8
Expand Down
23 changes: 0 additions & 23 deletions get-git.sh

This file was deleted.

0 comments on commit 43a7d87

Please sign in to comment.