0e55d5b
%define open_iscsi_version	2.0
0e55d5b
%define open_iscsi_build	873
0e55d5b
cvsdist 2734589
Summary: iSCSI daemon and utility programs
cvsdist 2734589
Name: iscsi-initiator-utils
0e55d5b
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
0ed757e
Release: 25%{?dist}
be68e03
Group: System Environment/Daemons
be68e03
License: GPLv2+
be68e03
URL: http://www.open-iscsi.org
be68e03
0e55d5b
Source0: http://www.open-iscsi.org/bits/open-iscsi-%{open_iscsi_version}-%{open_iscsi_build}.tar.gz
0e55d5b
Source4: 04-iscsi
3c58b16
Source5: iscsi-tmpfiles.conf
0e55d5b
0e55d5b
# upstream patches, post last tagged version
0e55d5b
Patch1: 0001-iscsid-fix-iscsid-segfault-during-qla4xxx-login.patch
0e55d5b
Patch2: 0002-ISCSISTART-Bring-up-the-corresponding-network-interf.patch
0e55d5b
Patch3: 0003-iscsi-tools-fix-compile-error-when-OFFLOAD_BOOT_SUPP.patch
0e55d5b
Patch4: 0004-ISCSID-Passing-more-net-params-from-ibft-to-iface.patch
0e55d5b
Patch5: 0005-iscsi-tools-Convert-r-argument-to-an-integer-before-.patch
0e55d5b
Patch6: 0006-Update-README-for-removal-of-DBM-requirement.patch
0e55d5b
Patch7: 0007-iscsid-iscsiadm-fix-abstract-socket-length-in-bind-c.patch
0e55d5b
Patch8: 0008-iscsid-implement-systemd-compatible-socket-activatio.patch
0e55d5b
Patch9: 0009-iscsid-add-example-unit-files-for-systemd.patch
0e55d5b
Patch10: 0010-iscsi-tools-fix-get_random_bytes-error-handling.patch
c2d5d21
Patch11: 0011-ISCSID-Added-socket-communication-hooks-for-uip.patch
c2d5d21
Patch12: 0012-ISCSID-Modified-the-Makefile-for-iscsiuio-compilatio.patch
c2d5d21
Patch13: 0013-ISCSID-Added-iscsiuio-source-to-the-open-iscsi-pkg.patch
c2d5d21
Patch14: 0014-From-Adheer-Chandravanshi-adheer.chandravanshi-qlogi.patch
c2d5d21
Patch15: 0015-Manpage-changes-for-flashnode-submode-support-for-ho.patch
c2d5d21
Patch16: 0016-README-changes-for-flashnode-submode-support-for-hos.patch
c2d5d21
Patch17: 0017-PATCH-1-of-1-correctly-check-return-value-of-nice.patch
c2d5d21
Patch18: 0018-Allow-firmware-mode-to-use-debug-flag.patch
c2d5d21
Patch19: 0019-iscsiadm-return-error-when-login-fails.patch
c2d5d21
Patch20: 0020-iscsiadm-bind-ifaces-to-portals-found-using-isns.patch
c2d5d21
Patch21: 0021-iscsiadm-Check-for-mode-is-not-required-when-creatin.patch
c2d5d21
Patch22: 0022-iscsid-iscsiadm-add-support-for-emulex-one-connect-s.patch
c2d5d21
Patch23: 0023-ISCSIUIO-Updated-iscsiuio-to-version-0.7.8.1b-for-pe.patch
c2d5d21
Patch24: 0024-Fix-discovery-error-return-without-return-value.patch
c2d5d21
Patch25: 0025-iscsid-Fix-strlen-parameter.patch
c2d5d21
Patch26: 0026-iscsiuio-Change-socket-bind-to-use-the-same-struct-s.patch
c2d5d21
Patch27: 0027-Make-rescan-run-in-parallel.patch
2c4537b
Patch28: 0028-iscsiadm-Correctly-check-for-invalid-hostno-and-flas.patch
2c4537b
Patch29: 0029-iscsi-tools-Print-additional-session-info-for-flashn.patch
2c4537b
Patch30: 0030-iscsi-tools-sync-iscsi_if.h-with-kernel-space.patch
2c4537b
Patch31: 0031-PATCH-v5-1-3-ISCSISTART-Saved-ibft-boot-info-to-the-.patch
2c4537b
Patch32: 0032-ISCSID-Added-the-extraction-of-the-session-boot-info.patch
2c4537b
Patch33: 0033-ISCSID-Added-iface-content-override-fix.patch
374005d
Patch34: 0034-iscsi-tools-Bug-fix-on-IPC-address-copy-version-2.patch
374005d
Patch35: 0035-flashnode-Add-support-to-set-ISCSI_FLASHNODE_CHAP_OU.patch
374005d
Patch36: 0036-iscsiadm-Use-x-option-instead-of-v-to-specify-chap_t.patch
374005d
Patch37: 0037-iscsiadm-Man-page-changes-to-use-x-option-for-chap_t.patch
374005d
Patch38: 0038-README-changes-to-use-long-option-index-instead-of-f.patch
374005d
Patch39: 0039-iscsiadm-Add-support-to-set-CHAP-entry-using-host-ch.patch
374005d
Patch40: 0040-iscsi-tools-Correctly-get-username_in-and-password_i.patch
374005d
Patch41: 0041-README-changes-for-adding-support-to-set-CHAP-entry.patch
a288e4f
Patch42: 0042-iscsi-tools-Setup-iface-conf-file-with-all-iface-att.patch
a288e4f
Patch43: 0043-iscsi_if.h-Remove-numbers-used-for-network-parameter.patch
a288e4f
Patch44: 0044-iscsi_if.h-Additional-parameters-for-network-param-s.patch
a288e4f
Patch45: 0045-iscsi-tools-Use-macro-to-set-IPv4-IPv6-IP-addresses.patch
a288e4f
Patch46: 0046-iscsi-tools-Use-single-function-to-enable-disable-ne.patch
a288e4f
Patch47: 0047-iscsi-tools-Use-single-function-to-set-integer-netwo.patch
a288e4f
Patch48: 0048-iscsi-tools-Ignore-network-parameter-if-not-enabled-.patch
a288e4f
Patch49: 0049-iscsi-tools-Additional-parameters-for-network-settin.patch
a288e4f
Patch50: 0050-iscsi-tools-iface-params-should-be-updated-for-node_.patch
a288e4f
Patch51: 0051-iscsi-tools-Let-default-type-of-iface-be-ipv4.patch
a288e4f
Patch52: 0052-iscsi-tools-Show-iface-params-based-on-iface-type.patch
9a597eb
Patch53: 0053-iscsiadm-Added-document-for-description-of-iface-att.patch
9a597eb
Patch54: 0054-iscsi_tool-Add-offload-host-statistics-support.patch
9a597eb
Patch55: 0055-README-Updated-for-host-statistics.patch
9a597eb
Patch56: 0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch
9a597eb
Patch57: 0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch
9a597eb
Patch58: 0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch
e509a42
Patch59: 0059-ISCSIUIO-Added-tx-doorbell-override-mechanism.patch
e509a42
Patch60: 0060-ISCSIUIO-Added-fix-for-the-iface.subnet_mask-decodin.patch
e509a42
Patch61: 0061-ISCSIUIO-Added-fix-for-the-ARP-cache-flush-mechanism.patch
e509a42
Patch62: 0062-ISCSIUIO-Updated-RELEASE-note-and-version.patch
e509a42
Patch63: 0063-ISCSIUIO-Updated-the-configure-file-to-reflect-the-n.patch
e509a42
Patch64: 0064-ISCSIUIO-Removed-the-auto-generated-COPYING-file.patch
e509a42
Patch68: 0068-iscsiuio-fix-compilation.patch
e509a42
Patch69: 0069-Add-missing-DESTDIR.patch
860e10c
Patch70: 0070-iscsi-tools-set-non-negotiated-params-early.patch
3f3ec35
Patch71: 0071-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch
3f3ec35
Patch72: 0072-iscsiadm-Fix-the-compile-time-warning.patch
3f3ec35
Patch74: 0074-iscsid-Fix-handling-of-iscsi-async-events.patch
3f3ec35
Patch75: 0075-be2iscsi-Fix-MaxXmitDataLenght-of-the-driver.patch
3f3ec35
Patch76: 0076-Fix-StatSN-in-Open-iSCSI-Stack.patch
3f3ec35
Patch77: 0077-iscsid-retry-login-for-ISCSI_ERR_HOST_NOT_FOUND.patch
3f3ec35
Patch78: 0078-iscsid-Fix-double-close-of-mgmt-ipc-fd.patch
3f3ec35
Patch79: 0079-iscsiadm-Initialize-param_count-in-set_host_chap_inf.patch
3f3ec35
Patch81: 0081-iscsiadm-make-iface.ipaddress-optional-in-iface-conf.patch
3f3ec35
Patch82: 0082-Remove-unused-variable-path.patch
3f3ec35
Patch83: 0083-Parse-origin-value-from-iBFT.patch
3f3ec35
Patch84: 0084-isns-Add-docs-for-deregistering-discovery-domains.patch
374005d
c2d5d21
# not (yet) upstream merged
0047874
Patch130: 0130-guard-against-NULL-ptr-during-discovery-from-unexpec.patch
b34de1d
Patch140: 0140-add-discovery-as-a-valid-mode-in-iscsiadm.8.patch
11189d1
Patch143: 0143-idmb_rec_write-check-for-tpgt-first.patch
11189d1
Patch145: 0145-idbm_rec_write-seperate-old-and-new-style-writes.patch
11189d1
Patch146: 0146-idbw_rec_write-pick-tpgt-from-existing-record.patch
11189d1
Patch147: 0147-iscsiuio-systemd-socket-activation-support.patch
11189d1
Patch149: 0149-update-systemd-service-files-add-iscsi.service-for-s.patch
11189d1
Patch150: 0150-iscsi-boot-related-service-file-updates.patch
0e55d5b
# distro specific modifications
11189d1
Patch151: 0151-update-initscripts-and-docs.patch
11189d1
Patch152: 0152-use-var-for-config.patch
11189d1
Patch153: 0153-use-red-hat-for-name.patch
11189d1
Patch154: 0154-add-libiscsi.patch
11189d1
Patch155: 0155-dont-use-static.patch
11189d1
Patch156: 0156-remove-the-offload-boot-supported-ifdef.patch
11189d1
Patch159: 0159-iscsiuio-systemd-unit-files.patch
11189d1
Patch160: 0160-use-systemctl-to-start-iscsid.patch
11189d1
Patch161: 0161-resolve-565245-multilib-issues-caused-by-doxygen.patch
11189d1
Patch162: 0162-Don-t-check-for-autostart-sessions-if-iscsi-is-not-u.patch
11189d1
Patch163: 0163-fix-order-of-setting-uid-gid-and-drop-supplementary-.patch
11189d1
Patch164: 0164-libiscsi-fix-incorrect-strncpy-use.patch
11189d1
Patch165: 0165-fix-hardened-build-of-iscsiuio.patch
11189d1
Patch166: 0166-start-socket-listeners-on-iscsiadm-command.patch
4b292f8
Patch167: 0167-Revert-iscsiadm-return-error-when-login-fails.patch
fbd8563
Patch168: 0168-update-handling-of-boot-sessions.patch
fbd8563
Patch169: 0169-update-iscsi.service-for-boot-session-recovery.patch
b34de1d
Patch170: 0170-fix-systemd-unit-wants.patch
0047874
Patch171: 0171-iscsiuio-strict-aliasing.patch
0e55d5b
# version string, needs to be updated with each build
11189d1
Patch199: 0199-use-Red-Hat-version-string-to-match-RPM-package-vers.patch
1c8eda8
c2d5d21
BuildRequires: flex bison python-devel doxygen kmod-devel systemd-devel
a5f731e
# For dir ownership
eb7ab1c
Requires: %{name}-iscsiuio >= %{version}-%{release}
6c1aaf9
Requires(post): systemd
6c1aaf9
Requires(preun): systemd
6c1aaf9
Requires(postun): systemd
cvsdist 2734589
c2d5d21
%global _hardened_build 1
c2d5d21
%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$
c2d5d21
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
eb7ab1c
%package iscsiuio
eb7ab1c
Summary: Userspace configuration daemon required for some iSCSI hardware
eb7ab1c
Group: System Environment/Daemons
eb7ab1c
License: BSD
eb7ab1c
Requires: %{name} = %{version}-%{release}
eb7ab1c
eb7ab1c
%description iscsiuio
eb7ab1c
The iscsiuio configuration daemon provides network configuration help
eb7ab1c
for some iSCSI offload hardware.
eb7ab1c
7f6313a
%package devel
7f6313a
Summary: Development files for %{name}
7f6313a
Group: Development/Libraries
7f6313a
Requires: %{name} = %{version}-%{release}
7f6313a
7f6313a
%description devel
7f6313a
The %{name}-devel package contains libraries and header files for
7f6313a
developing applications that use %{name}.
7f6313a
cvsdist 2734589
%prep
c2d5d21
%setup -q -n open-iscsi-%{open_iscsi_version}-%{open_iscsi_build}
0e55d5b
# upstream patches
0e55d5b
%patch1 -p1
0e55d5b
%patch2 -p1
0e55d5b
%patch3 -p1
0e55d5b
%patch4 -p1
0e55d5b
%patch5 -p1
0e55d5b
%patch6 -p1
0e55d5b
%patch7 -p1
0e55d5b
%patch8 -p1
0e55d5b
%patch9 -p1
0e55d5b
%patch10 -p1
c2d5d21
%patch11 -p1
c2d5d21
%patch12 -p1
c2d5d21
%patch13 -p1
c2d5d21
%patch14 -p1
c2d5d21
%patch15 -p1
c2d5d21
%patch16 -p1
c2d5d21
%patch17 -p1
c2d5d21
%patch18 -p1
c2d5d21
%patch19 -p1
c2d5d21
%patch20 -p1
c2d5d21
%patch21 -p1
c2d5d21
%patch22 -p1
c2d5d21
%patch23 -p1
c2d5d21
%patch24 -p1
c2d5d21
%patch25 -p1
c2d5d21
%patch26 -p1
c2d5d21
%patch27 -p1
2c4537b
%patch28 -p1
2c4537b
%patch29 -p1
2c4537b
%patch30 -p1
2c4537b
%patch31 -p1
2c4537b
%patch32 -p1
2c4537b
%patch33 -p1
374005d
%patch34 -p1
374005d
%patch35 -p1
374005d
%patch36 -p1
374005d
%patch37 -p1
374005d
%patch38 -p1
374005d
%patch39 -p1
374005d
%patch40 -p1
374005d
%patch41 -p1
a288e4f
%patch42 -p1
a288e4f
%patch43 -p1
a288e4f
%patch44 -p1
a288e4f
%patch45 -p1
a288e4f
%patch46 -p1
a288e4f
%patch47 -p1
a288e4f
%patch48 -p1
a288e4f
%patch49 -p1
a288e4f
%patch50 -p1
a288e4f
%patch51 -p1
a288e4f
%patch52 -p1
9a597eb
%patch53 -p1
9a597eb
%patch54 -p1
9a597eb
%patch55 -p1
9a597eb
%patch56 -p1
9a597eb
%patch57 -p1
9a597eb
%patch58 -p1
e509a42
%patch59 -p1
e509a42
%patch60 -p1
e509a42
%patch61 -p1
e509a42
%patch62 -p1
e509a42
%patch63 -p1
e509a42
%patch64 -p1
e509a42
%patch68 -p1
e509a42
%patch69 -p1
860e10c
%patch70 -p1
3f3ec35
%patch71 -p1
3f3ec35
%patch72 -p1
3f3ec35
%patch74 -p1
3f3ec35
%patch75 -p1
3f3ec35
%patch76 -p1
3f3ec35
%patch77 -p1
3f3ec35
%patch78 -p1
3f3ec35
%patch79 -p1
3f3ec35
%patch81 -p1
3f3ec35
%patch82 -p1
3f3ec35
%patch83 -p1
3f3ec35
%patch84 -p1
6bbb925
# pending upstream merge
0047874
%patch130 -p1
b34de1d
%patch140 -p1
11189d1
%patch143 -p1
11189d1
%patch145 -p1
11189d1
%patch146 -p1
11189d1
%patch147 -p1
11189d1
%patch149 -p1
11189d1
%patch150 -p1
0e55d5b
# distro specific modifications
11189d1
%patch151 -p1
11189d1
%patch152 -p1
11189d1
%patch153 -p1
11189d1
%patch154 -p1
11189d1
%patch155 -p1
11189d1
%patch156 -p1
11189d1
%patch159 -p1
11189d1
%patch160 -p1
11189d1
%patch161 -p1
11189d1
%patch162 -p1
11189d1
%patch163 -p1
11189d1
%patch164 -p1
11189d1
%patch165 -p1
11189d1
%patch166 -p1
4b292f8
%patch167 -p1
fbd8563
%patch168 -p1
fbd8563
%patch169 -p1
b34de1d
%patch170 -p1
0047874
%patch171 -p1
0e55d5b
# version string
11189d1
%patch199 -p1
0e55d5b
974636d
# change exec_prefix, there's no easy way to override
974636d
%{__sed} -i -e 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile
31786f0
cvsdist 2734589
%build
31786f0
31786f0
# configure sub-packages from here
31786f0
# letting the top level Makefile do it will lose setting from rpm
31786f0
cd iscsiuio
974636d
%{__chmod} +x configure
31786f0
%{configure}
31786f0
cd ..
31786f0
cd utils/open-isns
0ed757e
%{configure} --with-security=no --with-slp=no
31786f0
cd ../..
31786f0
974636d
%{__make} OPTFLAGS="%{optflags} %{?__global_ldflags} -DUSE_KMOD -lkmod"
7f6313a
pushd libiscsi
7f6313a
python setup.py build
cedd464
touch -r libiscsi.doxy html/*
7f6313a
popd
cvsdist 2734589
cedd464
cvsdist 2734589
%install
974636d
%{__make} DESTDIR=%{?buildroot} install_programs install_doc install_etc
c2d5d21
# upstream makefile doesn't get everything the way we like it
974636d
rm $RPM_BUILD_ROOT%{_sbindir}/iscsi_discovery
c2d5d21
rm $RPM_BUILD_ROOT%{_mandir}/man8/iscsi_discovery.8
974636d
%{__install} -pm 755 usr/iscsistart $RPM_BUILD_ROOT%{_sbindir}
974636d
%{__install} -pm 644 doc/iscsistart.8 $RPM_BUILD_ROOT%{_mandir}/man8
974636d
%{__install} -pm 644 doc/iscsi-iname.8 $RPM_BUILD_ROOT%{_mandir}/man8
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
974636d
%{__install} -pm 644 iscsiuio/iscsiuiolog $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
974636d
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi/nodes
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi/send_targets
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi/static
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi/isns
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi/slp
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sharedstatedir}/iscsi/ifaces
7f6313a
2d4a526
# for %%ghost
974636d
%{__install} -d $RPM_BUILD_ROOT/var/lock/iscsi
2d4a526
touch $RPM_BUILD_ROOT/var/lock/iscsi/lock
2d4a526
3b954e8
974636d
%{__install} -d $RPM_BUILD_ROOT%{_unitdir}
974636d
%{__install} -pm 644 etc/systemd/iscsi.service $RPM_BUILD_ROOT%{_unitdir}
974636d
%{__install} -pm 644 etc/systemd/iscsid.service $RPM_BUILD_ROOT%{_unitdir}
974636d
%{__install} -pm 644 etc/systemd/iscsid.socket $RPM_BUILD_ROOT%{_unitdir}
974636d
%{__install} -pm 644 etc/systemd/iscsiuio.service $RPM_BUILD_ROOT%{_unitdir}
974636d
%{__install} -pm 644 etc/systemd/iscsiuio.socket $RPM_BUILD_ROOT%{_unitdir}
c2d5d21
974636d
%{__install} -d $RPM_BUILD_ROOT%{_libexecdir}
974636d
%{__install} -pm 755 etc/systemd/iscsi-mark-root-nodes $RPM_BUILD_ROOT%{_libexecdir}
c2d5d21
974636d
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d
974636d
%{__install} -pm 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d
c2d5d21
974636d
%{__install} -d $RPM_BUILD_ROOT%{_tmpfilesdir}
974636d
%{__install} -pm 644 %{SOURCE5} $RPM_BUILD_ROOT%{_tmpfilesdir}/iscsi.conf
c2d5d21
974636d
%{__install} -d $RPM_BUILD_ROOT%{_libdir}
974636d
%{__install} -pm 755 libiscsi/libiscsi.so.0 $RPM_BUILD_ROOT%{_libdir}
974636d
%{__ln_s}    libiscsi.so.0 $RPM_BUILD_ROOT%{_libdir}/libiscsi.so
974636d
%{__install} -d $RPM_BUILD_ROOT%{_includedir}
974636d
%{__install} -pm 644 libiscsi/libiscsi.h $RPM_BUILD_ROOT%{_includedir}
c2d5d21
974636d
%{__install} -d $RPM_BUILD_ROOT%{python_sitearch}
974636d
%{__install} -pm 755 libiscsi/build/lib.linux-*/libiscsimodule.so \
c2d5d21
	$RPM_BUILD_ROOT%{python_sitearch}
