On Thu, Oct 25, 2018 at 11:49:30PM -0400, Doug Ledford wrote: > On 10/25/2018 5:43 PM, Jason Gunthorpe wrote: > > On Thu, Oct 25, 2018 at 06:56:46PM +0200, Nicolas Morey-Chaisemartin wrote: > >> Now that we can produce them properly, make it easy to add them. > >> > >> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> > >> Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@xxxxxxxx> > >> > >> Tested both ways on centos7 and tumbleweed > >> > >> redhat/rdma-core.spec | 15 +++++++++++++++ > >> suse/rdma-core.spec | 18 +++++++++++++++++- > >> 2 files changed, 32 insertions(+), 1 deletion(-) > > > > I updated things, thanks > > > >> diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec > >> index c281c5fa4e2c..644c3ffd01bf 100644 > >> +++ b/redhat/rdma-core.spec > >> @@ -10,6 +10,8 @@ Summary: RDMA core userspace libraries and daemons > >> License: GPLv2 or BSD > >> Url: https://github.com/linux-rdma/rdma-core > >> Source: rdma-core-%{version}.tgz > >> +# Do not build static libs by default. > >> +%define with_static %{?_with_static: 1} %{?!_with_static: 0} > >> > >> BuildRequires: binutils > >> BuildRequires: cmake >= 2.8.11 > >> @@ -73,6 +75,13 @@ Obsoletes: librdmacm-devel < %{version}-%{release} > >> Requires: ibacm = %{version}-%{release} > >> Provides: ibacm-devel = %{version}-%{release} > >> Obsoletes: ibacm-devel < %{version}-%{release} > >> +%if %{with_static} > > > > So we don't want to use > > > > %if %{with static} > > > > As suggested by the RPM manual for this feature? > > ? You are quoting exactly what we are doing and then saying we don't > want to do it? Look closely, the patch does this: +%define with_static %{?_with_static: 1} %{?!_with_static: 0} %if %{with_static} Where as the manual seems to say to do %if %{with static} Notice the stuble difference of no _ and no intermediate variable.. Jason