cvsdist 2734589
Summary: iSCSI daemon and utility programs
cvsdist 2734589
Name: iscsi-initiator-utils
a4c8b30
Version: 6.2.0.870
15c0ddc
Release: 0.2.rc1%{?dist}
a4c8b30
Source0: http://www.open-iscsi.org/bits/open-iscsi-2.0-870-rc1.tar.gz
mchristi 63a3144
Source1: iscsid.init
mchristi 63a3144
Source2: iscsidevs.init
a4c8b30
Source3: 04-iscsi
mchristi 63a3144
Patch0: iscsi-initiator-utils-update-initscripts-and-docs.patch
d3d8564
Patch1: iscsi-initiator-utils-use-var-for-config.patch
5a3872e
Patch2: iscsi-initiator-utils-use-red-hat-for-name.patch
5a3872e
Patch3: iscsi-initiator-utils-ibft-sysfs.patch
a4c8b30
Patch4: iscsi-initiator-utils-print-ibft-net-info.patch
a4c8b30
Patch5: iscsi-initiator-utils-only-root-use.patch
a4c8b30
Patch6: iscsi-initiator-utils-start-iscsid.patch
mchristi 9c24859
cvsdist 2734589
Group: System Environment/Daemons
5a3872e
License: GPLv2+
mchristi 5441886
URL: http://www.open-iscsi.org
fc80682
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5a3872e
BuildRequires: openssl-devel flex bison
fc80682
Requires(post): chkconfig
fc80682
Requires(preun): chkconfig /sbin/service
cvsdist 2734589
ExcludeArch: s390 s390x
cvsdist 2734589
cvsdist 2734589
%description
cvsdist 2734589
The iscsi package provides the server daemon for the iSCSI protocol,
cvsdist 2734589
as well as the utility programs used to manage it. iSCSI is a protocol
cvsdist 2734589
for distributed disk access using SCSI commands sent over Internet
cvsdist 2734589
Protocol networks.
cvsdist 2734589
cvsdist 2734589
%prep
a4c8b30
%setup -q -n open-iscsi-2.0-870-rc1
mchristi 9c24859
%patch0 -p1 -b .update-initscripts-and-docs
d3d8564
%patch1 -p1 -b .use-var-for-config
5a3872e
%patch2 -p1 -b .use-red-hat-for-name
5a3872e
%patch3 -p1 -b .ibft-sysfs
a4c8b30
%patch4 -p1 -b .print-ibft-net-info
a4c8b30
%patch5 -p1 -b .only-root
a4c8b30
%patch6 -p1 -b .start-iscsid
5003024
cvsdist 2734589
cvsdist 2734589
%build
5a3872e
make OPTFLAGS="%{optflags}" -C utils/fwparam_ibft
3b954e8
make OPTFLAGS="%{optflags}" -C usr
3b954e8
make OPTFLAGS="%{optflags}" -C utils
cvsdist 2734589
cvsdist 2734589
%install
cvsdist 2734589
rm -rf $RPM_BUILD_ROOT
mchristi 5441886
mkdir -p $RPM_BUILD_ROOT/sbin
5a3872e
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
5a3872e
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
5a3872e
mkdir -p $RPM_BUILD_ROOT/etc/iscsi
a4c8b30
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/nodes
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/send_targets
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/static
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/isns
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/slp
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/ifaces
5a3872e
mkdir -p $RPM_BUILD_ROOT/var/lock/iscsi
5a3872e
5a3872e
mchristi 0e38bd5
fc80682
install -p -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
fc80682
install -p -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
fc80682
install -p -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
fc80682
install -p -m 644 etc/iscsid.conf $RPM_BUILD_ROOT%{_sysconfdir}/iscsi
cvsdist 2734589
fc80682
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/iscsid
fc80682
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/iscsi
a4c8b30
install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
a4c8b30
3b954e8
cvsdist 2734589
%clean
cvsdist 2734589
rm -rf $RPM_BUILD_ROOT
cvsdist 2734589
cvsdist 2734589
%post
fc80682
if [ "$1" -eq "1" ]; then
fc80682
	if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
