Skip to content

Commit adab734

Browse files
committed
SRE-2832 Update for Fedora 41
Test-master-branch: grom72/sre-2832-fix-scratch-mount Skiptg-list-master: test_ior_intercept_libioil:DAOS-16260 test_osa_offline_reintegration_without_checksum:DAOS-15608 test_daos_drain_simple:DAOS-15271 test_daos_rebuild_ec:DAOS-14982 test_osa_offline_reintegration_without_checksum:DAOS-14570 Skiptg-list-release/2.6: test_cart_rpc:DAOS-15989 test_daos_rebuild_ec:DAOS-14982 test_dfuse_daos_build_wt_pil4dfs:DAOS-16215 test_daos_rebuild_simple:DAOS-15290 test_dfuse_daos_build_wb:DAOS-16215 test_dfuse_daos_build_wt:DAOS-16215 test_dfuse_daos_build_metadata:DAOS-16215 test_dfuse_daos_build_data:DAOS-16215 test_dfuse_daos_build_nocache:DAOS-16215 Allow-unstable-test: true Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
1 parent 2f5846c commit adab734

11 files changed

+342
-79
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/groovy
22
// SPDX-License-Identifier: BSD-2-Clause-Patent
3-
// Copyright (c) 2019-2024 Intel Corporation
3+
// Copyright 2019-2024 Intel Corporation
4+
// Copyright 2025 Hewlett Packard Enterprise Development LP
45

56
// To use a test branch (i.e. PR) until it lands to master
67
// I.e. for testing library changes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# pmdk
1+
# pmdk-pkg
22
RPM packaging of pmdk

packaging/Dockerfile.coverity

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#
22
# Copyright 2018-2020, Intel Corporation
3+
# Copyright 2025 Hewlett Packard Enterprise Development LP
34
#
45
# 'recipe' for Docker to build for a Coverity scan.
56
#
67

78
# Pull base image
89
FROM fedora:latest
9-
MAINTAINER daos-stack <daos@daos.groups.io>
10+
LABEL maintainer="daos-stack <daos@daos.groups.io>""
1011

1112
# use same UID as host and default value of 1000 if not specified
1213
ARG UID=1000

packaging/Dockerfile.mockbuild

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#
22
# Copyright 2018-2024 Intel Corporation
3+
# Copyright 2025 Hewlett Packard Enterprise Development LP
34
#
45
# 'recipe' for Docker to build an RPM
56
#
@@ -13,15 +14,16 @@ LABEL maintainer="daos@daos.groups.io"
1314

1415
# Use local repo server if present
1516
ARG REPO_FILE_URL
16-
RUN if [ -n "$REPO_FILE_URL" ]; then \
17-
cd /etc/yum.repos.d/ && \
18-
curl -k -f -o daos_ci-fedora-artifactory.repo.tmp \
19-
"$REPO_FILE_URL"daos_ci-fedora-artifactory.repo && \
20-
for file in *.repo; do \
21-
true > $file; \
22-
done; \
23-
mv daos_ci-fedora-artifactory.repo{.tmp,}; \
24-
fi
17+
ARG DAOS_LAB_CA_FILE_URL
18+
ARG REPOSITORY_NAME
19+
# script to install OS updates basic tools and daos dependencies
20+
# COPY ./utils/scripts/install-fedora.sh /tmp/install.sh
21+
# script to setup local repo if available
22+
COPY ./packaging/scripts/repo-helper-fedora.sh /tmp/repo-helper.sh
23+
24+
RUN chmod +x /tmp/repo-helper.sh && \
25+
/tmp/repo-helper.sh && \
26+
rm -f /tmp/repo-helper.sh
2527

2628
# Install basic tools
2729
RUN dnf -y install mock make \
@@ -33,13 +35,15 @@ RUN dnf -y install mock make \
3335
ARG UID=1000
3436

3537
# Add build user (to keep rpmbuild happy)
36-
ENV USER build
37-
ENV PASSWD build
38+
ENV USER=build
39+
ENV PASSWD=build
3840
# add the user to the mock group so it can run mock
3941
RUN if [ $UID != 0 ]; then \
4042
useradd -u $UID -ms /bin/bash $USER; \
4143
echo "$USER:$PASSWD" | chpasswd; \
4244
usermod -a -G mock $USER; \
45+
mkdir -p /var/cache/mock; \
46+
chown $USER:root /var/cache/mock; \
4347
fi
4448

4549
ARG CB0

