Compare commits
No commits in common. "8bad2d03cec0cb588985d10aa381d1cfce1d4e67" and "c8248b95daaf4635db698bb999c616000319d416" have entirely different histories.
8bad2d03ce
...
c8248b95da
Binary file not shown.
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Launch the necessary OpenSM daemons for systemd
|
|
||||||
#
|
|
||||||
# sysconfig: /etc/sysconfig/opensm
|
|
||||||
# config: /etc/rdma/opensm.conf
|
|
||||||
#
|
|
||||||
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
prog=/usr/sbin/opensm
|
|
||||||
[ -f /etc/sysconfig/opensm ] && . /etc/sysconfig/opensm
|
|
||||||
|
|
||||||
[ -n "$PRIORITY" ] && prio="-p $PRIORITY"
|
|
||||||
|
|
||||||
if [ -z "$GUIDS" ]; then
|
|
||||||
CONFIGS=""
|
|
||||||
CONFIG_CNT=0
|
|
||||||
for conf in /etc/rdma/opensm.conf.[0-9]*; do
|
|
||||||
CONFIGS="$CONFIGS $conf"
|
|
||||||
let CONFIG_CNT++
|
|
||||||
done
|
|
||||||
else
|
|
||||||
GUID_CNT=0
|
|
||||||
for guid in $GUIDS; do
|
|
||||||
let GUID_CNT++
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
# Start opensm
|
|
||||||
if [ -n "$GUIDS" ]; then
|
|
||||||
SUBNET_COUNT=0
|
|
||||||
for guid in $GUIDS; do
|
|
||||||
SUBNET_PREFIX=`printf "0xfe800000000000%02d" $SUBNET_COUNT`
|
|
||||||
(while true; do $prog $prio -g $guid --subnet_prefix $SUBNET_PREFIX; sleep 30; done) &
|
|
||||||
let SUBNET_COUNT++
|
|
||||||
done
|
|
||||||
elif [ -n "$CONFIGS" ]; then
|
|
||||||
for config in $CONFIGS; do
|
|
||||||
(while true; do $prog $prio -F $config; sleep 30; done) &
|
|
||||||
done
|
|
||||||
else
|
|
||||||
(while true; do $prog $prio; sleep 30; done) &
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
/var/log/opensm.log {
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
copytruncate
|
|
||||||
weekly
|
|
||||||
compress
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
empty /var/cache/opensm
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Starts the OpenSM InfiniBand fabric Subnet Manager
|
|
||||||
Documentation=man:opensm
|
|
||||||
DefaultDependencies=false
|
|
||||||
Before=network.target remote-fs-pre.target
|
|
||||||
After=rdma.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=forking
|
|
||||||
ExecStart=/usr/libexec/opensm-launch
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=network.target
|
|
||||||
121
opensm.spec
121
opensm.spec
@ -1,121 +0,0 @@
|
|||||||
Name: opensm
|
|
||||||
Version: 3.3.24
|
|
||||||
Release: 1
|
|
||||||
Summary: InfiniBand Subnet Manager and Administrator
|
|
||||||
License: GPLv2 or BSD
|
|
||||||
URL: https://github.com/linux-rdma/opensm
|
|
||||||
|
|
||||||
Source0: https://github.com/linux-rdma/opensm/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
||||||
Source1: opensm.logrotate
|
|
||||||
Source2: opensm.service
|
|
||||||
Source3: opensm.launch
|
|
||||||
Source4: opensm.rwtab
|
|
||||||
BuildRequires: gcc byacc flex libibumad-devel autoconf automake libtool
|
|
||||||
|
|
||||||
Requires: logrotate rdma
|
|
||||||
Requires(post): systemd
|
|
||||||
Requires(preun): systemd
|
|
||||||
Requires(postun): systemd
|
|
||||||
ExcludeArch: %{arm}
|
|
||||||
|
|
||||||
Provides: opensm-libs = %{version}-%{release}
|
|
||||||
Provides: opensm-libs%{?_isa} = %{version}-%{release}
|
|
||||||
Obsoletes: opensm-libs < %{version}-%{release}
|
|
||||||
|
|
||||||
%description
|
|
||||||
OpenSM provides an implementation for an InfiniBand Subnet Manager and
|
|
||||||
Administrator. Such a software entity is required to run for in order
|
|
||||||
to initialize the InfiniBand hardware (at least one per each
|
|
||||||
InfiniBand subnet).
|
|
||||||
|
|
||||||
The full list of OpenSM features is described in the user manual
|
|
||||||
provided in the doc sub directory.
|
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Development files for opensm
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
Provides: opensm-static = %{version}-%{release}
|
|
||||||
Provides: opensm-static%{?_isa} = %{version}-%{release}
|
|
||||||
Obsoletes: opensm-static < %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
This package contains libraries for developing applications that use
|
|
||||||
opensm and static version of opensm libraries
|
|
||||||
|
|
||||||
%package_help
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -n %{name}-%{version} -p1
|
|
||||||
|
|
||||||
%build
|
|
||||||
./autogen.sh
|
|
||||||
%configure --with-opensm-conf-sub-dir=rdma \
|
|
||||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
cd opensm
|
|
||||||
./opensm -c ../opensm-%{version}.conf
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install
|
|
||||||
|
|
||||||
%delete_la
|
|
||||||
|
|
||||||
rm -fr %{buildroot}%{_sysconfdir}/init.d
|
|
||||||
install -D -m644 opensm-%{version}.conf %{buildroot}%{_sysconfdir}/rdma/opensm.conf
|
|
||||||
install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/opensm
|
|
||||||
install -D -m644 %{SOURCE2} %{buildroot}%{_unitdir}/opensm.service
|
|
||||||
install -D -m755 %{SOURCE3} %{buildroot}%{_libexecdir}/opensm-launch
|
|
||||||
install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rwtab.d/opensm
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm
|
|
||||||
|
|
||||||
%preun
|
|
||||||
%systemd_preun opensm.service
|
|
||||||
|
|
||||||
%post
|
|
||||||
%systemd_post opensm.service
|
|
||||||
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%postun
|
|
||||||
rm -rf /var/cache/opensm
|
|
||||||
|
|
||||||
%systemd_postun_with_restart opensm.service
|
|
||||||
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc COPYING AUTHORS
|
|
||||||
%dir /var/cache/opensm
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/opensm
|
|
||||||
%config(noreplace) %{_sysconfdir}/rdma/opensm.conf
|
|
||||||
%{_sysconfdir}/rwtab.d/opensm
|
|
||||||
%{_unitdir}/*
|
|
||||||
%{_libdir}/*.so.*
|
|
||||||
%{_libexecdir}/opensm-launch
|
|
||||||
%{_sbindir}/opensm
|
|
||||||
%{_sbindir}/osmtest
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_libdir}/lib*.so
|
|
||||||
%{_includedir}/infiniband
|
|
||||||
%{_libdir}/lib*.a
|
|
||||||
|
|
||||||
%files help
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc ChangeLog INSTALL README NEWS
|
|
||||||
%{_mandir}/man5/*5*
|
|
||||||
%{_mandir}/man8/*8*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Wed May 18 2022 wulei <wulei80@h-partners.com> - 3.3.24-1
|
|
||||||
- Update package
|
|
||||||
|
|
||||||
* Wed Jun 02 2021 zhaoyao<zhaoyao32@huawei.com> - 3.3.20-12
|
|
||||||
- fixs faileds: /bin/sh: gcc: command not found.
|
|
||||||
|
|
||||||
* Mon Nov 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.3.20-10
|
|
||||||
- Package init
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: github
|
|
||||||
src_repo: linux-rdma/opensm
|
|
||||||
tag_prefix: opensm-
|
|
||||||
seperator: .
|
|
||||||
Loading…
x
Reference in New Issue
Block a user