Commit 52652c30 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

rpmbuild: Fix Requires section



This particular section must be defined in one place hence the
%{requirements_list} cannot be passed down later on. This requires
reordering of the .spec a bit. Most notably, all global macros are
now defined at the very beginning so then Requires section can be
build properly.

Also, use %() to expand the macro which holds the requirements as
bare "Requires: %{foo}" is not valid.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: I69430f73d10204325fc825ecc392506f261ebaf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8347


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent f5cb018a
Loading
Loading
Loading
Loading
+20 −18
Original line number Diff line number Diff line
Name:           spdk
Version:        %{version}
Release:        %{release}
Summary:        Storage Performance Development Kit

License:       BSD
URL:           https://spdk.io
Source:        spdk-%{version}.tar.gz

%description

The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for
writing high performance, scalable, user-mode storage applications. It achieves high
performance by moving all of the necessary drivers into userspace and operating in a
polled mode instead of relying on interrupts, which avoids kernel context switches and
eliminates interrupt handling overhead.

# Global macros
%define debug_package %{nil}

%{!?deps:%define deps 1}
@@ -24,6 +8,12 @@ eliminates interrupt handling overhead.
%{!?requirements:%define requirements 0}
%{!?shared:%define shared 0}

# Spec metadata
Name:           spdk
Version:        %{version}
Release:        %{release}
Summary:        Storage Performance Development Kit

# This is a minimal set of requirements needed for SPDK apps to run when built with
# default configuration. These are also predetermined by rpmbuild. Extra requirements
# can be defined through a comma-separated list passed via $requirements when building
@@ -39,9 +29,21 @@ Requires: openssl-libs
Requires: zlib

%if %{requirements}
Requires: %{requirements_list}
Requires: %(echo "%{requirements_list}")
%endif

License:       BSD
URL:           https://spdk.io
Source:        spdk-%{version}.tar.gz

%description

The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for
writing high performance, scalable, user-mode storage applications. It achieves high
performance by moving all of the necessary drivers into userspace and operating in a
polled mode instead of relying on interrupts, which avoids kernel context switches and
eliminates interrupt handling overhead.

%prep
make clean &>/dev/null || :
%setup