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