9fb2e54a9b
Currently fcoemon creates a world and group writable PID file which could be locally exploited. This patch sets umask to 177 before the PID file creation.
248 lines
9.3 KiB
RPMSpec
248 lines
9.3 KiB
RPMSpec
Name: fcoe-utils
|
|
Version: 1.0.18
|
|
Release: 2%{?dist}
|
|
Summary: Fibre Channel over Ethernet utilities
|
|
Group: Applications/System
|
|
License: GPLv2
|
|
URL: http://www.open-fcoe.org
|
|
# git://open-fcoe.org/fcoe/fcoe-utils.git
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
Source1: quickstart.txt
|
|
# Generic Fedora patches
|
|
Patch0: fcoe-utils-1.0.17-init.patch
|
|
Patch1: fcoe-utils-1.0.17-make.patch
|
|
Patch2: fcoe-utils-1.0.18-help.patch
|
|
#Patch3: fcoe-utils-1.0.17-manpages.patch
|
|
Patch4: fcoe-utils-1.0.18-config.patch
|
|
Patch5: fcoe-utils-1.0.18-kernel-headers.patch
|
|
# Upstream patches
|
|
Patch10: fcoe-utils-1.0.18-fcoemon-Use-new-libfcoe.ko-interfaces-create-destroy.patch
|
|
Patch11: fcoe-utils-1.0.18-fcoe-utils-Add-SUPPORTED_DRIVERS-field-to-config.patch
|
|
Patch12: fcoe-utils-1.0.18-fcoe-utils-Handle-more-than-128-adapters-in-fcoeadm-.patch
|
|
Patch13: fcoe-utils-1.0.18-fcoeutils-Cancel-vlan-discovery-timer-only-when-vali.patch
|
|
Patch14: fcoe-utils-1.0.18-fcoeutils-Retry-vlan-discovery-forever-if-AUTO_VLAN-.patch
|
|
Patch15: fcoe-utils-1.0.18-fcoe-utils-Include-current-lldpad-headers.patch
|
|
Patch16: fcoe-utils-1.0.18-fcoe-utils-Add-libnl-build-dependency-for-fcoe-utils.patch
|
|
Patch17: fcoe-utils-1.0.18-fcoemon-Unexpected-FLOGI-after-fcoe-port-is-destroye.patch
|
|
Patch18: fcoe-utils-1.0.18-fcoe-utils-Drain-fip-socket-during-creation-to-disca.patch
|
|
Patch19: fcoe-utils-1.0.18-fcoe-utils-Include-fcoe_utils.h-before-scsi-scsi.h.patch
|
|
Patch20: fcoe-utils-1.0.18-fcoe-utils-Remove-unused-variable-symbolic_name_len.patch
|
|
Patch21: fcoe-utils-1.0.18-fcoe-utils-Use-iproute2-instead-of-deprecated-vconfi.patch
|
|
Patch22: fcoe-utils-1.0.18-fcoe-utils-Documentation-for-the-fcoeadm-Scan-option.patch
|
|
Patch23: fcoe-utils-1.0.18-fcoemon-Correct-wrong-error-check.patch
|
|
Patch24: fcoe-utils-1.0.18-fcoemon-Fix-2-file-descriptor-leaks.patch
|
|
Patch25: fcoe-utils-1.0.18-fcoe-utils-Avoid-freeing-uninitialized-pointer-in-fc.patch
|
|
Patch26: fcoe-utils-1.0.18-fcoemon-Do-not-create-a-world-and-group-writable-PID.patch
|
|
|
|
BuildRequires: libhbaapi-devel lldpad-devel libnl-devel
|
|
BuildRequires: libtool automake autoconf
|
|
Requires: lldpad libhbalinux >= 1.0.9 iproute device-mapper-multipath
|
|
Requires(post): chkconfig
|
|
Requires(preun): chkconfig initscripts
|
|
Requires(postun): initscripts
|
|
|
|
%description
|
|
Fibre Channel over Ethernet utilities
|
|
fcoeadm - command line tool for configuring FCoE interfaces
|
|
fcoemon - service to configure DCB Ethernet QOS filters, works with dcbd or lldpad
|
|
|
|
%prep
|
|
%setup -q -c -n %{name}-%{version}
|
|
# Upstream first
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
%patch12 -p1
|
|
%patch13 -p1
|
|
%patch14 -p1
|
|
%patch15 -p1
|
|
%patch16 -p1
|
|
%patch17 -p1
|
|
%patch18 -p1
|
|
%patch19 -p1
|
|
%patch20 -p1
|
|
%patch21 -p1
|
|
%patch22 -p1
|
|
%patch23 -p1
|
|
%patch24 -p1
|
|
%patch25 -p1
|
|
%patch26 -p1
|
|
# Fedora patches on top of that...
|
|
%patch0 -p1 -b .init
|
|
%patch1 -p1 -b .make
|
|
%patch2 -p1 -b .help
|
|
#%patch3 -p1 -b .manpages
|
|
%patch4 -p1 -b .config
|
|
%patch5 -p1 -F 2 -b .kernel-headers
|
|
|
|
%build
|
|
./bootstrap.sh
|
|
%configure
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot}
|
|
mkdir -p %{buildroot}%{_initrddir}
|
|
mv %{buildroot}/etc/init.d/fcoe %{buildroot}%{_initrddir}/fcoe
|
|
rm -rf %{buildroot}/etc/init.d
|
|
install -m 644 %SOURCE1 quickstart.txt
|
|
mkdir -p %{buildroot}%{_sysconfdir}/fcoe/
|
|
cp etc/config %{buildroot}%{_sysconfdir}/fcoe/config
|
|
mkdir -p %{buildroot}%{_libexecdir}/fcoe
|
|
install -m 755 contrib/fcc.sh %{buildroot}%{_libexecdir}/fcoe/fcc.sh
|
|
install -m 755 contrib/fcoe_edd.sh %{buildroot}%{_libexecdir}/fcoe/fcoe_edd.sh
|
|
install -m 755 contrib/fcoe-setup.sh %{buildroot}%{_libexecdir}/fcoe/fcoe-setup.sh
|
|
install -m 755 debug/fcoedump.sh %{buildroot}%{_libexecdir}/fcoe/fcoedump.sh
|
|
install -m 755 debug/dcbcheck.sh %{buildroot}%{_libexecdir}/fcoe/dcbcheck.sh
|
|
|
|
%post
|
|
/sbin/chkconfig --add fcoe
|
|
|
|
%triggerun -- fcoe-utils <= 1.0.7-5
|
|
if [ -x %{_initrddir}/fcoe-utils ]; then
|
|
/sbin/service fcoe-utils stop > /dev/null 2>&1
|
|
/sbin/chkconfig fcoe-utils off
|
|
# now copy an updated file, which we need to do proper condrestart
|
|
sed 's/\/var\/lock\/subsys\/fcoe/\/var\/lock\/subsys\/fcoe-utils/' %{_initrddir}/fcoe > %{_initrddir}/fcoe-utils
|
|
fi
|
|
|
|
%triggerpostun -- fcoe-utils <= 1.0.7-5
|
|
if [ -x %{_initrddir}/fcoe-utils ]; then
|
|
rm -f %{_initrddir}/fcoe-utils # this file should be already deleted, but just in case ...
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 = 0 ]; then
|
|
/sbin/service fcoe stop > /dev/null 2>&1
|
|
/sbin/chkconfig --del fcoe
|
|
fi
|
|
|
|
%postun
|
|
if [ "$1" -ge "1" ]; then
|
|
/sbin/service fcoe condrestart > /dev/null 2>&1 || :
|
|
fi
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc README COPYING quickstart.txt
|
|
%{_sbindir}/*
|
|
%{_mandir}/man8/*
|
|
%dir %{_sysconfdir}/fcoe/
|
|
%config(noreplace) %{_sysconfdir}/fcoe/config
|
|
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
|
|
%{_initrddir}/fcoe
|
|
%attr(0755,root,root) %{_libexecdir}/fcoe/fcoe_edd.sh
|
|
%attr(0755,root,root) %{_libexecdir}/fcoe/fcoe-setup.sh
|
|
%attr(0755,root,root) %{_libexecdir}/fcoe/fcc.sh
|
|
%attr(0755,root,root) %{_libexecdir}/fcoe/fcoedump.sh
|
|
%attr(0755,root,root) %{_libexecdir}/fcoe/dcbcheck.sh
|
|
|
|
|
|
%changelog
|
|
* Wed May 3 2011 Petr Sabata <psabata@redhat.com> - 1.0.18-2
|
|
- fcoemon: Do not create a world and group writable PID file
|
|
|
|
* Wed Apr 20 2011 Petr Sabata <psabata@redhat.com> - 1.0.18-1
|
|
- 1.0.18 bump with latest bugfixes
|
|
- Removing ExcludeArch completely; not related for Fedora
|
|
- Buildroot cleanup
|
|
|
|
* Tue Apr 19 2011 Karsten Hopp <karsten@redhat.com> 1.0.17-1.1
|
|
- remove excludearch ppc, required by anaconda.ppc
|
|
|
|
* Thu Feb 24 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.0.17-1
|
|
- Pull in new upstream release (required to build)
|
|
- Fix git clone URL in comments
|
|
- Drop fcoe-utils-1.0.7-init.patch, fcoe-utils-1.0.7-init-condrestart.patch
|
|
and fcoe-utils-1.0.8-init-LSB.patch that are now upstream
|
|
- Drop fcoe-utils-1.0.8-includes.patch and use a copy of kernel headers
|
|
for all architectures (rename fcoe-sparc.patch to fcoe-include-headers.patch)
|
|
Upstream added detection to avoid inclusion of kernel headers in the build
|
|
and it expects to find the userland headers installed. Those have not
|
|
yet propagated in Fedora.
|
|
Use temporary this workaround, since fcoe is a requiment for anaconda
|
|
and it failed to build for a while
|
|
- Drop BuildRequires on kernel-devel
|
|
- Add BuildRequires on autoconf (it is used and not installed by default
|
|
on all build chroots)
|
|
|
|
* Wed Feb 23 2011 Dennis Gilmore <dennis@ausil.us> - 1.0.14-5
|
|
- patch in headers used from kernel-devel on 32 bit sparc
|
|
|
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.14-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Tue Nov 30 2010 Petr Sabata <psabata@redhat.com> - 1.0.14-3
|
|
- Removing dependency on vconfig, rhbz#658525
|
|
|
|
* Mon Jun 28 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.14-2
|
|
- added device-mapper-multipath to requires (#603242)
|
|
- added missing man pages for fcrls, fcnsq and fcping
|
|
- update of init script - added condrestart, try-restart
|
|
and force-reload options
|
|
- added vconfig to requires (#589608)
|
|
|
|
* Mon May 24 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.14-1
|
|
- rebased to 1.0.14, see bug #593824 for complete changelog
|
|
|
|
* Mon Apr 12 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.13-1
|
|
- rebased to v1.0.13, some bugfixes, new fcoe related scripts
|
|
|
|
* Tue Mar 30 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-2.20100323git
|
|
- some upstream updates
|
|
- better fipvlan support
|
|
- added fcoe_edd.sh script
|
|
|
|
* Tue Mar 16 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-1
|
|
- rebased to version 1.0.12, improved functionality with lldpad
|
|
and dcbd
|
|
- removed /etc/fcoe/scripts/fcoeplumb
|
|
|
|
* Thu Dec 10 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-2.20091204git
|
|
- excluded s390 and ppc
|
|
|
|
* Fri Dec 04 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-1.20091204git
|
|
- rebase to latest version of fcoe-utils
|
|
|
|
* Mon Sep 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-3
|
|
- update of init script to be LSB-compliant
|
|
|
|
* Fri Jul 31 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-2
|
|
- patch for clean compilation without usage of upstream's ugly hack
|
|
|
|
* Thu Jul 30 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-1
|
|
- rebase of fcoe-utils to 1.0.8, adjusted spec file
|
|
|
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
* Tue Jun 9 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-7
|
|
- added quickstart file to %doc (#500759)
|
|
|
|
* Thu May 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-6
|
|
- renamed init script to fcoe, changed lock filename to fcoe
|
|
(#497604)
|
|
- init script modified to do condrestart properly
|
|
- some modifications in spec file to apply previous change
|
|
to older versions od init script during update
|
|
- fixed issue with accepting long options (#498551)
|
|
|
|
* Mon May 4 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-5
|
|
- fixed SIGSEGV when fcoe module isn't loaded (#498550)
|
|
|
|
* Wed Apr 27 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-4
|
|
- added libhbalinux to Requires (#497605)
|
|
- correction of spec file (_initddir -> _initrddir)
|
|
|
|
* Wed Apr 8 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-3
|
|
- more minor corrections in spec file
|
|
|
|
* Thu Apr 2 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-2
|
|
- minor corrections in spec file
|
|
- moved init script to correct location
|
|
- correction in the init script (chkconfig directives)
|
|
|
|
* Mon Mar 2 2009 Chris Leech <christopher.leech@intel.com> - 1.0.7-1
|
|
- initial rpm build of fcoe tools
|
|
|