summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-08-11 12:51:47 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-08-11 12:51:47 +0000
commit85f0f914f0f064adcf61c13d60f77618a43bf5e2 (patch)
tree8b3dc7108092a93376977959ada2be828e3f83e8 /sys-infiniband
parentx86 stable, bug #418971 (diff)
downloadgentoo-2-85f0f914f0f064adcf61c13d60f77618a43bf5e2.tar.gz
gentoo-2-85f0f914f0f064adcf61c13d60f77618a43bf5e2.tar.bz2
gentoo-2-85f0f914f0f064adcf61c13d60f77618a43bf5e2.zip
Stop using /etc/udev which is reserved for user modified rules and read udevdir value from udev.pc pkg-config file instead.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'sys-infiniband')
-rw-r--r--sys-infiniband/ofed/ChangeLog6
-rw-r--r--sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild160
2 files changed, 165 insertions, 1 deletions
diff --git a/sys-infiniband/ofed/ChangeLog b/sys-infiniband/ofed/ChangeLog
index 4eff27ea0dc6..bb3aa9b822c4 100644
--- a/sys-infiniband/ofed/ChangeLog
+++ b/sys-infiniband/ofed/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-infiniband/ofed
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-infiniband/ofed/ChangeLog,v 1.4 2012/04/29 13:03:20 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-infiniband/ofed/ChangeLog,v 1.5 2012/08/11 12:51:47 ssuominen Exp $
+
+ 11 Aug 2012; Samuli Suominen <ssuominen@gentoo.org> +ofed-1.5.4.1-r1.ebuild:
+ Stop using /etc/udev which is reserved for user modified rules and read
+ udevdir value from udev.pc pkg-config file instead.
29 Apr 2012; Alexey Shvetsov <alexxy@gentoo.org> ofed-1.5.4.1.ebuild:
[sys-infiniband/ofed] Add rdmacm to minimal set
diff --git a/sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild b/sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild
new file mode 100644
index 000000000000..e4aa4979da7e
--- /dev/null
+++ b/sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild,v 1.1 2012/08/11 12:51:47 ssuominen Exp $
+
+EAPI="4"
+
+OFED_VER="1.5.4.1"
+OFED_SUFFIX="OFED.1.5.4.1"
+
+IUSE_OFED_DRIVERS="
+ ofed_drivers_cxgb3
+ ofed_drivers_cxgb4
+ ofed_drivers_ehca
+ ofed_drivers_ipath
+ ofed_drivers_mlx4
+ ofed_drivers_mthca
+ ofed_drivers_nes
+ ofed_drivers_psm"
+
+inherit openib toolchain-funcs
+
+DESCRIPTION="OpenIB system files"
+SCRIPTDIR="${S}/ofed_scripts"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="compat-dapl dapl +diags ibacm mstflint +opensm perftest rds sdp srp ${IUSE_OFED_DRIVERS}"
+
+RDEPEND="!sys-infiniband/openib
+ !sys-infiniband/openib-files
+ sys-infiniband/libibcm:${SLOT}
+ sys-infiniband/libibmad:${SLOT}
+ sys-infiniband/libibumad:${SLOT}
+ sys-infiniband/librdmacm:${SLOT}
+ compat-dapl? ( sys-infiniband/compat-dapl:${SLOT} )
+ dapl? ( sys-infiniband/dapl:${SLOT} )
+ diags? ( sys-infiniband/infiniband-diags:${SLOT} )
+ ibacm? ( sys-infiniband/ibacm:${SLOT} )
+ mstflint? ( sys-infiniband/mstflint:${SLOT} )
+ opensm? ( sys-infiniband/opensm:${SLOT} )
+ perftest? ( sys-infiniband/perftest:${SLOT} )
+ sdp? ( sys-infiniband/libsdp:${SLOT} )
+ srp? ( sys-infiniband/srptools:${SLOT} )
+ ofed_drivers_cxgb3? ( sys-infiniband/libcxgb3:${SLOT} )
+ ofed_drivers_cxgb4? ( sys-infiniband/libcxgb4:${SLOT} )
+ ofed_drivers_ehca? ( sys-infiniband/libehca:${SLOT} )
+ ofed_drivers_ipath? ( sys-infiniband/libipathverbs:${SLOT} )
+ ofed_drivers_mlx4? ( sys-infiniband/libmlx4:${SLOT} )
+ ofed_drivers_mthca? ( sys-infiniband/libmthca:${SLOT} )
+ ofed_drivers_nes? ( sys-infiniband/libnes:${SLOT} )
+ ofed_drivers_psm? ( sys-infiniband/infinipath-psm:${SLOT} )
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ "
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ local udevdir=/lib/udev
+ has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
+ insinto "${udevdir}"/rules.d
+ newins "${SCRIPTDIR}/90-ib.rules" 40-ib.rules
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/openib.modprobe" openib.conf
+ newenvd "${FILESDIR}/openib.env" 02openib
+ insinto /etc/infiniband
+
+ doinitd "${FILESDIR}/openib"
+
+ # build openib.conf based on ofed_scripts/ofa_kernel.spec
+ build_ipoib=1
+ build_sdp=1
+ cp "${SCRIPTDIR}/openib.conf" "${T}"
+ IB_CONF_DIR=${T}
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load UCM module" >> ${IB_CONF_DIR}/openib.conf
+ echo "UCM_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load RDMA_CM module" >> ${IB_CONF_DIR}/openib.conf
+ echo "RDMA_CM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load RDMA_UCM module" >> ${IB_CONF_DIR}/openib.conf
+ echo "RDMA_UCM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Increase ib_mad thread priority" >> ${IB_CONF_DIR}/openib.conf
+ echo "RENICE_IB_MAD=no" >> ${IB_CONF_DIR}/openib.conf
+
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load MTHCA" >> ${IB_CONF_DIR}/openib.conf
+ echo "MTHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ if use ofed_drivers_ipath; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load IPATH" >> ${IB_CONF_DIR}/openib.conf
+ echo "IPATH_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if use ofed_drivers_ehca; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load eHCA" >> ${IB_CONF_DIR}/openib.conf
+ echo "EHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if use ofed_drivers_mlx4; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load MLX4 modules" >> ${IB_CONF_DIR}/openib.conf
+ echo "MLX4_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if (( build_ipoib )); then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load IPoIB" >> ${IB_CONF_DIR}/openib.conf
+ echo "#IPOIB_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Enable IPoIB Connected Mode" >> ${IB_CONF_DIR}/openib.conf
+ echo "#SET_IPOIB_CM=yes" >> ${IB_CONF_DIR}/openib.conf
+ # from ofa_user.spec:
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Enable IPoIB High Availability daemon" >> ${IB_CONF_DIR}/openib.conf
+ echo "#IPOIBHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf
+ echo "# PRIMARY_IPOIB_DEV=ib0" >> ${IB_CONF_DIR}/openib.conf
+ echo "# SECONDARY_IPOIB_DEV=ib1" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if (( build_sdp )); then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load SDP module" >> ${IB_CONF_DIR}/openib.conf
+ echo "#SDP_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if use srp; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load SRP module" >> ${IB_CONF_DIR}/openib.conf
+ echo "#SRP_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
+ # from ofa_user.spec:
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Enable SRP High Availability daemon" >> ${IB_CONF_DIR}/openib.conf
+ echo "#SRPHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf
+
+ fi
+ if use iser; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load ISER module" >> ${IB_CONF_DIR}/openib.conf
+ echo "#ISER_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if use rds; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load RDS module" >> ${IB_CONF_DIR}/openib.conf
+ echo "#RDS_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
+ fi
+ if use vnic; then
+ echo >> ${IB_CONF_DIR}/openib.conf
+ echo "# Load VNIC module" >> ${IB_CONF_DIR}/openib.conf
+ echo "#VNIC_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
+ fi
+
+ doins "${T}/openib.conf"
+}
+
+pkg_postinst() {
+ einfo "Configuration file installed in /etc/infiniband/openib.conf"
+ einfo "To automatically initialize infiniband on boot, add openib to your"
+ einfo "start-up scripts, like so:"
+ einfo "\`rc-update add openib default\`"
+
+}