diff options
author | GUAN Xin <guanx.bac@gmail.com> | 2019-08-03 07:18:05 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-08-03 07:18:05 +0700 |
commit | 116c173576910f37708f21ed423da8b866363a2f (patch) | |
tree | b8681f87e38fa0c2922c77c1e51b78c1972df39a /network | |
parent | 9c4901bc157618c8375c00bcb41fa1ac2a5dae6e (diff) | |
download | slackbuilds-116c173576910f37708f21ed423da8b866363a2f.tar.gz |
network/rdma-core: Added (RDMA core userspace libraries/daemons).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r-- | network/rdma-core/README | 17 | ||||
-rw-r--r-- | network/rdma-core/doinst.sh | 13 | ||||
-rw-r--r-- | network/rdma-core/optional_pandoc.patch | 54 | ||||
-rw-r--r-- | network/rdma-core/rdma-core.SlackBuild | 114 | ||||
-rw-r--r-- | network/rdma-core/rdma-core.info | 10 | ||||
-rw-r--r-- | network/rdma-core/slack-desc | 19 |
6 files changed, 227 insertions, 0 deletions
diff --git a/network/rdma-core/README b/network/rdma-core/README new file mode 100644 index 0000000000..2bf247a640 --- /dev/null +++ b/network/rdma-core/README @@ -0,0 +1,17 @@ +The "rdma-core" the userspace components for the Linux Kernel's +drivers/infiniband subsystem. Specifically this contains the +userspace libraries for the following device nodes: + + /dev/infiniband/uverbsX (libibverbs) + /dev/infiniband/rdma_cm (librdmacm) + /dev/infiniband/umadX (libibumad) + +Additional service daemons are provided for: + + srp_daemon (ib_srp.ko) + iwpmd (for iwarp kernel providers) + ibacm (for InfiniBand communication management assistant) + +The package "pandoc" (available on SlackBuilds.org) is an optional +build-time dependency. Some man-pages will be missing if "pandoc" was +unavailable when building the package "rdma-core". diff --git a/network/rdma-core/doinst.sh b/network/rdma-core/doinst.sh new file mode 100644 index 0000000000..19a6ff6ac8 --- /dev/null +++ b/network/rdma-core/doinst.sh @@ -0,0 +1,13 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + diff --git a/network/rdma-core/optional_pandoc.patch b/network/rdma-core/optional_pandoc.patch new file mode 100644 index 0000000000..b86f398a60 --- /dev/null +++ b/network/rdma-core/optional_pandoc.patch @@ -0,0 +1,54 @@ +The master "CMakeLists.txt" listed "pandoc" as an optional dependency, +but subsequent "make install" fails is "pandoc" was missing. +This patch makes "pandoc" really optional. +diff -ru rdma-core-25.0.orig/CMakeLists.txt rdma-core-25.0/CMakeLists.txt +--- rdma-core-25.0.orig/CMakeLists.txt 2019-07-26 02:17:21.000000000 +0800 ++++ rdma-core-25.0/CMakeLists.txt 2019-07-31 00:08:41.485085990 +0800 +@@ -602,11 +602,17 @@ + add_subdirectory(kernel-headers) + # Libraries + add_subdirectory(libibumad) ++if (PANDOC_FOUND) + add_subdirectory(libibumad/man) ++endif() + add_subdirectory(libibverbs) ++if (PANDOC_FOUND) + add_subdirectory(libibverbs/man) ++endif() + add_subdirectory(librdmacm) ++if (PANDOC_FOUND) + add_subdirectory(librdmacm/man) ++endif() + + # Providers + if (HAVE_COHERENT_DMA) +@@ -614,13 +620,19 @@ + add_subdirectory(providers/cxgb3) # NO SPARSE + add_subdirectory(providers/cxgb4) # NO SPARSE + add_subdirectory(providers/efa) ++if (PANDOC_FOUND) + add_subdirectory(providers/efa/man) ++endif() + add_subdirectory(providers/hns) + add_subdirectory(providers/i40iw) # NO SPARSE + add_subdirectory(providers/mlx4) ++if (PANDOC_FOUND) + add_subdirectory(providers/mlx4/man) ++endif() + add_subdirectory(providers/mlx5) ++if (PANDOC_FOUND) + add_subdirectory(providers/mlx5/man) ++endif() + add_subdirectory(providers/mthca) + add_subdirectory(providers/nes) # NO SPARSE + add_subdirectory(providers/ocrdma) +@@ -639,7 +651,9 @@ + add_subdirectory(libibnetdisc/man) + add_subdirectory(infiniband-diags) + add_subdirectory(infiniband-diags/scripts) ++if (PANDOC_FOUND) + add_subdirectory(infiniband-diags/man) ++endif() + + if (CYTHON_EXECUTABLE) + add_subdirectory(pyverbs) diff --git a/network/rdma-core/rdma-core.SlackBuild b/network/rdma-core/rdma-core.SlackBuild new file mode 100644 index 0000000000..c89fbcdf18 --- /dev/null +++ b/network/rdma-core/rdma-core.SlackBuild @@ -0,0 +1,114 @@ +#!/bin/sh + +# Slackware build script for rdma-core + +# Copyright 2019 GUAN Xin from Beijing +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 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. + +PRGNAM=rdma-core +VERSION=${VERSION:-25.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -p1 --verbose <$CWD/optional_pandoc.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib$LIBDIRSUFFIX \ + -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var/run \ + -DCMAKE_INSTALL_MANDIR:PATH=/usr/man \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \ + -DCMAKE_INSTALL_INITDDIR:PATH=/etc/rc.d/init.d \ + -DCMAKE_INSTALL_DOCDIR:PATH=/usr/doc/$PRGNAM-$VERSION \ + -DCMAKE_BUILD_TYPE=Release \ + .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING.* \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh +( cd $PKG + find etc -type f -regextype posix-extended -not -regex "^etc/libibverbs.d/.*" \ + -exec mv {} {}.new \; \ + -exec printf 'config %s.new\n' {} >> $PKG/install/doinst.sh \; + printf '\n' >> $PKG/install/doinst.sh +) + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/rdma-core/rdma-core.info b/network/rdma-core/rdma-core.info new file mode 100644 index 0000000000..d212158b1d --- /dev/null +++ b/network/rdma-core/rdma-core.info @@ -0,0 +1,10 @@ +PRGNAM="rdma-core" +VERSION="25.0" +HOMEPAGE="https://github.com/linux-rdma" +DOWNLOAD="https://github.com/linux-rdma/rdma-core/archive/v25.0/rdma-core-25.0.tar.gz" +MD5SUM="48b2bec693fec7d1755a5e99a5d3678b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="GUAN Xin" +EMAIL="guanx.bac@gmail.com" diff --git a/network/rdma-core/slack-desc b/network/rdma-core/slack-desc new file mode 100644 index 0000000000..9d5c930641 --- /dev/null +++ b/network/rdma-core/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +rdma-core: rdma-core (RDMA core userspace libraries and daemons) +rdma-core: +rdma-core: This is the userspace components for the Linux Kernel's +rdma-core: drivers/infiniband subsystem. +rdma-core: +rdma-core: +rdma-core: +rdma-core: +rdma-core: +rdma-core: +rdma-core: |