Skip to content

Commit

Permalink
Use VERSION_ID instead
Browse files Browse the repository at this point in the history
  • Loading branch information
msullivan committed Jul 3, 2024
1 parent e21ca53 commit 30202cb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion integration/linux/build/Dockerfile-centos.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \
&& source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true)
Expand Down
4 changes: 2 additions & 2 deletions integration/linux/build/Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ENV GCC_VERSION 11
# installing centos-release-scl, which adds new things. Ugh.
RUN ulimit -n 1024 && echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf && ( \
source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true)
Expand All @@ -36,7 +36,7 @@ RUN ulimit -n 1024 \
&& yum install -y centos-release-scl epel-release \
&& ( \
source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true) \
Expand Down
2 changes: 1 addition & 1 deletion integration/linux/build/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \
&& source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true)
Expand Down
2 changes: 1 addition & 1 deletion integration/linux/build/centos-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \
&& source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true)
Expand Down
4 changes: 2 additions & 2 deletions integration/linux/build/linux-aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ENV GCC_VERSION 10
# installing centos-release-scl, which adds new things. Ugh.
RUN ulimit -n 1024 && echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf && ( \
source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true)
Expand All @@ -42,7 +42,7 @@ RUN ulimit -n 1024 \
&& yum install -y centos-release-scl epel-release \
&& ( \
source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true) \
Expand Down
4 changes: 2 additions & 2 deletions integration/linux/build/linux-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ENV GCC_VERSION 11
# installing centos-release-scl, which adds new things. Ugh.
RUN ulimit -n 1024 && echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf && ( \
source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true)
Expand All @@ -42,7 +42,7 @@ RUN ulimit -n 1024 \
&& yum install -y centos-release-scl epel-release \
&& ( \
source /etc/os-release; \
[ "$VERSION" = "7 (Core)" -o "$VERSION" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
[ "$VERSION_ID" = "7" -o "$VERSION_ID" = "8" ] && echo YES && (cd /etc/yum.repos.d/ \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum update -y) || true) \
Expand Down

0 comments on commit 30202cb

Please sign in to comment.