yselkowitz / rpms / opensm

Forked from rpms/opensm 6 years ago
Clone
fc35b4a
%global __remake_config 0
fc35b4a
ebc68d4
Name:    opensm
6a59ba1
Version: 3.3.20
af9f25c
Release: 6%{?dist}
a4c19b6
Summary: OpenIB InfiniBand Subnet Manager and management utilities
ebc68d4
Group:   System Environment/Daemons
a4c19b6
License: GPLv2 or BSD
fc35b4a
Url:     https://www.openfabrics.org/
ebc68d4
fc35b4a
Source0: https://www.openfabrics.org/downloads/management/%{name}-%{version}.tar.gz
a4c19b6
Source2: opensm.logrotate
a2783db
Source4: opensm.sysconfig
dbba840
Source5: opensm.service
dbba840
Source6: opensm.launch
e048e48
Source7: opensm.rwtab
fc35b4a
Source8: opensm.partitions
b4b107c
Patch0:  opensm-3.3.17-prefix.patch
ebc68d4
12cea7f
BuildRequires: libibumad-devel, systemd, systemd-units
c33a4b1
BuildRequires: bison, flex, byacc
fc35b4a
%if %{__remake_config}
c33a4b1
BuildRequires: libtool, autoconf, autoheader
fc35b4a
%endif
9059599
Requires: %{name}-libs%{?_isa} = %{version}-%{release}, logrotate, rdma
469a0f1
Requires(post): systemd
469a0f1
Requires(preun): systemd
469a0f1
Requires(postun): systemd
13a4b74
# RDMA is not currently built on 32-bit ARM: #1484155
af9f25c
ExcludeArch: s390 %{arm}
a4c19b6
a4c19b6
%description
a4c19b6
OpenSM is the OpenIB project's Subnet Manager for Infiniband networks.
a4c19b6
The subnet manager is run as a system daemon on one of the machines in
a4c19b6
the infiniband fabric to manage the fabric's routing state.  This package
a4c19b6
also contains various tools for diagnosing and testing Infiniband networks
a4c19b6
that can be used from any machine and do not need to be run on a machine
a4c19b6
running the opensm daemon.
a4c19b6
a4c19b6
%package libs
a4c19b6
Summary: Libraries used by opensm and included utilities
a4c19b6
Group: System Environment/Libraries
a4c19b6
a4c19b6
%description libs
a4c19b6
Shared libraries for Infiniband user space access
a4c19b6
a4c19b6
%package devel
a4c19b6
Summary: Development files for the opensm-libs libraries
9059599
Group: Development/Libraries
9059599
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
a4c19b6
a4c19b6
%description devel
a4c19b6
Development environment for the opensm libraries
a4c19b6
a4c19b6
%package static
a4c19b6
Summary: Static version of the opensm libraries
9059599
Group: Development/Libraries
9059599
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
a4c19b6
%description static
a4c19b6
Static version of opensm libraries
a4c19b6
a4c19b6
%prep
a4c19b6
%setup -q
fefd80b
%patch0 -p1 -b .prefix
a4c19b6
a4c19b6
%build
fc35b4a
%if %{__remake_config}
fc35b4a
./autogen.sh
fc35b4a
%endif
fc35b4a
%configure --with-opensm-conf-sub-dir=rdma CFLAGS="$CFLAGS -fno-strict-aliasing"
a4c19b6
make %{?_smp_mflags}
c5a5a1f
cd opensm
39a5c52
./opensm -c ../opensm-%{version}.conf
a4c19b6
a4c19b6
%install
a2783db
make install DESTDIR=%{buildroot}
a4c19b6
# remove unpackaged files from the buildroot
a2783db
rm -f %{buildroot}%{_libdir}/*.la
a2783db
rm -fr %{buildroot}%{_sysconfdir}/init.d
39a5c52
install -D -m644 opensm-%{version}.conf %{buildroot}%{_sysconfdir}/rdma/opensm.conf
a2783db
install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/opensm
a2783db
install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/opensm
dbba840
install -D -m644 %{SOURCE5} %{buildroot}%{_unitdir}/opensm.service
dbba840
install -D -m755 %{SOURCE6} %{buildroot}%{_libexecdir}/opensm-launch
e048e48
install -D -m644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rwtab.d/opensm
fc35b4a
install -D -m644 %{SOURCE8} %{buildroot}%{_sysconfdir}/rdma/partitions.conf
a4c19b6
mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm
a4c19b6
469a0f1
%post
469a0f1
%systemd_post opensm.service
469a0f1
469a0f1
%preun
469a0f1
# Don't use the macro because we need to remove our cache directory as well
469a0f1
# and the macro doesn't have the ability to do that.  But, here the macro
469a0f1
# is for future reference:
469a0f1
# %systemd_preun opensm.service
469a0f1
if [ $1 = 0 ]; then
469a0f1
	/bin/systemctl --no-reload disable opensm.service >/dev/null 2>&1 || :
469a0f1
	/bin/systemctl stop opensm.service >/dev/null 2>&1 || :
469a0f1
	rm -fr /var/cache/opensm
469a0f1
fi
469a0f1
469a0f1
%postun
469a0f1
%systemd_postun_with_restart opensm.service
469a0f1
a4c19b6
%post libs -p /sbin/ldconfig
a4c19b6
a4c19b6
%postun libs -p /sbin/ldconfig
a4c19b6
a4c19b6
%files
a4c19b6
%dir /var/cache/opensm
a4c19b6
%{_sbindir}/*
9059599
%{_mandir}/*/*
dbba840
%{_unitdir}/*
dbba840
%{_libexecdir}/*
a4c19b6
%config(noreplace) %{_sysconfdir}/logrotate.d/opensm
a4c19b6
%config(noreplace) %{_sysconfdir}/rdma/opensm.conf
fc35b4a
%config(noreplace) %{_sysconfdir}/rdma/partitions.conf
a2783db
%config(noreplace) %{_sysconfdir}/sysconfig/opensm
e048e48
%{_sysconfdir}/rwtab.d/opensm
a4c19b6
%doc AUTHORS COPYING ChangeLog INSTALL README NEWS
a4c19b6
a4c19b6
%files libs
a4c19b6
%{_libdir}/lib*.so.*
a4c19b6
a4c19b6
%files devel
a4c19b6
%{_libdir}/lib*.so
a4c19b6
%{_includedir}/infiniband
a4c19b6
a4c19b6
%files static
a4c19b6
%{_libdir}/lib*.a
a4c19b6
a4c19b6
%changelog
af9f25c
* Mon Aug 28 2017 Honggang Li <honli@redhat.com> - 3.3.20-6
af9f25c
- Add support for s309x
af9f25c
13a4b74
* Sat Aug 26 2017 Honggang Li <honli@redhat.com> - 3.3.20-5
13a4b74
- Disable support for ARM32.
13a4b74
- Resolves: bz1484155
13a4b74
a50ea5f
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-4
a50ea5f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a50ea5f
9e79182
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-3
9e79182
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9e79182
2f45743
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-2
2f45743
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2f45743
6a59ba1
* Fri Jun 10 2016 Honggang Li <honli@redhat.com> - 3.3.20-1
6a59ba1
- Update to latest upstream release
6a59ba1
- Resolves: bz1344691
6a59ba1
fc35b4a
* Wed Mar 16 2016 Doug Ledford <dledford@redhat.com> - 3.3.19-1
fc35b4a
- Update to latest upstream release
fc35b4a
- Incorporate features from RHEL opensm
fc35b4a
- Resolves: bz1124202
fc35b4a
a248f30
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.17-6
a248f30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a248f30
f411b31
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.17-5
f411b31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f411b31
c8abc25
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.17-4
c8abc25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
c8abc25
6acc7c9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.17-3
6acc7c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6acc7c9
9059599
* Thu May 29 2014 Michael Schwendt <mschwendt@fedoraproject.org> - 3.3.17-2
9059599
- Don't include manual page directories (#1089412).
9059599
- Use standard group Development/Libraries in library devel packages.
9059599
- Use %%?_isa in base package dependencies.
9059599
ebc68d4
* Mon Mar 17 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.3.17-1
ebc68d4
- Update to 3.3.17
ebc68d4
349f6d9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.15-7
349f6d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
349f6d9
ac2064a
* Mon Mar 25 2013 Doug Ledford <dledford@redhat.com> - 3.3.15-6
ac2064a
- Oops, forgot to remove the -B option to opensm when starting it
ac2064a
39a5c52
* Mon Mar 25 2013 Doug Ledford <dledford@redhat.com> - 3.3.15-5
39a5c52
- Drop the old sysv init script
39a5c52
- Fix opensm-launch to restart opensm in a loop.  This works around the
39a5c52
  fact that systemd starts opensm so early that we very well might not have
39a5c52
  sync on the link yet.  Without the physical link being up, opensm exits
39a5c52
  immediately.  This way opensm will get restarted every 30 seconds until
39a5c52
  sync is active on the link or until the opensm service is stopped.
39a5c52
- Always install the newly generated opensm-%%{version}.conf as opensm.conf
39a5c52
- Make the launch work properly in the event that no GUIDs are set and
39a5c52
  there are no numbered config files
39a5c52
38c047f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.15-4
38c047f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
38c047f
e048e48
* Wed Dec 05 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-3
e048e48
- Fix startup on read only root
e048e48
- Update default config file
e048e48
- Resolves: bz817591
e048e48
469a0f1
* Wed Dec 05 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-2
469a0f1
- More tweaks to systemd setup (proper scriptlets now)
469a0f1
- More tweaks to old sysv init script support (fix Requires)
469a0f1
dbba840
* Tue Nov 27 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-1
dbba840
- Update to latest upstream release
dbba840
- Update to systemd startup
dbba840
232b1b5
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.13-3
232b1b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
232b1b5
87d1a3c
* Tue Mar 13 2012 Doug Ledford <dledford@redhat.com> - 3.3.13-2
87d1a3c
- Fix the config file comment in the opensm init script
87d1a3c
- Resolves: bz802727
87d1a3c
fefd80b
* Tue Feb 28 2012 Doug Ledford <dledford@redhat.com> - 3.3.13-1
fefd80b
- Update to latest upstream version
fefd80b
- Fix a minor issue in init scripts that would cause systemd to try and
fefd80b
  start/stop things in the wrong order
fefd80b
- Add a patch to allow us to specify the subnet prefix on the command line
fefd80b
c5a5a1f
* Tue Jan 03 2012 Doug Ledford <dledford@redhat.com> - 3.3.12-1
c5a5a1f
- Update to latest upstream version
c5a5a1f
ed7ac61
* Mon Aug 15 2011 Kalev Lember <kalevlember@gmail.com> - 3.3.9-2
ed7ac61
- Rebuilt for rpm bug #728707
ed7ac61
a2783db
* Wed Jul 20 2011 Doug Ledford <dledford@redhat.com> - 3.3.9-1
a2783db
- Update to latest upstream version
a2783db
- Add /etc/sysconfig/opensm for use by opensm init script
a2783db
- Enable the ability to start more than one instance of opensm for multiple
a2783db
  fabric support
a2783db
- Enable the ability to start opensm with a priority other than default for
a2783db
  support of backup opensm instances
a2783db
850ddff
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.5-2
850ddff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
850ddff
6da9a5d
* Mon Mar 08 2010 Doug Ledford <dledford@redhat.com> - 3.3.5-1
6da9a5d
- Update to latest upstream release.  We need various defines in ib_types.h
6da9a5d
  for the latest ibutils package to build properly, and the latest ibutils
6da9a5d
  package is needed because we found licensing problems in the older
6da9a5d
  tarballs during review.
6da9a5d
c17c1a4
* Mon Jan 11 2010 Doug Ledford <dledford@redhat.com> - 3.3.3-2
c17c1a4
- ExcludeArch s390(x) as there's no hardware support there
c17c1a4
c8f583b
* Thu Dec 03 2009 Doug Ledford <dledford@redhat.com> - 3.3.3-1
c8f583b
- Update to latest upstream release
c8f583b
- Minor tweaks to init script for LSB compliance
c8f583b
6994e17
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-2
6994e17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6994e17
aae56c8
* Mon Jul 20 2009 Doug Ledford <dledford@redhat.com> - 3.3.2-1
aae56c8
- Update to latest upstream version
aae56c8
3e3fe8c
* Wed Apr 22 2009 Doug Ledford <dledford@redhat.com> - 3.3.1-1
3e3fe8c
- Update to latest upstream version
3e3fe8c
3191193
* Fri Mar 06 2009 Caolán McNamara <caolanm@redhat.com> - 3.2.1-3
3191193
- fix bare elifs to rebuild
3191193
6650e12
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
6650e12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6650e12
a4c19b6
* Sun Jun 08 2008 Doug Ledford <dledford@redhat.com> - 3.2.1-1
a4c19b6
- Initial package for Fedora review process