From 1e2d7a6691184ac6b8a33c76be013e6c82a1c586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 9 Sep 2024 16:22:35 +0200 Subject: [PATCH] remove hardcoded el7 and replace by variable --- containers/build-or-download-cvmfs-rpms.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/containers/build-or-download-cvmfs-rpms.sh b/containers/build-or-download-cvmfs-rpms.sh index a4cbcbf3..5d4f5b09 100644 --- a/containers/build-or-download-cvmfs-rpms.sh +++ b/containers/build-or-download-cvmfs-rpms.sh @@ -2,6 +2,7 @@ cvmfsversion=$1 arch=$(uname -m) yum install -y wget +elversion="$(rpm -q --queryformat '%{RELEASE}' rpm | cut -d '.' -f 2)" if [ "$arch" = "riscv64" ] then yum install -y epel-release @@ -10,11 +11,11 @@ then update-alternatives --install /usr/bin/python python /usr/bin/python3 1 update-alternatives --install /usr/bin/python python /usr/bin/python2 2 update-alternatives --set python /usr/bin/python2 - wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-${cvmfsversion}-1.el7.src.rpm && rpmbuild --rebuild cvmfs-${cvmfsversion}-1.el7.src.rpm + wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-${cvmfsversion}-1.${elversion}.src.rpm && rpmbuild --rebuild cvmfs-${cvmfsversion}-1.${elversion}.src.rpm else mkdir -p /root/rpmbuild/RPMS/${arch} cd /root/rpmbuild/RPMS/${arch} - wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-${cvmfsversion}-1.el7.${arch}.rpm - wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-fuse3-${cvmfsversion}-1.el7.${arch}.rpm - wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-libs-${cvmfsversion}-1.el7.${arch}.rpm + wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-${cvmfsversion}-1.${elversion}.${arch}.rpm + wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-fuse3-${cvmfsversion}-1.${elversion}.${arch}.rpm + wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-${cvmfsversion}/cvmfs-libs-${cvmfsversion}-1.${elversion}.${arch}.rpm fi