Skip to content
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

DAOS-15596: Update to argobots 1.2 #26

Merged
merged 12 commits into from
Oct 7, 2024
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@
//@Library(value="pipeline-lib@your_branch") _

/* groovylint-disable-next-line CompileStatic */
packageBuildingPipelineDAOSTest(['distros' : ['centos7', 'el8', 'el9', 'leap15', 'ubuntu20.04']])
packageBuildingPipelineDAOSTest(['distros' : ['el8', 'el9', 'leap15', 'ubuntu20.04',],
'test-tag': 'pr'])
19 changes: 15 additions & 4 deletions argobots.spec
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
Name: argobots

%global major 1
%global minor 1
%global minor 2
#%%global prerelease
%global tag %{major}.%{minor}%{?prerelease}

Version: %{major}.%{minor}%{?prerelease:~%{prerelease}}
Release: 3%{?dist}
Release: 1%{?dist}
Summary: Lightweight, low-level threading and tasking framework
Group: System Environment/Libraries
License: UChicago Argonne, LLC -- Argobots License
Url: http://www.argobots.org/
#Source: https://api.github.com/repos/pmodels/$(NAME)/tarball/31703b1
Source: https://github.com/pmodels/%{name}/releases/download/v%{tag}/%{name}-%{tag}.tar.gz
%if "%{?commit}" != ""
Patch0: %{version}..%{commit}.patch
%endif
brianjmurrell marked this conversation as resolved.
Show resolved Hide resolved
brianjmurrell marked this conversation as resolved.
Show resolved Hide resolved
# Fix DAOS-14248: ULTs stacks dump works only once
Patch1: https://github.com/pmodels/argobots/commit/411e5b344642ebc82190fd8b125db512e5b449d1.patch
# Restore the libunwind support
Patch2: https://github.com/pmodels/argobots/commit/bb0c908abfac4bfe37852eee621930634183c6aa.patch

BuildRequires: pkgconfig

Expand Down Expand Up @@ -73,7 +79,7 @@ if true || [ ! -f configure ]; then
./autogen.sh
fi
# defaults: with-dlopen can be over-rode:
%configure --enable-valgrind --enable-stack-unwind
%configure --enable-valgrind --enable-stack-unwind --enable-option-checking=fatal
make %{?_smp_mflags} V=1