c2d5d21
c2d5d21
cvsdist 2734589
%post
7f6313a
/sbin/ldconfig
3c948fa
3c948fa
%systemd_post iscsi.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket
3c948fa
3c948fa
if [ $1 -eq 1 ]; then
fc80682
	if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
974636d
		echo "InitiatorName=`/usr/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
fc80682
	fi
3c948fa
	# enable socket activation and persistant session startup by default
3c948fa
	/bin/systemctl enable iscsi.service >/dev/null 2>&1 || :
3c948fa
	/bin/systemctl enable iscsid.socket >/dev/null 2>&1 || :
3c948fa
	/bin/systemctl enable iscsiuio.socket >/dev/null 2>&1 || :
mchristi 9c24859
fi
6c1aaf9
3c948fa
%preun
3c948fa
%systemd_preun iscsi.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket
cvsdist 2734589
31b81b6
%postun
31b81b6
/sbin/ldconfig
6c1aaf9
%systemd_postun
7f6313a
6c1aaf9
%triggerun -- iscsi-initiator-utils < 6.2.0.873-1
6c1aaf9
# Save the current service runlevel info
6c1aaf9
# User must manually run systemd-sysv-convert --apply iscsid
6c1aaf9
# and systemd-sysv-convert --apply iscsi
6c1aaf9
# to migrate them to systemd targets
6c1aaf9
/usr/bin/systemd-sysv-convert --save iscsi >/dev/null 2>&1 ||:
6c1aaf9
/usr/bin/systemd-sysv-convert --save iscsid >/dev/null 2>&1 ||:
6c1aaf9
3c948fa
# enable socket activation
3c948fa
/bin/systemctl enable iscsid.socket >/dev/null 2>&1 || :
3c948fa
/bin/systemctl enable iscsiuio.socket >/dev/null 2>&1 || :
3c948fa
6c1aaf9
# Run these because the SysV package being removed won't do them
6c1aaf9
/sbin/chkconfig --del iscsid >/dev/null 2>&1 || :
6c1aaf9
/sbin/chkconfig --del iscsi >/dev/null 2>&1 || :
6c1aaf9
/bin/systemctl try-restart iscsid.service >/dev/null 2>&1 || :
6c1aaf9
/bin/systemctl try-restart iscsi.service >/dev/null 1>&1 || :
cvsdist 2734589
b34de1d
%triggerun -- iscsi-initiator-utils < 6.2.0.873-22
b34de1d
# prior to 6.2.0.873-22 iscsi.service was missing a Wants=remote-fs-pre.target
b34de1d
# this forces remote-fs-pre.target active if needed for a clean shutdown/reboot
b34de1d
# after upgrading this package
b34de1d
if [ $1 -gt 0 ]; then
b34de1d
    /usr/bin/systemctl -q is-active iscsi.service
