c2db1d
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
c2db1d
%global _hardened_build 1
c2db1d
c2db1d
# v1.0.34
c2db1d
%global commit0      14ef0d24c0657e56c68360afcfe64034d37323e0
c2db1d
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
c2db1d
c2db1d
Name:               fcoe-utils
c2db1d
Version:            1.0.34
c2db1d
Release:            0.git%{shortcommit0}%{?dist}
c2db1d
Summary:            Fibre Channel over Ethernet utilities
c2db1d
License:            GPLv2
c2db1d
URL:                http://www.open-fcoe.org
c2db1d
Source0:            https://github.com/openSUSE/fcoe-utils/archive/%{commit0}.tar.gz#/%{name}-%{version}-%{shortcommit0}.tar.gz
c2db1d
ExcludeArch:        ppc s390
c2db1d
BuildRequires:      autoconf
c2db1d
BuildRequires:      automake
c2db1d
BuildRequires:      libtool
c2db1d
BuildRequires:      libpciaccess-devel
c2db1d
BuildRequires:      lldpad-devel >= 0.9.43
c2db1d
BuildRequires:      systemd
c2db1d
BuildRequires:      make
c2db1d
Requires:           lldpad >= 0.9.43
c2db1d
Requires:           iproute
c2db1d
Requires:           device-mapper-multipath
c2db1d
Requires(post):     systemd
c2db1d
Requires(preun):    systemd
c2db1d
Requires(postun):   systemd
c2db1d
c2db1d
%description
c2db1d
Fibre Channel over Ethernet utilities
c2db1d
fcoeadm - command line tool for configuring FCoE interfaces
c2db1d
fcoemon - service to configure DCB Ethernet QOS filters, works with lldpad
c2db1d
c2db1d
%prep
c2db1d
%autosetup -p1 -n fcoe-utils-%{commit0}
c2db1d
%if 0%{?rhel} >= 8
c2db1d
# RHEL dropped support for software fcoe (fcoe.ko)
c2db1d
sed -i 's/^\(SUPPORTED_DRIVERS\)=".*"$/\1="bnx2fc qedf"/' etc/config
c2db1d
# make the defaults sane for supported offload drivers
c2db1d
sed -i 's/^\(DCB_REQUIRED\)=".*"$/\1="no"/' etc/cfg-ethx
c2db1d
%endif
c2db1d
c2db1d
%build
c2db1d
./bootstrap.sh
c2db1d
%configure --with-systemdsystemunitdir=%{_unitdir}
c2db1d
make %{?_smp_mflags}
c2db1d
c2db1d
%install
c2db1d
make install DESTDIR=%{buildroot}
c2db1d
rm -rf %{buildroot}/etc/init.d
c2db1d
mkdir -p %{buildroot}%{_libexecdir}/fcoe
c2db1d
for file in \
c2db1d
    contrib/*.sh \
c2db1d
    debug/*sh
c2db1d
    do install -m 755 ${file} %{buildroot}%{_libexecdir}/fcoe/
c2db1d
done
c2db1d
c2db1d
%post
c2db1d
%systemd_post fcoe.service fcoemon.socket
c2db1d
c2db1d
%preun
c2db1d
%systemd_preun fcoe.service fcoemon.socket
c2db1d
c2db1d
%postun
c2db1d
%systemd_postun_with_restart fcoe.service fcoemon.socket
c2db1d
c2db1d
%files
c2db1d
%doc README COPYING QUICKSTART
c2db1d
%{_sbindir}/*
c2db1d
%{_mandir}/man8/*
c2db1d
%{_unitdir}/fcoe.service
c2db1d
%{_unitdir}/fcoemon.socket
c2db1d
%{_sysconfdir}/fcoe/
c2db1d
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
c2db1d
%config(noreplace) %{_sysconfdir}/fcoe/config
c2db1d
%{_datadir}/bash-completion/completions/*
c2db1d
%{_libexecdir}/fcoe/
c2db1d
c2db1d
%changelog
c2db1d
* Thu Sep 09 2021 Chris Leech <cleech@redhat.com> - 1.0.34-0.git14ef0d2
c2db1d
- upstream 1.0.34
c2db1d
- drop gcc warning diabling patch, upstream fixes exist for these issues now
c2db1d
- #1961180 FCoE interface name regressions
c2db1d
c2db1d
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.33-7.git848bcc6
c2db1d
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
c2db1d
  Related: rhbz#1991688
c2db1d
c2db1d
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.33-6.git848bcc6
c2db1d
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
c2db1d
c2db1d
* Tue Feb 02 2021 Chris Leech <cleech@redhat.com> - 1.0.33-5.git848bcc6
c2db1d
- add in RHEL conditional for removed fcoe.ko support
c2db1d
c2db1d
* Mon Feb 01 2021 Chris Leech <cleech@redhat.com> - 1.0.33-4.git848bcc6
c2db1d
- drop any differences with upstream service and config files
c2db1d
c2db1d
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.33-3.gitfe376de
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c2db1d
c2db1d
* Sat Nov 14 2020 Jeff Law <law@redhat.com> - 1.0.33-2.gitfe376de
c2db1d
- Disable fatal diagnostic from gcc-11 for fping
c2db1d
c2db1d
* Wed Oct 28 2020 Jeff Law <law@redhat.com> - 1.0.33-1.gitfe376de
c2db1d
- Disable fatal diagnostics from gcc-11 for fipvlan
c2db1d
c2db1d
* Mon Sep 21 2020 Chris Leech <cleech@redhat.com> - 1.0.33-0.gitfe376de
c2db1d
- FTBFS: fix gcc 10.2 truncation and overflow errors
c2db1d
- rebase to 1.0.33+ from new upstream location
c2db1d
c2db1d
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-12.git9834b34
c2db1d
- Second attempt - Rebuilt for
c2db1d
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c2db1d
c2db1d
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-11.git9834b34
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c2db1d
c2db1d
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-10.git9834b34
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c2db1d
c2db1d
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-9.git9834b34
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c2db1d
c2db1d
* Tue Jun 04 2019 Chris Leech <cleech@redhat.com> - 1.0.32-8.git9834b34
c2db1d
- fix more string function issues breaking the build with newer gcc
c2db1d
c2db1d
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-7
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c2db1d
c2db1d
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-6
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
c2db1d
c2db1d
* Fri Mar 16 2018 Chris Leech <cleech@redhat.com> - 1.0.32-5
c2db1d
- fix some newer gcc 8 truncation format errors
c2db1d
c2db1d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-4
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c2db1d
c2db1d
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-3
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c2db1d
c2db1d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-2
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c2db1d
c2db1d
* Thu Feb 09 2017 Chris Leech <cleech@redhat.com> - 1.0.32-1
c2db1d
- update to 1.0.32
c2db1d
c2db1d
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.30-5.git91c0c8c
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c2db1d
c2db1d
* Mon Feb 01 2016 Chris Leech <cleech@redhat.com> - 1.0.30-4.git91c0c8c
c2db1d
- 1303433 package should not attempt to own /etc/bash_completion.d
c2db1d
c2db1d
* Mon Jul 06 2015 Chris Leech <cleech@redhat.com> - 1.0.30-2
c2db1d
- fix display when libhbalinux includes hosts without a serial number
c2db1d
c2db1d
* Tue Jun 16 2015 Chris Leech <cleech@redhat.com> - 1.0.30-1
c2db1d
- rebase to upstream v1.0.30-2-g91c0c8c
c2db1d
c2db1d
* Fri Oct 24 2014 Chris Leech <cleech@redhat.com> - 1.0.29-7
c2db1d
- enable vn2vn mode in fcoeadm
c2db1d
c2db1d
* Tue Oct 07 2014 Chris Leech <cleech@redhat.com> - 1.0.29-6
c2db1d
- update to upstream v1.0.29-29-g9267509
c2db1d
c2db1d
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-5
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
c2db1d
c2db1d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-4
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c2db1d
c2db1d
* Thu Nov 07 2013 Petr Å abata <contyk@redhat.com> - 1.0.29-3
c2db1d
- Fix configure.ac for automake 1.14
c2db1d
c2db1d
* Thu Nov 07 2013 Petr Å abata <contyk@redhat.com> - 1.0.29-2
c2db1d
- Don't install the old configuration file alongside the new one
c2db1d
- Add bnx2fc to the SUPPORTED_DRIVERS for consistency with previous configuration
c2db1d
c2db1d
* Thu Aug 29 2013 Petr Å abata <contyk@redhat.com> - 1.0.29-1
c2db1d
- 1.0.29 bump
c2db1d
c2db1d
* Wed Jul 31 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-4
c2db1d
- Drop the initscript-specific config patch
c2db1d
c2db1d
* Wed Jul 31 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-3
c2db1d
- Require just 'systemd' instead of 'systemd-units'
c2db1d
- Patch the fcoemon manpage with a note for systemd users
c2db1d
c2db1d
* Mon Jun 10 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-2
c2db1d
- Enhance the format strings patch to fix ppc64 build failures too
c2db1d
c2db1d
* Tue Jun 04 2013 Petr Å abata <contyk@redhat.com> - 1.0.28-1
c2db1d
- 1.0.28 bump
c2db1d
c2db1d
* Wed Mar 06 2013 Petr Å abata <contyk@redhat.com> - 1.0.27-1
c2db1d
- 1.0.27 bump
c2db1d
c2db1d
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.25-3
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c2db1d
c2db1d
* Wed Jan 09 2013 Petr Å abata <contyk@redhat.com> - 1.0.25-2
c2db1d
- Don't build for s390x since it's not supported by kernel either
c2db1d
c2db1d
* Tue Nov 27 2012 Petr Å abata <contyk@redhat.com> - 1.0.25-1
c2db1d
- 1.0.25 (with latest fixes)
c2db1d
- Simplify the spec a bit
c2db1d
- Fix bogus dates in changelog
c2db1d
c2db1d
* Thu Nov 01 2012 Petr Å abata <contyk@redhat.com> - 1.0.25-1
c2db1d
c2db1d
* Tue Aug 28 2012 Petr Å abata <contyk@redhat.com> - 1.0.24-2
c2db1d
- Migrate to systemd scriptlets (#850104)
c2db1d
c2db1d
* Wed Aug 15 2012 Petr Å abata <contyk@redhat.com> - 1.0.24-1
c2db1d
- 1.0.24 bump
c2db1d
c2db1d
* Mon Jul 23 2012 Petr Å abata <contyk@redhat.com> - 1.0.23-3
c2db1d
- Don't exclude s390x.
c2db1d
- Add AM_PROG_AR to configure.ac.
c2db1d
c2db1d
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.23-2
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c2db1d
c2db1d
* Mon Jun 25 2012 Petr Å abata <contyk@redhat.com> - 1.0.23-1
c2db1d
- Update to 1.0.23
c2db1d
- Re-introduce ExcludeArch to be in line with EL.
c2db1d
c2db1d
* Thu Feb 16 2012 Petr Å abata <contyk@redhat.com> - 1.0.22-2
c2db1d
- Fix the incorrect libhbalinux runtime dependency
c2db1d
c2db1d
* Mon Jan 23 2012 Petr Å abata <contyk@redhat.com> - 1.0.22-1
c2db1d
- 1.0.22 bump
c2db1d
- Remove dcbd from Description
c2db1d
c2db1d
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.21-2
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c2db1d
c2db1d
* Thu Nov 24 2011 Petr Å abata <contyk@redhat.com> - 1.0.21-1
c2db1d
- 1.0.21 bump
c2db1d
c2db1d
* Mon Oct 31 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-5
c2db1d
- Remove useless PIDFile from fcoe.service unit file
c2db1d
c2db1d
* Thu Oct 06 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-4
c2db1d
- Do not enable fcoemon by default (#701999)
c2db1d
- Silence systemctl output
c2db1d
c2db1d
* Fri Sep 23 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-3
c2db1d
- Enable hardened build
c2db1d
c2db1d
* Mon Jul 18 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-2
c2db1d
- Drop SysV support in favor of systemd (#714683)
c2db1d
- Remove ancient scriptlets (pre-1.0.7 era)
c2db1d
- Update quickstart.txt to reflect new changes
c2db1d
c2db1d
* Thu Jul 07 2011 Petr Sabata <contyk@redhat.com> - 1.0.20-1
c2db1d
- 1.0.20 bump
c2db1d
c2db1d
* Thu Jun 02 2011 Petr Sabata <contyk@redhat.com> - 1.0.19-1
c2db1d
- 1.0.19 bump
c2db1d
c2db1d
* Tue May  3 2011 Petr Sabata <psabata@redhat.com> - 1.0.18-2
c2db1d
- fcoemon: Do not create a world and group writable PID file
c2db1d
c2db1d
* Wed Apr 20 2011 Petr Sabata <psabata@redhat.com> - 1.0.18-1
c2db1d
- 1.0.18 bump with latest bugfixes
c2db1d
- Removing ExcludeArch completely; not related for Fedora
c2db1d
- Buildroot cleanup
c2db1d
c2db1d
* Tue Apr 19 2011 Karsten Hopp <karsten@redhat.com> 1.0.17-1.1
c2db1d
- remove excludearch ppc, required by anaconda.ppc
c2db1d
c2db1d
* Thu Feb 24 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.0.17-1
c2db1d
- Pull in new upstream release (required to build)
c2db1d
- Fix git clone URL in comments
c2db1d
- Drop fcoe-utils-1.0.7-init.patch, fcoe-utils-1.0.7-init-condrestart.patch
c2db1d
  and fcoe-utils-1.0.8-init-LSB.patch that are now upstream
c2db1d
- Drop fcoe-utils-1.0.8-includes.patch and use a copy of kernel headers
c2db1d
  for all architectures (rename fcoe-sparc.patch to fcoe-include-headers.patch)
c2db1d
  Upstream added detection to avoid inclusion of kernel headers in the build
c2db1d
  and it expects to find the userland headers installed. Those have not
c2db1d
  yet propagated in Fedora.
c2db1d
  Use temporary this workaround, since fcoe is a requiment for anaconda
c2db1d
  and it failed to build for a while
c2db1d
- Drop BuildRequires on kernel-devel
c2db1d
- Add BuildRequires on autoconf (it is used and not installed by default
c2db1d
  on all build chroots)
c2db1d
c2db1d
* Wed Feb 23 2011 Dennis Gilmore <dennis@ausil.us> - 1.0.14-5
c2db1d
- patch in headers used from kernel-devel on 32 bit sparc 
c2db1d
c2db1d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.14-4
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c2db1d
c2db1d
* Tue Nov 30 2010 Petr Sabata <psabata@redhat.com> - 1.0.14-3
c2db1d
- Removing dependency on vconfig, rhbz#658525
c2db1d
c2db1d
* Mon Jun 28 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.14-2
c2db1d
- added device-mapper-multipath to requires (#603242)
c2db1d
- added missing man pages for fcrls, fcnsq and fcping
c2db1d
- update of init script - added condrestart, try-restart
c2db1d
  and force-reload options
c2db1d
- added vconfig to requires (#589608)
c2db1d
c2db1d
* Mon May 24 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.14-1
c2db1d
- rebased to 1.0.14, see bug #593824 for complete changelog
c2db1d
c2db1d
* Mon Apr 12 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.13-1
c2db1d
- rebased to v1.0.13, some bugfixes, new fcoe related scripts
c2db1d
c2db1d
* Tue Mar 30 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-2.20100323git
c2db1d
- some upstream updates
c2db1d
- better fipvlan support
c2db1d
- added fcoe_edd.sh script
c2db1d
c2db1d
* Tue Mar 16 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-1
c2db1d
- rebased to version 1.0.12, improved functionality with lldpad
c2db1d
  and dcbd
c2db1d
- removed /etc/fcoe/scripts/fcoeplumb
c2db1d
c2db1d
* Thu Dec 10 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-2.20091204git
c2db1d
- excluded s390 and ppc
c2db1d
c2db1d
* Fri Dec 04 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-1.20091204git
c2db1d
- rebase to latest version of fcoe-utils
c2db1d
c2db1d
* Mon Sep 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-3
c2db1d
- update of init script to be LSB-compliant
c2db1d
c2db1d
* Fri Jul 31 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-2
c2db1d
- patch for clean compilation without usage of upstream's ugly hack
c2db1d
c2db1d
* Thu Jul 30 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-1
c2db1d
- rebase of fcoe-utils to 1.0.8, adjusted spec file
c2db1d
c2db1d
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-8
c2db1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c2db1d
c2db1d
* Tue Jun 9 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-7
c2db1d
- added quickstart file to doc (#500759)
c2db1d
c2db1d
* Thu May 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-6
c2db1d
- renamed init script to fcoe, changed lock filename to fcoe
c2db1d
  (#497604)
c2db1d
- init script modified to do condrestart properly
c2db1d
- some modifications in spec file to apply previous change
c2db1d
  to older versions od init script during update
c2db1d
- fixed issue with accepting long options (#498551)
c2db1d
c2db1d
* Mon May 4 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-5
c2db1d
- fixed SIGSEGV when fcoe module isn't loaded (#498550)
c2db1d
c2db1d
* Mon Apr 27 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-4
c2db1d
- added libhbalinux to Requires (#497605)
c2db1d
- correction of spec file (_initddir -> _initrddir)
c2db1d
c2db1d
* Wed Apr 8 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-3
c2db1d
- more minor corrections in spec file
c2db1d
c2db1d
* Thu Apr 2 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-2
c2db1d
- minor corrections in spec file
c2db1d
- moved init script to correct location
c2db1d
- correction in the init script (chkconfig directives)
c2db1d
c2db1d
* Mon Mar 2 2009 Chris Leech <christopher.leech@intel.com> - 1.0.7-1
c2db1d
- initial rpm build of fcoe tools
c2db1d