%install
Expand Down Expand Up @@ -109,6 +115,11 @@ rm -f %{buildroot}%{_libdir}/*.{l,}a
%doc README

%changelog
* Wed Oct 02 2024 Cedric Koch-Hofer <[email protected]> - 1.2-1
- Update to 1.2
- Add patch 411e5b3 Fix DAOS-14248: ULTs stacks dump works only once
- Add patch bb0c908 Restore the libunwind support

* Tue Jun 06 2023 Brian J. Murrell <[email protected]> - 1.1-3
- Update to build on EL9

Expand Down
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
argobots (1.2-1) unstable; urgency=medium
[ Cedric Koch-Hofer]
* Update to 1.2
* Add patch 411e5b3 Fix DAOS-14248: ULTs stacks dump works only once
* Add patch bb0c908 Restore the libunwind support

-- Cedric Koch-Hofer <[email protected]> Wed, 02 Oct 2024 16:08:44 -0500

argobots (1.1-2) unstable; urgency=medium
[ Brian J. Murrell ]
* NOOP change to keep parity with RPM versioning
Expand Down
30 changes: 26 additions & 4 deletions packaging/Dockerfile.centos.7
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,41 @@
#

# Pull base image
FROM centos:7
FROM centos:centos7
LABEL maintainer="[email protected]"

# Use local repo server if present
ARG REPO_FILE_URL
RUN set -e; \
if [ -n "$REPO_FILE_URL" ]; then \
cd /etc/yum.repos.d/ && \
curl -k -f -o daos_ci-centos7-artifactory.repo.tmp \
"$REPO_FILE_URL"daos_ci-centos7-artifactory.repo && \
for file in *.repo; do \
true > $file; \
done; \
mv daos_ci-centos7-artifactory.repo{.tmp,}; \
fi; \
yum -y install dnf; \
yum clean all; \
dnf --disablerepo \*epel\* -y install epel-release \
dnf-plugins-core; \
if [ -n "$REPO_FILE_URL" ]; then \
dnf -y --quiet config-manager --disable epel; \
fi; \
dnf -y update epel-release; \
dnf -y clean all

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

# Update distribution
#Nothing to do for CentOS

# Install basic tools
RUN yum install -y epel-release
RUN yum install -y mock make rpm-build curl createrepo rpmlint redhat-lsb-core \
git python-srpm-macros dnf
RUN dnf install -y epel-release
RUN dnf install -y mock make rpm-build curl createrepo rpmlint redhat-lsb-core \
git python-srpm-macros dnf && dnf -y clean all

# Add build user (to keep rpmbuild happy)
ENV USER build
Expand Down
38 changes: 26 additions & 12 deletions packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright 2018-2023 Intel Corporation
# Copyright 2018-2024 Intel Corporation
#
# 'recipe' for Docker to build an RPM
#

# Pull base image
ARG FVERSION=38
ARG FVERSION=latest
FROM fedora:$FVERSION
# Needed for later use of FVERSION
ARG FVERSION
Expand All @@ -15,27 +15,32 @@ LABEL maintainer="[email protected]"
ARG REPO_FILE_URL
RUN if [ -n "$REPO_FILE_URL" ]; then \
cd /etc/yum.repos.d/ && \
curl -f -o daos_ci-fedora-artifactory.repo.tmp \
curl -k -f -o daos_ci-fedora-artifactory.repo.tmp \
"$REPO_FILE_URL"daos_ci-fedora-artifactory.repo && \
rm -f *.repo && \
for file in *.repo; do \
true > $file; \
done; \
mv daos_ci-fedora-artifactory.repo{.tmp,}; \
fi

# Install basic tools
RUN dnf -y install mock make \
rpm-build createrepo rpmlint redhat-lsb-core git \
python-srpm-macros rpmdevtools
python-srpm-macros rpmdevtools && \
dnf -y clean all

# use same UID as host and default value of 1000 if not specified
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
# 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; \
fi

ARG CB0
RUN dnf -y upgrade && \
Expand All @@ -45,15 +50,24 @@ RUN dnf -y upgrade && \
# https://github.com/rpm-software-management/rpmlint/pull/795 in it
# But make sure to patch after dnf upgrade so that an upgraded rpmlint
# RPM doesn't wipe out our patch
COPY packaging/rpmlint--ignore-unused-rpmlintrc.patch .
# Ditto for the patch to zero and display ccache stats
# https://github.com/rpm-software-management/mock/pull/1299
ARG PACKAGINGDIR=packaging
COPY ${PACKAGINGDIR}/*.patch ./
RUN (cd $(python3 -c 'import site; print(site.getsitepackages()[-1])') && \
if ! grep -e --ignore-unused-rpmlintrc rpmlint/cli.py; then \
if ! patch -p1; then \
if ! patch -p1 < $OLDPWD/rpmlint--ignore-unused-rpmlintrc.patch; then \
exit 1; \
fi; \
rm -f rpmlint/__pycache__/{cli,lint}.*.pyc; \
fi) < rpmlint--ignore-unused-rpmlintrc.patch; \
rm -f rpmlint--ignore-unused-rpmlintrc.patch
fi; \
if ! grep _ccachePostBuildHook mockbuild/plugins/ccache.py; then \
if ! patch -p3 < $OLDPWD/ccache-stats.patch; then \
exit 1; \
fi; \
rm -f mockbuild/plugins/__pycache__/ccache.*.pyc; \
fi); \
rm -f rpmlint--ignore-unused-rpmlintrc.patch ccache-stats.patch

# show the release that was built
ARG CACHEBUST
Expand Down
25 changes: 11 additions & 14 deletions packaging/Dockerfile.ubuntu.20.04
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,23 @@ RUN if [ -n "$REPO_FILE_URL" ]; then \
true > ../sources.list && \
mv daos_ci-ubuntu20.04-artifactory.list.tmp \
daos_ci-ubuntu20.04-artifactory.list; \
url="${REPO_FILE_URL%/*/}/hpe-ilorest-ubuntu-bionic-proxy/"; \
else \
url="https://downloads.linux.hpe.com/SDR/repo/ilorest/"; \
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/; \
curl -f -O "$url"GPG-KEY-hprest; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg \
--import GPG-KEY-hprest; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \
--output /usr/local/share/keyrings/daos-stack-public.gpg; \
--output /usr/local/share/keyrings/hpe-sdr-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; \
curl -f -O "$REPO_FILE_URL"esad_repo.key; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg \
--import esad_repo.key; \
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \
--output /usr/local/share/keyrings/hpe-sdr-public.gpg; \
rm ./temp-keyring.gpg
--output /usr/local/share/keyrings/daos-stack-public.gpg

