Skip to contentSkip to conversation

rdma-core.spec and -DIN_PLACE

PATCH Bart Van Assche 2 participants 2 messages Mar 27, 2017 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

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:

rdma-core.spec +0 -0
index 6a280fe1..f2419e82 100644
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines · Bart Van Assche

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..

CMakeLists.txt +1 -0
index da803443536925..33e0dad9868c70 100644
@@ -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()
rdma-core.spec +1 -0
index 3f6e73a09ed12d..09c146f9324bd7 100644
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html