Skip to content

Commit

Permalink
spdk-devel R: dpdk-daos-devel (#60)
Browse files Browse the repository at this point in the history
To make sure we don't accidentally pick up any superior distribution
provided dpdk.

Signed-off-by: Brian J. Murrell <[email protected]>
  • Loading branch information
brianjmurrell authored Oct 17, 2023
1 parent 15221a8 commit 0deb13d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
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
12 changes: 8 additions & 4 deletions packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ 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
Expand All @@ -45,7 +48,8 @@ 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 .
ARG PACKAGINGDIR=packaging
COPY ${PACKAGINGDIR}/rpmlint--ignore-unused-rpmlintrc.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 \
Expand Down
4 changes: 2 additions & 2 deletions packaging/Makefile_packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RPM_BUILD_OPTIONS := $(BUILD_DEFINES)
GIT_DIFF_EXCLUDES := $(PATCH_EXCLUDE_FILES:%=':!%')
endif

COMMON_RPM_ARGS := --define "_topdir $$PWD/_topdir" $(BUILD_DEFINES)
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)
DEB_RVERS := $(subst $(DOT),\$(DOT),$(VERSION))
Expand Down Expand Up @@ -163,7 +163,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
10 changes: 7 additions & 3 deletions spdk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Name: spdk
Version: 22.01.2
Release: 4%{?dist}
Release: 5%{?dist}
Epoch: 0

Summary: Set of libraries and utilities for high performance user-mode storage
Expand Down Expand Up @@ -57,7 +57,7 @@ BuildRequires: libibverbs-devel, librdmacm-devel
%if %{with doc}
BuildRequires: doxygen mscgen graphviz
%endif
%if (0%{?rhel} >= 8) && (0%{?rhel} < 9)
%if (0%{?rhel} >= 8) && (0%{?rhel} < 9)
BuildRequires: python36
%else
BuildRequires: python
Expand All @@ -78,7 +78,7 @@ applications.
%package devel
Summary: Storage Performance Development Kit development files
Requires: %{name}%{?_isa} = %{package_version}
Requires: dpdk-devel >= %{dpdk_version}
Requires: dpdk-daos-devel >= %{dpdk_version}, dpdk-daos-devel < %{next_dpdk_major_version}
Provides: %{name}-static%{?_isa} = %{package_version}

%description devel
Expand Down Expand Up @@ -235,6 +235,10 @@ rm -f %{buildroot}/%{_libdir}/*.a


%changelog
* Mon Oct 16 2023 Brian J. Murrell <[email protected]> - 0:22.01.2-5
- Change spdk-devel's R: dpdk-devel to dpdk-daos-devel to ensure we get the
daos-targetted dpdk build

* Thu Jun 22 2023 Brian J. Murrell <[email protected]> - 0:22.01.2-4
- Build on EL9
- Change BR: dpdk-devel to dpdk-daos-devel to ensure we get the
Expand Down

0 comments on commit 0deb13d

Please sign in to comment.