Skip to content

Commit

Permalink
Merge pull request #2261 from flatcar/chewi/open-iscsi
Browse files Browse the repository at this point in the history
sys-block/open-iscsi: Migrate coreos-stable to portage-stable, 2.1.10
  • Loading branch information
chewi authored Sep 3, 2024
2 parents 516ea1f + 40e1c0e commit 2fc3b2d
Show file tree
Hide file tree
Showing 20 changed files with 491 additions and 206 deletions.
1 change: 1 addition & 0 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ sys-apps/util-linux
sys-apps/which
sys-apps/zram-generator

sys-block/open-iscsi
sys-block/open-isns
sys-block/parted
sys-block/thin-provisioning-tools
Expand Down
1 change: 1 addition & 0 deletions changelog/updates/2024-08-26-open-iscsi-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Open-iSCSI ([2.1.10](https://github.com/open-iscsi/open-iscsi/releases/tag/2.1.10))
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cros_post_src_install_tmpfiles() {
keepdir /var/lib/iscsi/ifaces

dosym ../flatcar/etc/iscsi/iscsid.conf /usr/share/iscsi/iscsid.conf
insinto /usr/share/flatcar/etc/iscsi
newins - iscsid.conf

systemd_install_dropin iscsi-init.service - <<-EOF
[Unit]
After=systemd-tmpfiles-setup.service
EOF
}

# Masking initiatorname.iscsi.example prevents initiatorname.iscsi from being
# generated and installed. We want the systemd unit to do this at runtime so
# that we don't bake the value into Flatcar images.
INSTALL_MASK+=" ${EPREFIX}/etc/iscsi/initiatorname.iscsi*"
PKG_INSTALL_MASK+=" ${EPREFIX}/etc/iscsi/initiatorname.iscsi*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
We want nodes to start automatically.

See: https://github.com/flatcar/scripts/commit/8fb48ff69f29e64da3df6a197662904f60af25f5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -Naur a/etc/iscsid.conf b/etc/iscsid.conf
--- a/etc/iscsid.conf 2024-05-31 18:25:54.000000000 +0100
+++ b/etc/iscsid.conf 2024-08-23 17:57:43.556060413 +0100
@@ -51,7 +51,7 @@
# node.startup = automatic
#
# To manually startup the session, use "manual". The default is manual.
-node.startup = manual
+node.startup = automatic

# For "automatic" startup nodes, setting this to "Yes" will try logins on each
# available iface until one succeeds, and then stop. The default "No" will try

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DIST open-iscsi-2.1.10.tar.gz 645825 BLAKE2B 6a2e279e2dcf77e8d340c025eb59168121ee0c50bd013d0b5d9dac2fbc7116cc54904b4206eea192bd3888e3bcf3da42caeae1e428268edc6c2f7184958b6b04 SHA512 18b92d3e9a85d8de66734d95e9ca74a8acc5167a98830134c18ad5e226b29a00d358f952edfab67b643c454ec63c0a382c7ab7e7e76970f7574b46cea0d5c82d
DIST open-iscsi-2.1.8.tar.gz 638346 BLAKE2B 1e85b6bd75ac31e5aaa65ea8869c2e6e13190786e28e473ab8bd1ea3edb0ef835624194e2ba53718fb2a49c25af53bff9035f5109e1a569155244f03a7dccdc0 SHA512 168ce68dc495cc8b2f217ad0373851d681f9274036b8ec562ece513de493adfdbba55f2038518f246f5244f6405102b2e096a9cce15e73fce9654f06790002c1
DIST open-iscsi-2.1.9.tar.gz 641974 BLAKE2B 87570329dd5902bf96f1c11786c7a814892c851eabb63148f35b85494242f7379db1770a93549dcb871bafa148d37b320b389a98eed2ac46b7252ed22187ecd1 SHA512 25c28da5918b775ca54d3e55591eca0b4f7b5be33d803cad28fce1e9b2334b43cee1423a4e1819497b322e0f420dcd8d74226f442ca432233d1753565b11a5bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From 0a6432de1a2186449d5e6557f75a9f30e487471d Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@43-1.org>
Date: Thu, 2 Jun 2022 13:12:43 -0500
Subject: [PATCH] Use __bitwise instead of __bitwise__

The iscsi_proto.h header goes into great length ensuring that the
__bitwise macro is defined:

#if !defined(__bitwise)
/*
* If running svn modules we may need to define these.
* This should not go upstream since this is already properly defined there
*/
#ifdef __CHECKER__
#define __bitwise__ __attribute__((bitwise))
#else
#define __bitwise__
#endif
#ifdef __CHECK_ENDIAN__
#define __bitwise __bitwise__
#else
#define __bitwise
#endif
#endif

But then uses the __bitwise__ macro instead:

typedef uint32_t __bitwise__ itt_t;

(This is the only occurence where the __bitwise__ (or __bitwise) macro
is actually used). This seems to be a typo, changing this to __bitwise
fixes compilation with gcc-11 onwards.
---
include/iscsi_proto.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/iscsi_proto.h b/include/iscsi_proto.h
index 1d14b89..3fe9018 100644
--- a/include/iscsi_proto.h
+++ b/include/iscsi_proto.h
@@ -63,7 +63,7 @@
#endif

/* initiator tags; opaque for target */
-typedef uint32_t __bitwise__ itt_t;
+typedef uint32_t __bitwise itt_t;
/* below makes sense only for initiator that created this tag */
#define build_itt(itt, age) ((__force itt_t)\
((itt) | ((age) << ISCSI_AGE_SHIFT)))
--
2.35.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
https://github.com/open-iscsi/open-iscsi/commit/11bdc17938ba648c81a853355a6bbddad69a9fc7
https://bugs.gentoo.org/908587

From 11bdc17938ba648c81a853355a6bbddad69a9fc7 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 4 Oct 2023 23:18:20 +0200
Subject: [PATCH] usr/idbm.c: fix musl build (#426)

Fix the following musl build failure raised since version 2.1.9 and
https://github.com/open-iscsi/open-iscsi/commit/7b571d76d6937a78c141630fc38c3c57c532466c:

../usr/idbm.c: In function 'idbm_rec_write_old':
../usr/idbm.c:2230:27: error: 'GLOB_ONLYDIR' undeclared (first use in this function)
2230 | rc = glob(portal, GLOB_ONLYDIR, NULL, &globbuf);
| ^~~~~~~~~~~~

Fixes:
- http://autobuild.buildroot.org/results/14fc1c139f055b5b1eaa6e04e327863c06176a7b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
usr/idbm.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/usr/idbm.c b/usr/idbm.c
index ca4a4ec..c39abb6 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -45,6 +45,11 @@
#include "fw_context.h"
#include "iscsi_err.h"

+// GLOB_ONLYDIR is not defined under musl
+#ifndef GLOB_ONLYDIR
+#define GLOB_ONLYDIR 0x100
+#endif
+
#define IDBM_HIDE 0 /* Hide parameter when print. */
#define IDBM_SHOW 1 /* Show parameter when print. */
#define IDBM_MASKED 2 /* Show "stars" instead of real value when print */
--
2.41.0

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
Expand All @@ -11,5 +11,6 @@
</use>
<upstream>
<remote-id type="github">open-iscsi/open-iscsi</remote-id>
<remote-id type="cpe">cpe:/a:open-iscsi_project:open-iscsi</remote-id>
</upstream>
</pkgmetadata>
Loading

0 comments on commit 2fc3b2d

Please sign in to comment.