b34de1d
    if [ $? -eq 0 ]; then
b34de1d
        /usr/bin/systemctl -q is-active remote-fs-pre.target
b34de1d
        if [ $? -ne 0 ]; then
b34de1d
            SRC=`/usr/bin/systemctl show --property FragmentPath remote-fs-pre.target | cut -d= -f2`
b34de1d
            DST=/run/systemd/system/remote-fs-pre.target
b34de1d
            if [ $SRC != $DST ]; then
b34de1d
                cp $SRC $DST
b34de1d
            fi
b34de1d
            sed -i 's/RefuseManualStart=yes/RefuseManualStart=no/' $DST
b34de1d
            /usr/bin/systemctl daemon-reload
b34de1d
            /usr/bin/systemctl start remote-fs-pre.target
b34de1d
        fi
b34de1d
    fi
b34de1d
fi
b34de1d
cvsdist 2734589
%files
3b954e8
%doc README
c2d5d21
%dir %{_sharedstatedir}/iscsi
c2d5d21
%dir %{_sharedstatedir}/iscsi/nodes
c2d5d21
%dir %{_sharedstatedir}/iscsi/isns
c2d5d21
%dir %{_sharedstatedir}/iscsi/static
c2d5d21
%dir %{_sharedstatedir}/iscsi/slp
c2d5d21
%dir %{_sharedstatedir}/iscsi/ifaces
c2d5d21
%dir %{_sharedstatedir}/iscsi/send_targets
2d4a526
%ghost %{_var}/lock/iscsi
2d4a526
%ghost %{_var}/lock/iscsi/lock
6c1aaf9
%{_unitdir}/iscsi.service
6c1aaf9
%{_unitdir}/iscsid.service
6c1aaf9
%{_unitdir}/iscsid.socket
2a4a67d
%{_libexecdir}/iscsi-mark-root-nodes
a5f731e
%{_sysconfdir}/NetworkManager/dispatcher.d/04-iscsi
c2d5d21
%{_tmpfilesdir}/iscsi.conf
a5f731e
%dir %{_sysconfdir}/iscsi
fc80682
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
eb7ab1c
%{_sbindir}/iscsi-iname
eb7ab1c
%{_sbindir}/iscsiadm
eb7ab1c
%{_sbindir}/iscsid
eb7ab1c
%{_sbindir}/iscsistart
7f6313a
%{_libdir}/libiscsi.so.0
7f6313a
%{python_sitearch}/libiscsimodule.so
eb7ab1c
%{_mandir}/man8/iscsi-iname.8.gz
eb7ab1c
%{_mandir}/man8/iscsiadm.8.gz
eb7ab1c
%{_mandir}/man8/iscsid.8.gz
eb7ab1c
%{_mandir}/man8/iscsistart.8.gz
eb7ab1c
eb7ab1c
%files iscsiuio
eb7ab1c
%{_sbindir}/iscsiuio
eb7ab1c
%{_unitdir}/iscsiuio.service
eb7ab1c
%{_unitdir}/iscsiuio.socket
c2d5d21
%config(noreplace) %{_sysconfdir}/logrotate.d/iscsiuiolog
eb7ab1c
%{_mandir}/man8/iscsiuio.8.gz
cvsdist 2734589
7f6313a
%files devel
7f6313a
%doc libiscsi/html
7f6313a
%{_libdir}/libiscsi.so
7f6313a
%{_includedir}/libiscsi.h
5a3872e
cvsdist 2734589
%changelog
0ed757e
* Thu Dec 11 2014 Andy Grover <agrover@redhat.com> - 6.2.0.873-25
0ed757e
- Add --with-slp=no for #1088020
0ed757e
0047874
* Tue Nov 18 2014 Chris Leech <cleech@redhat.com> - 6.2.0.873-24
0047874
- 1040343 segfault from unexpected netlink event during discovery
0047874
- inhibit strict aliasing optimizations in iscsiuio, rpmdiff error
0047874
df66fcb
* Tue Oct 21 2014 Chris Leech <cleech@redhat.com> - 6.2.0.873-23
df66fcb
- make sure to pass --with-security=no to isns configure (#1088020)
df66fcb
3f3ec35
* Wed Sep 24 2014 Chris Leech <cleech@redhat.com> - 6.2.0.873-22
3f3ec35
- 1081798 retry login on host not found error
b34de1d
- 1111925 ignore iscsiadm return in iscsi.service
b34de1d
- 1126524 make sure systemd order against remote mounts is correct
b34de1d
- 963039 add discovery as a valid mode in iscsiadm.8
3f3ec35
- sync with upstream
3f3ec35
fbd8563
* Tue Mar 18 2014 Chris Leech <cleech@redhat.com> - 6.2.0.873-21
fbd8563
- 1069825
fbd8563
- boot session handling improvements
fbd8563
- Fix iscsi-mark-root for changed iscsiadm output
fbd8563
- Make sure iscsiuio is running for boot session recovery when using the
fbd8563
  bnx2i transport by forcing iscsiuio.service start
fbd8563
- Make NM dispatch triggered re-check for autostart sessions async
fbd8563
- Accept exit code 21, no records, from iscsiadm as success in
fbd8563
  iscsi.service
fbd8563
4b292f8
* Tue Feb 25 2014 Chris Leech <cleech@redhat.com> - 6.2.0.873-20
4b292f8
- 1049710 host0 being treated as an invalid in the host stats command
4b292f8
- 1015563 revert change to return code when calling login_portal for sessions
4b292f8
  that already exist, as it impacts users scripting around iscsiadm
4b292f8
2c4537b
* Mon Feb 17 2014 Chris Leech <cleech@redhat.com> - 6.2.0.873-19
2c4537b
- 1007388 fixes for iscsiadm to support qla4xxx
2c4537b
- refresh boot session info patches to final version from upstream,
2c4537b
  fixes context issues with later patches
374005d
- 1006156, 1006161 Add/Update entries in chap table through Open-iSCSI
a288e4f
- 948134 extend support to set additional parameters for network configuration
9a597eb
- 1049710 update open-iscsi to support host statistics
e509a42
- 1043019 iscsiuio fix for arp cache flush issue
860e10c
- 1059332 Fix broken discovery sessions over iser
eb7ab1c
- 1017393 split out iscsiuio into a seperate sub-package
2c4537b
40630bc
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 6.2.0.873-18
40630bc
- Mass rebuild 2014-01-24
40630bc
fd16207
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 6.2.0.873-17
fd16207
- Mass rebuild 2013-12-27
fd16207
a47be9a
* Mon Nov 25 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-16
a47be9a
- fix iscsiuio socket activation
e4192b1
- have systemd start socket units on iscsiadm use, if not already listening
a47be9a
974636d
* Sun Sep 15 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-15
974636d
- move /sbin to /usr/sbin
974636d
- use rpm macros in install rules
974636d
31786f0
* Fri Sep 13 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-14
31786f0
- fix iscsiuio hardened build and other compiler flags
31786f0
f9b971f
* Fri Aug 23 2013 Andy Grover <agrover@redhat.com> - 6.2.0.873-13
f9b971f
- Fix patch 0041 to check session != NULL before calling iscsi_sysfs_read_boot()
f9b971f
241a29f
* Tue Aug 20 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-12
241a29f
- fix regression in last build, database records can't be accessed
241a29f
2a4a67d
* Mon Aug 19 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-11
2a4a67d
- iscsi boot related fixes
2a4a67d
  make sure iscsid gets started if there are any boot sessions running
2a4a67d
  add reload target to fix double session problem when restarting from NM
2a4a67d
  don't rely on session list passed from initrd, never got fully implemented
2a4a67d
  remove patches related to running iscsid from initrd, possible to revisit later
2a4a67d
c2d5d21
* Sun Aug 18 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-10
c2d5d21
- sync with upstream git, minor context fixes after rebase of out-of-tree patches
c2d5d21
- iscsiuio is merged upstream, remove old source archive and patches
c2d5d21
- spec cleanups to fix rpmlint issues
c2d5d21
be68e03
* Sun Aug  4 2013 Peter Robinson <pbrobinson@fedoraproject.org> 6.2.0.873-9
be68e03
- Fix FTBFS, cleanup spec
be68e03
74e8695
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.0.873-8
74e8695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
74e8695
3c58b16
* Tue Jun 11 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-7
3c58b16
- Use the systemd tmpfiles service to recreate lockfiles in /var/lock
643ff5c
- 955167 build as a position independent executable
a6ea154
- 894576 fix order of setuid/setgid and drop additional groups
3c58b16
631ea07
* Tue May 28 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-6
631ea07
- Don't have iscsiadm scan for autostart record if node db is empty (bug #951951)
631ea07
3bd762b
* Tue Apr 30 2013 Orion Poplawski <orion@cora.nwra.com> - 6.2.0.873-5
3bd762b
- Fix typo in NM dispatcher script (bug #917058)
3bd762b
3c948fa
* Thu Feb 21 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-4
3c948fa
- build with libkmod support, instead of calling out to modprobe
3c948fa
- enable socket activation by default
3c948fa
31b81b6
* Thu Jan 24 2013 Kalev Lember <kalevlember@gmail.com> - 6.2.0.873-3
31b81b6
- Fix the postun script to not use ldconfig as the interpreter
31b81b6
f19f928
* Wed Jan 23 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-2
f19f928
- package iscsi_mark_root_nodes script, it's being referenced by the unit files
f19f928
6c1aaf9
* Tue Jan 22 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-1
6c1aaf9
- rebase to new upstream code
6c1aaf9
- systemd conversion
259ee6b
- 565245 Fix multilib issues caused by timestamp in doxygen footers
6c1aaf9
9cb10dd
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.0.872-19
9cb10dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9cb10dd
be68e03
* Tue Feb 14 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.18
Mike Christie 1d09df9
- 789683 Fix boot slow down when the iscsi service is started
Mike Christie 1d09df9
  (regression added in 6.2.0.872.16 when the nm wait was added).
Mike Christie 1d09df9
be68e03
* Mon Feb 6 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.17
Mike Christie 658ff4f
- 786174 Change iscsid/iscsi service startup, so it always starts
Mike Christie 658ff4f
  when called.
Mike Christie 658ff4f
Mike Christie c6e1f6b
* Sat Feb 4 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.16
Mike Christie c6e1f6b
- 747479 Fix iscsidevs handling of network requirement
Mike Christie c6e1f6b
1c4f613
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.0.872-15
1c4f613
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1c4f613
Mike Christie 8c735fc
* Wed Nov 30 2011 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.14
Mike Christie 8c735fc
- Fix version string to reflect fedora and not rhel.
Mike Christie 8c735fc
Mike Christie 3949e15
* Tue Oct 18 2011 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.13
Mike Christie 3949e15
- Update iscsi tools.
Mike Christie 3949e15
f149ee2
* Sat Apr 30 2011 Hans de Goede <hdegoede@redhat.com> - 6.2.0.872-12
f149ee2
- Change iscsi init scripts to check for networking being actually up, rather
f149ee2
  then for NetworkManager being started (#692230)
f149ee2
2d4a526
* Tue Apr 26 2011 Hans de Goede <hdegoede@redhat.com> - 6.2.0.872-11
2d4a526
- Fix iscsid autostarting when upgrading from an older version
2d4a526
  (add iscsid.startup key to iscsid.conf on upgrade)
2d4a526
- Fix printing of [ OK ] when successfully stopping iscsid
2d4a526
- systemd related fixes:
2d4a526
 - Add Should-Start/Stop tgtd to iscsi init script to fix (re)boot from
2d4a526
   hanging when using locally hosted targets
2d4a526
 - %%ghost /var/lock/iscsi and contents (#656605)
2d4a526
2d4a526
* Mon Apr 25 2011 Mike Christie <mchristi@redhat.com> 6.2.0.872-10
2d4a526
- Fix iscsi init scripts check for networking being up (#692230)
Mike Christie a04b98f
832199a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.0.872-9
832199a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild