Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37596281
en ru br
ALT Linux repositórios
S:3.3.22-alt1
5.0: 3.1.11-alt2.M50.1
4.1: 3.2.6-alt0.M41.2

Group :: Rede/Outros
RPM: opensm

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: opensm-3.3.22.patch
Download


 .gear/rules            |   4 +
 .gear/tags/list        |   1 +
 .gear/upstream/remotes |   3 +
 alt/opensm.init        | 169 ++++++++++++++++++++++++++++++++++++++++++
 alt/opensm.launch      |  44 +++++++++++
 alt/opensm.service     |  14 ++++
 opensm.spec            | 195 +++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 430 insertions(+)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..ab7ac9e
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,4 @@
+tar: @version@:.
+diff: @version@:. . name=@name@-@version@.patch
+copy: alt/*
+
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..084789f
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+24d2f346ad8e54fcbf9c4fa3b2d087ad821dd148 3.3.22
diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes
new file mode 100644
index 0000000..6d33d3c
--- /dev/null
+++ b/.gear/upstream/remotes
@@ -0,0 +1,3 @@
+[remote "upstream"]
+	url = https://github.com/linux-rdma/opensm.git
+	fetch = +refs/heads/*:refs/remotes/upstream/*
diff --git a/alt/opensm.init b/alt/opensm.init
new file mode 100755
index 0000000..226a7b7
--- /dev/null
+++ b/alt/opensm.init
@@ -0,0 +1,169 @@
+#!/bin/sh
+#
+# opensm Manage OpenSM
+#
+# chkconfig: 2345 95 91
+#
+# description: Manage OpenSM
+#
+### BEGIN INIT INFO
+# Provides: opensm
+# Required-Start: $syslog
+# Default-Start: none
+# Default-Stop: 0 1 6
+# Description:  Manage OpenSM
+### END INIT INFO
+#
+
+# Do not load RH compatibility interface.
+WITHOUT_RC_COMPAT=1
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+DAEMON=/usr/sbin/opensm
+DISPNAME=OpenSM
+LOCKFILE=/var/lock/subsys/opensm
+RETVAL=0
+
+SourceIfNotEmpty /etc/sysconfig/opensm
+
+start()
+{
+	local FLAGS="--start --background --exec $DAEMON"
+
+	echo "$OSM_HOSTS"|fgrep -wqs "$(hostname)" || return 0
+
+	if ! start-stop-daemon $FLAGS --test >/dev/null;then
+	    msg_already_running "$DISPNAME"
+	    passed "$DAEMON startup"
+	    RETVAL=$?
+	    echo
+	    return $RETVAL
+	fi
+
+	msg_starting "$DISPNAME"
+
+	start-stop-daemon $FLAGS -- $OSM_ARGS
+	RETVAL=$?
+	
+	if [ $RETVAL = 0 ]; then
+	    touch "$LOCKFILE"
+	    success "$DAEMON startup"
+	else
+	    failure "$DAEMON startup"
+	fi
+	echo
+
+	return $RETVAL
+}
+
+do_status()
+{
+    local FLAGS="--stop --exec $DAEMON"
+
+    if start-stop-daemon $FLAGS --test >/dev/null;then
+	echo "$DISPNAME is running"
+	return 0;
+    fi
+
+    if [ -f "$LOCKFILE" ];then
+	echo "$DISPNAME is dead, but subsystem is locked"
+	return 2;
+    fi
+
+    echo "$DISPNAME is stopped"
+    return 3;
+}
+
+do_stop()
+{
+    local SIGNAL="$1";shift
+    local FLAGS="--stop --exec $DAEMON"
+    
+    if ! start-stop-daemon $FLAGS --test >/dev/null;then
+	msg_not_running	"$DISPNAME"
+	passed "$DAEMON stop"
+	RETVAL=$?
+	echo
+	return $RETVAL
+    fi
+
+    start-stop-daemon $FLAGS --signal "$SIGNAL"
+    
+    RETVAL=$?
+    if [ $RETVAL = 0 ];then
+	success "$MESSAGE"
+	if ! [ $SIGNAL = "$(kill -l HUP)" ]; then
+	    rm -f "$LOCKFILE"
+	    usleep 100000
+	    start-stop-daemon $FLAGS --signal "$(kill -l KILL)" >/dev/null
+	fi
+    else
+	failure "$MESSAGE"
+    fi
+    echo
+
+    return $RETVAL
+}
+
+stop()
+{
+    msg_stopping "$DISPNAME"
+    do_stop "$(kill -l TERM)"
+    RETVAL=$?
+    return $RETVAL
+}
+
+reload()
+{
+    msg_reloading "$DISPNAME"
+    do_stop "$(kill -l HUP)"
+    RETVAL=$?
+    return $RETVAL
+}
+
+restart()
+{
+	stop
+	start
+}
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart)
+	restart
+	;;
+  reload)
+	reload
+	;;
+  condstop)
+	if [ -e "$LOCKFILE" ]; then
+	    stop
+	fi
+	;;
+  condrestart)
+	if [ -e "$LOCKFILE" ]; then
+	    restart
+	fi
+	;;
+  condreload)
+	if [ -e "$LOCKFILE" ];then
+	    reload
+	fi
+	;;
+  status)
+	do_status
+	;;
+  *)
+	msg_usage "${0##*/} {start|stop|restart|reload|condrestart|condreload|status}"
+	RETVAL=1
+esac
+
+exit $RETVAL
diff --git a/alt/opensm.launch b/alt/opensm.launch
new file mode 100644
index 0000000..ba21a71
--- /dev/null
+++ b/alt/opensm.launch
@@ -0,0 +1,44 @@
+#!/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
diff --git a/alt/opensm.service b/alt/opensm.service
new file mode 100644
index 0000000..6264b4d
--- /dev/null
+++ b/alt/opensm.service
@@ -0,0 +1,14 @@
+[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
+ExecStart=/usr/libexec/opensm-launch
+
+[Install]
+WantedBy=network.target
diff --git a/opensm.spec b/opensm.spec
new file mode 100644
index 0000000..b35abc3
--- /dev/null
+++ b/opensm.spec
@@ -0,0 +1,195 @@
+%global _unpackaged_files_terminate_build 1
+%def_disable static
+%define Name OpenSM
+%define _libexecdir /usr/libexec
+
+Name: opensm
+%define lname lib%name
+Summary: InfiniBand subnet manager and administration
+Version: 3.3.22
+Release: alt1
+License: %gpl2only
+Group: Networking/Other
+URL: http://openib.org
+# https://github.com/linux-rdma/opensm.git
+Source0: %name-%version.tar
+Source1: %name.init
+Source2: %name.service
+Source3: %name.launch
+Patch: %name-%version.patch
+
+Requires: lib%name = %version-%release
+Provides: %{name}2 = %version-%release
+Obsoletes: %{name}2 < %version-%release
+
+BuildRequires(pre): rpm-build-licenses
+BuildRequires: flex rdma-core-devel 
+
+%description
+%Name provides an implementation of an InfiniBand Subnet Manager and
+Administration. Such a software entity is required to run for in order
+to initialize the InfiniBand hardware (at least one per each InfiniBand
+subnet).
+
+%package -n lib%name
+Summary: Libraries from the %name package
+Group: System/Libraries
+Provides: lib%{name}2 = %version-%release
+Obsoletes: lib%{name}2 < %version-%release
+
+%description -n lib%name
+Shared libraries that are part of the %name package but are also used
+by other applications. If you don't need %name itself installed, these
+libraries can be installed to satisfy dependencies of other
+applications.
+
+
+%package -n lib%name-devel
+Summary: Development files for %Name
+Group: Development/C
+Requires: lib%name = %version-%release
+Requires: libibumad-devel
+Provides: lib%{name}2-devel = %version-%release
+Obsoletes: lib%{name}2-devel < %version-%release
+
+%description -n lib%name-devel
+Development files for %Name.
+
+%package -n lib%name-devel-static
+Summary: Static %Name libraries
+Group: Development/C
+Requires: lib%name-devel = %version-%release libibumad-devel-static
+
+%description -n lib%name-devel-static
+Static %Name libraries.
+
+%prep
+%setup
+%patch -p1
+
+%build
+./autogen.sh
+%add_optflags %optflags_shared
+%configure \
+    %{subst_enable static} \
+    --with-opensm-conf-sub-dir=rdma
+
+%make_build
+
+cd opensm
+./opensm -c ../opensm-%version.conf
+
+%install
+%make_install DESTDIR=%buildroot install
+mkdir -p %buildroot{%_cachedir/%name,%_initdir,%_sysconfdir/{rdma,sysconfig},%_logrotatedir}
+install -D -m644 opensm-%version.conf %buildroot%_sysconfdir/rdma/opensm.conf
+install -D -m 0755 %SOURCE1 %buildroot%_initdir/%name
+install -D -m 0644 %SOURCE2 %buildroot%_unitdir/%name.service
+install -D -m 0755 %SOURCE3 %buildroot%_libexecdir/%name-launch
+install -D -m 0644 scripts/opensm.logrotate %buildroot%_logrotatedir/opensm
+cat > %buildroot/%_sysconfdir/sysconfig/%name <<__CONF__
+OSM_ARGS=
+OSM_HOSTS=
+__CONF__
+
+rm -f %buildroot/etc/init.d/opensmd
+
+%post 
+%post_service %name
+
+%preun
+%preun_service %name
+
+
+%files
+%doc AUTHORS COPYING README
+%doc doc/*.txt
+%config(noreplace) %_sysconfdir/sysconfig/%name
+%config(noreplace) %_sysconfdir/rdma/opensm.conf
+%config(noreplace) %_logrotatedir/opensm
+%_initdir/%name
+%_unitdir/%name.service
+%_libexecdir/%name-launch
+%_sbindir/*
+%_man5dir/*
+%_man8dir/*
+%dir %_cachedir/%name
+
+%files -n lib%name
+%_libdir/*.so.*
+
+%files -n lib%name-devel
+%_includedir/infiniband/*
+%_libdir/*.so
+
+%if_enabled static
+%files -n lib%name-devel-static
+%_libdir/*.a
+%endif
+
+%changelog
+* Sat Jul 20 2019 Alexey Shabalin <shaba@altlinux.org> 3.3.22-alt1
+- 3.3.22
+
+* Thu Jan 17 2019 Alexey Shabalin <shaba@altlinux.org> 3.3.21-alt1
+- 3.3.21
+
+* Thu Apr 12 2018 Alexey Shabalin <shaba@altlinux.ru> 3.3.20-alt1
+- 3.3.20
+- disable static build
+
+* Thu Mar 24 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3.7-alt2
+- Rebuilt for debuginfo
+
+* Tue Dec 07 2010 Andriy Stepanov <stanv@altlinux.ru> 3.3.7-alt1
+- New version
+
+* Mon Oct 25 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3.6-alt2
+- Rebuilt for soname set-versions
+- Fixed underlinking of libraries
+
+* Thu Sep 02 2010 Andriy Stepanov <stanv@altlinux.ru> 3.3.6-alt1
+- New version
+
+* Wed Sep 01 2010 Andriy Stepanov <stanv@altlinux.ru> 3.3.5-alt2
+- Rebuild with new libibumad
+
+* Wed Aug 18 2010 Andriy Stepanov <stanv@altlinux.ru> 3.3.5-alt1
+- 3.3.5 (OFED 1.5.1)
+
+* Thu Jul 09 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3.2-alt3
+- Rebuild from upstream git repository
+- Fixed libraries linking
+
+* Mon Jun 15 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3.2-alt2
+- Rename opensm -> opensm2
+
+* Tue May 26 2009 Led <led@altlinux.ru> 3.3.2-alt1
+- 3.3.2
+
+* Tue May 26 2009 Led <led@altlinux.ru> 3.2.6-alt1
+- 3.2.6
+
+* Mon May 25 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2.5_20081207-alt3
+- Rebuild with automake 1.11
+
+* Wed May 13 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2.5_20081207-alt2
+- Rebuild with gcc4.4
+
+* Wed Apr 29 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2.5_20081207-alt1
+- Version 3.2.5_20081207
+
+* Wed Oct 29 2008 Led <led@altlinux.ru> 3.2.2-alt1
+- 3.2.2
+
+* Thu Sep 18 2008 Stanislav Ievlev <inger@altlinux.org> 3.1.11-alt1
+- OFED-1.3.1
+
+* Fri Feb 22 2008 Stanislav Ievlev <inger@altlinux.org> 3.0.3-alt3
+- add init.d script
+
+* Mon Aug 27 2007 Stanislav Ievlev <inger@altlinux.org> 3.0.3-alt2
+- turn on devel part
+
+* Tue Aug 21 2007 Stanislav Ievlev <inger@altlinux.org> 3.0.3-alt1
+- Initial build
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009