From 5e7e11cda07d9f0d8c1ea8dfc1f7ef8be137d753 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 15 Aug 2024 10:46:53 -0400 Subject: [PATCH] Update various calls to mirrorlist.centos.org with vault.centos.org Mirrorlist has been deprecated following the EOL of Centos 7 Signed-off-by: Sophia Guo --- test/system/reproducibleCompare/playlist.xml | 4 ++-- tooling/reproducible/linux_repro_build_compare.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/system/reproducibleCompare/playlist.xml b/test/system/reproducibleCompare/playlist.xml index 5b19c0af3..2cffcd482 100644 --- a/test/system/reproducibleCompare/playlist.xml +++ b/test/system/reproducibleCompare/playlist.xml @@ -18,13 +18,13 @@ reproducible.mk Rebuild_Same_JDK_Reproducibility_Test - docker container rm reproducibleCompare; \ + docker container rm -f reproducibleCompare; \ docker run -v "$(TEST_RESROOT):/home/jenkins/test" -w "/home/jenkins/" -v "$(TEST_JDK_HOME):/home/jenkins/jdkbinary/" --name reproducibleCompare centos:7 /bin/bash /home/jenkins/test/linux_repro_build_compare.sh $(SBOM_FILE) /home/jenkins/jdkbinary; \ $(TEST_STATUS); \ docker cp reproducibleCompare:/home/jenkins/reprotest.diff ./; \ docker cp reproducibleCompare:/home/jenkins/reproJDK.tar.gz ./; \ docker cp reproducibleCompare:/home/jenkins/SBOM.json ./; \ - docker container rm reproducibleCompare + docker container rm -f reproducibleCompare special diff --git a/tooling/reproducible/linux_repro_build_compare.sh b/tooling/reproducible/linux_repro_build_compare.sh index 57e6f0f58..123949a67 100755 --- a/tooling/reproducible/linux_repro_build_compare.sh +++ b/tooling/reproducible/linux_repro_build_compare.sh @@ -28,6 +28,14 @@ isJdkDir=false USING_DEVKIT="false" installPrereqs() { if test -r /etc/redhat-release; then + if [ "$(uname -m)" == "x86_64" ]; then + echo "Running on x64 architecture"; + sed -i -e 's!#baseurl=http://mirror.centos.org/centos/\$releasever!baseurl=https://vault.centos.org/7.9.2009/!g' /etc/yum.repos.d/CentOS-Base.repo; \ + else + echo "Running on non-x64 architecture"; + sed -i 's|#baseurl=http://mirror.centos.org/altarch/\$releasever/|baseurl=http://vault.centos.org/altarch/7.9.2009/|' /etc/yum.repos.d/CentOS-Base.repo; \ + fi + yum install -y gcc gcc-c++ make autoconf unzip zip alsa-lib-devel cups-devel libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel yum install -y file fontconfig fontconfig-devel systemtap-sdt-devel epel-release # Not included above ... yum install -y git bzip2 xz openssl pigz which jq # pigz/which not strictly needed but help in final compression