packaging/Dockerfile.ubuntu

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Keep Dockerfile.ubuntu the same as this file until all packaging
2+
# jobs are fixed to have a Dockerfile.ubuntu, and then the common
3+
# Jenkinsfile will be changed to use Dockerfile.ubuntu.
4+
#
5+
# Copyright 2019-2021, Intel Corporation
6+
# Copyright 2025 Hewlett Packard Enterprise Development LP
7+
#
8+
# 'recipe' for Docker to build an Debian package
9+
#
10+
# Pull base image
11+
ARG BASE_DISTRO=ubuntu:20.04
12+
FROM $BASE_DISTRO
13+
LABEL org.opencontainers.image.authors="daos@daos.groups.io"
14+
# Needed for later use of BASE_DISTRO
15+
ARG BASE_DISTRO
16+
17+
ARG REPO_FILE_URL
18+
ARG DAOS_LAB_CA_FILE_URL
19+
ARG REPOSITORY_NAME
20+
# script to setup local repo if available
21+
COPY ./scripts/repo-helper-ubuntu.sh /tmp/repo-helper.sh
22+
23+
RUN chmod +x /tmp/repo-helper.sh && \
24+
/tmp/repo-helper.sh && \
25+
rm -f /tmp/repo-helper.sh
26+
27+
# Install basic tools
28+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
29+
autoconf bash ca-certificates curl debhelper dh-make \
30+
dpkg-dev dh-python doxygen gcc git git-buildpackage \
31+
javahelper locales make patch pbuilder pkg-config \
32+
python3-dev python3-distro python3-distutils rpm scons wget \
33+
cmake valgrind rpmdevtools
34+
35+
# use same UID as host and default value of 1000 if not specified
36+
ARG UID=1000
37+
38+
# Add build user (to keep chrootbuild happy)
39+
ENV USER=build
40+
RUN useradd -u $UID -ms /bin/bash $USER
41+
42+
# need to run the build command as root, as it needs to chroot
43+
RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \
44+
echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \
45+
fi; \
46+
echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \
47+
echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \
48+
echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \
49+
chmod 0440 /etc/sudoers.d/build; \
50+
visudo -c; \
51+
sudo -l -U build

packaging/Dockerfile.ubuntu.20.04

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,50 @@
1+
# Keep Dockerfile.ubuntu the same as this file until all packaging
2+
# jobs are fixed to have a Dockerfile.ubuntu, and then the common
3+
# Jenkinsfile will be changed to use Dockerfile.ubuntu.
14
#
25
# Copyright 2019-2021, Intel Corporation
6+
# Copyright 2025 Hewlett Packard Enterprise Development LP
37
#
48
# 'recipe' for Docker to build an Debian package
59
#
610
# Pull base image
7-
FROM ubuntu:20.04
11+
ARG BASE_DISTRO=ubuntu:20.04
12+
FROM $BASE_DISTRO
813
LABEL org.opencontainers.image.authors="daos@daos.groups.io"
9-
10-
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
11-
curl gpg
14+
# Needed for later use of BASE_DISTRO
15+
ARG BASE_DISTRO
1216

1317
ARG REPO_FILE_URL
14-
RUN if [ -n "$REPO_FILE_URL" ]; then \
15-
cd /etc/apt/sources.list.d && \
16-
curl -f -o daos_ci-ubuntu20.04-artifactory.list.tmp \
17-
"$REPO_FILE_URL"daos_ci-ubuntu20.04-artifactory.list && \
18-
true > ../sources.list && \
19-
mv daos_ci-ubuntu20.04-artifactory.list.tmp \
20-
daos_ci-ubuntu20.04-artifactory.list; \
21-
url="${REPO_FILE_URL%/*/}/hpe-ilorest-ubuntu-bionic-proxy/"; \
22-
else \
23-
url="https://downloads.linux.hpe.com/SDR/repo/ilorest/"; \
24-
fi; \
25-
cd -; \
26-
mkdir -p /usr/local/share/keyrings/; \
27-
curl -f -O "$url"GPG-KEY-hprest; \
28-
gpg --no-default-keyring --keyring ./temp-keyring.gpg \
29-
--import GPG-KEY-hprest; \
30-
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \
31-
--output /usr/local/share/keyrings/hpe-sdr-public.gpg; \
32-
rm ./temp-keyring.gpg; \
33-
curl -f -O "$REPO_FILE_URL"esad_repo.key; \
34-
gpg --no-default-keyring --keyring ./temp-keyring.gpg \
35-
--import esad_repo.key; \
36-
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \
37-
--output /usr/local/share/keyrings/daos-stack-public.gpg
18+
ARG DAOS_LAB_CA_FILE_URL
19+
ARG REPOSITORY_NAME
20+
# script to setup local repo if available
21+
COPY ./packaging/scripts/repo-helper-ubuntu.sh /tmp/repo-helper.sh
22+
23+
RUN chmod +x /tmp/repo-helper.sh && \
24+
/tmp/repo-helper.sh && \
25+
rm -f /tmp/repo-helper.sh
3826

