Re: [PATCH rdma-core 9/9] rpm: Add flag to include static libraries in the build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/26/18 6:14 AM, Jason Gunthorpe wrote:
> 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

As said somewhere else in the thread. I tried using the %(with static} and it fails weirdly on centos7 (works on in tumbleweed).
If any one from RHEL wants to give it a try.

As a side note bcond is doing the same thing underneath. --with=static means that a variable called _with_static is defined to 1 :)

Nicolas

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux