summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/mdadm')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch6
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch6
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch44
-rw-r--r--meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch36
-rw-r--r--meta/recipes-extended/mdadm/files/0001-include-libgen.h-for-basename-API.patch56
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch25
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch39
-rw-r--r--meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch18
-rw-r--r--meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch24
-rw-r--r--meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch10
-rw-r--r--meta/recipes-extended/mdadm/files/debian-no-Werror.patch29
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch36
-rw-r--r--meta/recipes-extended/mdadm/files/xmalloc.patch32
-rw-r--r--meta/recipes-extended/mdadm/mdadm_4.4.bb (renamed from meta/recipes-extended/mdadm/mdadm_4.3.bb)39
14 files changed, 62 insertions, 338 deletions
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 fa1f0aa520..8598aea1f1 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 76856a34a4e339e4a53b09d028f89fcc520e3127 Mon Sep 17 00:00:00 2001 1From 232101e2fcc6359fb6db2bc232570e373e368c75 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
@@ -14,10 +14,10 @@ Signed-off-by: Maxin B. John <maxin.john@intel.com>
14 1 file changed, 2 insertions(+), 2 deletions(-) 14 1 file changed, 2 insertions(+), 2 deletions(-)
15 15
16diff --git a/Makefile b/Makefile 16diff --git a/Makefile b/Makefile
17index cbdba49..7bfd336 100644 17index bcd092de..0a78cd22 100644
18--- a/Makefile 18--- a/Makefile
19+++ b/Makefile 19+++ b/Makefile
20@@ -109,8 +109,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots 20@@ -130,8 +130,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
21 SYSTEMD_DIR=/lib/systemd/system 21 SYSTEMD_DIR=/lib/systemd/system
22 LIB_DIR=/usr/libexec/mdadm 22 LIB_DIR=/usr/libexec/mdadm
23 23
diff --git a/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch
index a4be1aa8a1..bb4e8d0604 100644
--- a/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch
+++ b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch
@@ -1,4 +1,4 @@
1From 0be066d57a7dd1aead5488d0a095863608f2e559 Mon Sep 17 00:00:00 2001 1From 407691e11037709af888ce2cf6bd5eac6971ac61 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 25 Jan 2022 16:25:01 +0800 3Date: Tue, 25 Jan 2022 16:25:01 +0800
4Subject: [PATCH] Makefile: install mdcheck 4Subject: [PATCH] Makefile: install mdcheck
@@ -14,10 +14,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
14 1 file changed, 1 insertion(+) 14 1 file changed, 1 insertion(+)
15 15
16diff --git a/Makefile b/Makefile 16diff --git a/Makefile b/Makefile
17index 1141971..f4059e2 100644 17index 981e16fa..b28e7855 100644
18--- a/Makefile 18--- a/Makefile
19+++ b/Makefile 19+++ b/Makefile
20@@ -325,6 +325,7 @@ install-systemd: systemd/mdmon@.service 20@@ -345,6 +345,7 @@ install-systemd: systemd/mdmon@.service
21 install-bin: mdadm mdmon 21 install-bin: mdadm mdmon
22 $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm 22 $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm
23 $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon 23 $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon
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
deleted file mode 100644
index 16fdefbbd1..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From c29d086714b49a6d76ccca83b4a6fa2f139bad6e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Oct 2017 10:27:34 -0700
4Subject: [PATCH] Use CC to check for implicit-fallthrough warning support
5
6This warning it new in gcc7 and in cross compile case
7its possible that build host gcc is version 7+ but the
8cross compile used for compiling mdadm is < version 7
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Upstream-Status: Pending
12---
13 Makefile | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/Makefile b/Makefile
17index 7bfd336..9ab6a65 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -56,21 +56,21 @@ CWFLAGS += -Wp -O3
21 endif
22
23 ifeq ($(origin FALLTHROUGH), undefined)
24- FALLTHROUGH := $(shell gcc -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l)
25+ FALLTHROUGH := $(shell ${CC} -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l)
26 ifneq "$(FALLTHROUGH)" "0"
27 CWFLAGS += -Wimplicit-fallthrough=0
28 endif
29 endif
30
31 ifeq ($(origin FORMATOVERFLOW), undefined)
32- FORMATOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l)
33+ FORMATOVERFLOW := $(shell ${CC} -Q --help=warnings 2>&1 | grep "format-overflow" | wc -l)
34 ifneq "$(FORMATOVERFLOW)" "0"
35 CWFLAGS += -Wformat-overflow
36 endif
37 endif
38
39 ifeq ($(origin STRINGOPOVERFLOW), undefined)
40- STRINGOPOVERFLOW := $(shell gcc -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l)
41+ STRINGOPOVERFLOW := $(shell ${CC} -Q --help=warnings 2>&1 | grep "stringop-overflow" | wc -l)
42 ifneq "$(STRINGOPOVERFLOW)" "0"
43 CWFLAGS += -Wstringop-overflow
44 endif
diff --git a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
deleted file mode 100644
index 3cf295106f..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 78e5bb08971a5644a56af60d51ef35e13522e811 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 14 Dec 2018 15:12:31 +0800
4Subject: [PATCH] fix gcc-8 format-truncation warning
5
6While compiling with `-Werror=format-truncation=', it failed
7[snip]
8|super0.c:236:32: error: 'snprintf' output may be truncated
9before the last format character [-Werror=format-truncation=]
10| snprintf(nb, sizeof(nb), "%4d", d);
11| ^
12|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
13into a destination of size 11
14| snprintf(nb, sizeof(nb), "%4d", d);
15[snip]
16
17Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/34]
18
19Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
20---
21 super0.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/super0.c b/super0.c
25index a7c5f81..a79b6bd 100644
26--- a/super0.c
27+++ b/super0.c
28@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost)
29 d++) {
30 mdp_disk_t *dp;
31 char *dv;
32- char nb[11];
33+ char nb[12];
34 int wonly, failfast;
35 if (d>=0) dp = &sb->disks[d];
36 else dp = &sb->this_disk;
diff --git a/meta/recipes-extended/mdadm/files/0001-include-libgen.h-for-basename-API.patch b/meta/recipes-extended/mdadm/files/0001-include-libgen.h-for-basename-API.patch
deleted file mode 100644
index 70be43c15e..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-include-libgen.h-for-basename-API.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 7759ceda978aba38861d4846d0c1657465b72f04 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 24 Mar 2024 23:13:32 -0700
4Subject: [PATCH] include libgen.h for basename API
5
6Musl does no more provide it via string.h therefore builds with newer
7compilers e.g. clang-18 fails due to missing prototype for basename
8therefore add libgen.h to included headers list
9
10Upstream-Status: Submitted [https://lore.kernel.org/linux-raid/20240325061537.275811-1-raj.khem@gmail.com/T/#u]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 Monitor.c | 1 +
14 platform-intel.c | 1 +
15 super-intel.c | 1 +
16 3 files changed, 3 insertions(+)
17
18diff --git a/Monitor.c b/Monitor.c
19index 824a69f..e3942e1 100644
20--- a/Monitor.c
21+++ b/Monitor.c
22@@ -26,6 +26,7 @@
23 #include "udev.h"
24 #include "md_p.h"
25 #include "md_u.h"
26+#include <libgen.h>
27 #include <sys/wait.h>
28 #include <limits.h>
29 #include <syslog.h>
30diff --git a/platform-intel.c b/platform-intel.c
31index ac282bc..5d6687d 100644
32--- a/platform-intel.c
33+++ b/platform-intel.c
34@@ -19,6 +19,7 @@
35 #include "mdadm.h"
36 #include "platform-intel.h"
37 #include "probe_roms.h"
38+#include <libgen.h>
39 #include <stdio.h>
40 #include <stdlib.h>
41 #include <string.h>
42diff --git a/super-intel.c b/super-intel.c
43index dbea235..881dbda 100644
44--- a/super-intel.c
45+++ b/super-intel.c
46@@ -23,6 +23,7 @@
47 #include "dlink.h"
48 #include "sha1.h"
49 #include "platform-intel.h"
50+#include <libgen.h>
51 #include <values.h>
52 #include <scsi/sg.h>
53 #include <ctype.h>
54--
552.44.0
56
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
deleted file mode 100644
index f224d0008d..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From c27e128fdc062ec3fcdf7b48a8c5078615c538df Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 1 Jul 2019 11:34:49 +0800
4Subject: [PATCH] mdadm: add option -y for use syslog to recive event report
5
6fix service startup failed when there is
7No mail address or alert command
8
9Upstream-Status: Inappropriate [configuration]
10
11Signed-off-by: Changqing Li <changqing.li@windriver.com>
12---
13 systemd/mdmonitor.service | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service
17index 9c36478..d289846 100644
18--- a/systemd/mdmonitor.service
19+++ b/systemd/mdmonitor.service
20@@ -14,4 +14,4 @@ Documentation=man:mdadm(8)
21 Environment= MDADM_MONITOR_ARGS=--scan
22 EnvironmentFile=-/run/sysconfig/mdadm
23 ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh
24-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS
25+ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS
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
deleted file mode 100644
index 52daea2a49..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 4dd5c2659722b44409cee28b4cea68cdeaa1f987 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 9 May 2016 22:03:57 +0000
4Subject: [PATCH] mdadm.h: Undefine dprintf before redefining
5
6dprintf is also defined in libc see
7usr/include/bits/stdio2.h, this comes into
8play especially when fortify sources is enabled
9and compilers like clang reports the override
10
11In file included from policy.c:25:
12./mdadm.h:1562:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
13 ^
14/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Upstream-Status: Pending
18---
19 mdadm.h | 2 ++
20 1 file changed, 2 insertions(+)
21
22diff --git a/mdadm.h b/mdadm.h
23index 1f28b3e..04996e2 100644
24--- a/mdadm.h
25+++ b/mdadm.h
26@@ -1869,11 +1869,13 @@ static inline sighandler_t signal_s(int sig, sighandler_t handler)
27 }
28
29 #ifdef DEBUG
30+#undef dprintf
31 #define dprintf(fmt, arg...) \
32 fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##arg)
33 #define dprintf_cont(fmt, arg...) \
34 fprintf(stderr, fmt, ##arg)
35 #else
36+#undef dprintf
37 #define dprintf(fmt, arg...) \
38 ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; })
39 #define dprintf_cont(fmt, arg...) \
diff --git a/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch b/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch
index 13435ee418..aa874dbec3 100644
--- a/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch
+++ b/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch
@@ -1,4 +1,4 @@
1From aa86de05cd6a75222b38e0789ac96fe00f705430 Mon Sep 17 00:00:00 2001 1From 9e3b15adf86147fe581cd2159cb99708abe26158 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 10 Nov 2022 12:31:22 -0800 3Date: Thu, 10 Nov 2022 12:31:22 -0800
4Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support 4Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support
@@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 3 files changed, 22 insertions(+), 15 deletions(-) 16 3 files changed, 22 insertions(+), 15 deletions(-)
17 17
18diff --git a/raid6check.c b/raid6check.c 18diff --git a/raid6check.c b/raid6check.c
19index 9947776..8e7f142 100644 19index 99477761..8e7f1421 100644
20--- a/raid6check.c 20--- a/raid6check.c
21+++ b/raid6check.c 21+++ b/raid6check.c
22@@ -22,6 +22,9 @@ 22@@ -22,6 +22,9 @@
@@ -60,7 +60,7 @@ index 9947776..8e7f142 100644
60 if (seek_res < 0) { 60 if (seek_res < 0) {
61 fprintf(stderr, "lseek to source %d failed\n", i); 61 fprintf(stderr, "lseek to source %d failed\n", i);
62diff --git a/restripe.c b/restripe.c 62diff --git a/restripe.c b/restripe.c
63index a7a7229..1c03577 100644 63index 5e126eb7..af76c634 100644
64--- a/restripe.c 64--- a/restripe.c
65+++ b/restripe.c 65+++ b/restripe.c
66@@ -22,6 +22,9 @@ 66@@ -22,6 +22,9 @@
@@ -71,9 +71,9 @@ index a7a7229..1c03577 100644
71+#define _FILE_OFFSET_BITS 64 71+#define _FILE_OFFSET_BITS 64
72+ 72+
73 #include "mdadm.h" 73 #include "mdadm.h"
74 #include <stdint.h> 74 #include "xmalloc.h"
75 75
76@@ -581,7 +584,7 @@ int save_stripes(int *source, unsigned long long *offsets, 76@@ -583,7 +586,7 @@ int save_stripes(int *source, unsigned long long *offsets,
77 raid_disks, level, layout); 77 raid_disks, level, layout);
78 if (dnum < 0) abort(); 78 if (dnum < 0) abort();
79 if (source[dnum] < 0 || 79 if (source[dnum] < 0 ||
@@ -82,7 +82,7 @@ index a7a7229..1c03577 100644
82 offsets[dnum] + offset, 0) < 0 || 82 offsets[dnum] + offset, 0) < 0 ||
83 read(source[dnum], buf+disk * chunk_size, 83 read(source[dnum], buf+disk * chunk_size,
84 chunk_size) != chunk_size) { 84 chunk_size) != chunk_size) {
85@@ -754,8 +757,8 @@ int restore_stripes(int *dest, unsigned long long *offsets, 85@@ -756,8 +759,8 @@ int restore_stripes(int *dest, unsigned long long *offsets,
86 raid_disks, level, layout); 86 raid_disks, level, layout);
87 if (src_buf == NULL) { 87 if (src_buf == NULL) {
88 /* read from file */ 88 /* read from file */
@@ -93,7 +93,7 @@ index a7a7229..1c03577 100644
93 rv = -1; 93 rv = -1;
94 goto abort; 94 goto abort;
95 } 95 }
96@@ -816,7 +819,7 @@ int restore_stripes(int *dest, unsigned long long *offsets, 96@@ -818,7 +821,7 @@ int restore_stripes(int *dest, unsigned long long *offsets,
97 } 97 }
98 for (i=0; i < raid_disks ; i++) 98 for (i=0; i < raid_disks ; i++)
99 if (dest[i] >= 0) { 99 if (dest[i] >= 0) {
@@ -102,7 +102,7 @@ index a7a7229..1c03577 100644
102 offsets[i]+offset, 0) < 0) { 102 offsets[i]+offset, 0) < 0) {
103 rv = -1; 103 rv = -1;
104 goto abort; 104 goto abort;
105@@ -866,7 +869,7 @@ int test_stripes(int *source, unsigned long long *offsets, 105@@ -868,7 +871,7 @@ int test_stripes(int *source, unsigned long long *offsets,
106 int disk; 106 int disk;
107 107
108 for (i = 0 ; i < raid_disks ; i++) { 108 for (i = 0 ; i < raid_disks ; i++) {
@@ -112,7 +112,7 @@ index a7a7229..1c03577 100644
112 chunk_size)) { 112 chunk_size)) {
113 free(q); 113 free(q);
114diff --git a/swap_super.c b/swap_super.c 114diff --git a/swap_super.c b/swap_super.c
115index b6db574..18c89e2 100644 115index b6db5743..18c89e2b 100644
116--- a/swap_super.c 116--- a/swap_super.c
117+++ b/swap_super.c 117+++ b/swap_super.c
118@@ -1,3 +1,6 @@ 118@@ -1,3 +1,6 @@
diff --git a/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch b/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch
deleted file mode 100644
index 0916efafdf..0000000000
--- a/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1From 8fa7d3cb96e8833743b635fb198675ad6c020b6e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 12 Mar 2024 10:51:51 +0100
4Subject: [PATCH] util.c: add limits.h include for NAME_MAX definition
5
6Upstream-Status: Submitted [mariusz.tkaczyk@linux.intel.com,linux-raid@vger.kernel.org]
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 util.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/util.c b/util.c
13index b145447..a9cb6c4 100644
14--- a/util.c
15+++ b/util.c
16@@ -36,7 +36,7 @@
17 #include <ctype.h>
18 #include <dirent.h>
19 #include <dlfcn.h>
20-
21+#include <limits.h>
22
23 /*
24 * following taken from linux/blkpg.h because they aren't
diff --git a/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch b/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch
index 145c65477a..e425fc446e 100644
--- a/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch
+++ b/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch
@@ -1,4 +1,4 @@
1From a22b2345b9773d362acd85dd4c4a6a3cda9100d4 Mon Sep 17 00:00:00 2001 1From 8de073c637a1ea968b7304f373a20b13a4a47bbc Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 12 Mar 2024 10:54:08 +0100 3Date: Tue, 12 Mar 2024 10:54:08 +0100
4Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE 4Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE
@@ -14,14 +14,14 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de>
14 1 file changed, 1 insertion(+) 14 1 file changed, 1 insertion(+)
15 15
16diff --git a/Create.c b/Create.c 16diff --git a/Create.c b/Create.c
17index 8082f54..7071f0a 100644 17index fd6c9215..3210a03e 100644
18--- a/Create.c 18--- a/Create.c
19+++ b/Create.c 19+++ b/Create.c
20@@ -31,6 +31,7 @@ 20@@ -33,6 +33,7 @@
21 #include <signal.h> 21 #include <signal.h>
22 #include <sys/signalfd.h> 22 #include <sys/signalfd.h>
23 #include <sys/wait.h> 23 #include <sys/wait.h>
24+#include <linux/falloc.h> 24+#include <linux/falloc.h>
25 25
26 static int round_size_and_verify(unsigned long long *size, int chunk) 26 #ifndef FALLOC_FL_ZERO_RANGE
27 { 27 #define FALLOC_FL_ZERO_RANGE 16
diff --git a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch
deleted file mode 100644
index b758fcd0ab..0000000000
--- a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 319b3191f088cea7b0fb6038ab7625d5e049dcf7 Mon Sep 17 00:00:00 2001
2From: "martin f. krafft" <madduck@debian.org>
3Date: Mon, 3 Jan 2022 19:14:12 +0000
4Subject: [PATCH] Remove -Werror from compiler flags
5
6-Werror seems like a bad idea on released/packaged code because a toolchain
7update (introducing new warnings) could break the build. We'll let upstream
8use it to beautify the code, but remove it for out builds.
9
10Signed-off-by: martin f. krafft <madduck@debian.org>
11
12Upstream-Status: Pending
13---
14 Makefile | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/Makefile b/Makefile
18index 9ab6a65..1141971 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -50,7 +50,7 @@ ifeq ($(origin CC),default)
22 CC := $(CROSS_COMPILE)gcc
23 endif
24 CXFLAGS ?= -ggdb
25-CWFLAGS ?= -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds
26+CWFLAGS ?= -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds
27 ifdef WARN_UNUSED
28 CWFLAGS += -Wp -O3
29 endif
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
deleted file mode 100644
index ecd1f037d0..0000000000
--- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From ca91d9fc07943f209988411f2596e4b69828f208 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
9When try to print time_t values as a long int it causes an error because time_t
10data type in x32 ABI is long long int.
11
12Upstream-Status: Pending
13
14Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
15---
16 monitor.c | 5 ++++-
17 1 file changed, 4 insertions(+), 1 deletion(-)
18
19diff --git a/monitor.c b/monitor.c
20index 4acec67..8dcdfd6 100644
21--- a/monitor.c
22+++ b/monitor.c
23@@ -447,9 +447,12 @@ static int read_and_act(struct active_array *a, fd_set *fds)
24 if (FD_ISSET(mdi->bb_fd, fds))
25 check_for_cleared_bb(a, mdi);
26 }
27-
28 gettimeofday(&tv, NULL);
29+#if defined(__x86_64__) && defined(__ILP32__)
30+ dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
31+#else
32 dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
33+#endif
34 a->info.container_member,
35 tv.tv_sec, tv.tv_usec,
36 array_states[a->curr_state],
diff --git a/meta/recipes-extended/mdadm/files/xmalloc.patch b/meta/recipes-extended/mdadm/files/xmalloc.patch
new file mode 100644
index 0000000000..61774721d0
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/xmalloc.patch
@@ -0,0 +1,32 @@
1From c5cf5a83be4e3ce04ebf3250f77aeb465eeb53a1 Mon Sep 17 00:00:00 2001
2From: Xiao Ni <xni@redhat.com>
3Date: Fri, 17 Jan 2025 15:15:40 +0800
4Subject: [PATCH] mdadm/raid6check: add xmalloc.h to raid6check.c
5
6It reports building error:
7raid6check.c:324:26: error: implicit declaration of function xmalloc
8
9Add xmalloc.h to raid6check.c file to fix this.
10
11Signed-off-by: Xiao Ni <xni@redhat.com>
12Link: https://lore.kernel.org/r/20250117071540.4094-1-xni@redhat.com
13Signed-off-by: Song Liu <song@kernel.org>
14
15Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?h=main&id=e0df6c4c984d564e9e40913727e916a6cd8f466e]
16Signed-off-by: Alexander Kanavin <alex@linutronix.de>
17---
18 raid6check.c | 1 +
19 1 file changed, 1 insertion(+)
20
21diff --git a/raid6check.c b/raid6check.c
22index 8e7f1421..486b10c6 100644
23--- a/raid6check.c
24+++ b/raid6check.c
25@@ -26,6 +26,7 @@
26 #define _FILE_OFFSET_BITS 64
27
28 #include "mdadm.h"
29+#include "xmalloc.h"
30 #include <stdint.h>
31 #include <sys/mman.h>
32
diff --git a/meta/recipes-extended/mdadm/mdadm_4.3.bb b/meta/recipes-extended/mdadm/mdadm_4.4.bb
index 228fc6f84e..26a60e4c1a 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.3.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.4.bb
@@ -8,27 +8,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ 8 file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
9 file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" 9 file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
10 10
11 11SRC_URI = "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;branch=main;tag=mdadm-${PV} \
12SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
13 file://run-ptest \ 12 file://run-ptest \
14 file://mdadm-3.3.2_x32_abi_time_t.patch \
15 file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
16 file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \ 13 file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
17 file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \
18 file://0001-fix-gcc-8-format-truncation-warning.patch \
19 file://debian-no-Werror.patch \
20 file://mdadm.init \ 14 file://mdadm.init \
21 file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \
22 file://0001-Makefile-install-mdcheck.patch \ 15 file://0001-Makefile-install-mdcheck.patch \
23 file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \ 16 file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \
24 file://0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch \ 17 file://0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch \
25 file://0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch \ 18 file://xmalloc.patch \
26 file://0001-include-libgen.h-for-basename-API.patch \
27 " 19 "
28 20
29SRC_URI[sha256sum] = "416727ae1f1080ea6e3090cea36dd076826fc369151e36ab736557ba92196f9f" 21SRCREV = "8e56efac9afd7080bb42bae4b77cdad5f345633a"
30 22
31inherit autotools-brokensep ptest systemd 23inherit ptest systemd
32 24
33DEPENDS = "udev" 25DEPENDS = "udev"
34 26
@@ -43,29 +35,18 @@ CFLAGS:append:powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
43CFLAGS:append:mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' 35CFLAGS:append:mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
44CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' 36CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
45 37
46EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ 38EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \
47 BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}"' 39 BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}" \
40 SYSROOT="${STAGING_DIR_TARGET}" STRIP='
48 41
49DEBUG_OPTIMIZATION:append = " -Wno-error" 42DEBUG_OPTIMIZATION:append = " -Wno-error"
50 43
51do_compile() {
52 oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
53}
54
55do_install() { 44do_install() {
56 export STRIP="" 45 oe_runmake 'DESTDIR=${D}' install install-systemd
57 autotools_do_install
58}
59
60do_install:append() {
61 install -d ${D}/${sysconfdir}/ 46 install -d ${D}/${sysconfdir}/
62 install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf 47 install -m 644 ${S}/documentation/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
63 install -d ${D}/${sysconfdir}/init.d 48 install -d ${D}/${sysconfdir}/init.d
64 install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor 49 install -m 755 ${UNPACKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
65}
66
67do_install:append() {
68 oe_runmake install-systemd DESTDIR=${D}
69} 50}
70 51
71do_compile_ptest() { 52do_compile_ptest() {