diff options
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 @@ | |||
1 | From 782730a74dd453a3c9bd2b47b79b1797586871fa Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 1 Jun 2018 18:11:34 -0700 | ||
4 | Subject: [PATCH] Include limit.h for PATH_MAX | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | libopeniscsiusr/node.c | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | diff --git a/libopeniscsiusr/node.c b/libopeniscsiusr/node.c | ||
12 | index e82bb0d..3438a8f 100644 | ||
13 | --- a/libopeniscsiusr/node.c | ||
14 | +++ b/libopeniscsiusr/node.c | ||
15 | @@ -29,6 +29,7 @@ | ||
16 | #include <unistd.h> | ||
17 | #include <errno.h> | ||
18 | #include <string.h> | ||
19 | +#include <limits.h> | ||
20 | |||
21 | #include "libopeniscsiusr/libopeniscsiusr.h" | ||
22 | #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 @@ | |||
1 | From cfee58d5863a535b61aa54690ae205b876f57944 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Feb 2018 22:53:29 -0800 | ||
4 | Subject: [PATCH 1/2] libopeniscsiusr: Include limit.h for PATH_MAX | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | libopeniscsiusr/iface.c | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c | ||
12 | index 79898df..a48ef36 100644 | ||
13 | --- a/libopeniscsiusr/iface.c | ||
14 | +++ b/libopeniscsiusr/iface.c | ||
15 | @@ -30,6 +30,7 @@ | ||
16 | #include <netdb.h> | ||
17 | #include <assert.h> | ||
18 | #include <inttypes.h> | ||
19 | +#include <limits.h> | ||
20 | |||
21 | #include "libopeniscsiusr/libopeniscsiusr.h" | ||
22 | #include "misc.h" | ||
23 | -- | ||
24 | 2.16.1 | ||
25 | |||
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 @@ | |||
1 | From 197713ad7e3e944102bbd792e1ab9ec4a67100c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Feb 2018 23:25:21 -0800 | ||
4 | Subject: [PATCH 1/4] qedi.c: Removed unused linux/ethtool.h | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | iscsiuio/src/unix/libs/qedi.c | 1 - | ||
9 | 1 file changed, 1 deletion(-) | ||
10 | |||
11 | diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c | ||
12 | index b81fecd..24cb89a 100644 | ||
13 | --- a/iscsiuio/src/unix/libs/qedi.c | ||
14 | +++ b/iscsiuio/src/unix/libs/qedi.c | ||
15 | @@ -49,7 +49,6 @@ | ||
16 | #include <arpa/inet.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/sockios.h> | ||
19 | -#include <linux/ethtool.h> | ||
20 | #include <linux/netlink.h> | ||
21 | #include <sys/mman.h> | ||
22 | #include <sys/ioctl.h> | ||
23 | -- | ||
24 | 2.16.1 | ||
25 | |||
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 @@ | |||
1 | From 2b39f85dcf020647544002cb0b0e734748391dfb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Feb 2018 23:27:25 -0800 | ||
4 | Subject: [PATCH 2/4] idbm.c: Include fcnl.h for O_RDWR and O_CREAT definitions | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | usr/idbm.c | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | diff --git a/usr/idbm.c b/usr/idbm.c | ||
12 | index 5532202..0a51b85 100644 | ||
13 | --- a/usr/idbm.c | ||
14 | +++ b/usr/idbm.c | ||
15 | @@ -27,6 +27,7 @@ | ||
16 | #include <errno.h> | ||
17 | #include <dirent.h> | ||
18 | #include <limits.h> | ||
19 | +#include <fcntl.h> | ||
20 | #include <sys/stat.h> | ||
21 | #include <sys/file.h> | ||
22 | |||
23 | -- | ||
24 | 2.16.1 | ||
25 | |||
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 @@ | |||
1 | From 29571f71692e28ce9a17d1450097a98492f3b465 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Feb 2018 22:54:04 -0800 | ||
4 | Subject: [PATCH 2/2] libopeniscsiusr: Add CFLAGS to linker cmdline | ||
5 | |||
6 | This will ensure that -fPIC is passed to linker as | ||
7 | well | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | libopeniscsiusr/Makefile | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile | ||
15 | index 8b9b523..4f1d0d6 100644 | ||
16 | --- a/libopeniscsiusr/Makefile | ||
17 | +++ b/libopeniscsiusr/Makefile | ||
18 | @@ -49,7 +49,7 @@ LIBADD = | ||
19 | all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc | ||
20 | |||
21 | $(LIBS): $(OBJS) | ||
22 | - $(CC) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD) | ||
23 | + $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD) | ||
24 | ln -sf $@ $(DEVLIB) | ||
25 | |||
26 | $(LIBS_MAJOR): $(LIBS) | ||
27 | -- | ||
28 | 2.16.1 | ||
29 | |||
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 @@ | |||
1 | From 56a56567d4f334b119e60c4ef0ad87edf7b77609 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 1 Jun 2018 18:46:19 -0700 | ||
4 | Subject: [PATCH] libopeniscsiusr/iface: Set strncpy bounds to not overflow | ||
5 | |||
6 | Fixes warnings found by gcc8 | ||
7 | |||
8 | 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=] | ||
9 | |||
10 | iface.c:140:3: note: in expansion of macro '_strncpy' | ||
11 | _strncpy((*iface)->transport_name, proc_name + strlen("iscsi_"), | ||
12 | ^~~~~~~~ | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | libopeniscsiusr/iface.c | 5 +++-- | ||
17 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c | ||
20 | index 955395d..d33363e 100644 | ||
21 | --- a/libopeniscsiusr/iface.c | ||
22 | +++ b/libopeniscsiusr/iface.c | ||
23 | @@ -138,7 +138,7 @@ int _iscsi_iface_get_from_sysfs(struct iscsi_context *ctx, uint32_t host_id, | ||
24 | |||
25 | if (strncmp(proc_name, "iscsi_", strlen("iscsi_")) == 0) | ||
26 | _strncpy((*iface)->transport_name, proc_name + strlen("iscsi_"), | ||
27 | - sizeof((*iface)->transport_name) / sizeof(char)); | ||
28 | + sizeof((*iface)->transport_name) / sizeof(char) - 1); | ||
29 | else | ||
30 | _strncpy((*iface)->transport_name, proc_name, | ||
31 | sizeof((*iface)->transport_name) / sizeof(char)); | ||
32 | @@ -489,7 +489,8 @@ static int _fill_hw_iface_from_sys(struct iscsi_context *ctx, | ||
33 | |||
34 | sysfs_iface_dir_path = malloc(PATH_MAX); | ||
35 | _alloc_null_check(ctx, sysfs_iface_dir_path, rc, out); | ||
36 | - snprintf(sysfs_iface_dir_path, PATH_MAX, "%s/%s", | ||
37 | + sysfs_iface_dir_path[PATH_MAX+strlen(_ISCSI_SYS_IFACE_DIR)] = '\0'; | ||
38 | + snprintf(sysfs_iface_dir_path, PATH_MAX+strlen(_ISCSI_SYS_IFACE_DIR)+1, "%s/%s", | ||
39 | _ISCSI_SYS_IFACE_DIR, iface_kern_id); | ||
40 | |||
41 | _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 @@ | |||
1 | From 9b7a32903b56ce4d41f264a345ca59a0b00d53b3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Feb 2018 23:28:33 -0800 | ||
4 | Subject: [PATCH 3/4] bnx2x.c: Reorder the includes to avoid duplicate defines | ||
5 | with musl | ||
6 | |||
7 | including nic.h before linux/ethtool.h avoids redefinitions of | ||
8 | eth structs | ||
9 | |||
10 | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/ | ||
11 | usr/include/netinet/if_ether.h:104:8: error: redefinition of 'struct ethhdr' | ||
12 | struct ethhdr { | ||
13 | ^~~~~~ | ||
14 | In file included from /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0. | ||
15 | 876-r0/recipe-sysroot/usr/include/linux/ethtool.h:19:0, | ||
16 | from qedi.c:52: | ||
17 | /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/ | ||
18 | usr/include/linux/if_ether.h:154:8: note: originally defined here | ||
19 | struct ethhdr { | ||
20 | ^~~~~~ | ||
21 | |||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
23 | --- | ||
24 | iscsiuio/src/unix/libs/bnx2x.c | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c | ||
28 | index 3df6d5f..62530d1 100644 | ||
29 | --- a/iscsiuio/src/unix/libs/bnx2x.c | ||
30 | +++ b/iscsiuio/src/unix/libs/bnx2x.c | ||
31 | @@ -36,6 +36,7 @@ | ||
32 | * bnx2x.c - bnx2x user space driver | ||
33 | * | ||
34 | */ | ||
35 | +#include "nic.h" | ||
36 | #include <errno.h> | ||
37 | #include <stdio.h> | ||
38 | #include <string.h> | ||
39 | @@ -58,7 +59,6 @@ | ||
40 | #include "bnx2x.h" | ||
41 | #include "cnic.h" | ||
42 | #include "logger.h" | ||
43 | -#include "nic.h" | ||
44 | #include "nic_id.h" | ||
45 | #include "nic_utils.h" | ||
46 | #include "options.h" | ||
47 | -- | ||
48 | 2.16.1 | ||
49 | |||
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 @@ | |||
1 | From 6f9c1a04d250388d1574cfaf20a1ff66a64beb48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Feb 2018 23:42:12 -0800 | ||
4 | Subject: [PATCH 4/4] fwparam_ppc.c: Do not use __compar_fn_t | ||
5 | |||
6 | __compar_fn_t is not defined in musl | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | utils/fwparam_ibft/fwparam_ppc.c | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/utils/fwparam_ibft/fwparam_ppc.c b/utils/fwparam_ibft/fwparam_ppc.c | ||
14 | index c298b8c..391faa2 100644 | ||
15 | --- a/utils/fwparam_ibft/fwparam_ppc.c | ||
16 | +++ b/utils/fwparam_ibft/fwparam_ppc.c | ||
17 | @@ -356,7 +356,7 @@ static int loop_devs(const char *devtree) | ||
18 | * Sort the nics into "natural" order. The proc fs | ||
19 | * device-tree has them in somewhat random, or reversed order. | ||
20 | */ | ||
21 | - qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp); | ||
22 | + qsort(niclist, nic_count, sizeof(char *), nic_cmp); | ||
23 | |||
24 | snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases"); | ||
25 | dev_count = 0; | ||
26 | -- | ||
27 | 2.16.1 | ||
28 | |||
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" | |||
11 | 11 | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" |
13 | 13 | ||
14 | SRCREV ?= "24580adc4c174bbc5dde3ae7594a46d57635e906" | 14 | SRCREV ?= "0cfebb10d29382ac1058c950a60a946c28b01e53" |
15 | 15 | ||
16 | SRC_URI = "git://github.com/open-iscsi/open-iscsi \ | 16 | SRC_URI = "git://github.com/open-iscsi/open-iscsi \ |
17 | file://initd.debian \ | 17 | file://initd.debian \ |
18 | file://99_iscsi-initiator-utils \ | 18 | file://99_iscsi-initiator-utils \ |
19 | file://iscsi-initiator \ | 19 | file://iscsi-initiator \ |
20 | file://iscsi-initiator.service \ | 20 | file://iscsi-initiator.service \ |
21 | file://iscsi-initiator-targets.service \ | 21 | file://iscsi-initiator-targets.service \ |
22 | file://set_initiatorname \ | 22 | file://set_initiatorname \ |
23 | file://0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch \ | 23 | file://0001-Include-limit.h-for-PATH_MAX.patch \ |
24 | file://0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch \ | 24 | file://0002-libopeniscsiusr-iface-Set-strncpy-bounds-to-not-over.patch \ |
25 | file://0001-qedi.c-Removed-unused-linux-ethtool.h.patch \ | 25 | " |
26 | file://0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch \ | ||
27 | file://0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch \ | ||
28 | file://0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch \ | ||
29 | " | ||
30 | S = "${WORKDIR}/git" | 26 | S = "${WORKDIR}/git" |
31 | B = "${WORKDIR}/build" | 27 | B = "${WORKDIR}/build" |
32 | 28 | ||
29 | PV .= "+git${SRCPV}" | ||
30 | |||
33 | inherit update-rc.d systemd autotools | 31 | inherit update-rc.d systemd autotools |
34 | 32 | ||
35 | EXTRA_OECONF = " \ | 33 | EXTRA_OECONF = " \ |