39-
# Install basic tools
27+
# Install basic tools - rpmdevtools temporary commented out.
4028
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
4129
autoconf bash ca-certificates curl debhelper dh-make \
4230
dpkg-dev dh-python doxygen gcc git git-buildpackage \
4331
javahelper locales make patch pbuilder pkg-config \
44-
python3-dev python3-distro python3-distutils rpm scons wget \
45-
cmake valgrind rpmdevtools
32+
python3-dev python3-distro python3-distutils rpm scons sudo \
33+
wget cmake valgrind # rpmdevtools
4634

4735
# use same UID as host and default value of 1000 if not specified
4836
ARG UID=1000
4937

5038
# Add build user (to keep chrootbuild happy)
51-
ENV USER build
39+
ENV USER=build
5240
RUN useradd -u $UID -ms /bin/bash $USER
5341

5442
# need to run the build command as root, as it needs to chroot
5543
RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \
5644
echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \
5745
fi; \
5846
echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \
59-
echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \
47+
echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \
6048
echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \
6149
chmod 0440 /etc/sudoers.d/build; \
6250
visudo -c; \

packaging/Dockerfile.ubuntu.rolling

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#
22
# Copyright 2019, Intel Corporation
3+
# Copyright 2025 Hewlett Packard Enterprise Development LP
34
#
45
# 'recipe' for Docker to build an Debian package
56
#
67
# Pull base image
78
FROM ubuntu:rolling
8-
Maintainer daos-stack <daos@daos.groups.io>
9+
LABEL org.opencontainers.image.authors="daos@daos.groups.io"
910

1011
# use same UID as host and default value of 1000 if not specified
1112
ARG UID=1000

packaging/debian_chrootbuild

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,35 @@
22

33
set -uex
44

5+
: "${REPO_FILE_URL:=}"
6+
: "${HTTPS_PROXY:=}"
7+
8+
# Currently not fully working behind a proxy
59
if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then
6-
echo "MIRRORSITE=${ARTIFACTORY_URL}artifactory/ubuntu-proxy" | sudo tee /root/.pbuilderrc
10+
pbuilderrc="./pbuilder_rc.txt"
11+
rm -f "$pbuilderrc"
12+
if [ -n "${HTTPS_PROXY}" ]; then
13+
echo "export http_proxy=\"${HTTPS_PROXY}\"" >> "$pbuilderrc"
14+
else
15+
echo "MIRRORSITE=${ARTIFACTORY_URL}/ubuntu-proxy/ubuntu" > "$pbuilderrc"
16+
fi
17+
#if [ -n "$REPO_FILE_URL" ]; then
18+
# direct="${REPO_FILE_URL##*//}"
19+
# direct="${direct%%/*}"
20+
# echo "no_proxy=\"${direct}\"" >> "$pbuilderrc"
21+
#fi
22+
# shellcheck disable=SC2002
23+
cat "$pbuilderrc" | sudo tee /root/.pbuilderrc
724
fi
825

926
# shellcheck disable=SC2086
1027
sudo pbuilder create \
1128
--extrapackages "gnupg ca-certificates" \
12-
$DISTRO_ID_OPT
29+
$DISTRO_ID_OPT || true # Ignore error status for now.
1330

1431
repo_args=""
1532
repos_added=()
33+
# currently a bit broken, pbuilder will not accept user provided CAs.
1634
for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
1735
branch="master"
1836
build_number="lastSuccessfulBuild"
@@ -32,31 +50,34 @@ for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
3250
repo_args="$repo_args|deb [trusted=yes] ${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/$branch/$build_number/artifact/artifacts/$DISTRO/ ./"
3351
done
3452

35-
repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list |
36-
sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \
37-
-e 's/signed-by=.*\.gpg/trusted=yes/' |
38-
sed -e ':a; N; $!ba; s/\n/|/g')"
39-
for repo in $JOB_REPOS; do
40-
repo_name=${repo##*://}
41-
repo_name=${repo_name//\//_}
42-
if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then
43-
# don't add duplicates, first found wins
44-
continue
45-
fi
46-
repos_added+=("$repo_name")
47-
repo_args+="|deb ${repo} $VERSION_CODENAME main"
48-
done
49-
# NB: This PPA is needed to support modern go toolchains on ubuntu 20.04.
50-
# After the build is updated to use 22.04, which supports go >= 1.18, it
51-
# should no longer be needed.
52-
repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main"
53-
echo "$repo_args"
54-
if [ "$repo_args" = "|" ]; then
55-
repo_args=""
56-
else
57-
#repo_args="--othermirror"${repo_args#|}\""
58-
repo_args="${repo_args#|}"
59-
fi
53+
# currently broken, builder will not accept internal certs.
54+
# repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list |
55+
# sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \
56+
# -e 's/signed-by=.*\.gpg/trusted=yes/' |
57+
# sed -e ':a; N; $!ba; s/\n/|/g')"
58+
#for repo in $JOB_REPOS; do
59+
# repo_name=${repo##*://}
60+
# repo_name=${repo_name//\//_}
61+
# if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then
62+
# # don't add duplicates, first found wins
63+
# continue
64+
# fi
65+
# repos_added+=("$repo_name")
66+
# repo_args+="|deb ${repo} $VERSION_CODENAME main"
67+
#done
68+
69+
## NB: This PPA is needed to support modern go toolchains on ubuntu 20.04.
70+
## After the build is updated to use 22.04, which supports go >= 1.18, it
71+
## should no longer be needed.
72+
# currently broken - claim is public key not available.
73+
#repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main"
74+
#echo "$repo_args"
75+
#if [ "$repo_args" = "|" ]; then
76+
# repo_args=""
77+
#else
78+
# #repo_args="--othermirror"${repo_args#|}\""
79+
# repo_args="${repo_args#|}"
80+
#fi
6081
cd "$DEB_TOP"
6182
# shellcheck disable=SC2086
6283
sudo pbuilder update --override-config $DISTRO_ID_OPT ${repo_args:+--othermirror "$repo_args"}

packaging/rpm_chrootbuild

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -uex
44

5+
: "${HTTPS_PROXY:=}"
6+
: "${REPO_FILE_URL:=}"
7+
: "${ARCH:=$(arch)}"
8+
: "${REPOSITORY_NAME:=artifactory}"
9+
510
cp /etc/mock/"$CHROOT_NAME".cfg mock.cfg
611

712
# Enable mock ccache plugin
@@ -11,7 +16,20 @@ config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/%(root)s/cc
1116
EOF
1217

1318

14-
if [[ $CHROOT_NAME == *epel-8-x86_64 ]]; then
19+
# Optionally add a proxy to mock
20+
if [ -n "$HTTPS_PROXY" ];then
21+
yum_proxy="http://${HTTPS_PROXY##*//}"
22+
echo "config_opts['https_proxy'] = '$yum_proxy'" >> mock.cfg
23+
fi
24+
25+
# No proxy for local mirrors
26+
if [ -n "$REPO_FILE_URL" ]; then
27+
direct="${REPO_FILE_URL##*//}"
28+
direct="${direct%%/*}"
29+
echo "config_opts['no_proxy'] = '${direct}'" >> mock.cfg
30+
fi
31+
32+
if [[ $CHROOT_NAME == *"epel-8-${ARCH}" ]]; then
1533
cat <<EOF >> mock.cfg
1634
config_opts['module_setup_commands'] = [
1735
('enable', 'javapackages-tools:201801'),
@@ -21,7 +39,7 @@ EOF
2139
fi
2240

2341
# Use dnf on CentOS 7
24-
if [[ $CHROOT_NAME == *epel-7-x86_64 ]]; then
42+
if [[ $CHROOT_NAME == *"epel-7-$ARCH" ]]; then
2543
MOCK_OPTIONS="--dnf --no-bootstrap-chroot${MOCK_OPTIONS:+ }$MOCK_OPTIONS"
2644
fi
2745

@@ -61,7 +79,7 @@ if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then
6179
fi
6280
fi
6381
curl -sSf "$REPO_FILE_URL"daos_ci-"${CHROOT_NAME%-*}".repo >> mock.cfg
64-
repo_adds+=("--enablerepo *-artifactory")
82+
repo_adds+=("--enablerepo *-${REPOSITORY_NAME}")
6583
fi
6684
fi
6785

@@ -127,7 +145,7 @@ if ! eval time mock -r mock.cfg ${repo_dels[*]} ${repo_adds[*]} --no-clean \
127145
fi
128146

129147
# Save the ccache
130-
if [ -d /scratch/ ]; then
148+
if [ -d /scratch/mock ]; then
131149
mkdir -p "$bs_dir"/
132150
if ! flock "$bs_dir" -c "tar -czf $bs_dir/ccache-$CHROOT_NAME-$PACKAGE.tar.gz /var/cache/mock/${CHROOT_NAME}/ccache"; then
133151
echo "Failed to save ccache. Plowing onward."

0 commit comments

Comments
 (0)