swt2c / rpms / fcoe-utils

Forked from rpms/fcoe-utils 5 years ago
Clone
Jan Zeleny 40414ea
Name:           fcoe-utils
Jan Zeleny 80a8eaa
Version:        1.0.13
Jan Zeleny 80a8eaa
Release:        1%{?dist}
Jan Zeleny 40414ea
Summary:        Fibre Channel over Ethernet utilities
Jan Zeleny 40414ea
Jan Zeleny 40414ea
Group:          Applications/System
Jan Zeleny 40414ea
License:        GPLv2
Jan Zeleny 40414ea
URL:            http://www.open-fcoe.org
Jan Zeleny 57fc344
# This source was pulled from upstream git repository
Jan Zeleny 57fc344
# To make a tarball, just run:
Jan Zeleny 57fc344
# git clone git://open-fcoe.org/openfc/fcoe-utils.git && cd fcoe-utils
Jan Zeleny 57fc344
# git archive --prefix=fcoe-utils-%{version}/ v%{version} > ../fcoe-utils-%{version}.tar
Jan Zeleny 57fc344
# cd .. && gzip fcoe-utils-%{version}
Jan Zeleny 57fc344
Source0:        %{name}-%{version}.tar.gz
Jan Zeleny 1b31d37
Source1:        quickstart.txt
Jan Zeleny 40414ea
Patch0:         fcoe-utils-1.0.7-init.patch
Jan Zeleny 57fc344
Patch1:         fcoe-utils-1.0.7-init-condrestart.patch
Jan Zeleny 57fc344
Patch2:         fcoe-utils-1.0.8-includes.patch
Jan Zeleny d1feeb3
Patch3:         fcoe-utils-1.0.8-init-LSB.patch
Jan Zeleny 34acd09
Patch4:         fcoe-utils-1.0.12-makefile-data-hook.patch
Jan Zeleny b443a8b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Jan Zeleny b5de791
ExcludeArch:	s390 ppc
Jan Zeleny 40414ea
Jan Zeleny 34acd09
BuildRequires:    libhbaapi-devel lldpad-devel libtool automake kernel-devel
Jan Zeleny a7f5530
Requires:         lldpad libhbalinux >= 1.0.9
Jan Zeleny 40414ea
Requires(post):   chkconfig
Jan Zeleny 40414ea
Requires(preun):  chkconfig initscripts
Jan Zeleny 40414ea
Requires(postun): initscripts
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%description
Jan Zeleny 40414ea
Fibre Channel over Ethernet utilities
Jan Zeleny 40414ea
fcoeadm - command line tool for configuring FCoE interfaces
Jan Zeleny 34acd09
fcoemon - service to configure DCB Ethernet QOS filters, works with dcbd or lldpad
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%prep
Jan Zeleny 40414ea
%setup -q
Jan Zeleny 40414ea
%patch0 -p1 -b .initPatch
Jan Zeleny 57fc344
%patch1 -p1 -b .condrestartPatch
Jan Zeleny 57fc344
%patch2 -p1 -b .includes-fix
Jan Zeleny d1feeb3
%patch3 -p1 -b .initLSB
Jan Zeleny 34acd09
%patch4 -p1 -b .data-hook
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%build
Jan Zeleny 57fc344
./bootstrap.sh
Jan Zeleny 40414ea
%configure
Jan Zeleny 40414ea
make %{?_smp_mflags}
Jan Zeleny 40414ea
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%install
Jan Zeleny 40414ea
rm -rf $RPM_BUILD_ROOT
Jan Zeleny 40414ea
make install DESTDIR=$RPM_BUILD_ROOT
Jan Zeleny 47a58f5
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
Jan Zeleny c30f314
mv $RPM_BUILD_ROOT/etc/init.d/fcoe $RPM_BUILD_ROOT%{_initrddir}/fcoe
Jan Zeleny 40414ea
rm -rf $RPM_BUILD_ROOT/etc/init.d
Jan Zeleny 1b31d37
install -m 644 %SOURCE1 quickstart.txt
Jan Zeleny 34acd09
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fcoe/
Jan Zeleny 34acd09
cp etc/config $RPM_BUILD_ROOT%{_sysconfdir}/fcoe/config
Jan Zeleny a66b07f
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/fcoe
Jan Zeleny 80a8eaa
Jan Zeleny 80a8eaa
install -m 755 contrib/fcc.sh $RPM_BUILD_ROOT%{_libexecdir}/fcoe/fcc.sh
Jan Zeleny 80a8eaa
install -m 755 contrib/fcoe_edd.sh $RPM_BUILD_ROOT%{_libexecdir}/fcoe/fcoe_edd.sh
Jan Zeleny 80a8eaa
install -m 755 contrib/fcoe-setup.sh $RPM_BUILD_ROOT%{_libexecdir}/fcoe/fcoe-setup.sh
Jan Zeleny 80a8eaa
install -m 755 debug/fcoedump.sh $RPM_BUILD_ROOT%{_libexecdir}/fcoe/fcoedump.sh
Jan Zeleny 80a8eaa
install -m 755 debug/dcbcheck.sh $RPM_BUILD_ROOT%{_libexecdir}/fcoe/dcbcheck.sh
Jan Zeleny 40414ea
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%clean
Jan Zeleny 40414ea
rm -rf $RPM_BUILD_ROOT
Jan Zeleny 40414ea
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%post
Jan Zeleny c30f314
/sbin/chkconfig --add fcoe
Jan Zeleny c30f314
Jan Zeleny c30f314
%triggerun -- fcoe-utils <= 1.0.7-5
Jan Zeleny c30f314
if [ -x %{_initrddir}/fcoe-utils ]; then
Jan Zeleny c30f314
  /sbin/service fcoe-utils stop > /dev/null 2>&1