# Install basic tools
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
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 @@ -83,6 +83,14 @@ DISTRO_VERSION ?= $(VERSION_ID)
ORIG_TARGET_VER := 15.4
SED_EXPR := 1p
endif
ifeq ($(CHROOT_NAME),opensuse-leap-15.5-x86_64)
VERSION_ID := 15.5
DISTRO_ID := sl15.5
DISTRO_BASE := LEAP_15
DISTRO_VERSION ?= $(VERSION_ID)
ORIG_TARGET_VER := 15.5
SED_EXPR := 1p
endif
endif
ifeq ($(ID),centos)
ID = el
Expand Down
15 changes: 13 additions & 2 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 All @@ -54,6 +58,7 @@ RPM_BUILD_OPTIONS := $(BUILD_DEFINES)
GIT_DIFF_EXCLUDES := $(PATCH_EXCLUDE_FILES:%=':!%')
endif

FVERSION ?= latest
COMMON_RPM_ARGS := --define "_topdir $$PWD/_topdir" $(BUILD_DEFINES)
SPEC := $(shell if [ -f $(NAME)-$(DISTRO_BASE).spec ]; then echo $(NAME)-$(DISTRO_BASE).spec; else echo $(NAME).spec; fi)
VERSION = $(eval VERSION := $(shell rpm $(COMMON_RPM_ARGS) --specfile --qf '%{version}\n' $(SPEC) | sed -n '1p'))$(VERSION)
Expand Down Expand Up @@ -163,7 +168,7 @@ endif

$(notdir $(SOURCE) $(OTHER_SOURCES) $(REAL_SOURCE)): $(SPEC) $(CALLING_MAKEFILE)
# TODO: need to clean up old ones
$(SPECTOOL) -g $(SPEC)
$(SPECTOOL) $(COMMON_RPM_ARGS) -g $(SPEC)

$(DEB_TOP)/%: % | $(DEB_TOP)/

Expand Down Expand Up @@ -363,12 +368,14 @@ chrootbuild: $(SRPM) $(CALLING_MAKEFILE)
LOCAL_REPOS='$(LOCAL_REPOS)' \
ARTIFACTORY_URL="$(ARTIFACTORY_URL)" \
DISTRO_VERSION="$(DISTRO_VERSION)" \
PACKAGE="$(NAME)" \
TARGET="$<" \
packaging/rpm_chrootbuild
endif

