Skip to content

Commit

Permalink
remove hardcoded el7 and replace by variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Sep 9, 2024
1 parent 09ef36d commit 1e2d7a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions containers/build-or-download-cvmfs-rpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 1e2d7a6

Please sign in to comment.