aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-06-01 18:53:49 -0700
committerKhem Raj <raj.khem@gmail.com>2018-06-01 18:53:49 -0700
commit61868e1272df15ce6626f50d33473757c0e5890a (patch)
tree8b4d67678459053c721a95cf37afa933266840e1
parent92362245d7477ef8b1a334bd6b8514e216daeb6e (diff)
downloadmeta-openembedded-contrib-61868e1272df15ce6626f50d33473757c0e5890a.tar.gz
meta-openembedded-contrib-61868e1272df15ce6626f50d33473757c0e5890a.tar.bz2
meta-openembedded-contrib-61868e1272df15ce6626f50d33473757c0e5890a.zip
iscsi-initiator-utils: Update to latest master
- Fix build with gcc8 and musl - Drop already upstreamed patched Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Include-limit.h-for-PATH_MAX.patch22
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch25
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch25
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch25
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch29
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-iface-Set-strncpy-bounds-to-not-over.patch41
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch49
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch28
-rw-r--r--meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb26
9 files changed, 75 insertions, 195 deletions
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Include-limit.h-for-PATH_MAX.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Include-limit.h-for-PATH_MAX.patch
new file mode 100644
index 0000000000..074ea7565c
--- /dev/null
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-Include-limit.h-for-PATH_MAX.patch
@@ -0,0 +1,22 @@
+From 782730a74dd453a3c9bd2b47b79b1797586871fa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 1 Jun 2018 18:11:34 -0700
+Subject: [PATCH] Include limit.h for PATH_MAX
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libopeniscsiusr/node.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libopeniscsiusr/node.c b/libopeniscsiusr/node.c
+index e82bb0d..3438a8f 100644
+--- a/libopeniscsiusr/node.c
++++ b/libopeniscsiusr/node.c
+@@ -29,6 +29,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <string.h>
++#include <limits.h>
+
+ #include "libopeniscsiusr/libopeniscsiusr.h"
+ #include "misc.h"
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch
deleted file mode 100644
index f5e1bec8ad..0000000000
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From cfee58d5863a535b61aa54690ae205b876f57944 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Feb 2018 22:53:29 -0800
-Subject: [PATCH 1/2] libopeniscsiusr: Include limit.h for PATH_MAX
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libopeniscsiusr/iface.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c
-index 79898df..a48ef36 100644
---- a/libopeniscsiusr/iface.c
-+++ b/libopeniscsiusr/iface.c
-@@ -30,6 +30,7 @@
- #include <netdb.h>
- #include <assert.h>
- #include <inttypes.h>
-+#include <limits.h>
-
- #include "libopeniscsiusr/libopeniscsiusr.h"
- #include "misc.h"
---
-2.16.1
-
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch
deleted file mode 100644
index 174aa50d2b..0000000000
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 197713ad7e3e944102bbd792e1ab9ec4a67100c0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Feb 2018 23:25:21 -0800
-Subject: [PATCH 1/4] qedi.c: Removed unused linux/ethtool.h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- iscsiuio/src/unix/libs/qedi.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
-index b81fecd..24cb89a 100644
---- a/iscsiuio/src/unix/libs/qedi.c
-+++ b/iscsiuio/src/unix/libs/qedi.c
-@@ -49,7 +49,6 @@
- #include <arpa/inet.h>
- #include <linux/types.h>
- #include <linux/sockios.h>
--#include <linux/ethtool.h>
- #include <linux/netlink.h>
- #include <sys/mman.h>
- #include <sys/ioctl.h>
---
-2.16.1
-
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch
deleted file mode 100644
index aecede6eef..0000000000
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2b39f85dcf020647544002cb0b0e734748391dfb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Feb 2018 23:27:25 -0800
-Subject: [PATCH 2/4] idbm.c: Include fcnl.h for O_RDWR and O_CREAT definitions
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- usr/idbm.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/usr/idbm.c b/usr/idbm.c
-index 5532202..0a51b85 100644
---- a/usr/idbm.c
-+++ b/usr/idbm.c
-@@ -27,6 +27,7 @@
- #include <errno.h>
- #include <dirent.h>
- #include <limits.h>
-+#include <fcntl.h>
- #include <sys/stat.h>
- #include <sys/file.h>
-
---
-2.16.1
-
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch
deleted file mode 100644
index 836ed60487..0000000000
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 29571f71692e28ce9a17d1450097a98492f3b465 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Feb 2018 22:54:04 -0800
-Subject: [PATCH 2/2] libopeniscsiusr: Add CFLAGS to linker cmdline
-
-This will ensure that -fPIC is passed to linker as
-well
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libopeniscsiusr/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile
-index 8b9b523..4f1d0d6 100644
---- a/libopeniscsiusr/Makefile
-+++ b/libopeniscsiusr/Makefile
-@@ -49,7 +49,7 @@ LIBADD =
- all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc
-
- $(LIBS): $(OBJS)
-- $(CC) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD)
- ln -sf $@ $(DEVLIB)
-
- $(LIBS_MAJOR): $(LIBS)
---
-2.16.1
-
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-iface-Set-strncpy-bounds-to-not-over.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-iface-Set-strncpy-bounds-to-not-over.patch
new file mode 100644
index 0000000000..b7c87f4163
--- /dev/null
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-iface-Set-strncpy-bounds-to-not-over.patch
@@ -0,0 +1,41 @@
+From 56a56567d4f334b119e60c4ef0ad87edf7b77609 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 1 Jun 2018 18:46:19 -0700
+Subject: [PATCH] libopeniscsiusr/iface: Set strncpy bounds to not overflow
+
+Fixes warnings found by gcc8
+
+iface.c:492:47: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size 4073 [-Werror=format-truncation=]
+
+iface.c:140:3: note: in expansion of macro '_strncpy'
+ _strncpy((*iface)->transport_name, proc_name + strlen("iscsi_"),
+ ^~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libopeniscsiusr/iface.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c
+index 955395d..d33363e 100644
+--- a/libopeniscsiusr/iface.c
++++ b/libopeniscsiusr/iface.c
+@@ -138,7 +138,7 @@ int _iscsi_iface_get_from_sysfs(struct iscsi_context *ctx, uint32_t host_id,
+
+ if (strncmp(proc_name, "iscsi_", strlen("iscsi_")) == 0)
+ _strncpy((*iface)->transport_name, proc_name + strlen("iscsi_"),
+- sizeof((*iface)->transport_name) / sizeof(char));
++ sizeof((*iface)->transport_name) / sizeof(char) - 1);
+ else
+ _strncpy((*iface)->transport_name, proc_name,
+ sizeof((*iface)->transport_name) / sizeof(char));
+@@ -489,7 +489,8 @@ static int _fill_hw_iface_from_sys(struct iscsi_context *ctx,
+
+ sysfs_iface_dir_path = malloc(PATH_MAX);
+ _alloc_null_check(ctx, sysfs_iface_dir_path, rc, out);
+- snprintf(sysfs_iface_dir_path, PATH_MAX, "%s/%s",
++ sysfs_iface_dir_path[PATH_MAX+strlen(_ISCSI_SYS_IFACE_DIR)] = '\0';
++ snprintf(sysfs_iface_dir_path, PATH_MAX+strlen(_ISCSI_SYS_IFACE_DIR)+1, "%s/%s",
+ _ISCSI_SYS_IFACE_DIR, iface_kern_id);
+
+ _good(_sysfs_prop_get_str(ctx, sysfs_iface_dir_path,
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch
deleted file mode 100644
index 0ce155f7a2..0000000000
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 9b7a32903b56ce4d41f264a345ca59a0b00d53b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Feb 2018 23:28:33 -0800
-Subject: [PATCH 3/4] bnx2x.c: Reorder the includes to avoid duplicate defines
- with musl
-
-including nic.h before linux/ethtool.h avoids redefinitions of
-eth structs
-
-/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
-usr/include/netinet/if_ether.h:104:8: error: redefinition of 'struct ethhdr'
- struct ethhdr {
- ^~~~~~
-In file included from /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.
-876-r0/recipe-sysroot/usr/include/linux/ethtool.h:19:0,
- from qedi.c:52:
-/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/
-usr/include/linux/if_ether.h:154:8: note: originally defined here
- struct ethhdr {
- ^~~~~~
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- iscsiuio/src/unix/libs/bnx2x.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
-index 3df6d5f..62530d1 100644
---- a/iscsiuio/src/unix/libs/bnx2x.c
-+++ b/iscsiuio/src/unix/libs/bnx2x.c
-@@ -36,6 +36,7 @@
- * bnx2x.c - bnx2x user space driver
- *
- */
-+#include "nic.h"
- #include <errno.h>
- #include <stdio.h>
- #include <string.h>
-@@ -58,7 +59,6 @@
- #include "bnx2x.h"
- #include "cnic.h"
- #include "logger.h"
--#include "nic.h"
- #include "nic_id.h"
- #include "nic_utils.h"
- #include "options.h"
---
-2.16.1
-
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch b/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch
deleted file mode 100644
index 57bdc8cb60..0000000000
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6f9c1a04d250388d1574cfaf20a1ff66a64beb48 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 2 Feb 2018 23:42:12 -0800
-Subject: [PATCH 4/4] fwparam_ppc.c: Do not use __compar_fn_t
-
-__compar_fn_t is not defined in musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- utils/fwparam_ibft/fwparam_ppc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/fwparam_ibft/fwparam_ppc.c b/utils/fwparam_ibft/fwparam_ppc.c
-index c298b8c..391faa2 100644
---- a/utils/fwparam_ibft/fwparam_ppc.c
-+++ b/utils/fwparam_ibft/fwparam_ppc.c
-@@ -356,7 +356,7 @@ static int loop_devs(const char *devtree)
- * Sort the nics into "natural" order. The proc fs
- * device-tree has them in somewhat random, or reversed order.
- */
-- qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp);
-+ qsort(niclist, nic_count, sizeof(char *), nic_cmp);
-
- snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases");
- dev_count = 0;
---
-2.16.1
-
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb
index 823227c46c..f61900d823 100644
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb
@@ -11,25 +11,23 @@ DEPENDS = "openssl flex-native bison-native open-isns util-linux"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-SRCREV ?= "24580adc4c174bbc5dde3ae7594a46d57635e906"
+SRCREV ?= "0cfebb10d29382ac1058c950a60a946c28b01e53"
SRC_URI = "git://github.com/open-iscsi/open-iscsi \
- file://initd.debian \
- file://99_iscsi-initiator-utils \
- file://iscsi-initiator \
- file://iscsi-initiator.service \
- file://iscsi-initiator-targets.service \
- file://set_initiatorname \
- file://0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch \
- file://0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch \
- file://0001-qedi.c-Removed-unused-linux-ethtool.h.patch \
- file://0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch \
- file://0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch \
- file://0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch \
-"
+ file://initd.debian \
+ file://99_iscsi-initiator-utils \
+ file://iscsi-initiator \
+ file://iscsi-initiator.service \
+ file://iscsi-initiator-targets.service \
+ file://set_initiatorname \
+ file://0001-Include-limit.h-for-PATH_MAX.patch \
+ file://0002-libopeniscsiusr-iface-Set-strncpy-bounds-to-not-over.patch \
+ "
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
+PV .= "+git${SRCPV}"
+
inherit update-rc.d systemd autotools
EXTRA_OECONF = " \