205d44
%define _hardened_build 1
cfe731
%global __remake_config 1
205d44
642951
Name: opensm
cfe731
Version: 3.3.21
903d42
Release: 4%{?dist}
642951
Summary: OpenIB InfiniBand Subnet Manager and management utilities
642951
License: GPLv2 or BSD
cfe731
Url: https://github.com/linux-rdma/opensm
cfe731
Source0: https://github.com/linux-rdma/opensm/releases/download/%{version}/%{name}-%{version}.tar.gz
642951
Source2: opensm.logrotate
642951
Source4: opensm.sysconfig
642951
Source5: opensm.service
642951
Source6: opensm.launch
642951
Source7: opensm.rwtab
642951
Patch0: opensm-3.3.13-prefix.patch
cfe731
Patch1: 0001-Use-precision-specifier-for-scanf.patch
cfe731
Patch2: 0002-osm_helper.c-Fix-lsea_str_fixed_width-OVERRUN-issue.patch
cfe731
Patch3: 0003-osm_helper.c-Make-50-string-proper-fixed-width-in-ls.patch
cfe731
Patch4: 0004-main.c-Remove-NO_EFFECT-code.patch
cfe731
Patch5: 0005-osm_-link_mgr-trap_rcv-.c-Check-the-return-value-of-.patch
903d42
Patch6: 0001-osm_sa_mcmember_record.c-Allow-MCMR-requests-with-de.patch
cfe731
BuildRequires: libibumad-devel, libtool, bison, flex, byacc, systemd, gcc
cfe731
%if %{__remake_config}
cfe731
BuildRequires: libtool, autoconf, automake
cfe731
%endif
fd11bf
Requires: %{name}-libs%{?_isa} = %{version}-%{release}, logrotate, rdma
642951
Requires(post): systemd
642951
Requires(preun): systemd
642951
Requires(postun): systemd
642951
642951
%description
642951
OpenSM is the OpenIB project's Subnet Manager for Infiniband networks.
642951
The subnet manager is run as a system daemon on one of the machines in
642951
the infiniband fabric to manage the fabric's routing state.  This package
642951
also contains various tools for diagnosing and testing Infiniband networks
642951
that can be used from any machine and do not need to be run on a machine
642951
running the opensm daemon.
642951
642951
%package libs
642951
Summary: Libraries used by opensm and included utilities
642951
642951
%description libs
642951
Shared libraries for Infiniband user space access
642951
642951
%package devel
642951
Summary: Development files for the opensm-libs libraries
fd11bf
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
642951
642951
%description devel
642951
Development environment for the opensm libraries
642951
642951
%package static
642951
Summary: Static version of the opensm libraries
fd11bf
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
642951
%description static
642951
Static version of opensm libraries
642951
642951
%prep
642951
%setup -q
cfe731
%patch0 -p1
cfe731
%patch1 -p1
cfe731
%patch2 -p1
cfe731
%patch3 -p1
cfe731
%patch4 -p1
cfe731
%patch5 -p1
903d42
%patch6 -p1
642951
642951
%build
cfe731
%if %{__remake_config}
cfe731
./autogen.sh
cfe731
%endif
205d44
%configure --with-opensm-conf-sub-dir=rdma CFLAGS="$CFLAGS -fno-strict-aliasing"
642951
make %{?_smp_mflags}
642951
cd opensm
642951
./opensm -c ../opensm-%{version}.conf
642951
642951
%install
642951
make install DESTDIR=%{buildroot}
642951
# remove unpackaged files from the buildroot
642951
rm -f %{buildroot}%{_libdir}/*.la
642951
rm -fr %{buildroot}%{_sysconfdir}/init.d
642951
install -D -m644 opensm-%{version}.conf %{buildroot}%{_sysconfdir}/rdma/opensm.conf
642951
install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/opensm
642951
install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/opensm
642951
install -D -m644 %{SOURCE5} %{buildroot}%{_unitdir}/opensm.service
642951
install -D -m755 %{SOURCE6} %{buildroot}%{_libexecdir}/opensm-launch
642951
install -D -m644 %{SOURCE7} %{buildroot}%{_sysconfdir}/rwtab.d/opensm
642951
mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm
fd11bf
install -m 755 scripts/sldd.sh %{buildroot}%{_sbindir}/sldd.sh
642951
642951
%post
642951
%systemd_post opensm.service
642951
642951
%preun
fd11bf
%systemd_preun opensm.service
642951
642951
%postun
fd11bf
if [ -d /var/cache/opensm ]; then
fd11bf
	rm -fr /var/cache/opensm
fd11bf
fi
642951
%systemd_postun_with_restart opensm.service
642951
642951
%post libs -p /sbin/ldconfig
642951
642951
%postun libs -p /sbin/ldconfig
642951
642951
%files
642951
%dir /var/cache/opensm
642951
%{_sbindir}/*
642951
%{_mandir}/*
642951
%{_unitdir}/*
642951
%{_libexecdir}/*
642951
%config(noreplace) %{_sysconfdir}/logrotate.d/opensm
642951
%config(noreplace) %{_sysconfdir}/rdma/opensm.conf
642951
%config(noreplace) %{_sysconfdir}/sysconfig/opensm
642951
%{_sysconfdir}/rwtab.d/opensm
fd11bf
%doc AUTHORS ChangeLog INSTALL README NEWS doc/performance-manager-HOWTO.txt doc/QoS_management_in_OpenSM.txt doc/partition-config.txt doc/opensm-sriov.txt doc/current-routing.txt doc/opensm_release_notes-3.3.txt
fd11bf
%license COPYING
642951
642951
%files libs
642951
%{_libdir}/lib*.so.*
642951
642951
%files devel
642951
%{_libdir}/lib*.so
642951
%{_includedir}/infiniband
642951
642951
%files static
642951
%{_libdir}/lib*.a
642951
642951
%changelog
903d42
* Tue Dec 08 2020 Honggang Li <honli@redhat.com> - 3.3.21-4
903d42
- Allow MCMR requests with default subnet prefix
903d42
- Resolves: bz1898273
903d42
2fd409
* Tue Apr 28 2020 Honggang Li <honli@redhat.com> - 3.3.21-3
2fd409
- Fix subnet_prefix issue
2fd409
- Resolves: bz1828452
2fd409
cfe731
* Wed Feb 13 2019 Honggang Li <honli@redhat.com> - 3.3.21-2
cfe731
- Fix a few defects
cfe731
- Resolves: bz1668201
cfe731
cfe731
* Mon Jan 21 2019 Honggang Li <honli@redhat.com> - 3.3.21-1
cfe731
- Rebase to latest upstream release 3.3.21
cfe731
- Resolves: bz1535978, bz1653660
cfe731
5a3195
* Tue Jun 19 2018 Honggang Li <honli@redhat.com> - 3.3.20-3
5a3195
- Fix BuildRequires
5a3195
- Resolves: bz1567528
5a3195
fd11bf
* Wed Nov  1 2017 Honggang Li <honli@redhat.com> - 3.3.20-2
fd11bf
- Fix up preuninstall script
fd11bf
- Resolves: bz1508334
fd11bf
fd11bf
* Mon Oct 16 2017 Honggang Li <honli@redhat.com> - 3.3.20-1
fd11bf
- Cleanup the spec file
fd11bf
- Rebase to latest upstream release 3.3.20
fd11bf
- Resolves: bz1456524
fd11bf
30ef7a
* Fri Jun 05 2015 Doug Ledford <dledford@redhat.com> - 3.3.19-1
30ef7a
- Update to latest upstream release
30ef7a
- Build on s390
30ef7a
- Related: bz1186159
30ef7a
205d44
* Fri Oct 17 2014 Doug Ledford <dledford@redhat.com> - 3.3.18-2
205d44
- Fix an issue found by rpmdiff
205d44
- Related: bz1061587
205d44
205d44
* Thu Oct 09 2014 Doug Ledford <dledford@redhat.com> - 3.3.18-1
205d44
- Update to latest upstream release
205d44
- Resolves: bz1061587, bz1042745, bz884555, bz948475
205d44
0fe69b
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.3.15-7
0fe69b
- Mass rebuild 2013-12-27
0fe69b
642951
* Mon Mar 25 2013 Doug Ledford <dledford@redhat.com> - 3.3.15-6
642951
- Oops, forgot to remove the -B option to opensm when starting it
642951
642951
* Mon Mar 25 2013 Doug Ledford <dledford@redhat.com> - 3.3.15-5
642951
- Drop the old sysv init script
642951
- Fix opensm-launch to restart opensm in a loop.  This works around the
642951
  fact that systemd starts opensm so early that we very well might not have
642951
  sync on the link yet.  Without the physical link being up, opensm exits
642951
  immediately.  This way opensm will get restarted every 30 seconds until
642951
  sync is active on the link or until the opensm service is stopped.
642951
- Always install the newly generated opensm-%%{version}.conf as opensm.conf
642951
- Make the launch work properly in the event that no GUIDs are set and
642951
  there are no numbered config files
642951
642951
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.15-4
642951
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
642951
642951
* Wed Dec 05 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-3
642951
- Fix startup on read only root
642951
- Update default config file
642951
- Resolves: bz817591
642951
642951
* Wed Dec 05 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-2
642951
- More tweaks to systemd setup (proper scriptlets now)
642951
- More tweaks to old sysv init script support (fix Requires)
642951
642951
* Tue Nov 27 2012 Doug Ledford <dledford@redhat.com> - 3.3.15-1
642951
- Update to latest upstream release
642951
- Update to systemd startup
642951
642951
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.13-3
642951
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
642951
642951
* Tue Mar 13 2012 Doug Ledford <dledford@redhat.com> - 3.3.13-2
642951
- Fix the config file comment in the opensm init script
642951
- Resolves: bz802727
642951
642951
* Tue Feb 28 2012 Doug Ledford <dledford@redhat.com> - 3.3.13-1
642951
- Update to latest upstream version
642951
- Fix a minor issue in init scripts that would cause systemd to try and
642951
  start/stop things in the wrong order
642951
- Add a patch to allow us to specify the subnet prefix on the command line
642951
642951
* Tue Jan 03 2012 Doug Ledford <dledford@redhat.com> - 3.3.12-1
642951
- Update to latest upstream version
642951
642951
* Mon Aug 15 2011 Kalev Lember <kalevlember@gmail.com> - 3.3.9-2
642951
- Rebuilt for rpm bug #728707
642951
642951
* Wed Jul 20 2011 Doug Ledford <dledford@redhat.com> - 3.3.9-1
642951
- Update to latest upstream version
642951
- Add /etc/sysconfig/opensm for use by opensm init script
642951
- Enable the ability to start more than one instance of opensm for multiple
642951
  fabric support
642951
- Enable the ability to start opensm with a priority other than default for
642951
  support of backup opensm instances
642951
642951
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.5-2
642951
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
642951
642951
* Mon Mar 08 2010 Doug Ledford <dledford@redhat.com> - 3.3.5-1
642951
- Update to latest upstream release.  We need various defines in ib_types.h
642951
  for the latest ibutils package to build properly, and the latest ibutils
642951
  package is needed because we found licensing problems in the older
642951
  tarballs during review.
642951
642951
* Mon Jan 11 2010 Doug Ledford <dledford@redhat.com> - 3.3.3-2
642951
- ExcludeArch s390(x) as there's no hardware support there
642951
642951
* Thu Dec 03 2009 Doug Ledford <dledford@redhat.com> - 3.3.3-1
642951
- Update to latest upstream release
642951
- Minor tweaks to init script for LSB compliance
642951
642951
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-2
642951
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
642951
642951
* Mon Jul 20 2009 Doug Ledford <dledford@redhat.com> - 3.3.2-1
642951
- Update to latest upstream version
642951
642951
* Wed Apr 22 2009 Doug Ledford <dledford@redhat.com> - 3.3.1-1
642951
- Update to latest upstream version
642951
642951
* Fri Mar 06 2009 Caolán McNamara <caolanm@redhat.com> - 3.2.1-3
642951
- fix bare elifs to rebuild
642951
642951
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
642951
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
642951
642951
* Sun Jun 08 2008 Doug Ledford <dledford@redhat.com> - 3.2.1-1
642951
- Initial package for Fedora review process