b524e3
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
b524e3
%define _hardened_build 1
b524e3
b524e3
%global checkout f5cbb9a
b524e3
b524e3
Name:               fcoe-utils
b524e3
Version:            1.0.32
b524e3
Release:            2%{?dist}
b524e3
Summary:            Fibre Channel over Ethernet utilities
b524e3
Group:              Applications/System
b524e3
License:            GPLv2
b524e3
URL:                http://www.open-fcoe.org
b524e3
Source0:            https://github.com/morbidrsa/fcoe-utils/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
b524e3
Source1:            quickstart.txt
b524e3
Source2:            fcoe.service
b524e3
Source3:            fcoe.config
b524e3
Source4:            README.redhat
b524e3
Patch0:             0001-fcoemon-link-buffer-resize-fix.patch
b524e3
ExcludeArch:        ppc s390
b524e3
BuildRequires:      autoconf
b524e3
BuildRequires:      automake
b524e3
BuildRequires:      libpciaccess-devel
b524e3
BuildRequires:      libtool
b524e3
BuildRequires:      lldpad-devel >= 0.9.43
b524e3
BuildRequires:      systemd
b524e3
Requires:           lldpad >= 0.9.43
b524e3
Requires:           iproute
b524e3
Requires:           device-mapper-multipath
b524e3
Requires(post):     systemd
b524e3
Requires(preun):    systemd
b524e3
Requires(postun):   systemd
b524e3
b524e3
%description
b524e3
Fibre Channel over Ethernet utilities
b524e3
fcoeadm - command line tool for configuring FCoE interfaces
b524e3
fcoemon - service to configure DCB Ethernet QOS filters, works with lldpad
b524e3
b524e3
%prep
b524e3
%autosetup -p1
b524e3
b524e3
cp -v %{SOURCE1} quickstart.txt
b524e3
cp -v %{SOURCE4} README.redhat
b524e3
b524e3
%build
b524e3
./bootstrap.sh
b524e3
%configure
b524e3
make %{?_smp_mflags}
b524e3
b524e3
%install
b524e3
make install DESTDIR=%{buildroot}
b524e3
rm -rf %{buildroot}/etc/init.d
b524e3
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig %{buildroot}%{_unitdir}
b524e3
rm -f %{buildroot}%{_unitdir}/*
b524e3
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
b524e3
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/fcoe
b524e3
mkdir -p %{buildroot}%{_libexecdir}/fcoe
b524e3
for file in \
b524e3
    contrib/*.sh \
b524e3
    debug/*sh
b524e3
    do install -m 755 ${file} %{buildroot}%{_libexecdir}/fcoe/
b524e3
done
b524e3
# We supply our own config for fcoe.service
b524e3
rm -f %{buildroot}/%{_sysconfdir}/fcoe/config
b524e3
%ifarch s390x
b524e3
# bnx2fc is not available on s390x (#1056371)
b524e3
sed -i -e 's/SUPPORTED_DRIVERS="libfc fcoe bnx2fc"/SUPPORTED_DRIVERS="libfc fcoe"/' \
b524e3
    %{buildroot}/%{_sysconfdir}/sysconfig/fcoe
b524e3
%endif
b524e3
b524e3
%post
b524e3
%systemd_post fcoe.service
b524e3
b524e3
%preun
b524e3
%systemd_preun fcoe.service
b524e3
b524e3
%postun
b524e3
%systemd_postun_with_restart fcoe.service
b524e3
b524e3
%files
b524e3
%doc README.redhat COPYING QUICKSTART quickstart.txt
b524e3
%{_sbindir}/*
b524e3
%{_mandir}/man8/*
b524e3
%{_unitdir}/fcoe.service
b524e3
%{_sysconfdir}/fcoe/
b524e3
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
b524e3
%config(noreplace) %{_sysconfdir}/sysconfig/fcoe
b524e3
%{_sysconfdir}/bash_completion.d/
b524e3
%{_libexecdir}/fcoe/
b524e3
b524e3
%changelog
b524e3
* Fri Jan 25 2019 Chris Leech <cleech@redhat.com> - 1.0.32-2
b524e3
- 1656720 fcoemon fix ignored devices from recv buffer resize bug
b524e3
b524e3
* Wed Feb 22 2017 Chris Leech <cleech@redhat.com> - 1.0.32-1
b524e3
- 1384707 fcoeadm --target segfaults if non-FCoE FC targets are present
b524e3
- 1321611 fcoemon should only try to connect to lldpad when required
b524e3
b524e3
* Fri Aug 19 2016 Chris Leech <cleech@redhat.com> - 1.0.31-1.git5dfd3e4
b524e3
- 1274530 rebase to upstream 1.0.31+
b524e3
- no longer requires libhbaapi/libhbalinux
b524e3
- no longer attempts to connect to lldpad if DC_REQUIRED is configured off
b524e3
  for all interfaces
b524e3
b524e3
* Wed Jul 06 2016 Chris Leech <cleech@redhat.com> - 1.0.30-4.git91c0c8c
b524e3
- 1039779 replace README that contained mostly build instructions with
b524e3
  README.redhat containing better distro-specific information
b524e3
b524e3
* Mon Jul 06 2015 Chris Leech <cleech@redhat.com> - 1.0.30-3.git91c0c8c
b524e3
- 1056367 remove s390x from ExcludeArch
b524e3
b524e3
* Mon Jul 06 2015 Chris Leech <cleech@redhat.com> - 1.0.30-2.git91c0c8c
b524e3
- 1056367 fix display when libhbalinux includes hosts without a serial number
b524e3
b524e3
* Thu Jun 18 2015 Chris Leech <cleech@redhat.com> - 1.0.30-1.git91c0c8c
b524e3
- 1175802 rebase to upstream v1.0.30-2-g91c0c8c
b524e3
b524e3
* Wed Jan 21 2015 Chris Leech <cleech@redhat.com> - 1.0.29-9
b524e3
- 1184386 fix segfault on fipvlan create
b524e3
b524e3
* Mon Oct 27 2014 Chris Leech <cleech@redhat.com> - 1.0.29-8
b524e3
- 1049200 fix fcoeadm VN2VN mode create
b524e3
b524e3
* Fri Oct 03 2014 Chris Leech <cleech@redhat.com> - 1.0.29-7
b524e3
- 1087095 update to upstream v1.0.29-29-g9267509
b524e3
b524e3
* Mon Mar 10 2014 Petr Å abata <contyk@redhat.com> - 1.0.29-6
b524e3
- Break out of recv_loop() (#1049018)
b524e3
b524e3
* Thu Mar 06 2014 Petr Å abata <contyk@redhat.com> - 1.0.29-5
b524e3
- Don't build on s390x again (#1073060)
b524e3
- Drop bnx2fc from SUPPORTED_DRIVERS on s390x, for future (#1056371)
b524e3
- Update fcoemon(8) with more systemd changes (#1049162)
b524e3
b524e3
* Fri Jan 17 2014 Petr Å abata <contyk@redhat.com> - 1.0.29-4
b524e3
- Build on s390x again (#1052999)
b524e3
b524e3
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.29-3
b524e3
- Mass rebuild 2013-12-27
b524e3
b524e3
* Thu Nov 07 2013 Petr Å abata <contyk@redhat.com> - 1.0.29-2
b524e3
- Bug #1024124:
b524e3
- Don't install the old configuration file alongside the new one
b524e3
- Add bnx2fc to the SUPPORTED_DRIVERS for consistency with previous configuration
b524e3
b524e3
* Thu Aug 29 2013 Petr Å abata <contyk@redhat.com> - 1.0.29-1
b524e3
- 1.0.29 bump
b524e3
b524e3
* Wed Jul 31 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-4
b524e3
- Drop the initscript-specific config patch
b524e3
b524e3
* Wed Jul 31 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-3
b524e3
- Require just 'systemd' instead of 'systemd-units'
b524e3
- Patch the fcoemon manpage with a note for systemd users
b524e3
b524e3
* Mon Jun 10 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-2
b524e3
- Enhance the format strings patch to fix ppc64 build failures too
b524e3
b524e3
* Tue Jun 04 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-1
b524e3
- 1.0.28 bump
b524e3
b524e3
* Wed Mar 06 2013 Petr Å abata <contyk@redhat.com> - 1.0.27-1
b524e3
- 1.0.27 bump
b524e3
b524e3
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-3
b524e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b524e3
b524e3
* Wed Jan 09 2013 Petr Å abata <contyk@redhat.com> - 1.0.25-2
b524e3
- Don't build for s390x since it's not supported by kernel either
b524e3
b524e3
* Tue Nov 27 2012 Petr Å abata <contyk@redhat.com> - 1.0.25-1
b524e3
- 1.0.25 (with latest fixes)
b524e3
- Simplify the spec a bit
b524e3
- Fix bogus dates in changelog
b524e3
b524e3
* Thu Nov 01 2012 Petr Å abata <contyk@redhat.com> - 1.0.25-1
b524e3
b524e3
* Tue Aug 28 2012 Petr Å abata <contyk@redhat.com> - 1.0.24-2
b524e3
- Migrate to systemd scriptlets (#850104)
b524e3
b524e3
* Wed Aug 15 2012 Petr Å abata <contyk@redhat.com> - 1.0.24-1
b524e3
- 1.0.24 bump
b524e3
b524e3
* Mon Jul 23 2012 Petr Å abata <contyk@redhat.com> - 1.0.23-3
b524e3
- Don't exclude s390x.
b524e3
- Add AM_PROG_AR to configure.ac.
b524e3
b524e3
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.23-2
b524e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b524e3
b524e3
* Mon Jun 25 2012 Petr Å abata <contyk@redhat.com> - 1.0.23-1
b524e3
- Update to 1.0.23
b524e3
- Re-introduce ExcludeArch to be in line with EL.
b524e3
b524e3
* Thu Feb 16 2012 Petr Å abata <contyk@redhat.com> - 1.0.22-2
b524e3
- Fix the incorrect libhbalinux runtime dependency
b524e3
b524e3
* Mon Jan 23 2012 Petr Å abata <contyk@redhat.com> - 1.0.22-1
b524e3
- 1.0.22 bump
b524e3
- Remove dcbd from Description
b524e3
b524e3
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.21-2
b524e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b524e3
b524e3
* Thu Nov 24 2011 Petr Å abata <contyk@redhat.com> - 1.0.21-1
b524e3
- 1.0.21 bump
b524e3
b524e3
* Mon Oct 31 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-5
b524e3
- Remove useless PIDFile from fcoe.service unit file
b524e3
b524e3
* Thu Oct 06 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-4
b524e3
- Do not enable fcoemon by default (#701999)
b524e3
- Silence systemctl output
b524e3
b524e3
* Fri Sep 23 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-3
b524e3
- Enable hardened build
b524e3
b524e3
* Mon Jul 18 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-2
b524e3
- Drop SysV support in favor of systemd (#714683)
b524e3
- Remove ancient scriptlets (pre-1.0.7 era)
b524e3
- Update quickstart.txt to reflect new changes
b524e3
b524e3
* Thu Jul 07 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-1
b524e3
- 1.0.20 bump
b524e3
b524e3
* Thu Jun 02 2011 Petr Sabata <contyk@redhat.com> - 1.0.19-1
b524e3
- 1.0.19 bump
b524e3
b524e3
* Tue May  3 2011 Petr Sabata <psabata@redhat.com> - 1.0.18-2
b524e3
- fcoemon: Do not create a world and group writable PID file
b524e3
b524e3
* Wed Apr 20 2011 Petr Sabata <psabata@redhat.com> - 1.0.18-1
b524e3
- 1.0.18 bump with latest bugfixes
b524e3
- Removing ExcludeArch completely; not related for Fedora
b524e3
- Buildroot cleanup
b524e3
b524e3
* Tue Apr 19 2011 Karsten Hopp <karsten@redhat.com> 1.0.17-1.1
b524e3
- remove excludearch ppc, required by anaconda.ppc
b524e3
b524e3
* Thu Feb 24 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.0.17-1
b524e3
- Pull in new upstream release (required to build)
b524e3
- Fix git clone URL in comments
b524e3
- Drop fcoe-utils-1.0.7-init.patch, fcoe-utils-1.0.7-init-condrestart.patch
b524e3
  and fcoe-utils-1.0.8-init-LSB.patch that are now upstream
b524e3
- Drop fcoe-utils-1.0.8-includes.patch and use a copy of kernel headers
b524e3
  for all architectures (rename fcoe-sparc.patch to fcoe-include-headers.patch)
b524e3
  Upstream added detection to avoid inclusion of kernel headers in the build
b524e3
  and it expects to find the userland headers installed. Those have not
b524e3
  yet propagated in Fedora.
b524e3
  Use temporary this workaround, since fcoe is a requiment for anaconda
b524e3
  and it failed to build for a while
b524e3
- Drop BuildRequires on kernel-devel
b524e3
- Add BuildRequires on autoconf (it is used and not installed by default
b524e3
  on all build chroots)
b524e3
b524e3
* Wed Feb 23 2011 Dennis Gilmore <dennis@ausil.us> - 1.0.14-5
b524e3
- patch in headers used from kernel-devel on 32 bit sparc 
b524e3
b524e3
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.14-4
b524e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b524e3
b524e3
* Tue Nov 30 2010 Petr Sabata <psabata@redhat.com> - 1.0.14-3
b524e3
- Removing dependency on vconfig, rhbz#658525
b524e3
b524e3
* Mon Jun 28 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.14-2
b524e3
- added device-mapper-multipath to requires (#603242)
b524e3
- added missing man pages for fcrls, fcnsq and fcping
b524e3
- update of init script - added condrestart, try-restart
b524e3
  and force-reload options
b524e3
- added vconfig to requires (#589608)
b524e3
b524e3
* Mon May 24 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.14-1
b524e3
- rebased to 1.0.14, see bug #593824 for complete changelog
b524e3
b524e3
* Mon Apr 12 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.13-1
b524e3
- rebased to v1.0.13, some bugfixes, new fcoe related scripts
b524e3
b524e3
* Tue Mar 30 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-2.20100323git
b524e3
- some upstream updates
b524e3
- better fipvlan support
b524e3
- added fcoe_edd.sh script
b524e3
b524e3
* Tue Mar 16 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-1
b524e3
- rebased to version 1.0.12, improved functionality with lldpad
b524e3
  and dcbd
b524e3
- removed /etc/fcoe/scripts/fcoeplumb
b524e3
b524e3
* Thu Dec 10 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-2.20091204git
b524e3
- excluded s390 and ppc
b524e3
b524e3
* Fri Dec 04 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-1.20091204git
b524e3
- rebase to latest version of fcoe-utils
b524e3
b524e3
* Mon Sep 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-3
b524e3
- update of init script to be LSB-compliant
b524e3
b524e3
* Fri Jul 31 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-2
b524e3
- patch for clean compilation without usage of upstream's ugly hack
b524e3
b524e3
* Thu Jul 30 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-1
b524e3
- rebase of fcoe-utils to 1.0.8, adjusted spec file
b524e3
b524e3
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-8
b524e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b524e3
b524e3
* Tue Jun 9 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-7
b524e3
- added quickstart file to doc (#500759)
b524e3
b524e3
* Thu May 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-6
b524e3
- renamed init script to fcoe, changed lock filename to fcoe
b524e3
  (#497604)
b524e3
- init script modified to do condrestart properly
b524e3
- some modifications in spec file to apply previous change
b524e3
  to older versions od init script during update
b524e3
- fixed issue with accepting long options (#498551)
b524e3
b524e3
* Mon May 4 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-5
b524e3
- fixed SIGSEGV when fcoe module isn't loaded (#498550)
b524e3
b524e3
* Mon Apr 27 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-4
b524e3
- added libhbalinux to Requires (#497605)
b524e3
- correction of spec file (_initddir -> _initrddir)
b524e3
b524e3
* Wed Apr 8 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-3
b524e3
- more minor corrections in spec file
b524e3
b524e3
* Thu Apr 2 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-2
b524e3
- minor corrections in spec file
b524e3
- moved init script to correct location
b524e3
- correction in the init script (chkconfig directives)
b524e3
b524e3
* Mon Mar 2 2009 Chris Leech <christopher.leech@intel.com> - 1.0.7-1
b524e3
- initial rpm build of fcoe tools
b524e3