Skip to content

Commit 0fb91a4

Browse files
authored
Merge pull request #218 from bedroge/debian_trixie
Use Debian Trixie (instead of Sid) for build containers, and only build CVMFS from source for RISC-V
2 parents 1eaa333 + bc6f1b7 commit 0fb91a4

3 files changed

Lines changed: 18 additions & 55 deletions

File tree

.github/workflows/build-publish-containers.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ permissions: read-all
2525
jobs:
2626
build_and_publish:
2727
name: Build and publish image
28-
runs-on: self-hosted
28+
#runs-on: self-hosted
29+
runs-on: ubuntu-24.04-arm
2930
timeout-minutes: 720
3031
permissions:
3132
packages: write
3233
contents: read
3334
strategy:
3435
matrix:
35-
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian-sid']
36+
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian13']
3637
platform: [amd64, arm64, riscv64]
3738
exclude:
3839
# exclude images that don't support RISC-V
@@ -97,7 +98,7 @@ jobs:
9798
contents: read
9899
strategy:
99100
matrix:
100-
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian-sid']
101+
tag: ['client:rocky8', 'build-node:debian11', 'build-node:debian13']
101102
steps:
102103
- name: Login to GitHub Container Registry
103104
if: github.event_name != 'pull_request'
@@ -112,15 +113,15 @@ jobs:
112113
echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
113114
114115
- name: Create the final image using "docker buildx imagetools create"
115-
if: github.event_name != 'pull_request' && matrix.tag == 'build-node:debian-sid'
116+
if: github.event_name != 'pull_request' && matrix.tag == 'build-node:debian13'
116117
run: |
117118
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
118119
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
119120
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \
120121
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-riscv64
121122
122123
- name: Create the final image using "docker buildx imagetools create"
123-
if: github.event_name != 'pull_request' && matrix.tag != 'build-node:debian-sid'
124+
if: github.event_name != 'pull_request' && matrix.tag != 'build-node:debian13'
124125
run: |
125126
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
126127
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \

containers/Dockerfile.EESSI-build-node-debian-sid renamed to containers/Dockerfile.EESSI-build-node-debian13

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ ARG archspecversion=0.2.2
33
ARG awscliversion=1.32.22
44
ARG fuseoverlayfsversion=1.10
55

6-
FROM debian:sid-20240330-slim AS prepare-deb
6+
FROM debian:trixie-20250520-slim AS prepare-deb
77
ARG cvmfsversion
88
COPY ./containers/build-or-download-cvmfs-debs.sh /build-or-download-cvmfs-debs.sh
99
RUN sh /build-or-download-cvmfs-debs.sh ${cvmfsversion}
1010

1111

12-
FROM debian:sid-20240330-slim
12+
FROM debian:trixie-20250520-slim
1313
ARG cvmfsversion
1414
ARG archspecversion
1515
ARG awscliversion

containers/build-or-download-cvmfs-debs.sh

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@ apt-get install -y wget lsb-release
88
distro=$(lsb_release -si | tr [:upper:] [:lower:])
99
release=$(lsb_release -sr)
1010

11-
# lsb_release -sr prints n/a for debian sid, replace it by 13
12-
if [ "${distro}" = "debian" ] && [ "${release}" = "n/a" ]
13-
then
14-
release=13
15-
fi
16-
1711
os="${distro}${release}"
1812