Jan Zeleny c30f314
  /sbin/chkconfig fcoe-utils off
Jan Zeleny c30f314
  # now copy an updated file, which we need to do proper condrestart
Jan Zeleny c30f314
  sed 's/\/var\/lock\/subsys\/fcoe/\/var\/lock\/subsys\/fcoe-utils/' %{_initrddir}/fcoe > %{_initrddir}/fcoe-utils
Jan Zeleny c30f314
fi
Jan Zeleny c30f314
Jan Zeleny c30f314
%triggerpostun -- fcoe-utils <= 1.0.7-5
Jan Zeleny c30f314
if [ -x %{_initrddir}/fcoe-utils ]; then
Jan Zeleny c30f314
  rm -f %{_initrddir}/fcoe-utils # this file should be already deleted, but just in case ...
Jan Zeleny c30f314
fi
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%preun
Jan Zeleny 40414ea
if [ $1 = 0 ]; then
Jan Zeleny c30f314
        /sbin/service fcoe stop > /dev/null 2>&1
Jan Zeleny c30f314
        /sbin/chkconfig --del fcoe
Jan Zeleny 40414ea
fi
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%postun
Jan Zeleny 40414ea
if [ "$1" -ge "1" ]; then
Jan Zeleny c30f314
        /sbin/service fcoe condrestart > /dev/null  2>&1 || :
