-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-block/open-iscsi: Migrate coreos-stable to portage-stable, 2.1.10
The old version 2.1.4 does not cross-compile without help from QEMU that we cannot rely on going forwards. 2.1.10 is Meson-based and handles this much better. Rather than update the package in-place, migrate it to portage-stable and cover the differences with a small patch and env script. Upstream now carries the systemd files, so we do not need to add these. /etc is now automatically moved to /usr/share/flatcar/etc, so we no longer need any special handling for that here, but I have added a compatibility symlink for iscsid.conf. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
- Loading branch information
Showing
20 changed files
with
491 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
18 changes: 18 additions & 0 deletions
18
sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-block/open-iscsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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*" |
3 changes: 3 additions & 0 deletions
3
...c/third_party/coreos-overlay/coreos/user-patches/sys-block/open-iscsi/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
12 changes: 12 additions & 0 deletions
12
...oreos-overlay/coreos/user-patches/sys-block/open-iscsi/open-iscsi-startup-automatic.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
4 changes: 0 additions & 4 deletions
4
sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/Manifest
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/iscsi-init.service
This file was deleted.
Oops, something went wrong.
78 changes: 0 additions & 78 deletions
78
...rc/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/files/open-iscsi.conf
This file was deleted.
Oops, something went wrong.
112 changes: 0 additions & 112 deletions
112
sdk_container/src/third_party/coreos-overlay/sys-block/open-iscsi/open-iscsi-2.1.4-r1.ebuild
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
sdk_container/src/third_party/portage-stable/sys-block/open-iscsi/Manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
52 changes: 52 additions & 0 deletions
52
.../third_party/portage-stable/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_bitwise.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
43 changes: 43 additions & 0 deletions
43
...ge-stable/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.