diff options
14 files changed, 56 insertions, 320 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 @@ | |||
| 1 | From 76856a34a4e339e4a53b09d028f89fcc520e3127 Mon Sep 17 00:00:00 2001 | 1 | From 232101e2fcc6359fb6db2bc232570e373e368c75 Mon Sep 17 00:00:00 2001 |
| 2 | From: "Maxin B. John" <maxin.john@intel.com> | 2 | From: "Maxin B. John" <maxin.john@intel.com> |
| 3 | Date: Tue, 9 Feb 2016 11:44:01 +0200 | 3 | Date: Tue, 9 Feb 2016 11:44:01 +0200 |
| 4 | Subject: [PATCH] Fix the path of corosync and dlm header files check | 4 | Subject: [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 | ||
| 16 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
| 17 | index cbdba49..7bfd336 100644 | 17 | index 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 @@ | |||
| 1 | From 0be066d57a7dd1aead5488d0a095863608f2e559 Mon Sep 17 00:00:00 2001 | 1 | From 407691e11037709af888ce2cf6bd5eac6971ac61 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Tue, 25 Jan 2022 16:25:01 +0800 | 3 | Date: Tue, 25 Jan 2022 16:25:01 +0800 |
| 4 | Subject: [PATCH] Makefile: install mdcheck | 4 | Subject: [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 | ||
| 16 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
| 17 | index 1141971..f4059e2 100644 | 17 | index 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 @@ | |||
| 1 | From c29d086714b49a6d76ccca83b4a6fa2f139bad6e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 13 Oct 2017 10:27:34 -0700 | ||
| 4 | Subject: [PATCH] Use CC to check for implicit-fallthrough warning support | ||
| 5 | |||
| 6 | This warning it new in gcc7 and in cross compile case | ||
| 7 | its possible that build host gcc is version 7+ but the | ||
| 8 | cross compile used for compiling mdadm is < version 7 | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | Upstream-Status: Pending | ||
| 12 | --- | ||
| 13 | Makefile | 6 +++--- | ||
| 14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/Makefile b/Makefile | ||
| 17 | index 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 @@ | |||
| 1 | From 78e5bb08971a5644a56af60d51ef35e13522e811 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Fri, 14 Dec 2018 15:12:31 +0800 | ||
| 4 | Subject: [PATCH] fix gcc-8 format-truncation warning | ||
| 5 | |||
| 6 | While compiling with `-Werror=format-truncation=', it failed | ||
| 7 | [snip] | ||
| 8 | |super0.c:236:32: error: 'snprintf' output may be truncated | ||
| 9 | before 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 | ||
| 13 | into a destination of size 11 | ||
| 14 | | snprintf(nb, sizeof(nb), "%4d", d); | ||
| 15 | [snip] | ||
| 16 | |||
| 17 | Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/34] | ||
| 18 | |||
| 19 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 20 | --- | ||
| 21 | super0.c | 2 +- | ||
| 22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 23 | |||
| 24 | diff --git a/super0.c b/super0.c | ||
| 25 | index 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 @@ | |||
| 1 | From 7759ceda978aba38861d4846d0c1657465b72f04 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 24 Mar 2024 23:13:32 -0700 | ||
| 4 | Subject: [PATCH] include libgen.h for basename API | ||
| 5 | |||
| 6 | Musl does no more provide it via string.h therefore builds with newer | ||
| 7 | compilers e.g. clang-18 fails due to missing prototype for basename | ||
| 8 | therefore add libgen.h to included headers list | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://lore.kernel.org/linux-raid/20240325061537.275811-1-raj.khem@gmail.com/T/#u] | ||
| 11 | Signed-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 | |||
| 18 | diff --git a/Monitor.c b/Monitor.c | ||
| 19 | index 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> | ||
| 30 | diff --git a/platform-intel.c b/platform-intel.c | ||
| 31 | index 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> | ||
| 42 | diff --git a/super-intel.c b/super-intel.c | ||
| 43 | index 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 | -- | ||
| 55 | 2.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 @@ | |||
| 1 | From c27e128fdc062ec3fcdf7b48a8c5078615c538df Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Changqing Li <changqing.li@windriver.com> | ||
| 3 | Date: Mon, 1 Jul 2019 11:34:49 +0800 | ||
| 4 | Subject: [PATCH] mdadm: add option -y for use syslog to recive event report | ||
| 5 | |||
| 6 | fix service startup failed when there is | ||
| 7 | No mail address or alert command | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [configuration] | ||
| 10 | |||
| 11 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 12 | --- | ||
| 13 | systemd/mdmonitor.service | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service | ||
| 17 | index 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 @@ | |||
| 1 | From 4dd5c2659722b44409cee28b4cea68cdeaa1f987 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 9 May 2016 22:03:57 +0000 | ||
| 4 | Subject: [PATCH] mdadm.h: Undefine dprintf before redefining | ||
| 5 | |||
| 6 | dprintf is also defined in libc see | ||
| 7 | usr/include/bits/stdio2.h, this comes into | ||
| 8 | play especially when fortify sources is enabled | ||
| 9 | and compilers like clang reports the override | ||
| 10 | |||
| 11 | In 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 | |||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | Upstream-Status: Pending | ||
| 18 | --- | ||
| 19 | mdadm.h | 2 ++ | ||
| 20 | 1 file changed, 2 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/mdadm.h b/mdadm.h | ||
| 23 | index 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 @@ | |||
| 1 | From aa86de05cd6a75222b38e0789ac96fe00f705430 Mon Sep 17 00:00:00 2001 | 1 | From 9e3b15adf86147fe581cd2159cb99708abe26158 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 10 Nov 2022 12:31:22 -0800 | 3 | Date: Thu, 10 Nov 2022 12:31:22 -0800 |
| 4 | Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support | 4 | Subject: [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 | ||
| 18 | diff --git a/raid6check.c b/raid6check.c | 18 | diff --git a/raid6check.c b/raid6check.c |
| 19 | index 9947776..8e7f142 100644 | 19 | index 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); |
| 62 | diff --git a/restripe.c b/restripe.c | 62 | diff --git a/restripe.c b/restripe.c |
| 63 | index a7a7229..1c03577 100644 | 63 | index 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); |
| 114 | diff --git a/swap_super.c b/swap_super.c | 114 | diff --git a/swap_super.c b/swap_super.c |
| 115 | index b6db574..18c89e2 100644 | 115 | index 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 @@ | |||
| 1 | From 8fa7d3cb96e8833743b635fb198675ad6c020b6e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex@linutronix.de> | ||
| 3 | Date: Tue, 12 Mar 2024 10:51:51 +0100 | ||
| 4 | Subject: [PATCH] util.c: add limits.h include for NAME_MAX definition | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [mariusz.tkaczyk@linux.intel.com,linux-raid@vger.kernel.org] | ||
| 7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 8 | --- | ||
| 9 | util.c | 2 +- | ||
| 10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/util.c b/util.c | ||
| 13 | index 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 @@ | |||
| 1 | From a22b2345b9773d362acd85dd4c4a6a3cda9100d4 Mon Sep 17 00:00:00 2001 | 1 | From 8de073c637a1ea968b7304f373a20b13a4a47bbc Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex@linutronix.de> | 2 | From: Alexander Kanavin <alex@linutronix.de> |
| 3 | Date: Tue, 12 Mar 2024 10:54:08 +0100 | 3 | Date: Tue, 12 Mar 2024 10:54:08 +0100 |
| 4 | Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE | 4 | Subject: [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 | ||
| 16 | diff --git a/Create.c b/Create.c | 16 | diff --git a/Create.c b/Create.c |
| 17 | index 8082f54..7071f0a 100644 | 17 | index 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 @@ | |||
| 1 | From 319b3191f088cea7b0fb6038ab7625d5e049dcf7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "martin f. krafft" <madduck@debian.org> | ||
| 3 | Date: Mon, 3 Jan 2022 19:14:12 +0000 | ||
| 4 | Subject: [PATCH] Remove -Werror from compiler flags | ||
| 5 | |||
| 6 | -Werror seems like a bad idea on released/packaged code because a toolchain | ||
| 7 | update (introducing new warnings) could break the build. We'll let upstream | ||
| 8 | use it to beautify the code, but remove it for out builds. | ||
| 9 | |||
| 10 | Signed-off-by: martin f. krafft <madduck@debian.org> | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | --- | ||
| 14 | Makefile | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/Makefile b/Makefile | ||
| 18 | index 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 @@ | |||
| 1 | From ca91d9fc07943f209988411f2596e4b69828f208 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> | ||
| 3 | Date: Sun, 15 Mar 2015 09:02:14 +0000 | ||
| 4 | Subject: [PATCH] mdadm: Fix build in x32 ABI | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | When try to print time_t values as a long int it causes an error because time_t | ||
| 10 | data type in x32 ABI is long long int. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | |||
| 14 | Signed-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 | |||
| 19 | diff --git a/monitor.c b/monitor.c | ||
| 20 | index 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 @@ | |||
| 1 | From c5cf5a83be4e3ce04ebf3250f77aeb465eeb53a1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Xiao Ni <xni@redhat.com> | ||
| 3 | Date: Fri, 17 Jan 2025 15:15:40 +0800 | ||
| 4 | Subject: [PATCH] mdadm/raid6check: add xmalloc.h to raid6check.c | ||
| 5 | |||
| 6 | It reports building error: | ||
| 7 | raid6check.c:324:26: error: implicit declaration of function xmalloc | ||
| 8 | |||
| 9 | Add xmalloc.h to raid6check.c file to fix this. | ||
| 10 | |||
| 11 | Signed-off-by: Xiao Ni <xni@redhat.com> | ||
| 12 | Link: https://lore.kernel.org/r/20250117071540.4094-1-xni@redhat.com | ||
| 13 | Signed-off-by: Song Liu <song@kernel.org> | ||
| 14 | |||
| 15 | Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?h=main&id=e0df6c4c984d564e9e40913727e916a6cd8f466e] | ||
| 16 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
| 17 | --- | ||
| 18 | raid6check.c | 1 + | ||
| 19 | 1 file changed, 1 insertion(+) | ||
| 20 | |||
| 21 | diff --git a/raid6check.c b/raid6check.c | ||
| 22 | index 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 e3b94d4b6f..db45df43d3 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.3.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.4.bb | |||
| @@ -11,22 +11,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
| 11 | 11 | ||
| 12 | SRC_URI = "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;branch=main;tag=mdadm-${PV} \ | 12 | SRC_URI = "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;branch=main;tag=mdadm-${PV} \ |
| 13 | file://run-ptest \ | 13 | 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 \ | 14 | 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 \ | 15 | 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 \ | 16 | file://0001-Makefile-install-mdcheck.patch \ |
| 23 | file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \ | 17 | 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 \ | 18 | 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 \ | 19 | file://xmalloc.patch \ |
| 26 | file://0001-include-libgen.h-for-basename-API.patch \ | ||
| 27 | " | 20 | " |
| 28 | 21 | ||
| 29 | SRCREV = "d709d4161d1dd51a976147e8372fbd99ff8183bd" | 22 | SRCREV = "8e56efac9afd7080bb42bae4b77cdad5f345633a" |
| 30 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
| 31 | 24 | ||
| 32 | inherit ptest systemd | 25 | inherit ptest systemd |
| @@ -44,7 +37,7 @@ CFLAGS:append:powerpc64 = ' -D__SANE_USERSPACE_TYPES__' | |||
| 44 | CFLAGS:append:mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' | 37 | CFLAGS:append:mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' |
| 45 | CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' | 38 | CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' |
| 46 | 39 | ||
| 47 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ | 40 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ |
| 48 | BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}" \ | 41 | BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}" \ |
| 49 | SYSROOT="${STAGING_DIR_TARGET}" STRIP=' | 42 | SYSROOT="${STAGING_DIR_TARGET}" STRIP=' |
| 50 | 43 | ||
| @@ -53,7 +46,7 @@ DEBUG_OPTIMIZATION:append = " -Wno-error" | |||
| 53 | do_install() { | 46 | do_install() { |
| 54 | oe_runmake 'DESTDIR=${D}' install install-systemd | 47 | oe_runmake 'DESTDIR=${D}' install install-systemd |
| 55 | install -d ${D}/${sysconfdir}/ | 48 | install -d ${D}/${sysconfdir}/ |
| 56 | install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf | 49 | install -m 644 ${S}/documentation/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf |
| 57 | install -d ${D}/${sysconfdir}/init.d | 50 | install -d ${D}/${sysconfdir}/init.d |
| 58 | install -m 755 ${UNPACKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor | 51 | install -m 755 ${UNPACKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor |
| 59 | } | 52 | } |