podman_chrootbuild:
if ! podman build --build-arg REPO_FILE_URL=$(REPO_FILE_URL) \
--build-arg FVERSION=$(FVERSION) \
-t $(subst +,-,$(CHROOT_NAME))-chrootbuild \
-f packaging/Dockerfile.mockbuild .; then \
echo "Container build failed"; \
Expand All @@ -386,7 +393,9 @@ podman_chrootbuild:
exit 1; \
fi; \
rpmlint $$(ls /var/lib/mock/$(CHROOT_NAME)/result/*.rpm | \
grep -v -e debuginfo -e debugsource -e src.rpm)'
grep -v -e debuginfo -e debugsource -e src.rpm)'; then \
exit 1; \
fi

docker_chrootbuild:
if ! $(DOCKER) build --build-arg UID=$$(id -u) -t chrootbuild \
Expand Down Expand Up @@ -419,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
66 changes: 66 additions & 0 deletions packaging/ccache-stats.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
From e87d916d7f49ea4949973adf0f09e9e5bf891e03 Mon Sep 17 00:00:00 2001
From: "Brian J. Murrell" <[email protected]>
Date: Tue, 30 Jan 2024 11:03:12 -0500
Subject: [PATCH 1/2] Show ccache stats at the end of the build

Zero the ccache stats at the beginning of the build and then display the
ccache stats at the end of the build to see how effective ccache was.

Signed-off-by: Brian J. Murrell <[email protected]>
---
mock/py/mockbuild/plugins/ccache.py | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/mock/py/mockbuild/plugins/ccache.py b/mock/py/mockbuild/plugins/ccache.py
index 2666ad9fc..1080ffe68 100644
--- a/mock/py/mockbuild/plugins/ccache.py
+++ b/mock/py/mockbuild/plugins/ccache.py
@@ -35,6 +35,7 @@ def __init__(self, plugins, conf, buildroot):
buildroot.preexisting_deps.append("ccache")
plugins.add_hook("prebuild", self._ccacheBuildHook)
plugins.add_hook("preinit", self._ccachePreInitHook)
+ plugins.add_hook("postbuild", self._ccachePostBuildHook)
buildroot.mounts.add(
BindMountPoint(srcpath=self.ccachePath, bindpath=buildroot.make_chroot_path("/var/tmp/ccache")))

@@ -47,6 +48,9 @@ def __init__(self, plugins, conf, buildroot):
@traceLog()
def _ccacheBuildHook(self):
self.buildroot.doChroot(["ccache", "-M", str(self.ccache_opts['max_cache_size'])], shell=False)
+ # zero ccache stats
+ getLog().info("Zero ccache stats:")
+ self.buildroot.doChroot(["ccache", "--zero-stats"], printOutput=True, shell=False)

# set up the ccache dir.
# we also set a few variables used by ccache to find the shared cache.
@@ -61,3 +65,10 @@ def _ccachePreInitHook(self):
file_util.mkdirIfAbsent(self.buildroot.make_chroot_path('/var/tmp/ccache'))
file_util.mkdirIfAbsent(self.ccachePath)
self.buildroot.uid_manager.changeOwner(self.ccachePath, recursive=True)
+
+ # get some cache stats
+ def _ccachePostBuildHook(self):
+ # show the cache hit stats
+ getLog().info("ccache stats:")
+ self.buildroot.doChroot(["ccache", "--show-stats"], printOutput=True, shell=False)
++

From bfd3a7e1bb47d28ee60a94cb5985c1f66476475f Mon Sep 17 00:00:00 2001
From: "Brian J. Murrell" <[email protected]>
Date: Tue, 30 Jan 2024 11:17:48 -0500
Subject: [PATCH 2/2] Remove extraneous line

Signed-off-by: Brian J. Murrell <[email protected]>
---
mock/py/mockbuild/plugins/ccache.py | 1 -
1 file changed, 1 deletion(-)

diff --git a/mock/py/mockbuild/plugins/ccache.py b/mock/py/mockbuild/plugins/ccache.py
index 1080ffe68..1a20846d3 100644
--- a/mock/py/mockbuild/plugins/ccache.py
+++ b/mock/py/mockbuild/plugins/ccache.py
@@ -71,4 +71,3 @@ def _ccachePostBuildHook(self):
# show the cache hit stats
getLog().info("ccache stats:")
self.buildroot.doChroot(["ccache", "--show-stats"], printOutput=True, shell=False)
-+
Loading