Skip to content

SRE-2382 Update for Fedora 41 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions fuse3.spec
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ Common files for FUSE v2 and FUSE v3.
signify -V -m '%{SOURCE0}' -p '%{SOURCE2}'

%setup -q -n fuse-%{version}
%patch0 -p1
%patch -P 0 -p1
%if 0%{?suse_version}
%patch1 -p1
%patch -P 1 -p1
%endif
%patch16 -p1
%patch17 -p1
%patch -P 16 -p1
%patch -P 17 -p1

%build
export LC_ALL=en_US.UTF-8
Expand Down
3 changes: 2 additions & 1 deletion packaging/Dockerfile.coverity
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#
# Copyright 2018-2020, Intel Corporation
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# 'recipe' for Docker to build for a Coverity scan.
#

# Pull base image
FROM fedora:latest
MAINTAINER daos-stack <daos@daos.groups.io>
LABEL maintainer="daos-stack <daos@daos.groups.io>""

# use same UID as host and default value of 1000 if not specified
ARG UID=1000
Expand Down
34 changes: 20 additions & 14 deletions packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
# Copyright 2018-2024 Intel Corporation
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# 'recipe' for Docker to build an RPM
#
Expand All @@ -13,15 +14,16 @@ LABEL maintainer="daos@daos.groups.io"

# Use local repo server if present
ARG REPO_FILE_URL
RUN if [ -n "$REPO_FILE_URL" ]; then \
cd /etc/yum.repos.d/ && \
curl -k -f -o daos_ci-fedora-artifactory.repo.tmp \
"$REPO_FILE_URL"daos_ci-fedora-artifactory.repo && \
for file in *.repo; do \
true > $file; \
done; \
mv daos_ci-fedora-artifactory.repo{.tmp,}; \
fi
ARG DAOS_LAB_CA_FILE_URL
ARG REPOSITORY_NAME
# script to install OS updates basic tools and daos dependencies
# COPY ./utils/scripts/install-fedora.sh /tmp/install.sh
# script to setup local repo if available
COPY ./packaging/scripts/repo-helper-fedora.sh /tmp/repo-helper.sh

RUN chmod +x /tmp/repo-helper.sh && \
/tmp/repo-helper.sh && \
rm -f /tmp/repo-helper.sh

# Install basic tools
RUN dnf -y install mock make \
Expand All @@ -33,12 +35,16 @@ RUN dnf -y install mock make \
ARG UID=1000

# Add build user (to keep rpmbuild happy)
ENV USER build
ENV PASSWD build
RUN useradd -u $UID -ms /bin/bash $USER
RUN echo "$USER:$PASSWD" | chpasswd
ENV USER=build
ENV PASSWD=build
# add the user to the mock group so it can run mock
RUN usermod -a -G mock $USER
RUN if [ $UID != 0 ]; then \
useradd -u $UID -ms /bin/bash $USER; \
echo "$USER:$PASSWD" | chpasswd; \
usermod -a -G mock $USER; \
mkdir -p /var/cache/mock; \
chown $USER:root /var/cache/mock; \
fi

ARG CB0
RUN dnf -y upgrade && \
Expand Down
51 changes: 51 additions & 0 deletions packaging/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Keep Dockerfile.ubuntu the same as this file until all packaging
# jobs are fixed to have a Dockerfile.ubuntu, and then the common
# Jenkinsfile will be changed to use Dockerfile.ubuntu.
#
# Copyright 2019-2021, Intel Corporation
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# 'recipe' for Docker to build an Debian package
#
# Pull base image
ARG BASE_DISTRO=ubuntu:20.04
FROM $BASE_DISTRO
LABEL org.opencontainers.image.authors="daos@daos.groups.io"
# Needed for later use of BASE_DISTRO
ARG BASE_DISTRO

ARG REPO_FILE_URL
ARG DAOS_LAB_CA_FILE_URL
ARG REPOSITORY_NAME
# script to setup local repo if available
COPY ./scripts/repo-helper-ubuntu.sh /tmp/repo-helper.sh

RUN chmod +x /tmp/repo-helper.sh && \
/tmp/repo-helper.sh && \
rm -f /tmp/repo-helper.sh

# Install basic tools
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
autoconf bash ca-certificates curl debhelper dh-make \
dpkg-dev dh-python doxygen gcc git git-buildpackage \
javahelper locales make patch pbuilder pkg-config \
python3-dev python3-distro python3-distutils rpm scons wget \
cmake valgrind rpmdevtools

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

# Add build user (to keep chrootbuild happy)
ENV USER=build
RUN useradd -u $UID -ms /bin/bash $USER

