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