Message ID | ef8214f8-d44d-2289-d1ed-a0998e9e05c0@sandisk.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Fri, Sep 02, 2016 at 05:10:45PM -0700, Bart Van Assche wrote: > Can you have a look at the patch below? I needed it to make the spec > file usable on my development system. Interesting. Thanks Bart > -%define CMAKE_FLAG > +%define CMAKE_FLAG %{nil} Weird, I didn't know opensuse rpmbuild was different.. But that hunk is fine, c6 and c7 accept it as well, but don't need it.. So I added opensuse 13.2 and 42.1 to the list of docker container builders and the simple build looks like it runs OK. But rpmbuild chokes even after the above fix. What suse version are you using to have any success at all? I suppose it isn't available in docker? Looks like opensuse uses a different %cmake macro. Totally different in fact. Scary macros. I will need to look at it alot more to get 13.2 and 42.1 to rpmbuild, is that of value to you or anyone else? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 09/02/16 22:12, Jason Gunthorpe wrote: > On Fri, Sep 02, 2016 at 05:10:45PM -0700, Bart Van Assche wrote: >> -%define CMAKE_FLAG >> +%define CMAKE_FLAG %{nil} > > Weird, I didn't know opensuse rpmbuild was different.. But that hunk is > fine, c6 and c7 accept it as well, but don't need it.. Hello Jason, I don't think that "%define CMAKE_FLAG" is syntactically valid. See e.g. http://stackoverflow.com/questions/3474674/how-to-define-a-rpm-spec-macro-with-empty-body. > So I added opensuse 13.2 and 42.1 to the list of docker container > builders and the simple build looks like it runs OK. > > But rpmbuild chokes even after the above fix. > > What suse version are you using to have any success at all? I suppose > it isn't available in docker? On my development system I run openSuSE Tumbleweed, a rolling release. I update it every now and then by running "zypper dist-upgrade". Some of our production systems run SLES 12 SP2; others run RHEL 6 or RHEL 7. Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Sep 02, 2016 at 11:12:22PM -0600, Jason Gunthorpe wrote: > On Fri, Sep 02, 2016 at 05:10:45PM -0700, Bart Van Assche wrote: > > So I added opensuse 13.2 and 42.1 to the list of docker container > builders and the simple build looks like it runs OK. Are you running standard docker containers or build them by yourself? Can you add scripts to run containers to your rdma-plumbers repo? So it will be much easier to see/debug build issues on different platforms. Thanks
On Sun, Sep 04, 2016 at 08:54:41AM +0300, Leon Romanovsky wrote: > On Fri, Sep 02, 2016 at 11:12:22PM -0600, Jason Gunthorpe wrote: > > On Fri, Sep 02, 2016 at 05:10:45PM -0700, Bart Van Assche wrote: > > > > So I added opensuse 13.2 and 42.1 to the list of docker container > > builders and the simple build looks like it runs OK. > > Are you running standard docker containers or build them by yourself? > Can you add scripts to run containers to your rdma-plumbers repo? So it > will be much easier to see/debug build issues on different platforms. I mentioned this in my first email, but here is more details. The tooling branch contains all the scripting I used to build and test this thing. The docker/ directory has all the docker files and the script to run them. https://github.com/jgunthorpe/rdma-plumbing/tree/tooling/docker The docker script is something I've used for awhile in other places, there are others around as well that are similar.. The basic usage is like this: # Download docker base images and run all docker files # Do once. $ docker/do_docker.py build-images --env all # Run 'make' inside the container using the current source tree # exactly as is. Directs the build to a build-fc24 output directory $ docker/do_docker.py make fc24 # Build a package. This runs 'git archive', imports the archive into # the container, transfers the spec file, fusses with the container, # runs rpmbuild/dpkg-buildpkg, then copies the rpms back out. Note # that changes must be checked in to have any impact. $ docker/do_docker.py pkg fc24 Folks can decide how much of this stuff should go on into the main repository later on.. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Sep 03, 2016 at 02:08:24PM +0000, Bart Van Assche wrote: > On my development system I run openSuSE Tumbleweed, a rolling release. I > update it every now and then by running "zypper dist-upgrade". Some of > our production systems run SLES 12 SP2; others run RHEL 6 or RHEL 7. Okay, this is what I came up with. Not very pretty, but suse and rh have different %cmake macros.. :| Docker says it works on tumbleweed, os42.1, os13.2, fc24, c7, c6 - which seems like enough :| Name: rdma-plumbing Version: 1 Release: 1%{?dist} Summary: Userspace components for the Linux Kernel\'s drivers/infiniband stack License: GPLv2 or BSD Url: http://openfabrics.org/ Source: rdma-plumbing-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: binutils BuildRequires: cmake >= 2.8.11 BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) BuildRequires: valgrind-devel # Since we recommend developers use Ninja, so should packagers, for consistency. %define CMAKE_FLAGS %{nil} %if 0%{?suse_version} # SuSE releases have it, and sometime around cmake 3.3.2-1.2 the macros learned to use it. BuildRequires: ninja,make %define __builder ninja # cmake_install,make_jobs is specified by opensuse %else %if 0%{?fedora} >= 23 # Ninja was introduced in FC23 BuildRequires: ninja-build %define CMAKE_FLAGS -GNinja %define make_jobs ninja -v %{?_smp_mflags} %define cmake_install DESTDIR=%{buildroot} ninja-build install %else # Fallback to make otherwise BuildRequires: make %define make_jobs make -v %{?_smp_mflags} %define cmake_install DESTDIR=%{buildroot} make install %endif %endif %description Temporary packaging This is a simple example without the split sub packages to get things started. %prep %setup %build # Detect if systemd is supported on this system %if 0%{?_unitdir:1} %define my_unitdir %{_unitdir} %else %define my_unitdir /tmp/ %endif # Pass all of the rpm paths directly to GNUInstallDirs and our other defines. %cmake %{CMAKE_FLAGS} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \ -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \ -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \ -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \ -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \ -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \ -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \ -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} %make_jobs %install %cmake_install %if 0%{?_unitdir:1} rm -rf %{buildroot}/%{_initrddir}/ %else rm -rf %{buildroot}/%{my_unitdir}/ %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc %{_mandir}/man*/* %{_bindir}/* %{_includedir}/* %{_libdir}/lib* %{_libdir}/rsocket/* %{_sbindir}/* %if 0%{?_unitdir:1} %{_unitdir}/* %else %config %{_initrddir}/* %endif %config %{_sysconfdir}/iwpmd.conf %config %{_sysconfdir}/srp_daemon.conf %config %{_sysconfdir}/libibverbs.d/* %config %{_sysconfdir}/logrotate.d/srp_daemon %{_sysconfdir}/modprobe.d/* %config %{_sysconfdir}/rsyslog.d/srp_daemon.conf -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Sep 04, 2016 at 05:55:55PM -0600, Jason Gunthorpe wrote: > On Sun, Sep 04, 2016 at 08:54:41AM +0300, Leon Romanovsky wrote: > > On Fri, Sep 02, 2016 at 11:12:22PM -0600, Jason Gunthorpe wrote: > > > On Fri, Sep 02, 2016 at 05:10:45PM -0700, Bart Van Assche wrote: > > > > > > So I added opensuse 13.2 and 42.1 to the list of docker container > > > builders and the simple build looks like it runs OK. > > > > Are you running standard docker containers or build them by yourself? > > Can you add scripts to run containers to your rdma-plumbers repo? So it > > will be much easier to see/debug build issues on different platforms. > > I mentioned this in my first email, but here is more details. > > The tooling branch contains all the scripting I used to build and test > this thing. The docker/ directory has all the docker files and the > script to run them. > > https://github.com/jgunthorpe/rdma-plumbing/tree/tooling/docker > > The docker script is something I've used for awhile in other places, > there are others around as well that are similar.. The basic usage is > like this: > > # Download docker base images and run all docker files > # Do once. > $ docker/do_docker.py build-images --env all > > # Run 'make' inside the container using the current source tree > # exactly as is. Directs the build to a build-fc24 output directory > $ docker/do_docker.py make fc24 > > # Build a package. This runs 'git archive', imports the archive into > # the container, transfers the spec file, fusses with the container, > # runs rpmbuild/dpkg-buildpkg, then copies the rpms back out. Note > # that changes must be checked in to have any impact. > $ docker/do_docker.py pkg fc24 > > Folks can decide how much of this stuff should go on into the main > repository later on.. I completely missed that tooling branch. It looks like it misses the Debian image. Thanks > > Jason
On Mon, Sep 05, 2016 at 03:48:02PM +0300, Leon Romanovsky wrote: > > Folks can decide how much of this stuff should go on into the main > > repository later on.. > > I completely missed that tooling branch. It looks like it misses the > Debian image. Only 'make' works for Debian. There is no .deb packaging yet. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Sep 05, 2016 at 11:46:36AM -0600, Jason Gunthorpe wrote: > On Mon, Sep 05, 2016 at 03:48:02PM +0300, Leon Romanovsky wrote: > > > > Folks can decide how much of this stuff should go on into the main > > > repository later on.. > > > > I completely missed that tooling branch. It looks like it misses the > > Debian image. > > Only 'make' works for Debian. There is no .deb packaging yet. I have just pushed sample Debian packaging, please let me know what you think. The DEB stuff is much closer to production ready than the RPM example, and illistrates my proposed package split: ibverbs-providers_11-1_amd64.deb ibverbs-utils_11-1_amd64.deb iwpmd_11-1_amd64.deb libibcm-dev_1.0.11-1_amd64.deb libibcm1-dbg_1.0.11-1_amd64.deb libibcm1_1.0.11-1_amd64.deb libibumad-dev_3.1.11-1_amd64.deb libibumad3-dbg_3.1.11-1_amd64.deb libibumad3_3.1.11-1_amd64.deb libibverbs-dev_1.2.11-1_amd64.deb libibverbs1-dbg_1.2.11-1_amd64.deb libibverbs1_1.2.11-1_amd64.deb librdmacm-dev_1.1.11-1_amd64.deb librdmacm1-dbg_1.1.11-1_amd64.deb librdmacm1_1.1.11-1_amd64.deb rdmacm-utils_11-1_amd64.deb srptools_11-1_amd64.deb Debian will be able to gain 5 new providers, iwpmd and a spattering of newer versions. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/rdma-plumbing.spec b/rdma-plumbing.spec index 050df0c..acb24bc 100644 --- a/rdma-plumbing.spec +++ b/rdma-plumbing.spec @@ -16,17 +16,24 @@ BuildRequires: pkgconfig(libnl-3.0) BuildRequires: pkgconfig(libnl-route-3.0) BuildRequires: valgrind-devel -%if 0%{?fedora} >= 23 # Since we recommend developers use Ninja, so should packagers, for consistency. +%if %{expand:%%(rpm -q kernel-default >/dev/null 2>&1; echo $((1-$?)))} +# openSuSE or SLES +BuildRequires: ninja +%define CMAKE_FLAG -GNinja +%define MAKE_CMD ninja -v +%else +%if 0%{?fedora} >= 23 # Ninja was introduced in FC23 and has not yet made it to an EL. BuildRequires: ninja-build %define CMAKE_FLAG -GNinja %define MAKE_CMD ninja-build -v %else BuildRequires: make -%define CMAKE_FLAG +%define CMAKE_FLAG %{nil} %define MAKE_CMD make %endif +%endif %description Temporary packaging