fc80682
		echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
fc80682
	fi
fc80682
	/sbin/chkconfig --add iscsid
fc80682
	/sbin/chkconfig --add iscsi
mchristi 9c24859
fi
cvsdist 2734589
cvsdist 2734589
%preun
cvsdist 2734589
if [ "$1" = "0" ]; then
fc80682
	# stop iscsi
fc80682
	/sbin/service iscsi stop > /dev/null 2>&1
fc80682
	# delete service
mchristi 63a3144
	/sbin/chkconfig --del iscsi
fc80682
	# stop iscsid
fc80682
	/sbin/service iscsid stop > /dev/null 2>&1
fc80682
	# delete service
mchristi 63a3144
	/sbin/chkconfig --del iscsid
cvsdist 2734589
fi
cvsdist 2734589
cvsdist 2734589
%files
cvsdist 2734589
%defattr(-,root,root)
3b954e8
%doc README
fc80682
%dir %{_var}/lib/iscsi
fc80682
%dir %{_var}/lib/iscsi/nodes
5a3872e
%dir %{_var}/lib/iscsi/isns
5a3872e
%dir %{_var}/lib/iscsi/static
5a3872e
%dir %{_var}/lib/iscsi/slp
5a3872e
%dir %{_var}/lib/iscsi/ifaces
fc80682
%dir %{_var}/lib/iscsi/send_targets
fc80682
%dir %{_var}/lock/iscsi
fc80682
%{_initrddir}/iscsi
fc80682
%{_initrddir}/iscsid
a4c8b30
%{_sysconfdir}/NetworkManager
fc80682
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
cvsdist 2734589
/sbin/*
fc80682
%{_mandir}/man8/*
cvsdist 2734589
5a3872e
cvsdist 2734589
%changelog
15c0ddc
* Thu Nov  6 2008 Hans de Goede <hdegoede@redhat.com> 6.2.0.870-0.2.rc1
15c0ddc
- Add force-start iscsid initscript option and use that in "patch to make
15c0ddc
  iscsiadm start iscsid when needed" so that iscsid will actual be started
15c0ddc
  even if there are no iscsi disks configured yet (rh 470437)
15c0ddc
- Do not start iscsid when not running when iscsiadm -k 0 gets executed
15c0ddc
  (rh 470438)
15c0ddc
a4c8b30
* Tue Sep 30 2008 Hans de Goede <hdegoede@redhat.com> 6.2.0.870-0.1.rc1
a4c8b30
- Rewrite SysV initscripts, fixes rh 441290, 246960, 282001, 436175, 430791
a4c8b30
- Add patch to make iscsiadm complain and exit when run as user instead
a4c8b30
  of hang spinning for the database lock
a4c8b30
- Add patch to make iscsiadm start iscsid when needed (rh 436175 related)
a4c8b30
- Don't start iscsi service when network not yet up (in case of using NM)
a4c8b30
  add NM dispatcher script to start iscsi service once network is up
a4c8b30
a4c8b30
* Mon Jun 30 2008 Mike Christie <mchristie@redhat.com> - 6.2.0.870
a4c8b30
- Rebase to open-iscsi-2-870
a4c8b30
- 453282 Handle sysfs changes.
a4c8b30
a4c8b30
* Fri Apr 25 2008 Mike Christie <mchristie@redhat.com> - 6.2.0.868-0.7
a4c8b30
- 437522 log out sessions that are not used for root during "iscsi stop".
a4c8b30
5003024
* Fri Apr 4 2008 Mike Christie <mchristie@redhat.com> - 6.2.0.868-0.6
5003024
- Rebase to RHEL5 to bring in bug fixes.
5003024
- 437522 iscsi startup does not need to modify with network startup.
5003024
- 436175 Check for running sessions when stopping service.
5003024
5a3872e
* Wed Feb 5 2008 Mike Christie <mchristie@redhat.com> - 6.2.0.868-0.3
5a3872e
- Rebase to upstream and RHEL5.
5a3872e
- 246960 LSB init script changes.
5a3872e
d3d8564
* Fri Oct 5 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.865-0.2
d3d8564
- Rebase to upstream's bug fix release.
d3d8564
- Revert init script startup changes from 225915 which reviewers did
d3d8564
 not like.
d3d8564
fc80682
* Mon Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1
fc80682
- 225915 From Adrian Reber - Fix up spec and init files for rpmlint.
fc80682
mchristi 63a3144
* Tue Feb 6 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.0
mchristi 63a3144
- Rebase to upstream.
mchristi 63a3144
- Add back --map functionality but in session mode to match RHEL5 fixes
mchristi 63a3144
- Break up iscsi init script into two, so iscsid can be started early for root
mchristi 63a3144
mchristi 63a3144
* Tue Nov 28 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.747-0.0
mchristi 63a3144
- Fix several bugs in actor.c (iscsi scheduling). This should result
mchristi 63a3144
- in better dm-multipath intergation and fix bugs where time outs
mchristi 63a3144
- or requests were missed or dropped.
mchristi 63a3144
- Set default noop timeout correctly.
mchristi 63a3144
mchristi 63a3144
* Sat Nov 25 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.742-0.0
mchristi 63a3144
- Don't flood targets with nop-outs.
mchristi 63a3144
mchristi 63a3144
* Fri Nov 24 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.737-0.0
mchristi 63a3144
- Add commands missing from RHEL4/RHEL3 and document iscsid.conf.
mchristi 63a3144
- Fixup README.
mchristi 63a3144
mchristi 63a3144
* Mon Nov 7 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.8
mchristi 63a3144
- Rebase to upstream open-iscsi-2.0-730.
mchristi 63a3144
mchristi 63a3144
* Tue Oct 17 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.7
mchristi 63a3144
- Change period to colon in default name
mchristi 5dc381b
mchristi 0e38bd5
* Thu Oct 5 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.6
mchristi 0e38bd5
- BZ 209523 make sure the network is not going to get shutdown so
mchristi 0e38bd5
iscsi devices (include iscsi root and dm/md over iscsi) get syncd.
mchristi 0e38bd5
- BZ 209415 have package create iscsi var dirs
mchristi 0e38bd5
mchristi 2df40a2
* Tue Oct 3 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.5
mchristi 2df40a2
- BZ 208864 move /etc/iscsi/nodes and send_targets to /var/lib/iscsi
mchristi 2df40a2
mchristi fb0628e
* Mon Oct 1 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.4
mchristi fb0628e
- BZ 208548 move /etc/iscsi/lock to /var/lock/iscsi/lock
mchristi fb0628e
9f4cdff
* Wed Sep 27 2006 Jeremy Katz <katzj@redhat.com> - 6.2.0.695-0.3
9f4cdff
- Add fix for initscript with pid file moved
9f4cdff
9f4cdff
* Tue Sep 26 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.2
mchristi 9b7d56f
- BZ 208050 - change default initiator name to reflect redhat
mchristi 9b7d56f
- Move pid from /etc/iscsi to /var/run/iscsid.pid
mchristi 9b7d56f
mchristi e93d25d
* Fri Sep 15 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.1
mchristi e93d25d
- Add compat with FC kernel so iscsid will pass startup checks and run.
mchristi e93d25d
- Fix bug when using hw iscsi and software iscsi and iscsid is restarted.
mchristi e93d25d
- Fix session matching bug when hw and software iscsi is both running
mchristi e93d25d
80c3a6d
* Tue Sep  5 2006 Jeremy Katz <katzj@redhat.com> - 6.1.1.685-0.1
80c3a6d
- Fix service startup
80c3a6d
- Fix another case where cflags weren't being used
80c3a6d
mchristi 3556861
* Mon Aug 28 2006 Mike Christie <mchristie@redhat.com> - 6.1.1.685
mchristi 3556861
- Rebase to upstream to bring in many bug fixes and rm db.
mchristi 3556861
- iscsi uses /etc/iscsi instead of just etc now
mchristi 3556861
cc7fbba
* Fri Jul 21 2006 Jeremy Katz <katzj@redhat.com> - 6.1.1.645-1
cc7fbba
- fix shutdown with root on iscsi
cc7fbba
mchristi b3f7fe0
* Thu Jul 13 2006 Mike Christie <mchristie@redhat.com> - 6.1.1.645
mchristi b3f7fe0
- update to upstream 1.1.645
mchristi b3f7fe0
- Note DB and interface changed so you must update kernel, tools and DB
mchristi b3f7fe0
098f8c1
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 6.0.5.595-2.1.1
098f8c1
- rebuild
098f8c1
073f8b5
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 6.0.5.595-2.1
073f8b5
- rebuild
073f8b5
mchristi deb9386
* Wed Jun 21 2006 Mike Christie <mchristi@redhat.com> - 6.0.5.595-2
mchristi deb9386
- add PatM's statics.c file. This is needed for boot since 
mchristi deb9386
  there is no getpwuid static available at that time.
3b954e8
* Tue Jun 20 2006 Jeremy Katz <katzj@redhat.com> - 6.0.5.595-1
3b954e8
- ensure that we respect %%{optflags}
3b954e8
- cleaned up initscript to make use of standard functions, return right 
3b954e8
  values and start by default
3b954e8
- build iscsistart as a static binary for use in initrds
3b954e8
mchristi 9c24859
* Tue May 30 2006 Mike Christie <mchristi@redhat.com>
mchristi 9c24859
- rebase package to svn rev 595 to fix several bugs
mchristi 9c24859
  NOTE!!!!!!!! This is not compatible with the older open-iscsi modules
mchristi 9c24859
  and tools. You must upgrade.
mchristi 9c24859
mchristi 9c24859
* Thu May 18 2006 Mike Christie <mchristi@redhat.com>
mchristi 9c24859
- update package to open-iscsi svn rev 571
mchristi 9c24859
  NOTE!!!!!!!! This is not compatible with the older open-iscsi modules
mchristi 9c24859
  and tools. You must upgrade.
mchristi 9c24859
mchristi 9c24859
* Fri Apr 7 2006 Mike Christie <mchristi@redhat.com>
mchristi 9c24859
- From Andy Henson <andy@zexia.co.uk>:
mchristi 9c24859
  Autogenerate /etc/initiatorname.iscsi during install if not already present
mchristi 9c24859
- Remove code to autogenerate /etc/initiatorname.iscsi from initscript
mchristi 9c24859
- From dan.y.roche@gmail.com:
mchristi 9c24859
  add touch and rm lock code
mchristi 9c24859
- update README
mchristi 9c24859
- update default iscsid.conf. "cnx" was not supported. The correct
mchristi 9c24859
  id was "conn".
mchristi 9c24859
2f6e7a3
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 5.0.5.476-0.1
2f6e7a3
- bump again for double-long bug on ppc(64)
2f6e7a3
mchristi 84bb175
* Mon Jan 23 2006 Mike Christie <mchristi@redhat.com>
mchristi 84bb175
- rebase package to bring in ppc64 unsigned long vs unsigned
mchristi 84bb175
  long long fix and iscsadm return value fix. Also drop rdma patch
mchristi 84bb175
  becuase it is now upstream.
mchristi 5441886
* Wed Dec 14 2005 Mike Christie <mchristi@redhat.com>
cvsdist 2734589
- initial packaging
mchristi 968c1d6