c2d36b
%global __remake_config 1
c2d36b
c2d36b
Name:    opensm
5ecf84
Version: 3.3.24
5ecf84
Release: 1%{?dist}
c2d36b
Summary: OpenIB InfiniBand Subnet Manager and management utilities
c2d36b
Group:   System Environment/Daemons
c2d36b
License: GPLv2 or BSD
c2d36b
Url:     https://github.com/linux-rdma/opensm
c2d36b
c2d36b
Source0: https://github.com/linux-rdma/opensm/releases/download/%{version}/%{name}-%{version}.tar.gz
c2d36b
Source2: opensm.logrotate
c2d36b
Source4: opensm.sysconfig
c2d36b
Source5: opensm.service
c2d36b
Source6: opensm.launch
c2d36b
Source7: opensm.rwtab
c2d36b
Source8: opensm.partitions
c2d36b
c2d36b
BuildRequires: libibumad-devel, systemd, systemd-units
c2d36b
BuildRequires: bison, flex, byacc, gcc
c2d36b
%if %{__remake_config}
c2d36b
BuildRequires: libtool, autoconf, automake
c2d36b
%endif
c2d36b
Requires: %{name}-libs%{?_isa} = %{version}-%{release}, logrotate, rdma
c2d36b
Requires(post): systemd
c2d36b
Requires(preun): systemd
c2d36b
Requires(postun): systemd
c2d36b
# RDMA is not currently built on 32-bit ARM: #1484155
c2d36b
ExcludeArch: s390 %{arm}
c2d36b
c2d36b
%description
c2d36b
OpenSM is the OpenIB project's Subnet Manager for Infiniband networks.
c2d36b
The subnet manager is run as a system daemon on one of the machines in
c2d36b
the infiniband fabric to manage the fabric's routing state.  This package
c2d36b
also contains various tools for diagnosing and testing Infiniband networks
c2d36b
that can be used from any machine and do not need to be run on a machine
c2d36b
running the opensm daemon.
c2d36b
c2d36b
%package libs
c2d36b
Summary: Libraries used by opensm and included utilities
c2d36b
Group: System Environment/Libraries
c2d36b
c2d36b
%description libs
c2d36b
Shared libraries for Infiniband user space access
c2d36b
c2d36b
%package devel
c2d36b
Summary: Development files for the opensm-libs libraries
c2d36b
Group: Development/Libraries
c2d36b
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
c2d36b
c2d36b
%description devel
c2d36b
Development environment for the opensm libraries
c2d36b
c2d36b
%package static
c2d36b
Summary: Static version of the opensm libraries
c2d36b
Group: Development/Libraries
c2d36b
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
c2d36b
%description static
c2d36b
Static version of opensm libraries
c2d36b
c2d36b
%prep
c2d36b
%setup -q
c2d36b
c2d36b
%build
c2d36b
%if %{__remake_config}
c2d36b
./autogen.sh
c2d36b
%endif
c2d36b
%configure --with-opensm-conf-sub-dir=rdma
c2d36b
make %{?_smp_mflags}
c2d36b
cd opensm
c2d36b
./opensm -c ../opensm-%{version}.conf
c2d36b
c2d36b
%install
c2d36b
make install DESTDIR=%{buildroot}
c2d36b
# remove unpackaged files from the buildroot
c2d36b
rm -f %{buildroot}%{_libdir}/*.la
c2d36b
rm -fr %{buildroot}%{_sysconfdir}/init.d
c2d36b
install -D -m644 opensm-%{version}.conf %{buildroot}%{_sysconfdir}/rdma/opensm.conf
c2d36b
install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/opensm
c2d36b
install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/opensm
c2d36b
install -D -m644 %{SOURCE5} %{buildroot}%{_unitdir}/opensm.service
c2d36b
install -D -m755 %{SOURCE6} %{buildroot}%{_libexecdir}/opensm-launch
c2d36b
install -D -m644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rwtab.d/opensm
c2d36b
install -D -m644 %{SOURCE8} %{buildroot}%{_sysconfdir}/rdma/partitions.conf
c2d36b
mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm
c2d36b
c2d36b
%post
c2d36b
%systemd_post opensm.service
c2d36b
c2d36b
%preun
c2d36b
%systemd_preun opensm.service
c2d36b
c2d36b
%postun
c2d36b
if [ -d /var/cache/opensm ]; then
c2d36b
	rm -fr /var/cache/opensm
c2d36b
fi
c2d36b
%systemd_postun_with_restart opensm.service
c2d36b
c2d36b
%post libs -p /sbin/ldconfig
c2d36b
c2d36b
%postun libs -p /sbin/ldconfig
c2d36b
c2d36b
%files
c2d36b
%dir /var/cache/opensm
c2d36b
%{_sbindir}/*
c2d36b
%{_mandir}/*/*
c2d36b
%{_unitdir}/*
c2d36b
%{_libexecdir}/*
c2d36b
%config(noreplace) %{_sysconfdir}/logrotate.d/opensm
c2d36b
%config(noreplace) %{_sysconfdir}/rdma/opensm.conf
c2d36b
%config(noreplace) %{_sysconfdir}/rdma/partitions.conf
c2d36b
%config(noreplace) %{_sysconfdir}/sysconfig/opensm
c2d36b
%{_sysconfdir}/rwtab.d/opensm
c2d36b
%doc AUTHORS ChangeLog INSTALL README NEWS
c2d36b
%license COPYING
c2d36b
c2d36b
%files libs
c2d36b
%{_libdir}/lib*.so.*
c2d36b
c2d36b
%files devel
c2d36b
%{_libdir}/lib*.so
c2d36b
%{_includedir}/infiniband
c2d36b
c2d36b
%files static
c2d36b
%{_libdir}/lib*.a
c2d36b
c2d36b
%changelog
5ecf84
* Tue Jun 15 2021 Honggang Li <honli@redhat.com> - 3.3.24-1
5ecf84
- Rebase to latest upstream release 3.3.24
5ecf84
- Resolves: bz1961961
5ecf84
5bcbac
* Thu Dec 10 2020 Honggang Li <honli@redhat.com> - 3.3.23-4
5bcbac
- opensm service should after rdma-hw.target
5bcbac
- Resolves: bz1906252
5bcbac
5bcbac
* Fri Nov 20 2020 Honggang Li <honli@redhat.com> - 3.3.23-3
5bcbac
- Allow MCMR requests with default subnet prefix
5bcbac
- Resolves: bz1898872
5bcbac
5bcbac
* Thu Nov 05 2020 Honggang Li <honli@redhat.com> - 3.3.23-2
5bcbac
- Update opensm service file
5bcbac
- Resolves: bz1892502
5bcbac
7dd54a
* Wed Apr 15 2020 Honggang Li <honli@redhat.com> - 3.3.23-1
7dd54a
- Rebase to latest upstream release 3.3.23
7dd54a
- Resolves: bz1815960
7dd54a
c2d36b
* Thu May 30 2019 Honggang Li <honli@redhat.com> - 3.3.22-2
c2d36b
- Onboard gating configuration
c2d36b
- Resolves: bz1682401
c2d36b
c2d36b
* Wed May 15 2019 Honggang Li <honli@redhat.com> - 3.3.22-1
c2d36b
- Rebase to latest upstream release 3.3.22
c2d36b
- Resolves: bz1708475
c2d36b
c2d36b
* Fri Jan 11 2019 Honggang Li <honli@redhat.com> - 3.3.21-2
c2d36b
- Restore the 'subnet_prefix' option
c2d36b
- Resolves: bz1664575
c2d36b
c2d36b
* Mon Sep 24 2018 Honggang Li <honli@redhat.com> - 3.3.21-1
c2d36b
- Rebase to latest upstream release 3.3.21
c2d36b
- Resolves: bz1602645
c2d36b
c2d36b
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-8
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c2d36b
c2d36b
* Thu Feb  1 2018 Honggang Li <honli@redhat.com> - 3.3.20-7
c2d36b
- Fix BuildRequires
c2d36b
- Fix preuninstall script
c2d36b
- Resolves: bz1540934
c2d36b
c2d36b
* Mon Aug 28 2017 Honggang Li <honli@redhat.com> - 3.3.20-6
c2d36b
- Add support for s309x
c2d36b
c2d36b
* Sat Aug 26 2017 Honggang Li <honli@redhat.com> - 3.3.20-5
c2d36b
- Disable support for ARM32.
c2d36b
- Resolves: bz1484155
c2d36b
c2d36b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-4
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c2d36b
c2d36b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-3
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c2d36b
c2d36b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-2
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c2d36b
c2d36b
* Fri Jun 10 2016 Honggang Li <honli@redhat.com> - 3.3.20-1
c2d36b
- Update to latest upstream release
c2d36b
- Resolves: bz1344691
c2d36b
c2d36b
* Wed Mar 16 2016 Doug Ledford <dledford@redhat.com> - 3.3.19-1
c2d36b
- Update to latest upstream release
c2d36b
- Incorporate features from RHEL opensm
c2d36b
- Resolves: bz1124202
c2d36b
c2d36b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.17-6
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c2d36b
c2d36b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.17-5
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c2d36b
c2d36b
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.17-4
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
c2d36b
c2d36b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.17-3
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c2d36b
c2d36b
* Thu May 29 2014 Michael Schwendt <mschwendt@fedoraproject.org> - 3.3.17-2
c2d36b
- Don't include manual page directories (#1089412).
c2d36b
- Use standard group Development/Libraries in library devel packages.
c2d36b
- Use %%?_isa in base package dependencies.
c2d36b
c2d36b
* Mon Mar 17 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.3.17-1
c2d36b
- Update to 3.3.17
c2d36b
c2d36b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.15-7
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c2d36b
c2d36b
* Mon Mar 25 2013 Doug Ledford <dledford@redhat.com> - 3.3.15-6
c2d36b
- Oops, forgot to remove the -B option to opensm when starting it
c2d36b
c2d36b
* Mon Mar 25 2013 Doug Ledford <dledford@redhat.com> - 3.3.15-5
c2d36b
- Drop the old sysv init script
c2d36b
- Fix opensm-launch to restart opensm in a loop.  This works around the
c2d36b
  fact that systemd starts opensm so early that we very well might not have
c2d36b
  sync on the link yet.  Without the physical link being up, opensm exits
c2d36b
  immediately.  This way opensm will get restarted every 30 seconds until
c2d36b
  sync is active on the link or until the opensm service is stopped.
c2d36b
- Always install the newly generated opensm-%%{version}.conf as opensm.conf
c2d36b
- Make the launch work properly in the event that no GUIDs are set and
c2d36b
  there are no numbered config files
c2d36b
c2d36b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.15-4
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c2d36b
c2d36b
* Wed Dec 05 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-3
c2d36b
- Fix startup on read only root
c2d36b
- Update default config file
c2d36b
- Resolves: bz817591
c2d36b
c2d36b
* Wed Dec 05 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-2
c2d36b
- More tweaks to systemd setup (proper scriptlets now)
c2d36b
- More tweaks to old sysv init script support (fix Requires)
c2d36b
c2d36b
* Tue Nov 27 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-1
c2d36b
- Update to latest upstream release
c2d36b
- Update to systemd startup
c2d36b
c2d36b
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.13-3
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c2d36b
c2d36b
* Tue Mar 13 2012 Doug Ledford <dledford@redhat.com> - 3.3.13-2
c2d36b
- Fix the config file comment in the opensm init script
c2d36b
- Resolves: bz802727
c2d36b
c2d36b
* Tue Feb 28 2012 Doug Ledford <dledford@redhat.com> - 3.3.13-1
c2d36b
- Update to latest upstream version
c2d36b
- Fix a minor issue in init scripts that would cause systemd to try and
c2d36b
  start/stop things in the wrong order
c2d36b
- Add a patch to allow us to specify the subnet prefix on the command line
c2d36b
c2d36b
* Tue Jan 03 2012 Doug Ledford <dledford@redhat.com> - 3.3.12-1
c2d36b
- Update to latest upstream version
c2d36b
c2d36b
* Mon Aug 15 2011 Kalev Lember <kalevlember@gmail.com> - 3.3.9-2
c2d36b
- Rebuilt for rpm bug #728707
c2d36b
c2d36b
* Wed Jul 20 2011 Doug Ledford <dledford@redhat.com> - 3.3.9-1
c2d36b
- Update to latest upstream version
c2d36b
- Add /etc/sysconfig/opensm for use by opensm init script
c2d36b
- Enable the ability to start more than one instance of opensm for multiple
c2d36b
  fabric support
c2d36b
- Enable the ability to start opensm with a priority other than default for
c2d36b
  support of backup opensm instances
c2d36b
c2d36b
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.5-2
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c2d36b
c2d36b
* Mon Mar 08 2010 Doug Ledford <dledford@redhat.com> - 3.3.5-1
c2d36b
- Update to latest upstream release.  We need various defines in ib_types.h
c2d36b
  for the latest ibutils package to build properly, and the latest ibutils
c2d36b
  package is needed because we found licensing problems in the older
c2d36b
  tarballs during review.
c2d36b
c2d36b
* Mon Jan 11 2010 Doug Ledford <dledford@redhat.com> - 3.3.3-2
c2d36b
- ExcludeArch s390(x) as there's no hardware support there
c2d36b
c2d36b
* Thu Dec 03 2009 Doug Ledford <dledford@redhat.com> - 3.3.3-1
c2d36b
- Update to latest upstream release
c2d36b
- Minor tweaks to init script for LSB compliance
c2d36b
c2d36b
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-2
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c2d36b
c2d36b
* Mon Jul 20 2009 Doug Ledford <dledford@redhat.com> - 3.3.2-1
c2d36b
- Update to latest upstream version
c2d36b
c2d36b
* Wed Apr 22 2009 Doug Ledford <dledford@redhat.com> - 3.3.1-1
c2d36b
- Update to latest upstream version
c2d36b
c2d36b
* Fri Mar 06 2009 Caolán McNamara <caolanm@redhat.com> - 3.2.1-3
c2d36b
- fix bare elifs to rebuild
c2d36b
c2d36b
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
c2d36b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c2d36b
c2d36b
* Sun Jun 08 2008 Doug Ledford <dledford@redhat.com> - 3.2.1-1
c2d36b
- Initial package for Fedora review process