Skip to content

Commit

Permalink
Merge pull request #199 from bedroge/client_container_rocky8
Browse files Browse the repository at this point in the history
Build client container with Rocky 8 as base image
  • Loading branch information
boegel authored Oct 8, 2024
2 parents 86053f0 + 9022203 commit a5b099d
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-publish-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
contents: read
strategy:
matrix:
tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid']
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian-sid']
platform: [amd64, arm64, riscv64]
exclude:
# exclude images that don't support RISC-V
- tag: client:centos7
- tag: client:rocky8
platform: riscv64
- tag: build-node:debian11
platform: riscv64
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
contents: read
strategy:
matrix:
tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid']
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian-sid']
steps:
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build-test-release-client-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,16 @@ jobs:
needs: build-linux-packages
runs-on: ubuntu-latest
container:
image: centos:centos7
image: rockylinux:8
options: --device /dev/fuse --privileged

steps:
- name: Download and install CVMFS client
run: yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm && yum-config-manager --enable cernvm-config

- name: Install CVMFS client
run: yum install -y cvmfs cvmfs-config-none
run: |
dnf install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --enable cernvm-config
dnf install -y cvmfs cvmfs-config-none
- name: Download cvmfs-config-eessi package
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- name: Build the Docker image
run: docker build . --file containers/Dockerfile.EESSI-client-centos7
run: docker build . --file containers/Dockerfile.EESSI-client-rocky8
2 changes: 1 addition & 1 deletion containers/Dockerfile.EESSI-build-node-debian-sid
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG cvmfsversion=2.11.2
ARG cvmfsversion=2.11.5
ARG archspecversion=0.2.2
ARG awscliversion=1.32.22
ARG fuseoverlayfsversion=1.10
Expand Down
2 changes: 1 addition & 1 deletion containers/Dockerfile.EESSI-build-node-debian11
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG cvmfsversion=2.11.2
ARG cvmfsversion=2.11.5
ARG awscliversion=1.32.22
ARG fuseoverlayfsversion=1.10

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
ARG cvmfsversion=2.11.2
ARG cvmfsversion=2.11.5
# Stick to old version of fuse-overlayfs due to issues with newer versions
# (cfr. https://github.com/containers/fuse-overlayfs/issues/232)
ARG fuseoverlayfsversion=1.10

FROM centos:7 AS prepare-rpm
FROM rockylinux:8 AS prepare-rpm
ARG cvmfsversion
COPY ./containers/build-or-download-cvmfs-rpms.sh /build-or-download-cvmfs-rpms.sh
RUN sh /build-or-download-cvmfs-rpms.sh ${cvmfsversion}


FROM centos:7 AS build-fuse-overlayfs
FROM rockylinux:8 AS build-fuse-overlayfs
ARG fuseoverlayfsversion
RUN yum install -y wget fuse3-devel autoconf automake gcc make tar
RUN wget https://github.com/containers/fuse-overlayfs/archive/refs/tags/v${fuseoverlayfsversion}.tar.gz \
Expand All @@ -18,17 +18,18 @@ RUN wget https://github.com/containers/fuse-overlayfs/archive/refs/tags/v${fuseo
&& ./autogen.sh && ./configure && make && make install


FROM centos:7
FROM rockylinux:8
ARG cvmfsversion

COPY --from=prepare-rpm /root/rpmbuild/RPMS /root/rpmbuild/RPMS
COPY --from=build-fuse-overlayfs /usr/local/bin/fuse-overlayfs /usr/local/bin/fuse-overlayfs

RUN yum install -y sudo vim openssh-clients lsof strace
RUN yum install -y /root/rpmbuild/RPMS/$(uname -m)/cvmfs-${cvmfsversion}-1.el7.$(uname -m).rpm \
/root/rpmbuild/RPMS/$(uname -m)/cvmfs-fuse3-${cvmfsversion}-1.el7.$(uname -m).rpm \
/root/rpmbuild/RPMS/$(uname -m)/cvmfs-libs-${cvmfsversion}-1.el7.$(uname -m).rpm \
http://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default-latest.noarch.rpm
RUN elversion="$(rpm -q --queryformat '%{RELEASE}' rpm | cut -d '.' -f 2)" \
&& yum install -y /root/rpmbuild/RPMS/$(uname -m)/cvmfs-${cvmfsversion}-1.${elversion}.$(uname -m).rpm \
/root/rpmbuild/RPMS/$(uname -m)/cvmfs-fuse3-${cvmfsversion}-1.${elversion}.$(uname -m).rpm \
/root/rpmbuild/RPMS/$(uname -m)/cvmfs-libs-${cvmfsversion}-1.${elversion}.$(uname -m).rpm \
http://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default-latest.noarch.rpm
RUN yum install -y https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm

# download binary for specific version of fuse-overlayfs
Expand Down
19 changes: 19 additions & 0 deletions containers/build-or-download-cvmfs-debs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ then
else
apt-get install -y valgrind
fi

# gcc 14 fix for CVMFS's dependency pacparser, see
# https://github.com/manugarg/pacparser/issues/194
if gcc --version | grep -q "^gcc.*14"; then
cat << EOF > externals/pacparser/src/fix_gcc14.patch
--- src/spidermonkey/js/src/jsapi.c
+++ src/spidermonkey/js/src/jsapi.c
@@ -93,7 +93,7 @@
#ifdef HAVE_VA_LIST_AS_ARRAY
#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(ap))
#else
-#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
+#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(&(ap)))
#endif
#if defined(JS_PARANOID_REQUEST) && defined(JS_THREADSAFE)
EOF
fi

cd ci/cvmfs
# make sure the cvmfs package also uses debian 13 for debian sid
[ $release = "13" ] && sed -i "s@\$(lsb_release -sr)@13@" ./deb.sh && sed -i "s/focal/trixie/" ./deb.sh
Expand Down
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 a5b099d

Please sign in to comment.