Skip to content

Commit 9dd2cf4

Browse files
ci: add ubuntu 24.04
Add Ubuntu 24.04 support. Signed-off-by: Andrii Holovchenko <[email protected]>
1 parent 82af56a commit 9dd2cf4

File tree

5 files changed

+80
-9
lines changed

5 files changed

+80
-9
lines changed

.ci/Dockerfile.ubuntu24.04

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FROM ubuntu:24.04
2+
ARG _UID=6213
3+
ARG _GID=11429
4+
ARG _LOGIN=swx-jenkins
5+
ARG _HOME=/var/home/$_LOGIN
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
ARG MOFED_VER
8+
ENV TZ=Etc/UTC
9+
USER root
10+
11+
RUN apt-get update && \
12+
apt-get install -y \
13+
git \
14+
vim \
15+
wget \
16+
curl \
17+
python3 \
18+
dpkg-dev \
19+
sudo \
20+
debhelper \
21+
debsigs \
22+
autotools-dev \
23+
dh-python \
24+
libiscsi-dev \
25+
meson \
26+
uuid-dev \
27+
libssl-dev \
28+
libaio-dev \
29+
libncurses-dev \
30+
libcunit1-dev \
31+
patchelf \
32+
python3-pyelftools \
33+
python3-requests \
34+
python3-pip \
35+
liburing-dev \
36+
linux-headers-generic \
37+
pkg-config nasm \
38+
libnuma-dev \
39+
libfuse3-dev
40+
41+
RUN wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | \
42+
sudo apt-key add - && \
43+
echo "deb [trusted=yes] http://nbu-nfs.gtm.nvidia.com/auto/mswg/release/MLNX_OFED/MLNX_OFED_LINUX-${MOFED_VER}/MLNX_OFED_LINUX-${MOFED_VER}-ubuntu24.04-$(dpkg-architecture -qDEB_HOST_GNU_CPU)/DEBS/ ./" > /etc/apt/sources.list.d/ofed.list && \
44+
apt update && KVERSION=$(ls /lib/modules) apt install -y mlnx-ofed-basic-user-only && \
45+
apt-get download libxlio-dev && dpkg --force-all -i libxlio-dev*
46+
47+
RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
48+
RUN mkdir -p $_HOME
49+
RUN groupadd -f -g "$_GID" "$_LOGIN"
50+
RUN useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "$_LOGIN"
51+
RUN chown $_LOGIN $_HOME
52+
53+
SHELL ["/bin/bash"]
54+
55+
USER "${_LOGIN}"
56+
ENTRYPOINT [ "/bin/bash", "--login", "--rcfile", "/etc/bashrc", "-c" ]

.ci/build_deb.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ if [ -z "$VER" ]; then
1616
export VER=$(echo $branch | grep -o '[0-9]\+\(\.[0-9]\+\)*')
1717
fi
1818

19+
if test -n "$ghprbPullId" ; then
20+
REV="pr${ghprbPullId}"
21+
else
22+
REV="${BUILD_NUMBER:-1}"
23+
fi
24+
1925
function pack_dist() {
2026
git submodule init
2127
git submodule update
@@ -38,7 +44,7 @@ function pack_dist() {
3844

3945
function generate_changelog() {
4046
today=$(date +"%a, %d %b %Y %T %z")
41-
sed -e "s/@PACKAGE_VERSION@/$VER/" -e "s/@PACKAGE_REVISION@/${BUILD_NUMBER:-1}/" \
47+
sed -e "s/@PACKAGE_VERSION@/$VER/" -e "s/@PACKAGE_REVISION@/${REV}/" \
4248
-e 's/@PACKAGE_BUGREPORT@/[email protected]/' -e "s/@BUILD_DATE_CHANGELOG@/$today/" \
4349
debian/changelog.in > debian/changelog
4450
}

.ci/job_matrix.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ secret_volumes:
3232
runs_on_dockers:
3333
- {file: '.ci/Dockerfile.ubuntu20.04', name: 'ubuntu20_04', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
3434
- {file: '.ci/Dockerfile.ubuntu22.04', name: 'ubuntu22_04', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
35+
- {file: '.ci/Dockerfile.ubuntu24.04', name: 'ubuntu24_04', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
3536
# - {file: '.ci/Dockerfile.centos7.9.2009', name: 'centos7_9', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
3637
- {file: '.ci/Dockerfile.centos8', name: 'centos8_stream', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
3738
- {file: '.ci/Dockerfile.openeuler.20.03', name: 'openeuler20_03', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
@@ -69,6 +70,7 @@ steps:
6970
containerSelector:
7071
- "{name: 'ubuntu20_04', variant:1}"
7172
- "{name: 'ubuntu22_04', variant:1}"
73+
- "{name: 'ubuntu24_04', variant:1}"
7274
- "{name: 'centos7_9', variant:1}"
7375
- "{name: 'centos8_stream', variant:1}"
7476
- "{name: 'openeuler20_03', variant:1}"

.ci/upload.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@ upload_deb_urm() {
4141
test -e $deb_pkg
4242
echo "INFO: Signing package ${deb_pkg##*/}"
4343
# Debian 12 doesn't have dpkg-sig, so use debsigs
44-
if [[ "$(get_os_name)" == "debian_12" ]]; then
45-
debsigs --sign=origin -k ${gpg_key_name} ${deb_pkg}
46-
else
47-
dpkg-sig -k ${gpg_key_name} -s builder ${deb_pkg}
48-
fi
44+
case "$(get_os_name)" in
45+
debian_12|ubuntu_24.04)
46+
debsigs --sign=origin -k ${gpg_key_name} ${deb_pkg}
47+
;;
48+
*)
49+
dpkg-sig -k ${gpg_key_name} -s builder ${deb_pkg}
50+
;;
51+
esac
4952
MD5=$(md5sum $deb_pkg | awk '{print $1}')
5053
SHA1=$(shasum -a 1 $deb_pkg | awk '{ print $1 }')
5154
SHA256=$(shasum -a 256 $deb_pkg | awk '{ print $1 }')

debian/rules

+7-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ override_dh_auto_install:
6868
install -m 644 include/spdk/pci_ids.h debian/tmp$(install_datadir)/include/spdk
6969
install -p -m 644 scripts/bash-completion/spdk debian/tmp/etc/bash_completion.d
7070
sed -i -e 's/ rpc.py/ spdk_rpc.py/' debian/tmp/etc/bash_completion.d/spdk
71-
for so in debian/tmp$(pkg_prefix)/lib/lib*so.*; do \
72-
patchelf --set-rpath $(pkg_prefix)/lib --force-rpath $$so || true; \
73-
done
7471
rm -rf debian/tmp$(pkg_prefix)/share/dpdk/examples
7572
(cd scripts ; python3 setup.py install --install-layout=deb --root=../debian/tmp )
7673
mv debian/tmp/usr/bin/spdkcli.py debian/tmp/usr/bin/spdkcli
@@ -82,6 +79,13 @@ override_dh_installdeb:
8279
dh_installdeb
8380
rm debian/*/DEBIAN/conffiles
8481

82+
# Run patchelf after strip to avoid corruption with patchelf > 0.14 (RM 4406077)
83+
override_dh_strip:
84+
dh_strip
85+
for so in debian/*/$(pkg_prefix)/lib/lib*so.*; do \
86+
patchelf --set-rpath $(pkg_prefix)/lib --force-rpath $$so || true; \
87+
done
88+
8589
override_dh_shlibdeps:
8690
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(shell pwd)/debian/tmp$(pkg_prefix)/lib
8791

0 commit comments

Comments
 (0)