142 lines
4.3 KiB
RPMSpec
142 lines
4.3 KiB
RPMSpec
Name: fcoe-utils
|
|
Version: 1.0.8
|
|
Release: 3%{?dist}
|
|
Summary: Fibre Channel over Ethernet utilities
|
|
|
|
Group: Applications/System
|
|
License: GPLv2
|
|
URL: http://www.open-fcoe.org
|
|
# This source was pulled from upstream git repository
|
|
# To make a tarball, just run:
|
|
# git clone git://open-fcoe.org/openfc/fcoe-utils.git && cd fcoe-utils
|
|
# git archive --prefix=fcoe-utils-%{version}/ v%{version} > ../fcoe-utils-%{version}.tar
|
|
# cd .. && gzip fcoe-utils-%{version}
|
|
Source0: %{name}-%{version}.tar.gz
|
|
Source1: quickstart.txt
|
|
Patch0: fcoe-utils-1.0.7-init.patch
|
|
Patch1: fcoe-utils-1.0.7-init-condrestart.patch
|
|
Patch2: fcoe-utils-1.0.8-includes.patch
|
|
Patch3: fcoe-utils-1.0.8-init-LSB.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: libhbaapi-devel dcbd-devel libtool automake kernel-devel
|
|
Requires: dcbd libhbalinux >= 1.0.8
|
|
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
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1 -b .initPatch
|
|
%patch1 -p1 -b .condrestartPatch
|
|
%patch2 -p1 -b .includes-fix
|
|
%patch3 -p1 -b .initLSB
|
|
|
|
%build
|
|
./bootstrap.sh
|
|
%configure
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
|
mv $RPM_BUILD_ROOT/etc/init.d/fcoe $RPM_BUILD_ROOT%{_initrddir}/fcoe
|
|
rm -rf $RPM_BUILD_ROOT/etc/init.d
|
|
install -m 644 %SOURCE1 quickstart.txt
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%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/*
|
|
%{_sysconfdir}/fcoe/scripts/fcoeplumb
|
|
%dir %{_sysconfdir}/fcoe/
|
|
%dir %{_sysconfdir}/fcoe/scripts/
|
|
%config(noreplace) %{_sysconfdir}/fcoe/config
|
|
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
|
|
%{_initrddir}/fcoe
|
|
|
|
|
|
%changelog
|
|
* 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
|
|
|