19-
if [ "$arch" = "riscv64" ] || [ "${os}" = "debian13" ]
13+
if [ "$arch" = "riscv64" ]
2014
then
2115
apt-get install -y devscripts libfuse3-dev cmake cpio golang libcap-dev libssl-dev libfuse-dev pkg-config libattr1-dev python3-dev python3-setuptools python3-dev python3-setuptools uuid-dev libz-dev lsb-release
2216
cd /tmp
@@ -25,49 +19,17 @@ then
2519
cd cvmfs-cvmfs-${cvmfsversion}
2620
mkdir /root/deb
2721
sed -i 's/amd64 armhf arm64/amd64 armhf arm64 riscv64/' packaging/debian/cvmfs/control*
28-
sed -i 's/python-dev/python3-dev/' packaging/debian/cvmfs/control*
29-
sed -i 's/python-setuptools/python3-setuptools/' packaging/debian/cvmfs/control*
30-
# debian13 has libfuse3-4
31-
[ $os = "debian13" ] && sed -i 's/libfuse3-3/libfuse3-4/' packaging/debian/cvmfs/control*
32-
if [ "$arch" = "riscv64" ]
33-
then
34-
# valgrind is not available (yet) for RISC-V
35-
sed -i 's/, valgrind//' packaging/debian/cvmfs/control*
36-
# for RISC-V we need to run autoreconf, see:
37-
# https://github.com/cvmfs/cvmfs/pull/3446
38-
wget https://github.com/cvmfs/cvmfs/pull/3446.patch
39-
patch -p 1 -i ./3446.patch
40-
rm 3446.patch
41-
# QEMU shows the host CPU in /proc/cpuinfo, so we need to tweak the CPU detection for some packages and use uname -m instead
42-
sed -i "s/^ISA=.*/ISA=\$(uname -m)/" externals/libcrypto/src/configureHook.sh
43-
sed -i "s/rv64/riscv64/" externals/libcrypto/src/configureHook.sh
44-
sed -i "s/^ISA=.*/ISA=\$(uname -m)/" externals/protobuf/src/configureHook.sh
45-
sed -i "s/rv64/riscv64/" externals/protobuf/src/configureHook.sh
46-
else
47-
apt-get install -y valgrind
48-
fi
49-
50-
# gcc 14 fix for CVMFS's dependency pacparser, see
51-
# https://github.com/manugarg/pacparser/issues/194
52-
if gcc --version | grep -q "^gcc.*14"; then
53-
cat << EOF > externals/pacparser/src/fix_gcc14.patch
54-
--- src/spidermonkey/js/src/jsapi.c
55-
+++ src/spidermonkey/js/src/jsapi.c
56-
@@ -93,7 +93,7 @@
57-
#ifdef HAVE_VA_LIST_AS_ARRAY
58-
#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(ap))
59-
#else
60-
-#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
61-
+#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(&(ap)))
62-
#endif
63-
64-
#if defined(JS_PARANOID_REQUEST) && defined(JS_THREADSAFE)
65-
EOF
66-
fi
22+
# debian13 provides libfuse3-4, see https://github.com/cvmfs/cvmfs/pull/3847
23+
[ $os = "debian13" ] && sed -i 's/libfuse3-3 (>= 3.3.0)/libfuse3-3 (>= 3.3.0) | libfuse3-4/g' packaging/debian/cvmfs/control*
24+
# valgrind is not available (yet) for RISC-V
25+
sed -i 's/, valgrind//' packaging/debian/cvmfs/control*
26+
# QEMU shows the host CPU in /proc/cpuinfo, so we need to tweak the CPU detection for some packages and use uname -m instead
27+
sed -i "s/^ISA=.*/ISA=\$(uname -m)/" externals/libcrypto/src/configureHook.sh
28+
sed -i "s/rv64/riscv64/" externals/libcrypto/src/configureHook.sh
29+
sed -i "s/^ISA=.*/ISA=\$(uname -m)/" externals/protobuf/src/configureHook.sh
30+
sed -i "s/rv64/riscv64/" externals/protobuf/src/configureHook.sh
6731

6832
cd ci/cvmfs
69-
# make sure the cvmfs package also uses debian 13 for debian sid
70-
[ $release = "13" ] && sed -i "s@\$(lsb_release -sr)@13@" ./deb.sh && sed -i "s/focal/trixie/" ./deb.sh
7133
./deb.sh /tmp/cvmfs-cvmfs-${cvmfsversion} /root/deb
7234
else
7335
mkdir -p /root/deb

0 commit comments

Comments
 (0)