Skip to content
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
6 changes: 5 additions & 1 deletion hdf5.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# You need to recompile all users of HDF5 for each version change
Name: hdf5
Version: %{hdf5_major}.%{hdf5_minor}.%{hdf5_bugfix}%{?hdf5_prerelease:~%{hdf5_prerelease}}
Release: 3%{?commit:.git%{shortcommit}}%{?dist}
Release: 4%{?commit:.git%{shortcommit}}%{?dist}
Summary: A general purpose library and file format for storing scientific data
License: BSD
URL: https://portal.hdfgroup.org/display/HDF5/HDF5
Expand Down Expand Up @@ -242,6 +242,7 @@ HDF5 tests with openmpi3
%package mpich
Summary: HDF5 mpich libraries
BuildRequires: mpich-devel
BuildRequires: libfabric-devel
Provides: %{name}-mpich2 = %{version}-%{release}
Obsoletes: %{name}-mpich2 < 1.8.11-4

Expand Down Expand Up @@ -708,6 +709,9 @@ done
%endif

%changelog
* Fri Aug 6 2021 Maureen Jean <[email protected]> - 1.13.0~rc5-4
- Update packaging

* Mon May 17 2021 Brian J. Murrell <[email protected]> - 1.13.0~rc5-3
- Package for openmpi on EL8
- Move tests under %%_libdir/$mpi to keep the dependency generator happy
Expand Down
2 changes: 1 addition & 1 deletion packaging/Dockerfile.centos.7
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ARG UID=1000
# 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
git python-srpm-macros dnf

# Add build user (to keep rpmbuild happy)
ENV USER build
Expand Down
1 change: 0 additions & 1 deletion packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ RUN usermod -a -G mock $USER
RUN grep use_nspawn /etc/mock/site-defaults.cfg || \
echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg

RUN chmod g+w /etc/mock/*
12 changes: 6 additions & 6 deletions packaging/Dockerfile.ubuntu.20.04
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright 2019-2020, Intel Corporation
# Copyright 2019-2021, Intel Corporation
#
# 'recipe' for Docker to build an Debian package
#
# Pull base image
FROM ubuntu:20.04
MAINTAINER daos-stack <daos@daos.groups.io>
LABEL org.opencontainers.image.authors="[email protected]"

# use same UID as host and default value of 1000 if not specified
ARG UID=1000
Expand All @@ -14,10 +14,10 @@ ARG REPO_UBUNTU_20_04=""

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

# rpmdevtools
RUN echo "deb [trusted=yes] ${REPO_URL}${REPO_UBUNTU_20_04} focal main" > /etc/apt/sources.list.d/daos-stack-ubuntu-stable-local.list
Expand Down
29 changes: 19 additions & 10 deletions packaging/Makefile_distro_vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,34 @@ DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist})
VERSION_ID := 8
DISTRO_ID := el8
DISTRO_BASE := EL_8
SED_EXPR := 1s/$(DIST)//p
ifeq ($(DAOS_STACK_CENTOS_8_VERSION),8.$(DOT_VER))
DAOS_REPO_TYPE ?= STABLE
else
DAOS_REPO_TYPE ?= DEV
endif
ifeq ($(CHROOT_NAME),opensuse-leap-15.1-x86_64)
VERSION_ID := 15.1
DISTRO_ID := sl15.1
DISTRO_BASE := LEAP_15
SED_EXPR := 1p
SED_EXPR := 1s/$(DIST)//p
endif
ifeq ($(CHROOT_NAME),opensuse-leap-15.2-x86_64)
VERSION_ID := 15.2
DISTRO_ID := sl15.2
DISTRO_BASE := LEAP_15
ifeq ($(DAOS_STACK_LEAP_15_VERSION),15.2)
DAOS_REPO_TYPE ?= STABLE
else
DAOS_REPO_TYPE ?= DEV
endif
SED_EXPR := 1p
endif
ifeq ($(CHROOT_NAME),leap-42.3-x86_64)
# TBD if support is ever resurrected
ifeq ($(CHROOT_NAME),opensuse-leap-15.3-x86_64)
VERSION_ID := 15.3
DISTRO_ID := sl15.3
DISTRO_BASE := LEAP_15
ifeq ($(DAOS_STACK_LEAP_15_VERSION),15.3)
DAOS_REPO_TYPE ?= STABLE
else
DAOS_REPO_TYPE ?= DEV
endif
ifeq ($(CHROOT_NAME),sles-12.3-x86_64)
# TBD if support is ever resurrected
SED_EXPR := 1p
endif
endif
ifeq ($(ID),centos)
Expand Down
42 changes: 30 additions & 12 deletions packaging/Makefile_packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ RPM_BUILD_OPTIONS += $(EXTERNAL_RPM_BUILD_OPTIONS)
# some defaults the caller can override
PACKAGING_CHECK_DIR ?= ../packaging
LOCAL_REPOS ?= true
ifeq ($(ID_LIKE),debian)
DAOS_REPO_TYPE ?= LOCAL
else
DAOS_REPO_TYPE ?= STABLE
endif
TEST_PACKAGES ?= ${NAME}

# unfortunately we cannot always name the repo the same as the project
Expand Down Expand Up @@ -70,13 +75,12 @@ define distro_map
case $(DISTRO_ID) in \
el7) distro="centos7" \
;; \
el8) distro="centos8" \
el8) distro="centos8"; \
if [ -n "$DOT_VER" ] ; then distro="centos8.${DOT_VER}"; fi \
;; \
sle12.3) distro="sles12.3" \
sl15.2) distro=leap15.2 \
;; \
sl42.3) distro="leap42.3" \
;; \
sl15.*) distro="leap15" \
sl15.*) distro=leap15.3 \
;; \
ubuntu*) distro="$(DISTRO_ID)" \
;; \
Expand Down Expand Up @@ -126,8 +130,7 @@ all: $(TARGETS)
xz -z $<

_topdir/SOURCES/%: % | _topdir/SOURCES/
rm -f $@
ln $< $@
if [ ! -d "$@" ]; then rm -f "$@"; ln "$<" "$@"; fi

# At least one spec file, SLURM (sles), has a different version for the
# download file than the version in the spec file.
Expand Down Expand Up @@ -291,19 +294,33 @@ ls: $(TARGETS)
# *_GROUP_* repos may not supply a repomd.xml.key.
ifeq ($(LOCAL_REPOS),true)
ifneq ($(REPOSITORY_URL),)
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO),)
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_$(DAOS_REPO_TYPE)_REPO),)
ifeq ($(ID_LIKE),debian)
# $(DISTRO_BASE)_LOCAL_REPOS is a list separated by | because you cannot pass lists
# of values with spaces as environment variables
$(DISTRO_BASE)_LOCAL_REPOS := [trusted=yes]
endif
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS) $(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO)/
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS) $(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_$(DAOS_REPO_TYPE)_REPO)/
endif
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)|
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_GROUP_REPO),)
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_GROUP_REPO)/|
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_DOCKER_$(DAOS_REPO_TYPE)_REPO),)
DISTRO_REPOS = $(DAOS_STACK_$(DISTRO_BASE)_DOCKER_$(DAOS_REPO_TYPE)_REPO)
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_DOCKER_$(DAOS_REPO_TYPE)_REPO)/|
endif
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_APPSTREAM_$(DAOS_REPO_TYPE)_REPO),)
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_APPSTREAM_$(DAOS_REPO_TYPE)_REPO)|
endif
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_POWERTOOLS_$(DAOS_REPO_TYPE)_REPO),)
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)$(REPOSITORY_URL)$(DAOS_STACK_$(DISTRO_BASE)_POWERTOOLS_$(DAOS_REPO_TYPE)_REPO)|
endif
ifneq ($(ID_LIKE),debian)
ifneq ($(DAOS_STACK_INTEL_ONEAPI_REPO),)
$(DISTRO_BASE)_LOCAL_REPOS := $($(DISTRO_BASE)_LOCAL_REPOS)$(REPOSITORY_URL)$(DAOS_STACK_INTEL_ONEAPI_REPO)|
endif
endif
endif
# else
# Mirror repos for building a point release.
endif
ifeq ($(ID_LIKE),debian)
chrootbuild: $(DEB_TOP)/$(DEB_DSC)
Expand Down Expand Up @@ -331,6 +348,7 @@ chrootbuild: $(SRPM) $(CALLING_MAKEFILE)
DISTRO_BASE_LOCAL_REPOS="$($(DISTRO_BASE)_LOCAL_REPOS)" \
MOCK_OPTIONS="$(MOCK_OPTIONS)" \
RPM_BUILD_OPTIONS='$(RPM_BUILD_OPTIONS)' \
DISTRO_REPOS='$(DISTRO_REPOS)' \
TARGET="$<" \
packaging/rpm_chrootbuild
endif
Expand Down Expand Up @@ -378,7 +396,7 @@ endif
test:
# Test the rpmbuild by installing the built RPM
$(call install_repos,$(REPO_NAME)@$(BRANCH_NAME):$(BUILD_NUMBER))
yum -y install $(TEST_PACKAGES)
dnf -y install $(TEST_PACKAGES)

show_spec:
@echo '$(SPEC)'
Expand Down
114 changes: 78 additions & 36 deletions packaging/rpm_chrootbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,88 @@ set -uex

# shellcheck disable=SC2153
IFS=\| read -r -a distro_base_local_repos <<< "$DISTRO_BASE_LOCAL_REPOS"
repo_adds=()
repo_dels=()

if [ -w /etc/mock/"$CHROOT_NAME".cfg ]; then
# Remove the distro repos
if [[ $CHROOT_NAME =~ opensuse-leap-* ]]; then
ed /etc/mock/"$CHROOT_NAME".cfg << EOF
/^# repos$/+2;/^"""$/-1d
wq
EOF
elif [[ $CHROOT_NAME =~ epel-8-* ]]; then
echo -e "config_opts['module_enable'] = ['javapackages-tools']\n" >> /etc/mock/"$CHROOT_NAME".cfg



: "${DISTRO_NAME:=$DISTRO}"
if [[ "${CHROOT_NAME}" = epel-8-* ]]; then
: "${DAOS_STACK_CENTOS_8_VERSION:=8}"
DISTRO_NAME="centos-${DAOS_STACK_CENTOS_8_VERSION}"
elif [[ "${CHROOT_NAME}" = opensuse-leap-15* ]]; then
: "${DAOS_STACK_LEAP_15_VERSION:=15.3}"
DISTRO_NAME="opensuse-${DAOS_STACK_LEAP_15_VERSION}"
fi
: "${REPOSITORY_URL:=}"
if [ -n "$REPOSITORY_URL" ] && [ -n "$DISTRO_REPOS" ]; then
repo_dels+=("--disablerepo=\*")
elif [ "${CHROOT_NAME}" == "epel-8-x86_64" ]; then
# Special code to force building on CentOS 8.3
if [ "${DOT_VER}" -eq 3 ]; then
repo_dels+=("--disablerepo=\*")
repo_base='http://mirror.centos.org/centos/8.3.2011/'
distro_base_local_repos=(\
"${repo_base}BaseOS/x86_64/os/" \
"${repo_base}AppStream/x86_64/os/" \
"${repo_base}extras/x86_64/os/" \
"${repo_base}PowerTools/x86_64/os/" \
https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/ )
fi
echo -e "config_opts['yum.conf'] += \"\"\"\n" >> /etc/mock/"$CHROOT_NAME".cfg
for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
branch="master"
build_number="lastSuccessfulBuild"
if [[ $repo = *@* ]]; then
branch="${repo#*@}"
repo="${repo%@*}"
if [[ $branch = *:* ]]; then
build_number="${branch#*:}"
branch="${branch%:*}"
fi
fi

: "${WORKSPACE:=$PWD}"
mock_config_dir="$WORKSPACE/mock"
original_cfg_file="/etc/mock/${CHROOT_NAME}.cfg"
cfg_file="$mock_config_dir/${CHROOT_NAME}_daos.cfg"
mkdir -p "$mock_config_dir"
ln -sf /etc/mock/templates "$mock_config_dir/"
ln -sf /etc/mock/logging.ini "$mock_config_dir/"

cp "$original_cfg_file" "$cfg_file"

if [ "${CHROOT_NAME}" == "epel-8-x86_64" ]; then
echo -e "config_opts['module_enable'] = ['javapackages-tools:201801']" \
>> "$cfg_file"
if [ -n "${DOT_VER}" ]; then
echo -e "config_opts['macros']['%dist'] = '.el8_${DOT_VER}'" >> "$cfg_file"
fi
fi
echo -e "config_opts['yum.conf'] += \"\"\"\n" >> "$cfg_file"
for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
branch="master"
build_number="lastSuccessfulBuild"
if [[ $repo = *@* ]]; then
branch="${repo#*@}"
repo="${repo%@*}"
if [[ $branch = *:* ]]; then
build_number="${branch#*:}"
branch="${branch%:*}"
fi
echo -e "[$repo:$branch:$build_number]\n\
fi
repo_adds+=("--enablerepo $repo:$branch:$build_number")
echo -e "[$repo:$branch:$build_number]\n\
name=$repo:$branch:$build_number\n\
baseurl=${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/$branch/$build_number/artifact/artifacts/$DISTRO/\n\
baseurl=${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/$branch/$build_number/artifact/artifacts/$DISTRO_NAME/\n\
enabled=1\n\
gpgcheck=False\n" >> /etc/mock/"$CHROOT_NAME".cfg
done
for repo in $JOB_REPOS "${distro_base_local_repos[@]}"; do
repo_name=${repo##*://}
repo_name=${repo_name//\//_}
echo -e "[${repo_name//@/_}]\n\
gpgcheck=False\n" >> "$cfg_file"
done
for repo in $JOB_REPOS "${distro_base_local_repos[@]}"; do
repo_name=${repo##*://}
repo_name=${repo_name//\//_}
repo_adds+=("--enablerepo $repo_name")
echo -e "[${repo_name//@/_}]\n\
name=${repo_name}\n\
baseurl=${repo}\n\
enabled=1\n" >> /etc/mock/"$CHROOT_NAME".cfg
done
echo "\"\"\"" >> /etc/mock/"$CHROOT_NAME".cfg
else
echo "Unable to update /etc/mock/$CHROOT_NAME.cfg."
echo "You need to make sure it has the needed repos in it yourself."
fi
eval mock -r "$CHROOT_NAME" $MOCK_OPTIONS $RPM_BUILD_OPTIONS "$TARGET"
enabled=1\n" >> "$cfg_file"
done
echo "\"\"\"" >> "$cfg_file"

# shellcheck disable=SC2086
eval mock --configdir "$mock_config_dir" -r "${CHROOT_NAME}_daos" \
"${repo_dels[*]}" "${repo_adds[*]}" \
$MOCK_OPTIONS $RPM_BUILD_OPTIONS "$TARGET"

# For now just do an advisory check
rpmlint "/var/lib/mock/${CHROOT_NAME}/result/"*.rpm || true