from Adrian Reber: fix up spec

This commit is contained in:
Mike Christie 2007-06-25 20:03:20 +00:00
parent a7062b594f
commit fc80682a57
5 changed files with 44 additions and 33 deletions

View File

@ -7,3 +7,4 @@ open-iscsi-6.1.1.645.tar.bz2
open-iscsi-6.1.1.685.tar.bz2
open-iscsi-6.2.0.695.tar.bz2
open-iscsi-2.0-754.tar.gz
open-iscsi-2.0-865.2.tar.gz

View File

@ -1,7 +1,7 @@
Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils
Version: 6.2.0.754
Release: 0.0%{?dist}
Release: 0.1%{?dist}
Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-754.tar.gz
Source1: iscsid.init
Source2: iscsidevs.init
@ -12,9 +12,10 @@ Patch2: iscsi-initiator-utils-use-var-for-config.patch
Group: System Environment/Daemons
License: GPL
URL: http://www.open-iscsi.org
Buildroot: %{_tmppath}/%{name}-root
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl-devel
Prereq: /sbin/chkconfig
Requires(post): chkconfig
Requires(preun): chkconfig /sbin/service
ExcludeArch: s390 s390x
%description
@ -36,54 +37,63 @@ make OPTFLAGS="%{optflags}" -C utils
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/etc/iscsi
mkdir -p $RPM_BUILD_ROOT/etc/iscsi
mkdir -p $RPM_BUILD_ROOT/etc/iscsi
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/nodes
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/send_targets
mkdir -p $RPM_BUILD_ROOT/var/lock/iscsi
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/iscsi
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/iscsi
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/iscsi/nodes
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/iscsi/send_targets
mkdir -p $RPM_BUILD_ROOT%{_var}/lock/iscsi
install -s -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
install -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
#install -m 755 etc/initd/initd.redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/iscsi
install -m 644 etc/iscsid.conf $RPM_BUILD_ROOT/etc/iscsi
install -p -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
install -p -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
install -p -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
install -p -m 644 etc/iscsid.conf $RPM_BUILD_ROOT%{_sysconfdir}/iscsi
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/iscsid
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/iscsi
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/iscsid
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/iscsi
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then
echo "InitiatorName=`/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi
if [ "$1" -eq "1" ]; then
if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
fi
/sbin/chkconfig --add iscsid
/sbin/chkconfig --add iscsi
fi
/sbin/chkconfig --add iscsid
/sbin/chkconfig --add iscsi
%preun
if [ "$1" = "0" ]; then
# stop iscsi
/sbin/service iscsi stop > /dev/null 2>&1
# delete service
/sbin/chkconfig --del iscsi
# stop iscsid
/sbin/service iscsid stop > /dev/null 2>&1
# delete service
/sbin/chkconfig --del iscsid
fi
%files
%defattr(-,root,root)
%doc README
%dir /var/lib/iscsi/nodes
%dir /var/lib/iscsi/send_targets
%dir /var/lock/iscsi
%config /etc/rc.d/init.d/iscsi
%config /etc/rc.d/init.d/iscsid
%attr(0600,root,root) %config(noreplace) /etc/iscsi/iscsid.conf
%dir %{_var}/lib/iscsi
%dir %{_var}/lib/iscsi/nodes
%dir %{_var}/lib/iscsi/send_targets
%dir %{_var}/lock/iscsi
%{_initrddir}/iscsi
%{_initrddir}/iscsid
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
/sbin/*
%{_mandir}/*/*
%{_mandir}/man8/*
%changelog
* Mon Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1
- 225915 From Adrian Reber - Fix up spec and init files for rpmlint.
* Tue Feb 6 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.0
- Rebase to upstream.
- Add back --map functionality but in session mode to match RHEL5 fixes

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# chkconfig: 345 7 89
# chkconfig: - 7 89
# description: Starts and stops the iSCSI daemon.
#
# processname: iscsid

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# chkconfig: 345 13 89
# chkconfig: - 13 89
# description: Logs into iSCSI targets needed at system startup
#
# Source function library.

View File

@ -1 +1 @@
2e7ce941ea4e4eda7c82f0b272a33bf9 open-iscsi-2.0-754.tar.gz
fd3ae8aee6d25fce5c43e2798412829e open-iscsi-2.0-865.2.tar.gz