Jan Zeleny 40414ea
fi
Jan Zeleny 40414ea
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%files
Jan Zeleny 40414ea
%defattr(-,root,root,-)
Jan Zeleny 1b31d37
%doc README COPYING quickstart.txt
Jan Zeleny 40414ea
%{_sbindir}/*
Jan Zeleny 40414ea
%{_mandir}/man8/*
Jan Zeleny 40414ea
%dir %{_sysconfdir}/fcoe/
Jan Zeleny 40414ea
%config(noreplace) %{_sysconfdir}/fcoe/config
Jan Zeleny 40414ea
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
Jan Zeleny c30f314
%{_initrddir}/fcoe
Jan Zeleny a66b07f
%attr(0755,root,root) %{_libexecdir}/fcoe/fcoe_edd.sh
Jan Zeleny 80a8eaa
%attr(0755,root,root) %{_libexecdir}/fcoe/fcoe-setup.sh
Jan Zeleny 80a8eaa
%attr(0755,root,root) %{_libexecdir}/fcoe/fcc.sh
Jan Zeleny 80a8eaa
%attr(0755,root,root) %{_libexecdir}/fcoe/fcoedump.sh
Jan Zeleny 80a8eaa
%attr(0755,root,root) %{_libexecdir}/fcoe/dcbcheck.sh
Jan Zeleny 40414ea
Jan Zeleny 40414ea
Jan Zeleny 40414ea
%changelog
Jan Zeleny 80a8eaa
* Mon Apr 12 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.13-1
Jan Zeleny 80a8eaa
- rebased to v1.0.13, some bugfixes, new fcoe related scripts
Jan Zeleny 80a8eaa
Jan Zeleny a66b07f
* Tue Mar 30 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-2.20100323git
Jan Zeleny a66b07f
- some upstream updates
Jan Zeleny a66b07f
- better fipvlan support
Jan Zeleny a66b07f
- added fcoe_edd.sh script
Jan Zeleny a66b07f
Jan Zeleny 34acd09
* Tue Mar 16 2010 Jan Zeleny <jzeleny@redhat.com> - 1.0.12-1
Jan Zeleny 34acd09
- rebased to version 1.0.12, improved functionality with lldpad
Jan Zeleny 34acd09
  and dcbd
Jan Zeleny a7f5530
- removed /etc/fcoe/scripts/fcoeplumb
Jan Zeleny 34acd09
Jan Zeleny b5de791
* Thu Dec 10 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-2.20091204git
Jan Zeleny b5de791
- excluded s390 and ppc
Jan Zeleny b5de791
Jan Zeleny dfe27be
* Fri Dec 04 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.9-1.20091204git
Jan Zeleny dfe27be
- rebase to latest version of fcoe-utils
Jan Zeleny dfe27be
Jan Zeleny d1feeb3
* Mon Sep 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-3
Jan Zeleny d1feeb3
- update of init script to be LSB-compliant
Jan Zeleny d1feeb3
Jan Zeleny 57fc344
* Fri Jul 31 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-2
Jan Zeleny 57fc344
- patch for clean compilation without usage of upstream's ugly hack
Jan Zeleny 57fc344
Jan Zeleny 57fc344
* Thu Jul 30 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.8-1
Jan Zeleny 57fc344
- rebase of fcoe-utils to 1.0.8, adjusted spec file
Jan Zeleny 57fc344
2b4d8b8
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-8
2b4d8b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2b4d8b8
Jan Zeleny 1b31d37
* Tue Jun 9 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-7
Jan Zeleny 1b31d37
- added quickstart file to %doc (#500759)
Jan Zeleny 1b31d37
Jan Zeleny c30f314
* Thu May 14 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-6
Jan Zeleny c30f314
- renamed init script to fcoe, changed lock filename to fcoe
Jan Zeleny c30f314
  (#497604)
Jan Zeleny c30f314
- init script modified to do condrestart properly
Jan Zeleny c30f314
- some modifications in spec file to apply previous change
Jan Zeleny c30f314
  to older versions od init script during update
Jan Zeleny c30f314
- fixed issue with accepting long options (#498551)
Jan Zeleny c30f314
Jan Zeleny c30f314
* Mon May 4 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-5
Jan Zeleny 5af7502
- fixed SIGSEGV when fcoe module isn't loaded (#498550)
Jan Zeleny 5af7502
Jan Zeleny 47a58f5
* Wed Apr 27 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-4
Jan Zeleny 47a58f5
- added libhbalinux to Requires (#497605)
Jan Zeleny 47a58f5
- correction of spec file (_initddir -> _initrddir)
Jan Zeleny 47a58f5
Jan Zeleny 40414ea
* Wed Apr 8 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-3
Jan Zeleny 40414ea
- more minor corrections in spec file
Jan Zeleny 40414ea
Jan Zeleny 40414ea
* Thu Apr 2 2009 Jan Zeleny <jzeleny@redhat.com> - 1.0.7-2
Jan Zeleny 40414ea
- minor corrections in spec file
Jan Zeleny 40414ea
- moved init script to correct location
Jan Zeleny 40414ea
- correction in the init script (chkconfig directives)
Jan Zeleny 40414ea
Jan Zeleny 40414ea
* Mon Mar 2 2009 Chris Leech <christopher.leech@intel.com> - 1.0.7-1
Jan Zeleny 40414ea
- initial rpm build of fcoe tools
Jan Zeleny 40414ea