From 1e08f3bfa75e9cf303ef85ac92c080626af7c56c Mon Sep 17 00:00:00 2001 From: mck Date: Mon, 22 Jul 2024 13:21:04 +0200 Subject: [PATCH] remove centos7 and use vault mirror for ant-junit rpm download also remove noboolean in trunk patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-19787 --- .build/README.md | 2 +- .build/docker/almalinux-build.docker | 2 +- .build/docker/build-redhat.sh | 10 +--- .build/docker/centos7-build.docker | 86 ---------------------------- 4 files changed, 4 insertions(+), 96 deletions(-) delete mode 100644 .build/docker/centos7-build.docker diff --git a/.build/README.md b/.build/README.md index 72a974afc4..46ab9dddcb 100644 --- a/.build/README.md +++ b/.build/README.md @@ -65,7 +65,7 @@ Build with a specific jdk: .build/docker/build-redhat.sh rpm 11 -Build with centos7 and a specific jdk: +Build with legacy noboolean and a specific jdk: .build/docker/build-redhat.sh noboolean 11 diff --git a/.build/docker/almalinux-build.docker b/.build/docker/almalinux-build.docker index c850942620..89832b67b3 100644 --- a/.build/docker/almalinux-build.docker +++ b/.build/docker/almalinux-build.docker @@ -49,7 +49,7 @@ RUN yum -y install \ procps \ rsync -RUN until curl -f -S -s --retry 9 --retry-connrefused --retry-delay 1 http://mirror.centos.org/centos/7/os/x86_64/Packages/ant-junit-1.9.4-2.el7.noarch.rpm -o ant-junit-1.9.4-2.el7.noarch.rpm ; do echo "curl failed… trying again in 10s… " ; sleep 10 ; done +RUN until curl -f -S -s --retry 9 --retry-connrefused --retry-delay 1 https://vault.centos.org/7.9.2009/os/x86_64/Packages/ant-junit-1.9.4-2.el7.noarch.rpm -o ant-junit-1.9.4-2.el7.noarch.rpm ; do echo "curl failed… trying again in 10s… " ; sleep 10 ; done RUN rpm -i --nodeps ant-junit-1.9.4-2.el7.noarch.rpm diff --git a/.build/docker/build-redhat.sh b/.build/docker/build-redhat.sh index 35149855c7..adacccab6e 100755 --- a/.build/docker/build-redhat.sh +++ b/.build/docker/build-redhat.sh @@ -18,7 +18,7 @@ if [ "$1" == "-h" ]; then echo "$0 [-h] [rpm|noboolean] []" - echo " build redhat packages, specify noboolean for centos7 compatibility" + echo " build redhat packages, specify noboolean for legacy (centos7) compatibility" exit 1 fi @@ -26,12 +26,6 @@ fi rpm_dist=$1 java_version=$2 -if [ "${rpm_dist}" == "noboolean" ]; then - dist_name="centos7" -else # noboolean - dist_name="almalinux" -fi - echo echo "===" @@ -42,5 +36,5 @@ echo # # Creates the redhat package -$(dirname "$0")/_docker_run.sh ${dist_name}-build.docker docker/_build-redhat.sh "${java_version}" ${rpm_dist} +$(dirname "$0")/_docker_run.sh almalinux-build.docker docker/_build-redhat.sh "${java_version}" ${rpm_dist} exit $? diff --git a/.build/docker/centos7-build.docker b/.build/docker/centos7-build.docker deleted file mode 100644 index 901e77985d..0000000000 --- a/.build/docker/centos7-build.docker +++ /dev/null @@ -1,86 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM centos:7 -MAINTAINER Apache Cassandra - -# CONTEXT is expected to be cassandra/.build - -ENV BUILD_HOME=/home/build -ENV RPM_BUILD_DIR=$BUILD_HOME/rpmbuild -ENV DIST_DIR=/dist -ENV CASSANDRA_DIR=$BUILD_HOME/cassandra -ENV ANT_VERSION=1.10.14 -ARG UID_ARG=1000 -ARG GID_ARG=1000 - -LABEL org.cassandra.buildenv=centos - -RUN echo "Building with arguments:" \ - && echo " - DIST_DIR=${DIST_DIR}" \ - && echo " - BUILD_HOME=${BUILD_HOME}" \ - && echo " - RPM_BUILD_DIR=${RPM_BUILD_DIR}" \ - && echo " - CASSANDRA_DIR=${CASSANDRA_DIR}" \ - && echo " - UID_ARG=${UID_ARG}" \ - && echo " - GID_ARG=${GID_ARG}" - -# install deps -RUN yum -y install \ - ant \ - git \ - java-11-openjdk-devel \ - make \ - rpm-build \ - sudo \ - python3-pip \ - rsync - -RUN until curl -f -S -s --retry 9 --retry-delay 1 http://mirror.centos.org/centos/7/os/x86_64/Packages/ant-junit-1.9.4-2.el7.noarch.rpm -o ant-junit-1.9.4-2.el7.noarch.rpm ; do echo "curl failed… trying again in 10s… " ; sleep 10 ; done - -RUN rpm -i --nodeps ant-junit-1.9.4-2.el7.noarch.rpm - -# try first downloads.a.o and then archive.a.o (as the latter has a 5GB per IP daily limit) -RUN until curl -f -S -s --retry 9 --retry-delay 1 https://downloads.apache.org/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz -o apache-ant-${ANT_VERSION}-bin.tar.gz || curl -f -S -s --retry 9 --retry-delay 1 http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz -o apache-ant-${ANT_VERSION}-bin.tar.gz ; do echo "curl failed… trying again in 10s… " ; sleep 10 ; done - -RUN rm -rf /etc/ant.conf -RUN tar xvf apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt -RUN ln -sfn /opt/apache-ant-${ANT_VERSION} /opt/ant -RUN sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment' -RUN ln -sfn /opt/ant/bin/ant /usr/bin/ant - -# jdk17 latest on x64 -RUN if [ "$(arch)" == "x86_64" ] ; then \ - until curl -f -S -s --retry 9 --retry-delay 1 https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz -o openjdk-17_bin.tar.gz ; do \ - echo "curl failed… trying again in 10s… " ; sleep 10 ; \ - done \ - fi - -# jdk17 latest on arm -RUN if [ "$(arch)" == "aarch64" ] ; then \ - until curl -f -S -s --retry 9 --retry-delay 1 https://download.oracle.com/java/17/latest/jdk-17_linux-aarch64_bin.tar.gz -o openjdk-17_bin.tar.gz ; do \ - echo "curl failed… trying again in 10s… " ; sleep 10 ; \ - done \ - fi - -RUN tar xvf openjdk-17_bin.tar.gz -RUN mv jdk-17* /opt/jdk-17 - -RUN alternatives --install /usr/bin/java java /opt/jdk-17/bin/java 3 --family java-17-openjdk.$(arch) -RUN alternatives --install /usr/bin/javac javac /opt/jdk-17/bin/javac 3 --family java-17-openjdk.$(arch) - -# python3 is needed for the gen-doc target -RUN pip3 install --upgrade pip -