All of lore.kernel.org
 help / color / mirror / Atom feed
* rdma-core.spec and -DIN_PLACE
@ 2017-03-27 20:50 Bart Van Assche
       [not found] ` <1490647788.7897.5.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2017-03-27 20:50 UTC (permalink / raw)
  To: jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hello Jason,

When I build an RPM using the top-level rdma-core.spec file I need the following
patch to ensure that the verbs library looks into /etc/libibverbs.d instead of a
path in the build directory:

diff --git a/rdma-core.spec b/rdma-core.spec
index 6a280fe1..f2419e82 100644
--- a/rdma-core.spec
+++ b/rdma-core.spec
@@ -34,7 +34,7 @@ BuildRequires: ninja,make
 # Tumbleweed's cmake RPM macro adds -Wl,--no-undefined to the module flags
 # which is totally inappropriate and breaks building 'ENABLE_EXPORTS' style
 # module libraries (eg ibacmp).
-%define CMAKE_FLAGS -DCMAKE_MODULE_LINKER_FLAGS=""
+%define CMAKE_FLAGS -DCMAKE_MODULE_LINKER_FLAGS="" -DIN_PLACE=0
 %else
 %if 0%{?fedora} >= 23
 # Ninja was introduced in FC23

Do you think this is an issue with the spec file or with one of the CMake files?

The script I use to build an RPM is as follows:

#!/bin/sh

name=rdma-core
version=$(sed -n 's/^Version:[[:blank:]]*//p' rdma-core.spec)
rpmtopdir=$PWD/rpmbuilddir

rm -rf ${rpmtopdir} &&
    mkdir -p ${rpmtopdir}/{BUILD,RPMS,SOURCES,SPECS,SRPMS} &&
    git archive --prefix rdma-core-${version}/ --output ${rpmtopdir}/SOURCES/${name}-${version}.tgz HEAD &&
    rpmbuild --define="%_topdir ${rpmtopdir}" -ba ${name}.spec

Thanks,

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: rdma-core.spec and -DIN_PLACE
       [not found] ` <1490647788.7897.5.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2017-03-27 22:44   ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2017-03-27 22:44 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Mon, Mar 27, 2017 at 08:50:01PM +0000, Bart Van Assche wrote:
> When I build an RPM using the top-level rdma-core.spec file I need the following
> patch to ensure that the verbs library looks into?/etc/libibverbs.d instead of a
> path in the build directory:

You certainly should not need something like this. I tried your script
in a tumbleweed container and it was fine...

Could something else in your envionrment be setting IN_PLACE?
Environment Variable? (Does rpmbuild not wipe those?) What does your
cmake line look like? Your script looks fine to me..

I added this to check, I didn't run anything..

diff --git a/CMakeLists.txt b/CMakeLists.txt
index da803443536925..33e0dad9868c70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,7 @@ set(PACKAGE_VERSION "13")
 
 # Override the CMAKE_INSTALL_ dirs to be under the build/ directory
 if (IN_PLACE)
+message(FATAL_ERROR "In place")
   set(CMAKE_INSTALL_SYSCONFDIR "${CMAKE_BINARY_DIR}/etc")
   set(CMAKE_INSTALL_BINDIR "${CMAKE_BINARY_DIR}/bin")
 endif()
diff --git a/rdma-core.spec b/rdma-core.spec
index 3f6e73a09ed12d..09c146f9324bd7 100644
--- a/rdma-core.spec
+++ b/rdma-core.spec
@@ -104,6 +104,7 @@ This is a simple example without the split sub packages to get things started.
 	 -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \
 	 -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} \
 	 -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir}
+cat include/config.h
 %make_jobs
 
 %install
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-27 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 20:50 rdma-core.spec and -DIN_PLACE Bart Van Assche
     [not found] ` <1490647788.7897.5.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-03-27 22:44   ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.