# need to run the build command as root, as it needs to chroot
RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \
echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \
fi; \
echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \
echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \
echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \
chmod 0440 /etc/sudoers.d/build; \
visudo -c; \
sudo -l -U build
57 changes: 21 additions & 36 deletions packaging/Dockerfile.ubuntu.20.04
Original file line number Diff line number Diff line change
@@ -1,65 +1,50 @@
# Keep Dockerfile.ubuntu the same as this file until all packaging
# jobs are fixed to have a Dockerfile.ubuntu, and then the common
# Jenkinsfile will be changed to use Dockerfile.ubuntu.
#
# Copyright 2019-2021, Intel Corporation
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# 'recipe' for Docker to build an Debian package
#
# Pull base image
FROM ubuntu:20.04
ARG BASE_DISTRO=ubuntu:20.04
FROM $BASE_DISTRO
LABEL org.opencontainers.image.authors="daos@daos.groups.io"

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl gpg
# Needed for later use of BASE_DISTRO
ARG BASE_DISTRO

ARG REPO_FILE_URL
RUN if [ -n "$REPO_FILE_URL" ]; then \
cd /etc/apt/sources.list.d && \
curl -f -o daos_ci-ubuntu20.04-artifactory.list.tmp \
"$REPO_FILE_URL"daos_ci-ubuntu20.04-artifactory.list && \
true > ../sources.list && \
mv daos_ci-ubuntu20.04-artifactory.list.tmp \
daos_ci-ubuntu20.04-artifactory.list; \
fi; \
cd -; \
curl -f -O "$REPO_FILE_URL"esad_repo.key; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg \
--import esad_repo.key; \
mkdir -p /usr/local/share/keyrings/; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \
--output /usr/local/share/keyrings/daos-stack-public.gpg; \
rm ./temp-keyring.gpg; \
url_prefix=https://downloads.linux.hpe.com/SDR/; \
for url in hpPublicKey2048.pub \
hpPublicKey2048_key1.pub \
hpePublicKey2048_key1.pub; do \
curl -f -O "$url_prefix$url"; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg \
--import "$(basename $url)"; \
done; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \
--output /usr/local/share/keyrings/hpe-sdr-public.gpg; \
rm ./temp-keyring.gpg
ARG DAOS_LAB_CA_FILE_URL
ARG REPOSITORY_NAME
# script to setup local repo if available
COPY ./packaging/scripts/repo-helper-ubuntu.sh /tmp/repo-helper.sh

RUN chmod +x /tmp/repo-helper.sh && \
/tmp/repo-helper.sh && \
rm -f /tmp/repo-helper.sh

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

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

# Add build user (to keep chrootbuild happy)
ENV USER build
ENV USER=build
RUN useradd -u $UID -ms /bin/bash $USER

# need to run the build command as root, as it needs to chroot
RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \
echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \
fi; \
echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \
echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \
echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \
echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \
chmod 0440 /etc/sudoers.d/build; \
visudo -c; \
Expand Down
3 changes: 2 additions & 1 deletion packaging/Dockerfile.ubuntu.rolling
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#
# Copyright 2019, Intel Corporation
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# 'recipe' for Docker to build an Debian package
#
# Pull base image
FROM ubuntu:rolling
Maintainer daos-stack <daos@daos.groups.io>
LABEL org.opencontainers.image.authors="daos@daos.groups.io"

# use same UID as host and default value of 1000 if not specified
ARG UID=1000
Expand Down
8 changes: 8 additions & 0 deletions packaging/Makefile_distro_vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ DISTRO_VERSION ?= $(VERSION_ID)
ORIG_TARGET_VER := 15.5
SED_EXPR := 1p
endif
ifeq ($(CHROOT_NAME),opensuse-leap-15.6-x86_64)
VERSION_ID := 15.6
DISTRO_ID := sl15.6
DISTRO_BASE := LEAP_15
DISTRO_VERSION ?= $(VERSION_ID)
ORIG_TARGET_VER := 15.6
SED_EXPR := 1p
endif
endif
ifeq ($(ID),centos)
ID = el
Expand Down
6 changes: 6 additions & 0 deletions packaging/Makefile_packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ TEST_PACKAGES ?= ${NAME}
# unfortunately we cannot always name the repo the same as the project
REPO_NAME ?= $(NAME)

ifneq ($(CI_PR_REPOS),)
PR_REPOS ?= $(CI_PR_REPOS)
else
PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos: *\(.*\)/\1/p')
endif
LEAP_15_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-leap15: *\(.*\)/\1/p')
EL_7_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el7: *\(.*\)/\1/p')
EL_8_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el8: *\(.*\)/\1/p')
Expand Down Expand Up @@ -424,6 +428,8 @@ packaging_check:
--exclude libfabric.spec \
--exclude Makefile \
--exclude README.md \
--exclude SECURITY.md \
--exclude LICENSE \
--exclude _topdir \
--exclude \*.tar.\* \
--exclude \*.code-workspace \
Expand Down
75 changes: 48 additions & 27 deletions packaging/debian_chrootbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,35 @@

set -uex

: "${REPO_FILE_URL:=}"
: "${HTTPS_PROXY:=}"

# Currently not fully working behind a proxy
if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then
echo "MIRRORSITE=${ARTIFACTORY_URL}artifactory/ubuntu-proxy" | sudo tee /root/.pbuilderrc
pbuilderrc="./pbuilder_rc.txt"
rm -f "$pbuilderrc"
if [ -n "${HTTPS_PROXY}" ]; then
echo "export http_proxy=\"${HTTPS_PROXY}\"" >> "$pbuilderrc"
else
echo "MIRRORSITE=${ARTIFACTORY_URL}/ubuntu-proxy/ubuntu" > "$pbuilderrc"
fi
#if [ -n "$REPO_FILE_URL" ]; then
# direct="${REPO_FILE_URL##*//}"
# direct="${direct%%/*}"
# echo "no_proxy=\"${direct}\"" >> "$pbuilderrc"
#fi
# shellcheck disable=SC2002
cat "$pbuilderrc" | sudo tee /root/.pbuilderrc
fi

# shellcheck disable=SC2086
sudo pbuilder create \
--extrapackages "gnupg ca-certificates" \
$DISTRO_ID_OPT
$DISTRO_ID_OPT || true # Ignore error status for now.

repo_args=""
repos_added=()
# currently a bit broken, pbuilder will not accept user provided CAs.
for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
branch="master"
build_number="lastSuccessfulBuild"
Expand All @@ -32,31 +50,34 @@ for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
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/ ./"
done

repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list |
sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \
-e 's/signed-by=.*\.gpg/trusted=yes/' |
sed -e ':a; N; $!ba; s/\n/|/g')"
for repo in $JOB_REPOS; do
repo_name=${repo##*://}
repo_name=${repo_name//\//_}
if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then
# don't add duplicates, first found wins
continue
fi
repos_added+=("$repo_name")
repo_args+="|deb ${repo} $VERSION_CODENAME main"
done
# NB: This PPA is needed to support modern go toolchains on ubuntu 20.04.
# After the build is updated to use 22.04, which supports go >= 1.18, it
# should no longer be needed.
repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main"
echo "$repo_args"
if [ "$repo_args" = "|" ]; then
repo_args=""
else
#repo_args="--othermirror"${repo_args#|}\""
repo_args="${repo_args#|}"
fi
# currently broken, builder will not accept internal certs.
# repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list |
# sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \
# -e 's/signed-by=.*\.gpg/trusted=yes/' |
# sed -e ':a; N; $!ba; s/\n/|/g')"
#for repo in $JOB_REPOS; do
# repo_name=${repo##*://}
# repo_name=${repo_name//\//_}
# if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then
# # don't add duplicates, first found wins
# continue
# fi
# repos_added+=("$repo_name")
# repo_args+="|deb ${repo} $VERSION_CODENAME main"
#done

## NB: This PPA is needed to support modern go toolchains on ubuntu 20.04.
## After the build is updated to use 22.04, which supports go >= 1.18, it
## should no longer be needed.
# currently broken - claim is public key not available.
#repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main"
#echo "$repo_args"
#if [ "$repo_args" = "|" ]; then
# repo_args=""
#else
# #repo_args="--othermirror"${repo_args#|}\""
# repo_args="${repo_args#|}"
#fi
cd "$DEB_TOP"
# shellcheck disable=SC2086
sudo pbuilder update --override-config $DISTRO_ID_OPT ${repo_args:+--othermirror "$repo_args"}
Expand Down
2 changes: 1 addition & 1 deletion packaging/get_base_branch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -eux -o pipefail
IFS=' ' read -r -a add_bases <<< "${1:-}"
origin=origin
origin="${ORIGIN:-origin}"
mapfile -t all_bases < <(echo "master"
git branch -r | sed -ne "/^ $origin\\/release\\/[0-9]/s/^ $origin\\///p")
all_bases+=("${add_bases[@]}")
Expand Down
Loading