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