82e02b9
%global __remake_config 1
fc35b4a
ebc68d4
Name:    opensm
f84c416
Version: 3.3.24
f283c12
Release: 9%{?dist}
a4c19b6
Summary: OpenIB InfiniBand Subnet Manager and management utilities
f283c12
License: GPL-2.0-only OR Linux-OpenIB
82e02b9
Url:     https://github.com/linux-rdma/opensm
ebc68d4
82e02b9
Source0: https://github.com/linux-rdma/opensm/releases/download/%{version}/%{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
ebc68d4
0c07a16
BuildRequires: make
Igor Gnatenko 0b61ce0
BuildRequires:  gcc
30331ff
BuildRequires: libibumad-devel, systemd, systemd-units
c33a4b1
BuildRequires: bison, flex, byacc
fc35b4a
%if %{__remake_config}
82e02b9
BuildRequires: libtool, autoconf, automake
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
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
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
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
a4c19b6
%description static
a4c19b6
Static version of opensm libraries
a4c19b6
a4c19b6
%prep
a4c19b6
%setup -q
a4c19b6
a4c19b6
%build
fc35b4a
%if %{__remake_config}
fc35b4a
./autogen.sh
fc35b4a
%endif
82e02b9
%configure --with-opensm-conf-sub-dir=rdma
a535034
%make_build
c5a5a1f
cd opensm
39a5c52
./opensm -c ../opensm-%{version}.conf
a4c19b6
a4c19b6
%install
a535034
%make_install
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
9ef7aba
%systemd_preun opensm.service
469a0f1
469a0f1
%postun
9ef7aba
if [ -d /var/cache/opensm ]; then
9ef7aba
	rm -fr /var/cache/opensm
9ef7aba
fi
469a0f1
%systemd_postun_with_restart opensm.service
469a0f1
039dbce
%ldconfig_scriptlets libs
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
82e02b9
%doc AUTHORS ChangeLog INSTALL README NEWS
82e02b9
%license COPYING
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
f283c12
* Tue Feb 06 2024 Izabela Bakollari <ibakolla@redhat.com> - 3.3.24-9            
f283c12
- migrated to SPDX license
f283c12
06439ed
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-8
06439ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
06439ed
b8f4ad8
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-7
b8f4ad8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
b8f4ad8
5f75bc4
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-6
5f75bc4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
5f75bc4
aa7a739
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-5
aa7a739
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
aa7a739
d62d36c
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-4
d62d36c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
d62d36c
9760bc6
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-3
9760bc6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
9760bc6
67fd04a
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.24-2
67fd04a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
67fd04a
f84c416
* Mon Jun 14 2021 Honggang Li <honli@redhat.com> - 3.3.24-1
f84c416
- Rebase opensm to latest upstream release 3.3.24
f84c416
6aa8861
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.3.23-7
6aa8861
- Rebuilt for updated systemd-rpm-macros
6aa8861
  See https://pagure.io/fesco/issue/2583.
6aa8861
c8149d4
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.23-6
c8149d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c8149d4
a535034
* Thu Dec 10 2020 Timm Bäder <tbaeder@redhat.com> 3.3.23.5
a535034
- Use make macros
a535034
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make
a535034
6add8cf
* Thu Dec 10 2020 Honggang Li <honli@redhat.com> - 3.3.23-4
6add8cf
- opensm service should after rdma-hw.target
6add8cf
70f7102
* Thu Oct 29 2020 Honggang Li <honli@redhat.com> -3.3.23-3
70f7102
- Update systemd service file
70f7102
f8aad03
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.23-2
f8aad03
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f8aad03
eab687d
* Mon Mar 16 2020 Honggang Li <honli@redhat.com> - 3.3.23-1
eab687d
- Rebase opensm to latest upstream release 3.3.23
eab687d
- Resolves: bz1813779
eab687d
eff9326
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.22-3
eff9326
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
eff9326
3ac14df
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.22-2
3ac14df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3ac14df
527faec
* Wed Apr 17 2019 Honggang Li <honli@redhat.com> - 3.3.22-1
527faec
- Rebase opensm to latest upstream release 3.3.22
527faec
- Resolves: bz1700766
527faec
d7bb173
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.21-3
d7bb173
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d7bb173
df73e92
* Mon Jan 21 2019 Honggang Li <honli@redhat.com> - 3.3.21-2
df73e92
- Restore the subnet prefix patch
df73e92
- Resolves: bz1663785
df73e92
82e02b9
* Mon Oct  8 2018 Honggang Li <honli@redhat.com> - 3.3.21-1
82e02b9
- Rebase opensm to latest upstream release 3.3.21
82e02b9
- Resolves: bz1637260
82e02b9
e80cd84
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-9
e80cd84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e80cd84
e9133b7
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.20-8
e9133b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e9133b7
9ef7aba
* Thu Feb  1 2018 Honggang Li <honli@redhat.com> - 3.3.20-7
9ef7aba
- Fix BuildRequires
9ef7aba
- Fix preuninstall script
9ef7aba
- Resolves: bz1540934
9ef7aba
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
Caolan McNamara 3191193
* Fri Mar 06 2009 Caolán McNamara <caolanm@redhat.com> - 3.2.1-3
Caolan McNamara 3191193
- fix bare elifs to rebuild
Caolan McNamara 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