diff --git a/0024-minor-service-file-updates.patch b/0024-minor-service-file-updates.patch new file mode 100644 index 0000000..6c69766 --- /dev/null +++ b/0024-minor-service-file-updates.patch @@ -0,0 +1,67 @@ +From 3770c9a12d85bd4a990430faa7889b7692d5c6ac Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Thu, 18 Feb 2021 14:04:32 -0800 +Subject: [PATCH 1/1] minor service file updates + +Intended use is with system presets to enable the following: + iscsi.service - login of automatic node records + iscsid.socket - start iscsid as needed for all iSCSI sessions + iscsiuio.socket - start iscsiuio as needed for bnx2i or qedi + iscsi-onboot.service - special handling of initramfs sessions + +The following are started automatically as needed: + iscsid.service - needed for all iSCSI sessions + iscsiuio.service - needed for bnx2i or qedi offload + iscsi-init.service - create an iSCSI name if missing before starting iscsid + iscsi-shutdown.service - ensure all non-boot sessions logout at shutdown +--- + etc/systemd/iscsi-init.service | 1 + + etc/systemd/iscsi.service | 2 +- + etc/systemd/iscsid.service | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/etc/systemd/iscsi-init.service b/etc/systemd/iscsi-init.service +index e058ff0..c3370ec 100644 +--- a/etc/systemd/iscsi-init.service ++++ b/etc/systemd/iscsi-init.service +@@ -1,6 +1,7 @@ + [Unit] + Description=One time configuration for iscsi.service + ConditionPathExists=!/etc/iscsi/initiatorname.iscsi ++Before=iscsid.service + + [Service] + Type=oneshot +diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service +index 175cb2c..6c542d2 100644 +--- a/etc/systemd/iscsi.service ++++ b/etc/systemd/iscsi.service +@@ -4,7 +4,7 @@ Documentation=man:iscsiadm(8) man:iscsid(8) + DefaultDependencies=no + Before=remote-fs-pre.target + After=network.target network-online.target iscsid.service iscsiuio.service systemd-remount-fs.service +-Wants=remote-fs-pre.target iscsi-shutdown.service ++Wants=remote-fs-pre.target + ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes + + [Service] +diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service +index 28402fb..8b7434f 100644 +--- a/etc/systemd/iscsid.service ++++ b/etc/systemd/iscsid.service +@@ -4,6 +4,7 @@ Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) + DefaultDependencies=no + After=network.target iscsiuio.service + Before=remote-fs-pre.target ++Requires=iscsi-init.service iscsi-shutdown.service + + [Service] + Type=notify +@@ -14,4 +15,3 @@ Restart=on-failure + + [Install] + WantedBy=multi-user.target +-Also=iscsid.socket +-- +2.26.2 + diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec index 3655ec9..ee3ffdd 100644 --- a/iscsi-initiator-utils.spec +++ b/iscsi-initiator-utils.spec @@ -9,7 +9,7 @@ Summary: iSCSI daemon and utility programs Name: iscsi-initiator-utils Version: 6.%{open_iscsi_version}.%{open_iscsi_build} -Release: 4.git%{shortcommit0}%{?dist} +Release: 5.git%{shortcommit0}%{?dist} License: GPLv2+ URL: http://www.open-iscsi.org Source0: https://github.com/open-iscsi/open-iscsi/archive/%{commit0}.tar.gz#/open-iscsi-%{shortcommit0}.tar.gz @@ -39,6 +39,7 @@ Patch0020: 0020-fix-upstream-build-breakage-of-iscsiuio-LDFLAGS.patch Patch0021: 0021-use-Red-Hat-version-string-to-match-RPM-package-vers.patch Patch0022: 0022-iscsi_if.h-replace-zero-length-array-with-flexible-a.patch Patch0023: 0023-stop-using-Werror-for-now.patch +Patch0024: 0024-minor-service-file-updates.patch BuildRequires: flex bison doxygen kmod-devel systemd-units BuildRequires: autoconf automake libtool libmount-devel openssl-devel @@ -197,20 +198,20 @@ popd %post -%systemd_post iscsi.service iscsi-shutdown.service iscsid.service iscsid.socket +%systemd_post iscsi.service iscsid.service iscsid.socket iscsi-onboot.service iscsi-init.service iscsi-shutdown.service + +%preun +%systemd_preun iscsi.service iscsid.service iscsid.socket iscsi-onboot.service iscsi-init.service iscsi-shutdown.service + +%postun +%systemd_postun iscsi.service iscsid.service iscsid.socket iscsi-onboot.service iscsi-init.service iscsi-shutdown.service %post iscsiuio %systemd_post iscsiuio.service iscsiuio.socket -%preun -%systemd_preun iscsi.service iscsi-shutdown.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket - %preun iscsiuio %systemd_preun iscsiuio.service iscsiuio.socket -%postun -%systemd_postun iscsi.service iscsi-shutdown.service iscsid.service iscsiuio.service iscsid.socket iscsiuio.socket - %postun iscsiuio %systemd_postun iscsiuio.service iscsiuio.socket @@ -301,6 +302,9 @@ fi %{python3_sitearch}/* %changelog +* Thu Feb 18 2021 Chris Leech - 6.2.1.2-5.gita8fcb37 +- unit file changes + * Tue Jan 26 2021 Fedora Release Engineering - 6.2.1.2-4.gita8fcb37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild