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