Add various infiniband utilities
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Maintainer: James P. Harvey <jamespharvey20 at gmail dot com>
|
||||
|
||||
pkgname=opensm
|
||||
pkgver=3.3.22
|
||||
pkgrel=1
|
||||
pkgdesc='OpenFabrics Alliance InfiniBand Subnet Manager and Administrator'
|
||||
arch=('x86_64' 'i686')
|
||||
url='https://www.openfabrics.org/index.php/overview.html'
|
||||
license=('GPL2' 'custom:"OpenIB.org BSD"')
|
||||
depends=('rdma-core' 'bash')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/linux-rdma/${pkgname}/archive/${pkgver}.tar.gz"
|
||||
'opensm.service'
|
||||
'opensm.launch')
|
||||
sha256sums=('1e0dc56a5cf5f8e5cd68bd534591405a5f5f1975ace40509f61a43cc2fe74ca7'
|
||||
'a40c8a556cb170d84ffb49791fb82aabb21dc4afd22865e8f264a93c1f304788'
|
||||
'6fe01543d11d9fe0b4d3eeb9a6c6abf42c60da2e90c2dea829452a3bcfa6b3ce')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr \
|
||||
--sbindir=/usr/bin \
|
||||
--libexecdir=/usr/lib \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/share/man
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
|
||||
|
||||
# Convert from init.d to systemd
|
||||
rm -rf "${pkgdir}/etc/init.d"
|
||||
# ${pkgdir}/etc should now be empty
|
||||
rmdir "${pkgdir}/etc/" > /dev/null
|
||||
|
||||
install -Dm644 "${srcdir}/opensm.service" "${pkgdir}/usr/lib/systemd/system/opensm.service"
|
||||
install -Dm755 "${srcdir}/opensm.launch" "${pkgdir}/usr/bin/opensm.launch"
|
||||
|
||||
mkdir --parents "${pkgdir}/usr/share/docs/${pkgname}"
|
||||
cp doc/* "${pkgdir}/usr/share/docs/${pkgname}"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Upstream doesn't provide a systemd .service file
|
||||
# There is a timing bug that intermittently causes signal 15 failures on start
|
||||
# Fedora's workaround is to use a separate script
|
||||
# Copied from Fedora's opensm-3.3.17-4.fc22.x86_64.rpm
|
||||
# Following Arch's philosophy of deviating from upstream as little as possible,
|
||||
# modified to just launch opensm.
|
||||
# If you need simultaneous multiple interfaces, instead check out the AUR package
|
||||
# opensm-systemd-multiple-interfaces
|
||||
#
|
||||
# Launch the necessary OpenSM daemons for systemd
|
||||
|
||||
(while true; do /usr/bin/opensm; sleep 30; done) &
|
||||
exit 0
|
||||
@@ -0,0 +1,20 @@
|
||||
# Upstream doesn't provide a systemd .service file
|
||||
# Copied from Fedora's opensm-3.3.17-4.fc22.x86_64.rpm
|
||||
# Modified to follow Arch layout
|
||||
|
||||
[Unit]
|
||||
Description=Starts the OpenSM InfiniBand fabric Subnet Manager
|
||||
Documentation=man:opensm
|
||||
DefaultDependencies=false
|
||||
Before=network.target remote-fs-pre.target
|
||||
Requires=rdma.service
|
||||
After=rdma.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
# There is a timing bug that intermittently causes signal 15 failures on start
|
||||
# Fedora's workaround is to use a separate script
|
||||
ExecStart=/usr/bin/opensm.launch
|
||||
|
||||
[Install]
|
||||
WantedBy=network.target
|
||||
Reference in New Issue
Block a user