Update to Open-iSCSI 2.1.11

Resolves: RHEL-90554

Signed-off-by: Chris Leech <cleech@redhat.com>
This commit is contained in:
Chris Leech 2025-05-09 15:05:21 -07:00
parent 6d9d84f401
commit 5952f19561
8 changed files with 35 additions and 108 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
/open-iscsi-095f59c.tar.gz
/open-iscsi-2a8f9d8.tar.gz
/open-iscsi-a65a472.tar.gz
/open-iscsi-4b3e853.tar.gz

View File

@ -1,4 +1,4 @@
From 6de09f82e86db0500a59017a473c944877a80516 Mon Sep 17 00:00:00 2001
From bf70916c0bd278fc0a584204780149d71791acec Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Wed, 5 Jun 2019 09:08:39 -0700
Subject: [PATCH 1/1] Coverity scan fixes
@ -6,13 +6,11 @@ Subject: [PATCH 1/1] Coverity scan fixes
---
iscsiuio/src/unix/libs/qedi.c | 2 +-
iscsiuio/src/unix/main.c | 3 +++
libopeniscsiusr/idbm.c | 11 +++++------
usr/idbm.c | 10 ++++------
usr/iscsid.c | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
index 1af8d1b..9a814c6 100644
index c26744d..e8d3a4e 100644
--- a/iscsiuio/src/unix/libs/qedi.c
+++ b/iscsiuio/src/unix/libs/qedi.c
@@ -1034,7 +1034,7 @@ static int qedi_read(nic_t *nic, packet_t *pkt)
@ -25,10 +23,10 @@ index 1af8d1b..9a814c6 100644
if (bd_cons != bd_prod) {
diff --git a/iscsiuio/src/unix/main.c b/iscsiuio/src/unix/main.c
index 0c9ad49..f83f305 100644
index 645dbe8..b53a243 100644
--- a/iscsiuio/src/unix/main.c
+++ b/iscsiuio/src/unix/main.c
@@ -391,6 +391,9 @@ int main(int argc, char *argv[])
@@ -451,6 +451,9 @@ int main(int argc, char *argv[])
sigaddset(&set, SIGTERM);
sigaddset(&set, SIGUSR1);
rc = pthread_sigmask(SIG_SETMASK, &set, NULL);
@ -38,54 +36,11 @@ index 0c9ad49..f83f305 100644
/* Spin off the signal handling thread */
pthread_attr_init(&attr);
diff --git a/libopeniscsiusr/idbm.c b/libopeniscsiusr/idbm.c
index 0910c63..6213e62 100644
--- a/libopeniscsiusr/idbm.c
+++ b/libopeniscsiusr/idbm.c
@@ -321,12 +321,11 @@ int _idbm_lock(struct iscsi_context *ctx)
return 0;
}
- if (access(LOCK_DIR, F_OK) != 0) {
- if (mkdir(LOCK_DIR, 0770) != 0) {
- _error(ctx, "Could not open %s: %d %s", LOCK_DIR, errno,
- _strerror(errno, strerr_buff));
- return LIBISCSI_ERR_IDBM;
- }
+ if (((mkdir(LOCK_DIR, 0770) != 0) && (errno != EEXIST)) ||
+ (access(LOCK_DIR, F_OK) != 0)) {
+ _error(ctx, "Could not open %s: %d %s", LOCK_DIR, errno,
+ _strerror(errno, strerr_buff));
+ return LIBISCSI_ERR_IDBM;
}
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
diff --git a/usr/idbm.c b/usr/idbm.c
index b33ae42..1ac0b73 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -1461,12 +1461,10 @@ int idbm_lock(void)
return 0;
}
- if (access(LOCK_DIR, F_OK) != 0) {
- if (mkdir(LOCK_DIR, 0770) != 0) {
- log_error("Could not open %s: %s", LOCK_DIR,
- strerror(errno));
- return ISCSI_ERR_IDBM;
- }
+ if (((mkdir(LOCK_DIR, 0770) != 0) && (errno != EEXIST)) ||
+ (access(LOCK_DIR, F_OK) != 0)) {
+ log_error("Could not open %s: %s", LOCK_DIR, strerror(errno));
+ return ISCSI_ERR_IDBM;
}
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
diff --git a/usr/iscsid.c b/usr/iscsid.c
index dc54fec..fde8894 100644
index b6f157b..0154359 100644
--- a/usr/iscsid.c
+++ b/usr/iscsid.c
@@ -510,8 +510,8 @@ int main(int argc, char *argv[])
@@ -516,8 +516,8 @@ int main(int argc, char *argv[])
log_close(log_pid);
exit(ISCSI_ERR);
}
@ -96,5 +51,5 @@ index dc54fec..fde8894 100644
if ((control_fd = ipc->ctldev_open()) < 0) {
log_close(log_pid);
--
2.26.3
2.45.2

View File

@ -16,8 +16,8 @@ index a0859b7..7ae461a 100644
DESTDIR ?=
# our VERSION String
-ISCSI_VERSION_STR ?= 2.1.9
+ISCSI_VERSION_STR ?= 6.2.1.9
-ISCSI_VERSION_STR ?= 2.1.11
+ISCSI_VERSION_STR ?= 6.2.1.11
prefix = /usr
exec_prefix =
@ -29,8 +29,8 @@ index d49afbb..ab67096 100644
project('open-iscsi', 'c',
meson_version: '>= 0.54.0',
- version: '2.1.9',
+ version: '6.2.1.9',
- version: '2.1.11',
+ version: '6.2.1.11',
license: 'LGPL-2.1-or-later',
default_options: [
'c_std=gnu99',

View File

@ -22,19 +22,3 @@ index c598aee..bddf9fc 100644
strlcpy(new_node->name, rec->name, LIBISCSI_VALUE_MAXLEN);
new_node->tpgt = rec->tpgt;
diff --git a/usr/idbm.c b/usr/idbm.c
index e9025bf..9cc9c40 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -2536,7 +2536,7 @@ int idbm_add_node(node_rec_t *newrec, discovery_rec_t *drec, int overwrite)
if (rc)
goto unlock;
- if (drec->type == DISCOVERY_TYPE_FW) {
+ if (drec && drec->type == DISCOVERY_TYPE_FW) {
log_debug(8, "setting firmware node 'startup' to 'onboot'");
newrec->startup = ISCSI_STARTUP_ONBOOT;
newrec->conn[0].startup = ISCSI_STARTUP_ONBOOT;
--
2.36.1

View File

@ -1,6 +1,6 @@
%global open_iscsi_version 2.1
%global open_iscsi_build 9
%global commit0 a65a472a35b436c7a2d47c5862aae530ac4ae9c8
%global open_iscsi_build 11
%global commit0 4b3e853ab468a95d8a035efa8fc4298a6c6318a3
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
# Disable python2 build by default
@ -10,7 +10,7 @@
Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
Release: 1.git%{shortcommit0}%{?dist}
Release: 0.git%{shortcommit0}%{?dist}
License: GPL-2.0-or-later
URL: https://github.com/open-iscsi/open-iscsi
Source0: https://github.com/open-iscsi/open-iscsi/archive/%{commit0}.tar.gz#/open-iscsi-%{shortcommit0}.tar.gz
@ -113,7 +113,7 @@ libiscsi interface for interacting with %{name}
# avoid undefined references linking failures
%undefine _ld_as_needed
%meson -Diqn_prefix=iqn.1994-05.com.redhat
%meson -Diqn_prefix=iqn.1994-05.com.redhat -Discsi_sbindir=%{_sbindir}
%meson_build
%make_build LDFLAGS="%{build_ldflags}" iqn_prefix=iqn.1994-05.com.redhat DBROOT=/var/lib/iscsi libiscsi
@ -146,11 +146,11 @@ touch $RPM_BUILD_ROOT%{_rundir}/lock/iscsi/lock
rm $RPM_BUILD_ROOT/etc/iscsi/initiatorname.iscsi
rm $RPM_BUILD_ROOT/etc/udev/rules.d/50-iscsi-firmware-login.rules
rm $RPM_BUILD_ROOT/usr/lib/systemd/system-generators/ibft-rule-generator
rm $RPM_BUILD_ROOT/usr/sbin/brcm_iscsiuio
rm $RPM_BUILD_ROOT/usr/sbin/iscsi-gen-initiatorname
rm $RPM_BUILD_ROOT/usr/sbin/iscsi_discovery
rm $RPM_BUILD_ROOT/usr/sbin/iscsi_fw_login
rm $RPM_BUILD_ROOT/usr/sbin/iscsi_offload
rm $RPM_BUILD_ROOT/%{_sbindir}/brcm_iscsiuio
rm $RPM_BUILD_ROOT/%{_sbindir}/iscsi-gen-initiatorname
rm $RPM_BUILD_ROOT/%{_sbindir}/iscsi_discovery
rm $RPM_BUILD_ROOT/%{_sbindir}/iscsi_fw_login
rm $RPM_BUILD_ROOT/%{_sbindir}/iscsi_offload
rm $RPM_BUILD_ROOT/usr/share/man/man8/iscsi-gen-initiatorname.8
rm $RPM_BUILD_ROOT/usr/share/man/man8/iscsi_discovery.8
rm $RPM_BUILD_ROOT/usr/share/man/man8/iscsi_fw_login.8
@ -271,6 +271,9 @@ systemctl --no-reload preset iscsi.service iscsi-starter.service &>/dev/null ||
%endif
%changelog
* Wed May 07 2025 Chris Leech <cleech@redhat.com> - 6.2.1.11-0.git4b3e853
- Open-iSCSI upstream 2.1.11
* Wed Nov 15 2023 Chris Leech <cleech@redhat.com> - 6.2.1.9-18.gita65a472
- rebase to upstream 2.1.9+ with iscsiuio 0.7.8.8
- new meson build system, sync with fedora packaging

View File

@ -1,21 +1,5 @@
summary: Tier 0 iSCSI initiator tests
discover:
how: fmf
plan:
import:
url: https://gitlab.com/rh-kernel-stqe/sts
ref: fedora
filter:
- tier:0
- tag:iscsi
- tag:local
context:
component: iscsi-initiator-utils
execute:
how: tmt
environment:
STS_VENV_PATH: /opt/sts-venv
prepare:
- name: install-sts-libs
how: shell
script: >
curl --retry 3 --retry-delay 5 --connect-timeout 10 --max-time 30 -s
https://gitlab.com/rh-kernel-stqe/sts/-/raw/fedora/scripts/install-sts-libs.sh | bash
name: /plans/iscsi/tier0
ref: main

View File

@ -1 +1 @@
SHA512 (open-iscsi-a65a472.tar.gz) = f2befa5047a8a1f714910d402503828d6ae5d7be85d3b59db33cde32c4e36fe401430c6ae033a066d9bd57a3be0c0933185240cfc8660973e03c8a8c427d4ba6
SHA512 (open-iscsi-4b3e853.tar.gz) = 2f8474876a33bf8fd70141aefb1fae5ce8695ce0cdcf7244816f8f79bdd79247cf88d86f9e9d0453ef98746db5508dc99983f0672b7095644d28cdfb9fbefa99

View File

@ -67,7 +67,7 @@ rlPhaseStartSetup
if [ -f /etc/iscsi/initiatorname.iscsi ]; then
. /etc/iscsi/initiatorname.iscsi
else
echo InitiatorName=`iscsi-iname` > /etc/iscsi/initiatorname.iscsi
echo "InitiatorName=`/usr/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi
. /etc/iscsi/initiatorname.iscsi
fi