summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMingli Yu <Mingli.Yu@windriver.com>2018-11-21 23:49:49 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-23 23:35:18 +0000
commit55d59d3f6dfaab5de9995f7ffc1a65196aadc019 (patch)
tree6f5cfbc1366ed935e2efc9e894b1eef14c637229 /meta
parentc4f4c5347c7f1300f30deee11072be09f22aee3d (diff)
downloadpoky-55d59d3f6dfaab5de9995f7ffc1a65196aadc019.tar.gz
mdadm: Upgrade to 4.1
* Remove 5 backported patches * Refresh patches to remove fuzz warnings (From OE-Core rev: a455616df65f1e9dac5e283a9cda047868465d23) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch74
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch21
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch11
-rw-r--r--meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch10
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch37
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch12
-rw-r--r--meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch31
-rw-r--r--meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch75
-rw-r--r--meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch59
-rw-r--r--meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch33
-rw-r--r--meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch36
-rw-r--r--meta/recipes-extended/mdadm/files/gcc-4.9.patch19
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch22
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch10
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.1.bb (renamed from meta/recipes-extended/mdadm/mdadm_4.0.bb)9
15 files changed, 105 insertions, 354 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch b/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
index 739652cd55..361d53ca6c 100644
--- a/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
+++ b/meta/recipes-extended/mdadm/files/0001-Disable-gcc8-warnings.patch
@@ -1,4 +1,4 @@
1From b83218de2623c0bbe9af355a81ae8385d7f30cfc Mon Sep 17 00:00:00 2001 1From a6c991750ae6ebd87a0b9b243bec7fd8e5a064c5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 May 2018 12:56:41 -0700 3Date: Wed, 9 May 2018 12:56:41 -0700
4Subject: [PATCH] Disable gcc8 warnings 4Subject: [PATCH] Disable gcc8 warnings
@@ -23,28 +23,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
23 mdopen.c | 4 ++++ 23 mdopen.c | 4 ++++
24 super-ddf.c | 4 ++++ 24 super-ddf.c | 4 ++++
25 super-intel.c | 6 ++++++ 25 super-intel.c | 6 ++++++
26 super1.c | 5 +++++
27 super0.c | 2 +- 26 super0.c | 2 +-
28 6 files changed, 22 insertions(+), 1 deletion(-) 27 super1.c | 5 +++++
28 6 files changed, 23 insertions(+), 2 deletions(-)
29 29
30diff --git a/super0.c b/super0.c
31index f5b4507..264b598 100644
32--- a/super0.c
33+++ b/super0.c
34@@ -231,7 +231,7 @@
35 d++) {
36 mdp_disk_t *dp;
37 char *dv;
38- char nb[11];
39+ char nb[12];
40 int wonly, failfast;
41 if (d>=0) dp = &sb->disks[d];
42 else dp = &sb->this_disk;
43diff --git a/Monitor.c b/Monitor.c 30diff --git a/Monitor.c b/Monitor.c
44index 802a9d9..23b246b 100644 31index 036103f..08cbd0a 100644
45--- a/Monitor.c 32--- a/Monitor.c
46+++ b/Monitor.c 33+++ b/Monitor.c
47@@ -441,7 +441,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info) 34@@ -445,7 +445,8 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info)
48 event, dev); 35 event, dev);
49 } 36 }
50 } 37 }
@@ -54,16 +41,16 @@ index 802a9d9..23b246b 100644
54 static int check_array(struct state *st, struct mdstat_ent *mdstat, 41 static int check_array(struct state *st, struct mdstat_ent *mdstat,
55 int test, struct alert_info *ainfo, 42 int test, struct alert_info *ainfo,
56 int increments, char *prefer) 43 int increments, char *prefer)
57@@ -683,6 +684,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat, 44@@ -673,6 +674,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
58 return 1; 45 st->err++;
59 return 0; 46 goto out;
60 } 47 }
61+#pragma GCC diagnostic pop 48+#pragma GCC diagnostic pop
62 49
63 static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist, 50 static int add_new_arrays(struct mdstat_ent *mdstat, struct state **statelist,
64 int test, struct alert_info *info) 51 int test, struct alert_info *info)
65diff --git a/mdopen.c b/mdopen.c 52diff --git a/mdopen.c b/mdopen.c
66index 685ca32..406aba4 100644 53index 98c54e4..4f72b69 100644
67--- a/mdopen.c 54--- a/mdopen.c
68+++ b/mdopen.c 55+++ b/mdopen.c
69@@ -26,6 +26,9 @@ 56@@ -26,6 +26,9 @@
@@ -76,19 +63,19 @@ index 685ca32..406aba4 100644
76 void make_parts(char *dev, int cnt) 63 void make_parts(char *dev, int cnt)
77 { 64 {
78 /* make 'cnt' partition devices for 'dev' 65 /* make 'cnt' partition devices for 'dev'
79@@ -99,6 +102,7 @@ void make_parts(char *dev, int cnt) 66@@ -101,6 +104,7 @@ void make_parts(char *dev, int cnt)
80 } 67 }
81 free(name); 68 free(name);
82 } 69 }
83+#pragma GCC diagnostic pop 70+#pragma GCC diagnostic pop
84 71
85 /* 72 int create_named_array(char *devnm)
86 * We need a new md device to assemble/build/create an array. 73 {
87diff --git a/super-ddf.c b/super-ddf.c 74diff --git a/super-ddf.c b/super-ddf.c
88index 1707ad1..e08d289 100644 75index 618542c..6ed4e7e 100644
89--- a/super-ddf.c 76--- a/super-ddf.c
90+++ b/super-ddf.c 77+++ b/super-ddf.c
91@@ -2846,6 +2846,9 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl) 78@@ -2828,6 +2828,9 @@ static void _set_config_size(struct phys_disk_entry *pde, const struct dl *dl)
92 (unsigned long long)cfs, (unsigned long long)(dl->size-cfs)); 79 (unsigned long long)cfs, (unsigned long long)(dl->size-cfs));
93 } 80 }
94 81
@@ -98,7 +85,7 @@ index 1707ad1..e08d289 100644
98 /* Add a device to a container, either while creating it or while 85 /* Add a device to a container, either while creating it or while
99 * expanding a pre-existing container 86 * expanding a pre-existing container
100 */ 87 */
101@@ -2981,6 +2984,7 @@ static int add_to_super_ddf(struct supertype *st, 88@@ -2964,6 +2967,7 @@ static int add_to_super_ddf(struct supertype *st,
102 89
103 return 0; 90 return 0;
104 } 91 }
@@ -107,10 +94,10 @@ index 1707ad1..e08d289 100644
107 static int remove_from_super_ddf(struct supertype *st, mdu_disk_info_t *dk) 94 static int remove_from_super_ddf(struct supertype *st, mdu_disk_info_t *dk)
108 { 95 {
109diff --git a/super-intel.c b/super-intel.c 96diff --git a/super-intel.c b/super-intel.c
110index 00a2925..44fbead 100644 97index 1bc4b80..39d0e92 100644
111--- a/super-intel.c 98--- a/super-intel.c
112+++ b/super-intel.c 99+++ b/super-intel.c
113@@ -298,6 +298,11 @@ struct md_list { 100@@ -333,6 +333,11 @@ struct md_list {
114 }; 101 };
115 102
116 #define pr_vrb(fmt, arg...) (void) (verbose && pr_err(fmt, ##arg)) 103 #define pr_vrb(fmt, arg...) (void) (verbose && pr_err(fmt, ##arg))
@@ -122,16 +109,29 @@ index 00a2925..44fbead 100644
122 109
123 static __u8 migr_type(struct imsm_dev *dev) 110 static __u8 migr_type(struct imsm_dev *dev)
124 { 111 {
125@@ -11618,3 +11623,4 @@ struct superswitch super_imsm = { 112@@ -12208,3 +12213,4 @@ struct superswitch super_imsm = {
113 .clear_bad_block = imsm_clear_badblock,
126 .get_bad_blocks = imsm_get_badblocks, 114 .get_bad_blocks = imsm_get_badblocks,
127 #endif /* MDASSEMBLE */
128 }; 115 };
129+#pragma GCC diagnostic pop 116+#pragma GCC diagnostic pop
117diff --git a/super0.c b/super0.c
118index 42989b9..f5e8031 100644
119--- a/super0.c
120+++ b/super0.c
121@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost)
122 d++) {
123 mdp_disk_t *dp;
124 char *dv;
125- char nb[11];
126+ char nb[12];
127 int wonly, failfast;
128 if (d>=0) dp = &sb->disks[d];
129 else dp = &sb->this_disk;
130diff --git a/super1.c b/super1.c 130diff --git a/super1.c b/super1.c
131index 87a74cb..71c515f 100644 131index 636a286..f894cbb 100644
132--- a/super1.c 132--- a/super1.c
133+++ b/super1.c 133+++ b/super1.c
134@@ -1091,6 +1091,10 @@ static struct mdinfo *container_content1(struct supertype *st, char *subarray) 134@@ -1176,6 +1176,10 @@ static struct mdinfo *container_content1(struct supertype *st, char *subarray)
135 return info; 135 return info;
136 } 136 }
137 137
@@ -140,9 +140,9 @@ index 87a74cb..71c515f 100644
140+# pragma GCC diagnostic ignored "-Wstringop-truncation" 140+# pragma GCC diagnostic ignored "-Wstringop-truncation"
141+#endif 141+#endif
142 static int update_super1(struct supertype *st, struct mdinfo *info, 142 static int update_super1(struct supertype *st, struct mdinfo *info,
143 char *update, 143 char *update, char *devname, int verbose,
144 char *devname, int verbose, 144 int uuid_set, char *homehost)
145@@ -1473,6 +1477,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info, 145@@ -1641,6 +1645,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info,
146 146
147 return 1; 147 return 1;
148 } 148 }
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
index a89161404d..298f276cd6 100644
--- a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
+++ b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
@@ -1,4 +1,4 @@
1From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001 1From a9166bf422da1001bac9cc819386bf39b7cd1b73 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com> 2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Tue, 9 Feb 2016 11:44:01 +0200 3Date: Tue, 9 Feb 2016 11:44:01 +0200
4Subject: [PATCH] Fix the path of corosync and dlm header files check 4Subject: [PATCH] Fix the path of corosync and dlm header files check
@@ -9,28 +9,18 @@ Fix it.
9Upstream-Status: Inappropriate [Yocto specific] 9Upstream-Status: Inappropriate [Yocto specific]
10 10
11Signed-off-by: Maxin B. John <maxin.john@intel.com> 11Signed-off-by: Maxin B. John <maxin.john@intel.com>
12---
13mdadm only works with corosync 2.x which provides header file corosync/cmap.h.
14If build mdadm with corosync 1.x, it fails with:
15
16| member.c:12:27: fatal error: corosync/cmap.h: No such file or directory
17| #include <corosync/cmap.h>
18| ^
19 12
20Build with corosync only header file corosync/cmap.h exists.
21
22Signed-off-by: Kai Kang <kai.kang@windriver.com>
23--- 13---
24 Makefile | 4 ++-- 14 Makefile | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-) 15 1 file changed, 2 insertions(+), 2 deletions(-)
26 16
27diff --git a/Makefile b/Makefile 17diff --git a/Makefile b/Makefile
28index fd79cfb..34150a9 100644 18index 2767ac6..46bf57b 100644
29--- a/Makefile 19--- a/Makefile
30+++ b/Makefile 20+++ b/Makefile
31@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR) 21@@ -91,8 +91,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
32 FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
33 SYSTEMD_DIR=/lib/systemd/system 22 SYSTEMD_DIR=/lib/systemd/system
23 LIB_DIR=/usr/libexec/mdadm
34 24
35-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) 25-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
36-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM) 26-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
@@ -39,6 +29,3 @@ index fd79cfb..34150a9 100644
39 29
40 DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" 30 DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
41 DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" 31 DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
42--
432.4.0
44
diff --git a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
index a4b7b8acd3..72368cb17b 100644
--- a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
+++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
@@ -1,4 +1,4 @@
1From a129ee6d80f3b2cda0d827c35fa81a517cf6d505 Mon Sep 17 00:00:00 2001 1From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Oct 2017 10:27:34 -0700 3Date: Fri, 13 Oct 2017 10:27:34 -0700
4Subject: [PATCH] Use CC to check for implicit-fallthrough warning support 4Subject: [PATCH] Use CC to check for implicit-fallthrough warning support
@@ -8,16 +8,16 @@ its possible that build host gcc is version 7+ but the
8cross compile used for compiling mdadm is < version 7 8cross compile used for compiling mdadm is < version 7
9 9
10Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
11--- 12---
12Upstream-Status: Pending
13 Makefile | 2 +- 13 Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16diff --git a/Makefile b/Makefile 16diff --git a/Makefile b/Makefile
17index d207ee4..971f255 100644 17index 46bf57b..a075912 100644
18--- a/Makefile 18--- a/Makefile
19+++ b/Makefile 19+++ b/Makefile
20@@ -48,7 +48,7 @@ ifdef WARN_UNUSED 20@@ -53,7 +53,7 @@ ifdef WARN_UNUSED
21 CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 21 CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
22 endif 22 endif
23 23
@@ -26,6 +26,3 @@ index d207ee4..971f255 100644
26 ifneq "$(FALLTHROUGH)" "0" 26 ifneq "$(FALLTHROUGH)" "0"
27 CWFLAGS += -Wimplicit-fallthrough=0 27 CWFLAGS += -Wimplicit-fallthrough=0
28 endif 28 endif
29--
302.14.2
31
diff --git a/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch b/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch
index acd64ada22..bdedbb2d98 100644
--- a/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch
+++ b/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch
@@ -1,4 +1,4 @@
1From 943616e5dffb79f307e4bd9b249d316212998750 Mon Sep 17 00:00:00 2001 1From 714f2262960a7fe9e8f973629ed214023e144590 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 18 Dec 2016 08:30:51 +0000 3Date: Sun, 18 Dec 2016 08:30:51 +0000
4Subject: [PATCH] include <sys/sysmacros.h> for major/minor defintions 4Subject: [PATCH] include <sys/sysmacros.h> for major/minor defintions
@@ -25,14 +25,13 @@ Fixes
25| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 26
27Signed-off-by: Khem Raj <raj.khem@gmail.com> 27Signed-off-by: Khem Raj <raj.khem@gmail.com>
28---
29Upstream-Status: Pending
30 28
29---
31 mdadm.h | 1 + 30 mdadm.h | 1 +
32 1 file changed, 1 insertion(+) 31 1 file changed, 1 insertion(+)
33 32
34diff --git a/mdadm.h b/mdadm.h 33diff --git a/mdadm.h b/mdadm.h
35index 8c8f4d1..3ce13b5 100755 34index bb943bf..79c44c6 100644
36--- a/mdadm.h 35--- a/mdadm.h
37+++ b/mdadm.h 36+++ b/mdadm.h
38@@ -34,6 +34,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); 37@@ -34,6 +34,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
@@ -43,6 +42,3 @@ index 8c8f4d1..3ce13b5 100755
43 #include <sys/stat.h> 42 #include <sys/stat.h>
44 #include <stdint.h> 43 #include <stdint.h>
45 #include <stdlib.h> 44 #include <stdlib.h>
46--
471.9.1
48
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch
deleted file mode 100644
index ce15170c75..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From aa09af0fe2ec0737fa04ffd00957532684e257b9 Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Fri, 17 Mar 2017 19:55:42 +0800
4Subject: [PATCH 1/5] mdadm: Add Wimplicit-fallthrough=0 in Makefile
5
6There are many errors like 'error: this statement may fall through'.
7But the logic is right. So add the flag Wimplicit-fallthrough=0
8to disable the error messages. The method I use is from
9https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
10#index-Wimplicit-fallthrough-375
11
12Signed-off-by: Xiao Ni <xni@redhat.com>
13Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
14---
15Upstream-Status: Backport
16 Makefile | 5 +++++
17 1 file changed, 5 insertions(+)
18
19diff --git a/Makefile b/Makefile
20index 0f307ec..e1a7058 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -48,6 +48,11 @@ ifdef WARN_UNUSED
24 CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
25 endif
26
27+FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l)
28+ifneq "$(FALLTHROUGH)" "0"
29+CWFLAGS += -Wimplicit-fallthrough=0
30+endif
31+
32 ifdef DEBIAN
33 CPPFLAGS += -DDEBIAN
34 endif
35--
362.12.2
37
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
index 4cf809290d..e10905c63b 100644
--- a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
+++ b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
@@ -1,4 +1,4 @@
1From 6d369e8f226594632ce4260129509daf7030de0a Mon Sep 17 00:00:00 2001 1From b431cb4e1ed060122fa300dc0008f74080d38f73 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 9 May 2016 22:03:57 +0000 3Date: Mon, 9 May 2016 22:03:57 +0000
4Subject: [PATCH] mdadm.h: Undefine dprintf before redefining 4Subject: [PATCH] mdadm.h: Undefine dprintf before redefining
@@ -14,17 +14,16 @@ In file included from policy.c:25:
14/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here 14/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here
15 15
16Signed-off-by: Khem Raj <raj.khem@gmail.com> 16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18Upstream-Status: Pending
19 17
18---
20 mdadm.h | 2 ++ 19 mdadm.h | 2 ++
21 1 file changed, 2 insertions(+) 20 1 file changed, 2 insertions(+)
22 21
23diff --git a/mdadm.h b/mdadm.h 22diff --git a/mdadm.h b/mdadm.h
24index 230e60f..8c8f4d1 100755 23index 387e681..bb943bf 100644
25--- a/mdadm.h 24--- a/mdadm.h
26+++ b/mdadm.h 25+++ b/mdadm.h
27@@ -1554,11 +1554,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) 26@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container)
28 } 27 }
29 28
30 #ifdef DEBUG 29 #ifdef DEBUG
@@ -38,6 +37,3 @@ index 230e60f..8c8f4d1 100755
38 #define dprintf(fmt, arg...) \ 37 #define dprintf(fmt, arg...) \
39 ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; }) 38 ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; })
40 #define dprintf_cont(fmt, arg...) \ 39 #define dprintf_cont(fmt, arg...) \
41--
421.9.1
43
diff --git a/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch b/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch
deleted file mode 100644
index 44351b6569..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From ab18f04cf89ef4e8521c81c50477e1363b2d333b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 28 Apr 2018 09:46:12 -0700
4Subject: [PATCH] use memmove instead of memcpy on overlapping region
5
6Fixes
7super0.c:526:3: error: 'memcpy' accessing 3936 bytes at offsets 156 and 160 overlaps 3932 bytes at offset 160 [-Werror=restrict]
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 super0.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/super0.c b/super0.c
17index f5b4507..264b598 100644
18--- a/super0.c
19+++ b/super0.c
20@@ -523,7 +523,7 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
21 * up 4 bytes before continuing
22 */
23 __u32 *sb32 = (__u32*)sb;
24- memcpy(sb32+MD_SB_GENERIC_CONSTANT_WORDS+7,
25+ memmove(sb32+MD_SB_GENERIC_CONSTANT_WORDS+7,
26 sb32+MD_SB_GENERIC_CONSTANT_WORDS+7+1,
27 (MD_SB_WORDS - (MD_SB_GENERIC_CONSTANT_WORDS+7+1))*4);
28 if (verbose >= 0)
29--
302.17.0
31
diff --git a/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch b/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch
deleted file mode 100644
index cbce053a3a..0000000000
--- a/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1From bb4df273041ba206008bdb0ada75ccd97c29f623 Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Fri, 17 Mar 2017 19:55:43 +0800
4Subject: [PATCH 2/5] mdadm: Specify enough length when write to buffer
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9In Detail.c the buffer path in function Detail is defined as path[200],
10in fact the max lenth of content which needs to write to the buffer is
11287. Because the length of dname of struct dirent is 255.
12During building it reports error:
13error: ‘%s’ directive writing up to 255 bytes into a region of size 189
14[-Werror=format-overflow=]
15
16In function examine_super0 there is a buffer nb with length 5.
17But it need to show a int type argument. The lenght of max
18number of int is 10. So the buffer length should be 11.
19
20In human_size function the length of buf is 30. During building
21there is a error:
22output between 20 and 47 bytes into a destination of size 30.
23Change the length to 47.
24
25Signed-off-by: Xiao Ni <xni@redhat.com>
26Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
27---
28Upstream-Status: Backport
29 Detail.c | 2 +-
30 super0.c | 2 +-
31 util.c | 2 +-
32 3 files changed, 3 insertions(+), 3 deletions(-)
33
34diff --git a/Detail.c b/Detail.c
35index 509b0d4..cb33794 100644
36--- a/Detail.c
37+++ b/Detail.c
38@@ -575,7 +575,7 @@ This is pretty boring
39 printf(" Member Arrays :");
40
41 while (dir && (de = readdir(dir)) != NULL) {
42- char path[200];
43+ char path[287];
44 char vbuf[1024];
45 int nlen = strlen(sra->sys_name);
46 dev_t devid;
47diff --git a/super0.c b/super0.c
48index 938cfd9..f5b4507 100644
49--- a/super0.c
50+++ b/super0.c
51@@ -231,7 +231,7 @@ static void examine_super0(struct supertype *st, char *homehost)
52 d++) {
53 mdp_disk_t *dp;
54 char *dv;
55- char nb[5];
56+ char nb[11];
57 int wonly, failfast;
58 if (d>=0) dp = &sb->disks[d];
59 else dp = &sb->this_disk;
60diff --git a/util.c b/util.c
61index f100972..32bd909 100644
62--- a/util.c
63+++ b/util.c
64@@ -811,7 +811,7 @@ unsigned long calc_csum(void *super, int bytes)
65 #ifndef MDASSEMBLE
66 char *human_size(long long bytes)
67 {
68- static char buf[30];
69+ static char buf[47];
70
71 /* We convert bytes to either centi-M{ega,ibi}bytes or
72 * centi-G{igi,ibi}bytes, with appropriate rounding,
73--
742.12.2
75
diff --git a/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch b/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch
deleted file mode 100644
index dcec84ffcd..0000000000
--- a/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From bc87af1314325b00c6ac002a60a2b0f0caa81e34 Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Sat, 18 Mar 2017 10:33:44 +0800
4Subject: [PATCH 3/5] Replace snprintf with strncpy at some places to avoid
5 truncation
6
7In gcc7 there are some building errors like:
8directive output may be truncated writing up to 31 bytes into a region of size 24
9snprintf(str, MPB_SIG_LEN, %s, mpb->sig);
10
11It just need to copy one string to target. So use strncpy to replace it.
12
13For this line code: snprintf(str, MPB_SIG_LEN, %s, mpb->sig);
14Because mpb->sig has the content of version after magic, so
15it's better to use strncpy to replace snprintf too.
16
17Signed-off-by: Xiao Ni <xni@redhat.com>
18Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
19---
20Upstream-Status: Backport
21 super-intel.c | 9 ++++++---
22 1 file changed, 6 insertions(+), 3 deletions(-)
23
24diff --git a/super-intel.c b/super-intel.c
25index 57c7e75..5499098 100644
26--- a/super-intel.c
27+++ b/super-intel.c
28@@ -1811,7 +1811,8 @@ static void examine_super_imsm(struct supertype *st, char *homehost)
29 __u32 reserved = imsm_reserved_sectors(super, super->disks);
30 struct dl *dl;
31
32- snprintf(str, MPB_SIG_LEN, "%s", mpb->sig);
33+ strncpy(str, (char *)mpb->sig, MPB_SIG_LEN);
34+ str[MPB_SIG_LEN-1] = '\0';
35 printf(" Magic : %s\n", str);
36 snprintf(str, strlen(MPB_VERSION_RAID0), "%s", get_imsm_version(mpb));
37 printf(" Version : %s\n", get_imsm_version(mpb));
38@@ -7142,14 +7143,16 @@ static int update_subarray_imsm(struct supertype *st, char *subarray,
39
40 u->type = update_rename_array;
41 u->dev_idx = vol;
42- snprintf((char *) u->name, MAX_RAID_SERIAL_LEN, "%s", name);
43+ strncpy((char *) u->name, name, MAX_RAID_SERIAL_LEN);
44+ u->name[MAX_RAID_SERIAL_LEN-1] = '\0';
45 append_metadata_update(st, u, sizeof(*u));
46 } else {
47 struct imsm_dev *dev;
48 int i;
49
50 dev = get_imsm_dev(super, vol);
51- snprintf((char *) dev->volume, MAX_RAID_SERIAL_LEN, "%s", name);
52+ strncpy((char *) dev->volume, name, MAX_RAID_SERIAL_LEN);
53+ dev->volume[MAX_RAID_SERIAL_LEN-1] = '\0';
54 for (i = 0; i < mpb->num_raid_devs; i++) {
55 dev = get_imsm_dev(super, i);
56 handle_missing(super, dev);
57--
582.12.2
59
diff --git a/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch b/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch
deleted file mode 100644
index 94fde42e99..0000000000
--- a/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 5da889032e2d99751ed9fe60016146e9ae8114cd Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Sat, 18 Mar 2017 10:33:45 +0800
4Subject: [PATCH 4/5] mdadm: Forced type conversion to avoid truncation
5
6Gcc reports it needs 19 bytes to right to disk->serial. Because the
7type of argument i is int. But the meaning of i is failed disk
8number. So it doesn't need to use 19 bytes. Just add a type
9conversion to avoid this building error
10
11Signed-off-by: Xiao Ni <xni@redhat.com>
12Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
13---
14Upstream-Status: Backport
15 super-intel.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/super-intel.c b/super-intel.c
19index 5499098..4e466ff 100644
20--- a/super-intel.c
21+++ b/super-intel.c
22@@ -5228,7 +5228,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
23 disk->status = CONFIGURED_DISK | FAILED_DISK;
24 disk->scsi_id = __cpu_to_le32(~(__u32)0);
25 snprintf((char *) disk->serial, MAX_RAID_SERIAL_LEN,
26- "missing:%d", i);
27+ "missing:%d", (__u8)i);
28 }
29 find_missing(super);
30 } else {
31--
322.12.2
33
diff --git a/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch b/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
index 3d9d3b9044..d279fddfb6 100644
--- a/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
+++ b/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
@@ -1,7 +1,7 @@
1From 09014233bf10900f7bd8390b3b64ff82bca45222 Mon Sep 17 00:00:00 2001 1From 0c2c8ae6b3a1fb0f611f9795953a7a6ed06be38d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Apr 2017 12:04:15 -0700 3Date: Wed, 19 Apr 2017 12:04:15 -0700
4Subject: [PATCH 5/5] Add a comment to indicate valid fallthrough 4Subject: [PATCH] Add a comment to indicate valid fallthrough
5 5
6gcc7 warns about code with fallthroughs, this patch adds 6gcc7 warns about code with fallthroughs, this patch adds
7the comment to indicate a valid fallthrough, helps gcc7 7the comment to indicate a valid fallthrough, helps gcc7
@@ -10,9 +10,8 @@ compiler warnings
10This works in cross and native compilation case 10This works in cross and native compilation case
11 11
12Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14Upstream-Status: Submitted
15 13
14---
16 Grow.c | 4 ++++ 15 Grow.c | 4 ++++
17 bitmap.c | 8 ++++++++ 16 bitmap.c | 8 ++++++++
18 mdadm.c | 2 ++ 17 mdadm.c | 2 ++
@@ -21,10 +20,10 @@ Upstream-Status: Submitted
21 5 files changed, 16 insertions(+) 20 5 files changed, 16 insertions(+)
22 21
23diff --git a/Grow.c b/Grow.c 22diff --git a/Grow.c b/Grow.c
24index 455c5f9..27c73b1 100755 23index 4436a4d..b3116e2 100644
25--- a/Grow.c 24--- a/Grow.c
26+++ b/Grow.c 25+++ b/Grow.c
27@@ -1257,6 +1257,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) 26@@ -1447,6 +1447,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
28 switch (info->new_level) { 27 switch (info->new_level) {
29 case 4: 28 case 4:
30 delta_parity = 1; 29 delta_parity = 1;
@@ -32,7 +31,7 @@ index 455c5f9..27c73b1 100755
32 case 0: 31 case 0:
33 re->level = 4; 32 re->level = 4;
34 re->before.layout = 0; 33 re->before.layout = 0;
35@@ -1284,10 +1285,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) 34@@ -1474,10 +1475,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
36 35
37 case 4: 36 case 4:
38 info->array.layout = ALGORITHM_PARITY_N; 37 info->array.layout = ALGORITHM_PARITY_N;
@@ -45,7 +44,7 @@ index 455c5f9..27c73b1 100755
45 case 4: 44 case 4:
46 re->level = info->array.level; 45 re->level = info->array.level;
47 re->before.data_disks = info->array.raid_disks - 1; 46 re->before.data_disks = info->array.raid_disks - 1;
48@@ -1343,6 +1346,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) 47@@ -1533,6 +1536,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
49 case 4: 48 case 4:
50 case 5: 49 case 5:
51 delta_parity = -1; 50 delta_parity = -1;
@@ -54,7 +53,7 @@ index 455c5f9..27c73b1 100755
54 re->level = 6; 53 re->level = 6;
55 re->before.data_disks = info->array.raid_disks - 2; 54 re->before.data_disks = info->array.raid_disks - 2;
56diff --git a/bitmap.c b/bitmap.c 55diff --git a/bitmap.c b/bitmap.c
57index ccedfd3..a6ff091 100644 56index e38cb96..10af328 100644
58--- a/bitmap.c 57--- a/bitmap.c
59+++ b/bitmap.c 58+++ b/bitmap.c
60@@ -82,13 +82,21 @@ static inline int count_dirty_bits_byte(char byte, int num_bits) 59@@ -82,13 +82,21 @@ static inline int count_dirty_bits_byte(char byte, int num_bits)
@@ -80,10 +79,10 @@ index ccedfd3..a6ff091 100644
80 } 79 }
81 80
82diff --git a/mdadm.c b/mdadm.c 81diff --git a/mdadm.c b/mdadm.c
83index c3a265b..2d06d3b 100644 82index 25a1abd..9843bc5 100644
84--- a/mdadm.c 83--- a/mdadm.c
85+++ b/mdadm.c 84+++ b/mdadm.c
86@@ -148,6 +148,7 @@ int main(int argc, char *argv[]) 85@@ -155,6 +155,7 @@ int main(int argc, char *argv[])
87 mode == CREATE || mode == GROW || 86 mode == CREATE || mode == GROW ||
88 mode == INCREMENTAL || mode == MANAGE) 87 mode == INCREMENTAL || mode == MANAGE)
89 break; /* b means bitmap */ 88 break; /* b means bitmap */
@@ -91,7 +90,7 @@ index c3a265b..2d06d3b 100644
91 case Brief: 90 case Brief:
92 c.brief = 1; 91 c.brief = 1;
93 continue; 92 continue;
94@@ -828,6 +829,7 @@ int main(int argc, char *argv[]) 93@@ -839,6 +840,7 @@ int main(int argc, char *argv[])
95 94
96 case O(INCREMENTAL,NoDegraded): 95 case O(INCREMENTAL,NoDegraded):
97 pr_err("--no-degraded is deprecated in Incremental mode\n"); 96 pr_err("--no-degraded is deprecated in Incremental mode\n");
@@ -100,11 +99,11 @@ index c3a265b..2d06d3b 100644
100 c.runstop = -1; /* --stop isn't allowed for --assemble, 99 c.runstop = -1; /* --stop isn't allowed for --assemble,
101 * so we overload slightly */ 100 * so we overload slightly */
102diff --git a/super-intel.c b/super-intel.c 101diff --git a/super-intel.c b/super-intel.c
103index 4e466ff..00a2925 100644 102index e726987..1bc4b80 100644
104--- a/super-intel.c 103--- a/super-intel.c
105+++ b/super-intel.c 104+++ b/super-intel.c
106@@ -3271,6 +3271,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info, 105@@ -3425,6 +3425,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
107 << SECT_PER_MB_SHIFT; 106
108 } 107 }
109 } 108 }
110+ /* fallthrough */ 109+ /* fallthrough */
@@ -112,10 +111,10 @@ index 4e466ff..00a2925 100644
112 /* we could emulate the checkpointing of 111 /* we could emulate the checkpointing of
113 * 'sync_action=check' migrations, but for now 112 * 'sync_action=check' migrations, but for now
114diff --git a/util.c b/util.c 113diff --git a/util.c b/util.c
115index 32bd909..f2a4d19 100644 114index c26cf5f..61cbe23 100644
116--- a/util.c 115--- a/util.c
117+++ b/util.c 116+++ b/util.c
118@@ -335,6 +335,7 @@ unsigned long long parse_size(char *size) 117@@ -400,6 +400,7 @@ unsigned long long parse_size(char *size)
119 switch (*c) { 118 switch (*c) {
120 case 'K': 119 case 'K':
121 c++; 120 c++;
@@ -123,6 +122,3 @@ index 32bd909..f2a4d19 100644
123 default: 122 default:
124 s *= 2; 123 s *= 2;
125 break; 124 break;
126--
1272.12.2
128
diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch
index df21399deb..473fd7821b 100644
--- a/meta/recipes-extended/mdadm/files/gcc-4.9.patch
+++ b/meta/recipes-extended/mdadm/files/gcc-4.9.patch
@@ -1,3 +1,8 @@
1From 8804bca3de1b79a7c579783b7e3a7603f43bbb48 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 2 May 2014 16:31:17 -0700
4Subject: [PATCH] mdadm: Fix build on gcc 4.9
5
1super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value] 6super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
2 snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, 7 snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
3 ^ 8 ^
@@ -7,11 +12,15 @@ make: *** [super-intel.o] Error 1
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Upstream-Status: Pending 13Upstream-Status: Pending
9 14
10Index: mdadm-4.0/super-intel.c 15---
11=================================================================== 16 super-intel.c | 2 +-
12--- mdadm-4.0.orig/super-intel.c 17 1 file changed, 1 insertion(+), 1 deletion(-)
13+++ mdadm-4.0/super-intel.c 18
14@@ -5725,7 +5725,7 @@ static int write_super_imsm_spares(struc 19diff --git a/super-intel.c b/super-intel.c
20index 6438987..e726987 100644
21--- a/super-intel.c
22+++ b/super-intel.c
23@@ -5941,7 +5941,7 @@ static int write_super_imsm_spares(struct intel_super *super, int doclose)
15 spare->cache_size = mpb->cache_size; 24 spare->cache_size = mpb->cache_size;
16 spare->pwr_cycle_count = __cpu_to_le32(1); 25 spare->pwr_cycle_count = __cpu_to_le32(1);
17 26
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
index 00e6657e09..7a2c888701 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -1,3 +1,11 @@
1From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
3Date: Sun, 15 Mar 2015 09:02:14 +0000
4Subject: [PATCH] mdadm: Fix build in x32 ABI
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
1When try to print time_t values as a long int it causes an error because time_t 9When try to print time_t values as a long int it causes an error because time_t
2data type in x32 ABI is long long int. 10data type in x32 ABI is long long int.
3 11
@@ -5,11 +13,15 @@ Upstream-Status: Pending
5 13
6Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> 14Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
7 15
8Index: mdadm-4.0/monitor.c 16---
9=================================================================== 17 monitor.c | 5 ++++-
10--- mdadm-4.0.orig/monitor.c 18 1 file changed, 4 insertions(+), 1 deletion(-)
11+++ mdadm-4.0/monitor.c 19
12@@ -445,9 +445,12 @@ static int read_and_act(struct active_ar 20diff --git a/monitor.c b/monitor.c
21index 81537ed..7c33382 100644
22--- a/monitor.c
23+++ b/monitor.c
24@@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds)
13 if (FD_ISSET(mdi->bb_fd, fds)) 25 if (FD_ISSET(mdi->bb_fd, fds))
14 check_for_cleared_bb(a, mdi); 26 check_for_cleared_bb(a, mdi);
15 } 27 }
diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
index 267c007c21..8e2a8a9043 100644
--- a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
+++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -1,4 +1,4 @@
1From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001 1From 911f6ea9be0c334885aeff66853b111cbd4066df Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com> 2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Wed, 10 Feb 2016 17:28:05 +0200 3Date: Wed, 10 Feb 2016 17:28:05 +0200
4Subject: [PATCH] mdadm-fix-ptest-build-errors 4Subject: [PATCH] mdadm-fix-ptest-build-errors
@@ -16,15 +16,16 @@ builds fail with ptest enabled:
16Upstream-Status: Pending 16Upstream-Status: Pending
17 17
18Signed-off-by: Maxin B. John <maxin.john@intel.com> 18Signed-off-by: Maxin B. John <maxin.john@intel.com>
19
19--- 20---
20 restripe.c | 6 +++++- 21 restripe.c | 6 +++++-
21 1 file changed, 5 insertions(+), 1 deletion(-) 22 1 file changed, 5 insertions(+), 1 deletion(-)
22 23
23diff --git a/restripe.c b/restripe.c 24diff --git a/restripe.c b/restripe.c
24index 56dca73..d24b2b4 100644 25index 31b07e8..592ba5d 100644
25--- a/restripe.c 26--- a/restripe.c
26+++ b/restripe.c 27+++ b/restripe.c
27@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets, 28@@ -864,10 +864,14 @@ int test_stripes(int *source, unsigned long long *offsets,
28 29
29 while (length > 0) { 30 while (length > 0) {
30 int disk; 31 int disk;
@@ -40,6 +41,3 @@ index 56dca73..d24b2b4 100644
40 } 41 }
41 for (i = 0 ; i < data_disks ; i++) { 42 for (i = 0 ; i < data_disks ; i++) {
42 int disk = geo_map(i, start/chunk_size, raid_disks, 43 int disk = geo_map(i, start/chunk_size, raid_disks,
43--
442.4.0
45
diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 2c4d88a9e7..b9f55841cb 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.0.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -16,17 +16,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
16 file://run-ptest \ 16 file://run-ptest \
17 file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \ 17 file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
18 file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \ 18 file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \
19 file://0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch \
20 file://0002-mdadm-Specify-enough-length-when-write-to-buffer.patch \
21 file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \
22 file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \
23 file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \ 19 file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \
24 file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ 20 file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \
25 file://0001-use-memmove-instead-of-memcpy-on-overlapping-region.patch \
26 file://0001-Disable-gcc8-warnings.patch \ 21 file://0001-Disable-gcc8-warnings.patch \
27 " 22 "
28SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" 23SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598"
29SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9" 24SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a"
30 25
31CFLAGS += "-fno-strict-aliasing" 26CFLAGS += "-fno-strict-aliasing"
32inherit autotools-brokensep 27inherit autotools-brokensep