# Copyright © inria 2009-2010 # Brice Goglin # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #%%define debug_package %{nil} Summary: High-Performance Intra-Node MPI Communication Name: knem Version: 1.1.3 Release: 1.liv5%{?dist} License: BSD Group: System Environment/Libraries URL: http://runtime.bordeaux.inria.fr/knem/ Source: http://gforge.inria.fr/frs/download.php/37186/knem-1.1.3.tar.gz # Build on Linux >=4.15 (upstream) Patch1: knem-timer.patch # Avoid possible autotools invocation with dkms Patch2: knem-dkms.patch # cpus_allowed changed to cpus_mask in Linux 5.3 (with Changelog change removed) Patch3: knem-cpus_mask.patch # Other upstream patches Patch4: knem-check_kernel_headers.sh-fix-a-typo.patch Patch5: knem-driver-clarify-the-write-flags-passed-to-get_user_pa.patch Patch6: knem-driver-fix-get_user_pages_fast-use-on-Linux-kernel-5.patch Buildrequires: gcc kernel-devel hwloc-devel %{?fedora:Buildrequires: elfutils-libelf-devel} %description KNEM is a Linux kernel module enabling high-performance intra-node MPI communication for large messages. KNEM offers support for asynchronous and vectorial data transfers as well as offloading memory copies on to Intel I/OAT hardware. See http://runtime.bordeaux.inria.fr/knem/ for details. %package dkms Summary: DKMS support for knem Requires: dkms Buildarch: noarch %description dkms Manage the knem kernel module with DKMS. %package devel Summary: Development files for %name Requires: %{name} = %{version}-%{release} %description devel Development files for %name. %prep %setup -q -n knem-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %build # We may not even be able to install the devel package for the running # kernel, e.g. on copr; configure needs it, even though we don't need # to build the module, given dkms. # This is failing in some copr roots with "/var/lib/rpm/Name: unexpected file type or format". #LREL=$(rpm -q kernel-devel | tail -n1 | sed s/kernel-devel-//) LREL=$(cd /usr/src/kernels; ls -t| tail -n1) %configure --disable-silent-rules --with-linux=%_prefix/src/kernels/$LREL make -C tools %{?_smp_mflags} make -C doc %{?_smp_mflags} %install make DESTDIR=$RPM_BUILD_ROOT install rm $RPM_BUILD_ROOT%_sysconfdir/10-knem.rules rm -r $RPM_BUILD_ROOT%_docdir/%name install -D tools/10-knem.rules $RPM_BUILD_ROOT/etc/udev/rules.d/10-knem.rules rm -r $RPM_BUILD_ROOT%_libdir/modules mkdir -p $RPM_BUILD_ROOT%_prefix/src pushd $RPM_BUILD_ROOT%_prefix/src # DKMS files, cleaned up a bit tar fx %SOURCE0 rm -rf doc/*html tools/[a-z]* auto* RE* ChangeLog AUTHORS COPYING TODO knem-%version/common/knem_config.h.in~ popd install dkms.conf $RPM_BUILD_ROOT%_prefix/src/knem-%version chmod -x $RPM_BUILD_ROOT%_prefix/src/knem-%version/dkms.conf \ $RPM_BUILD_ROOT%_sysconfdir/udev/rules.d/10-knem.rules %clean rm -rf $RPM_BUILD_ROOT %post dkms getent group rdma >/dev/null 2>&1 || groupadd -r rdma if [ -f /usr/lib/dkms/common.postinst ]; then /usr/lib/dkms/common.postinst %name %version exit $? fi echo "WARNING: /usr/lib/dkms/common.postinst does not exist." exit 1 %preun dkms RELEASE="/var/lib/dkms/%name/%version/build/%name.release" if [ -f $RELEASE ] && [ `cat $RELEASE`%{?dist} = "%version-%dist" ]; then echo -e echo -e "Uninstall of %name module (version %version) beginning:" dkms remove -m %name/%version --all --rpm_safe_upgrade fi exit 0 %files %license COPYING %_bindir/* %_sbindir/* %doc doc/knem.html AUTHORS REPORTING-BUGS README ChangeLog %config(noreplace) %_sysconfdir/udev/rules.d/* %files dkms %license COPYING %_prefix/src/* %files devel %_includedir/* %doc doc/knem-api.html %changelog * Tue Sep 10 2019 Dave love - 1.1.3-1.liv5 - Add extra upstream patches * Mon Sep 2 2019 Dave love - 1.1.3-1.liv4 - Use actual upstream patch3 * Thu Aug 29 2019 Dave love - 1.1.3-1.liv3 - Add patch for Linux 5.3 * Thu Nov 15 2018 Dave Love - 1.1.3-1.liv2 - Ship licence files correctly * Wed Nov 14 2018 Dave Love - 1.1.3-1.liv1 - New version - BR gcc; maybe BR elfutils-libelf-devel * Wed Feb 10 2016 Dave Love - 1.1.2-1.liv2 - Actually install the patched dkms.conf * Mon Jan 18 2016 Dave Love - 1.1.2-1.liv2 - New version * Wed Sep 3 2014 Dave Love - 1.1.1-1liv2 - Patch dkms.conf for possible problems due to dkms not preserving file times and make wanting to autoreconf * Wed Jul 2 2014 Dave Love - 1.1.1-1liv - Rework for EPEL, making dkms and devel packages, fixing some rpmlinting - BR kernel-devel, hwloc-devel - Fix warnings from offload_test.c