diff options
Diffstat (limited to 'meta/recipes-extended/mdadm')
19 files changed, 395 insertions, 255 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch deleted file mode 100644 index 803a59b3ec..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Dec 2018 17:22:39 -0800 | ||
4 | Subject: [PATCH] Compute abs diff in a standard compliant way | ||
5 | |||
6 | This make it a bit less implementation defined and silences clang | ||
7 | warning -Wabsolute-value | ||
8 | |||
9 | | super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi | ||
10 | gned long long' has no effect [-Werror,-Wabsolute-value] | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | super-intel.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/super-intel.c b/super-intel.c | ||
20 | index 6438987..10d7218 100644 | ||
21 | --- a/super-intel.c | ||
22 | +++ b/super-intel.c | ||
23 | @@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map, | ||
24 | * 2048 blocks per each device. If the difference is higher it means | ||
25 | * that array size was expanded and num_data_stripes was not updated. | ||
26 | */ | ||
27 | - if ((unsigned int)abs(calc_dev_size - dev_size) > | ||
28 | + if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) > | ||
29 | (1 << SECT_PER_MB_SHIFT) * member_disks) { | ||
30 | component_size = dev_size / member_disks; | ||
31 | dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n", | ||
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 298f276cd6..fa1f0aa520 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 a9166bf422da1001bac9cc819386bf39b7cd1b73 Mon Sep 17 00:00:00 2001 | 1 | From 76856a34a4e339e4a53b09d028f89fcc520e3127 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 |
@@ -9,16 +9,15 @@ Fix it. | |||
9 | Upstream-Status: Inappropriate [Yocto specific] | 9 | Upstream-Status: Inappropriate [Yocto specific] |
10 | 10 | ||
11 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | 11 | Signed-off-by: Maxin B. John <maxin.john@intel.com> |
12 | |||
13 | --- | 12 | --- |
14 | Makefile | 4 ++-- | 13 | Makefile | 4 ++-- |
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | 14 | 1 file changed, 2 insertions(+), 2 deletions(-) |
16 | 15 | ||
17 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
18 | index 2767ac6..46bf57b 100644 | 17 | index cbdba49..7bfd336 100644 |
19 | --- a/Makefile | 18 | --- a/Makefile |
20 | +++ b/Makefile | 19 | +++ b/Makefile |
21 | @@ -91,8 +91,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots | 20 | @@ -109,8 +109,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots |
22 | SYSTEMD_DIR=/lib/systemd/system | 21 | SYSTEMD_DIR=/lib/systemd/system |
23 | LIB_DIR=/usr/libexec/mdadm | 22 | LIB_DIR=/usr/libexec/mdadm |
24 | 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 new file mode 100644 index 0000000000..a4be1aa8a1 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 0be066d57a7dd1aead5488d0a095863608f2e559 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 25 Jan 2022 16:25:01 +0800 | ||
4 | Subject: [PATCH] Makefile: install mdcheck | ||
5 | |||
6 | The mdcheck_xxx.service files use mdcheck, but it's not installed. | ||
7 | We need to install this script. | ||
8 | |||
9 | Upstream-Status: Submitted [Sent patch to maintainer] | ||
10 | |||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
12 | --- | ||
13 | Makefile | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/Makefile b/Makefile | ||
17 | index 1141971..f4059e2 100644 | ||
18 | --- a/Makefile | ||
19 | +++ b/Makefile | ||
20 | @@ -325,6 +325,7 @@ install-systemd: systemd/mdmon@.service | ||
21 | install-bin: mdadm mdmon | ||
22 | $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm | ||
23 | $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon | ||
24 | + $(INSTALL) -D -m 755 misc/mdcheck $(DESTDIR)/usr/share/mdadm/mdcheck | ||
25 | |||
26 | uninstall: | ||
27 | rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm | ||
diff --git a/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch deleted file mode 100644 index b196084a5c..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 02a41c3fd560fb5250186dd6b3cff6b21daa2e2b Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Mon, 15 Jul 2019 14:12:24 +0800 | ||
4 | Subject: [PATCH] Revert "tests: wait for complete rebuild in integrity checks" | ||
5 | |||
6 | This reverts commit e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74 | ||
7 | as the logic "check state 'U*'" will make the test enters | ||
8 | infinite loop especially in qemu env, so revert it to | ||
9 | use the previous logic "check wait" which also used | ||
10 | commonly by other tests such as tests/02r5grow, tests/07revert-grow | ||
11 | and etc. | ||
12 | |||
13 | Upstream-Status: Submitted[https://marc.info/?l=linux-raid&m=156317157314030&w=2] | ||
14 | |||
15 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
16 | --- | ||
17 | tests/01r5integ | 2 +- | ||
18 | tests/01raid6integ | 4 ++-- | ||
19 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/tests/01r5integ b/tests/01r5integ | ||
22 | index 48676a2..ffb30ce 100644 | ||
23 | --- a/tests/01r5integ | ||
24 | +++ b/tests/01r5integ | ||
25 | @@ -27,7 +27,7 @@ do | ||
26 | exit 1 | ||
27 | fi | ||
28 | mdadm $md0 -a $i | ||
29 | - while ! (check state 'U*'); do check wait; sleep 0.2; done | ||
30 | + check wait | ||
31 | done | ||
32 | mdadm -S $md0 | ||
33 | done | ||
34 | diff --git a/tests/01raid6integ b/tests/01raid6integ | ||
35 | index 12f4d81..c6fcdae 100644 | ||
36 | --- a/tests/01raid6integ | ||
37 | +++ b/tests/01raid6integ | ||
38 | @@ -47,10 +47,10 @@ do | ||
39 | exit 1 | ||
40 | fi | ||
41 | mdadm $md0 -a $first | ||
42 | - while ! (check state 'U*_U*'); do check wait; sleep 0.2; done | ||
43 | + check wait | ||
44 | done | ||
45 | mdadm $md0 -a $second | ||
46 | - while ! (check state 'U*'); do check wait; sleep 0.2; done | ||
47 | + check wait | ||
48 | totest="$totest $second" | ||
49 | done | ||
50 | mdadm -S $md0 | ||
51 | -- | ||
52 | 2.7.4 | ||
53 | |||
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 12bf6a5920..16fdefbbd1 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 @@ | |||
1 | From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001 | 1 | From c29d086714b49a6d76ccca83b4a6fa2f139bad6e 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: Fri, 13 Oct 2017 10:27:34 -0700 | 3 | Date: Fri, 13 Oct 2017 10:27:34 -0700 |
4 | Subject: [PATCH] Use CC to check for implicit-fallthrough warning support | 4 | Subject: [PATCH] Use CC to check for implicit-fallthrough warning support |
@@ -10,19 +10,35 @@ cross compile used for compiling mdadm is < version 7 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | Upstream-Status: Pending | 11 | Upstream-Status: Pending |
12 | --- | 12 | --- |
13 | Makefile | 2 +- | 13 | Makefile | 6 +++--- |
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 3 insertions(+), 3 deletions(-) |
15 | 15 | ||
16 | diff --git a/Makefile b/Makefile | 16 | diff --git a/Makefile b/Makefile |
17 | index 46bf57b..a075912 100644 | 17 | index 7bfd336..9ab6a65 100644 |
18 | --- a/Makefile | 18 | --- a/Makefile |
19 | +++ b/Makefile | 19 | +++ b/Makefile |
20 | @@ -53,7 +53,7 @@ ifdef WARN_UNUSED | 20 | @@ -56,21 +56,21 @@ CWFLAGS += -Wp -O3 |
21 | CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 | ||
22 | endif | 21 | endif |
23 | 22 | ||
24 | -FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) | 23 | ifeq ($(origin FALLTHROUGH), undefined) |
25 | +FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) | 24 | - FALLTHROUGH := $(shell gcc -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l) |
26 | ifneq "$(FALLTHROUGH)" "0" | 25 | + FALLTHROUGH := $(shell ${CC} -Q --help=warnings 2>&1 | grep "implicit-fallthrough" | wc -l) |
27 | CWFLAGS += -Wimplicit-fallthrough=0 | 26 | ifneq "$(FALLTHROUGH)" "0" |
27 | CWFLAGS += -Wimplicit-fallthrough=0 | ||
28 | endif | ||
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 index fa9c8cc835..3cf295106f 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3158d3788c2e0fb75ace2c89840bd8a977fb4cb0 Mon Sep 17 00:00:00 2001 | 1 | From 78e5bb08971a5644a56af60d51ef35e13522e811 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Fri, 14 Dec 2018 15:12:31 +0800 | 3 | Date: Fri, 14 Dec 2018 15:12:31 +0800 |
4 | Subject: [PATCH] fix gcc-8 format-truncation warning | 4 | Subject: [PATCH] fix gcc-8 format-truncation warning |
@@ -22,7 +22,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | 22 | 1 file changed, 1 insertion(+), 1 deletion(-) |
23 | 23 | ||
24 | diff --git a/super0.c b/super0.c | 24 | diff --git a/super0.c b/super0.c |
25 | index 756cab5..12c28da 100644 | 25 | index a7c5f81..a79b6bd 100644 |
26 | --- a/super0.c | 26 | --- a/super0.c |
27 | +++ b/super0.c | 27 | +++ b/super0.c |
28 | @@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost) | 28 | @@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost) |
@@ -34,6 +34,3 @@ index 756cab5..12c28da 100644 | |||
34 | int wonly, failfast; | 34 | int wonly, failfast; |
35 | if (d>=0) dp = &sb->disks[d]; | 35 | if (d>=0) dp = &sb->disks[d]; |
36 | else dp = &sb->this_disk; | 36 | else dp = &sb->this_disk; |
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
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 new file mode 100644 index 0000000000..70be43c15e --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-include-libgen.h-for-basename-API.patch | |||
@@ -0,0 +1,56 @@ | |||
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 index e00287cab1..f224d0008d 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001 | 1 | From c27e128fdc062ec3fcdf7b48a8c5078615c538df Mon Sep 17 00:00:00 2001 |
2 | From: Changqing Li <changqing.li@windriver.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
3 | Date: Mon, 1 Jul 2019 11:34:49 +0800 | 3 | Date: Mon, 1 Jul 2019 11:34:49 +0800 |
4 | Subject: [PATCH] mdadm: add option -y for use syslog to recive event report | 4 | Subject: [PATCH] mdadm: add option -y for use syslog to recive event report |
@@ -14,15 +14,12 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
15 | 15 | ||
16 | diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service | 16 | diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service |
17 | index 46f7b88..3fc4687 100644 | 17 | index 9c36478..d289846 100644 |
18 | --- a/systemd/mdmonitor.service | 18 | --- a/systemd/mdmonitor.service |
19 | +++ b/systemd/mdmonitor.service | 19 | +++ b/systemd/mdmonitor.service |
20 | @@ -13,4 +13,4 @@ DefaultDependencies=no | 20 | @@ -14,4 +14,4 @@ Documentation=man:mdadm(8) |
21 | Environment= MDADM_MONITOR_ARGS=--scan | 21 | Environment= MDADM_MONITOR_ARGS=--scan |
22 | EnvironmentFile=-/run/sysconfig/mdadm | 22 | EnvironmentFile=-/run/sysconfig/mdadm |
23 | ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh | 23 | ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh |
24 | -ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS | 24 | -ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS |
25 | +ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS | 25 | +ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS |
26 | -- | ||
27 | 2.7.4 | ||
28 | |||
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch deleted file mode 100644 index 3a192cc95c..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 1b83afa7c3121f819e72ea74883f8b6d61d6548e Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 6 Sep 2019 10:59:02 +0800 | ||
4 | Subject: [PATCH] mdadm: skip test 11spare-migration | ||
5 | |||
6 | 11spare-migration is a test series to check mdadm Monitor migrates spares | ||
7 | according to rules in /etc/mdadm.conf defined by POLICY lines. | ||
8 | |||
9 | [snip] | ||
10 | for scan in no yes; do | ||
11 | for platform in 1.2 imsm; do | ||
12 | try | ||
13 | done | ||
14 | done | ||
15 | [snip] | ||
16 | |||
17 | "try" includes near 20 sub testcase, so there are nearly 80 subcases need to run, | ||
18 | so it will take long time than ptest-runner timeout limit, skip it as workaround. | ||
19 | |||
20 | Upstream-Status: Inappropriate[oe-specific] | ||
21 | |||
22 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
23 | --- | ||
24 | test | 3 +++ | ||
25 | 1 file changed, 3 insertions(+) | ||
26 | |||
27 | diff --git a/test b/test | ||
28 | index 711a3c7..880dd1d 100755 | ||
29 | --- a/test | ||
30 | +++ b/test | ||
31 | @@ -272,6 +272,9 @@ main() { | ||
32 | else | ||
33 | for script in $testdir/$prefix $testdir/$prefix*[^~] | ||
34 | do | ||
35 | + if [ $script == "$testdir/11spare-migration" ];then | ||
36 | + continue | ||
37 | + fi | ||
38 | do_test $script | ||
39 | done | ||
40 | fi | ||
41 | -- | ||
42 | 2.7.4 | ||
43 | |||
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 a1e7e59323..52daea2a49 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 @@ | |||
1 | From b431cb4e1ed060122fa300dc0008f74080d38f73 Mon Sep 17 00:00:00 2001 | 1 | From 4dd5c2659722b44409cee28b4cea68cdeaa1f987 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: Mon, 9 May 2016 22:03:57 +0000 | 3 | Date: Mon, 9 May 2016 22:03:57 +0000 |
4 | Subject: [PATCH] mdadm.h: Undefine dprintf before redefining | 4 | Subject: [PATCH] mdadm.h: Undefine dprintf before redefining |
@@ -20,10 +20,10 @@ Upstream-Status: Pending | |||
20 | 1 file changed, 2 insertions(+) | 20 | 1 file changed, 2 insertions(+) |
21 | 21 | ||
22 | diff --git a/mdadm.h b/mdadm.h | 22 | diff --git a/mdadm.h b/mdadm.h |
23 | index 387e681..bb943bf 100644 | 23 | index 1f28b3e..04996e2 100644 |
24 | --- a/mdadm.h | 24 | --- a/mdadm.h |
25 | +++ b/mdadm.h | 25 | +++ b/mdadm.h |
26 | @@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) | 26 | @@ -1869,11 +1869,13 @@ static inline sighandler_t signal_s(int sig, sighandler_t handler) |
27 | } | 27 | } |
28 | 28 | ||
29 | #ifdef DEBUG | 29 | #ifdef DEBUG |
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 new file mode 100644 index 0000000000..13435ee418 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch | |||
@@ -0,0 +1,155 @@ | |||
1 | From aa86de05cd6a75222b38e0789ac96fe00f705430 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 10 Nov 2022 12:31:22 -0800 | ||
4 | Subject: [PATCH] restripe.c: Use _FILE_OFFSET_BITS to enable largefile support | ||
5 | |||
6 | Instead of using the lseek64 and friends, its better to enable it via | ||
7 | the feature macro _FILE_OFFSET_BITS = 64 and let the C library deal with | ||
8 | the width of types | ||
9 | |||
10 | Upstream-Status: Submitted [https://lore.kernel.org/linux-raid/20221110225546.337164-1-raj.khem@gmail.com/] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | raid6check.c | 11 +++++++---- | ||
14 | restripe.c | 13 ++++++++----- | ||
15 | swap_super.c | 13 +++++++------ | ||
16 | 3 files changed, 22 insertions(+), 15 deletions(-) | ||
17 | |||
18 | diff --git a/raid6check.c b/raid6check.c | ||
19 | index 9947776..8e7f142 100644 | ||
20 | --- a/raid6check.c | ||
21 | +++ b/raid6check.c | ||
22 | @@ -22,6 +22,9 @@ | ||
23 | * Based on "restripe.c" from "mdadm" codebase | ||
24 | */ | ||
25 | |||
26 | +/* Enable largefile support */ | ||
27 | +#define _FILE_OFFSET_BITS 64 | ||
28 | + | ||
29 | #include "mdadm.h" | ||
30 | #include <stdint.h> | ||
31 | #include <sys/mman.h> | ||
32 | @@ -284,9 +287,9 @@ int manual_repair(int chunk_size, int syndrome_disks, | ||
33 | } | ||
34 | |||
35 | int write_res1, write_res2; | ||
36 | - off64_t seek_res; | ||
37 | + off_t seek_res; | ||
38 | |||
39 | - seek_res = lseek64(source[fd1], | ||
40 | + seek_res = lseek(source[fd1], | ||
41 | offsets[fd1] + start * chunk_size, SEEK_SET); | ||
42 | if (seek_res < 0) { | ||
43 | fprintf(stderr, "lseek failed for failed_disk1\n"); | ||
44 | @@ -294,7 +297,7 @@ int manual_repair(int chunk_size, int syndrome_disks, | ||
45 | } | ||
46 | write_res1 = write(source[fd1], blocks[failed_slot1], chunk_size); | ||
47 | |||
48 | - seek_res = lseek64(source[fd2], | ||
49 | + seek_res = lseek(source[fd2], | ||
50 | offsets[fd2] + start * chunk_size, SEEK_SET); | ||
51 | if (seek_res < 0) { | ||
52 | fprintf(stderr, "lseek failed for failed_disk2\n"); | ||
53 | @@ -379,7 +382,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, | ||
54 | goto exitCheck; | ||
55 | } | ||
56 | for (i = 0 ; i < raid_disks ; i++) { | ||
57 | - off64_t seek_res = lseek64(source[i], offsets[i] + start * chunk_size, | ||
58 | + off_t seek_res = lseek(source[i], offsets[i] + start * chunk_size, | ||
59 | SEEK_SET); | ||
60 | if (seek_res < 0) { | ||
61 | fprintf(stderr, "lseek to source %d failed\n", i); | ||
62 | diff --git a/restripe.c b/restripe.c | ||
63 | index a7a7229..1c03577 100644 | ||
64 | --- a/restripe.c | ||
65 | +++ b/restripe.c | ||
66 | @@ -22,6 +22,9 @@ | ||
67 | * Email: <neilb@suse.de> | ||
68 | */ | ||
69 | |||
70 | +/* Enable largefile support */ | ||
71 | +#define _FILE_OFFSET_BITS 64 | ||
72 | + | ||
73 | #include "mdadm.h" | ||
74 | #include <stdint.h> | ||
75 | |||
76 | @@ -581,7 +584,7 @@ int save_stripes(int *source, unsigned long long *offsets, | ||
77 | raid_disks, level, layout); | ||
78 | if (dnum < 0) abort(); | ||
79 | if (source[dnum] < 0 || | ||
80 | - lseek64(source[dnum], | ||
81 | + lseek(source[dnum], | ||
82 | offsets[dnum] + offset, 0) < 0 || | ||
83 | read(source[dnum], buf+disk * chunk_size, | ||
84 | chunk_size) != chunk_size) { | ||
85 | @@ -754,8 +757,8 @@ int restore_stripes(int *dest, unsigned long long *offsets, | ||
86 | raid_disks, level, layout); | ||
87 | if (src_buf == NULL) { | ||
88 | /* read from file */ | ||
89 | - if (lseek64(source, read_offset, 0) != | ||
90 | - (off64_t)read_offset) { | ||
91 | + if (lseek(source, read_offset, 0) != | ||
92 | + (off_t)read_offset) { | ||
93 | rv = -1; | ||
94 | goto abort; | ||
95 | } | ||
96 | @@ -816,7 +819,7 @@ int restore_stripes(int *dest, unsigned long long *offsets, | ||
97 | } | ||
98 | for (i=0; i < raid_disks ; i++) | ||
99 | if (dest[i] >= 0) { | ||
100 | - if (lseek64(dest[i], | ||
101 | + if (lseek(dest[i], | ||
102 | offsets[i]+offset, 0) < 0) { | ||
103 | rv = -1; | ||
104 | goto abort; | ||
105 | @@ -866,7 +869,7 @@ int test_stripes(int *source, unsigned long long *offsets, | ||
106 | int disk; | ||
107 | |||
108 | for (i = 0 ; i < raid_disks ; i++) { | ||
109 | - if ((lseek64(source[i], offsets[i]+start, 0) < 0) || | ||
110 | + if ((lseek(source[i], offsets[i]+start, 0) < 0) || | ||
111 | (read(source[i], stripes[i], chunk_size) != | ||
112 | chunk_size)) { | ||
113 | free(q); | ||
114 | diff --git a/swap_super.c b/swap_super.c | ||
115 | index b6db574..18c89e2 100644 | ||
116 | --- a/swap_super.c | ||
117 | +++ b/swap_super.c | ||
118 | @@ -1,3 +1,6 @@ | ||
119 | +/* Enable largefile support */ | ||
120 | +#define _FILE_OFFSET_BITS 64 | ||
121 | + | ||
122 | #include <unistd.h> | ||
123 | #include <stdlib.h> | ||
124 | #include <fcntl.h> | ||
125 | @@ -16,8 +19,6 @@ | ||
126 | |||
127 | #define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS) | ||
128 | |||
129 | -extern long long lseek64(int, long long, int); | ||
130 | - | ||
131 | int main(int argc, char *argv[]) | ||
132 | { | ||
133 | int fd, i; | ||
134 | @@ -38,8 +39,8 @@ int main(int argc, char *argv[]) | ||
135 | exit(1); | ||
136 | } | ||
137 | offset = MD_NEW_SIZE_SECTORS(size) * 512LL; | ||
138 | - if (lseek64(fd, offset, 0) < 0LL) { | ||
139 | - perror("lseek64"); | ||
140 | + if (lseek(fd, offset, 0) < 0LL) { | ||
141 | + perror("lseek"); | ||
142 | exit(1); | ||
143 | } | ||
144 | if (read(fd, super, 4096) != 4096) { | ||
145 | @@ -68,8 +69,8 @@ int main(int argc, char *argv[]) | ||
146 | super[32*4+10*4 +i] = t; | ||
147 | } | ||
148 | |||
149 | - if (lseek64(fd, offset, 0) < 0LL) { | ||
150 | - perror("lseek64"); | ||
151 | + if (lseek(fd, offset, 0) < 0LL) { | ||
152 | + perror("lseek"); | ||
153 | exit(1); | ||
154 | } | ||
155 | if (write(fd, super, 4096) != 4096) { | ||
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 new file mode 100644 index 0000000000..0916efafdf --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch | |||
@@ -0,0 +1,24 @@ | |||
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 new file mode 100644 index 0000000000..145c65477a --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From a22b2345b9773d362acd85dd4c4a6a3cda9100d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Tue, 12 Mar 2024 10:54:08 +0100 | ||
4 | Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE | ||
5 | definition | ||
6 | |||
7 | glibc provides this through fcntl.h but musl does not - should | ||
8 | be reported and fixed there. | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl-specific issue] | ||
11 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
12 | --- | ||
13 | Create.c | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/Create.c b/Create.c | ||
17 | index 8082f54..7071f0a 100644 | ||
18 | --- a/Create.c | ||
19 | +++ b/Create.c | ||
20 | @@ -31,6 +31,7 @@ | ||
21 | #include <signal.h> | ||
22 | #include <sys/signalfd.h> | ||
23 | #include <sys/wait.h> | ||
24 | +#include <linux/falloc.h> | ||
25 | |||
26 | static int round_size_and_verify(unsigned long long *size, int chunk) | ||
27 | { | ||
diff --git a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch index e66a15cd79..b758fcd0ab 100644 --- a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch +++ b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch | |||
@@ -1,5 +1,7 @@ | |||
1 | From: martin f. krafft <madduck@debian.org> | 1 | From 319b3191f088cea7b0fb6038ab7625d5e049dcf7 Mon Sep 17 00:00:00 2001 |
2 | Subject: Remove -Werror from compiler flags | 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 | ||
3 | 5 | ||
4 | -Werror seems like a bad idea on released/packaged code because a toolchain | 6 | -Werror seems like a bad idea on released/packaged code because a toolchain |
5 | update (introducing new warnings) could break the build. We'll let upstream | 7 | update (introducing new warnings) could break the build. We'll let upstream |
@@ -9,17 +11,19 @@ Signed-off-by: martin f. krafft <madduck@debian.org> | |||
9 | 11 | ||
10 | Upstream-Status: Pending | 12 | Upstream-Status: Pending |
11 | --- | 13 | --- |
12 | Makefile | 2 +- | 14 | Makefile | 2 +- |
13 | 1 files changed, 1 insertions(+), 1 deletions(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 16 | ||
17 | diff --git a/Makefile b/Makefile | ||
18 | index 9ab6a65..1141971 100644 | ||
15 | --- a/Makefile | 19 | --- a/Makefile |
16 | +++ b/Makefile | 20 | +++ b/Makefile |
17 | @@ -48,7 +48,7 @@ endif | 21 | @@ -50,7 +50,7 @@ ifeq ($(origin CC),default) |
18 | 22 | CC := $(CROSS_COMPILE)gcc | |
19 | CC ?= $(CROSS_COMPILE)gcc | 23 | endif |
20 | CXFLAGS ?= -ggdb | 24 | CXFLAGS ?= -ggdb |
21 | -CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter | 25 | -CWFLAGS ?= -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds |
22 | +CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter | 26 | +CWFLAGS ?= -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIE -Warray-bounds |
23 | ifdef WARN_UNUSED | 27 | ifdef WARN_UNUSED |
24 | CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 | 28 | CWFLAGS += -Wp -O3 |
25 | endif | 29 | endif |
diff --git a/meta/recipes-extended/mdadm/files/include_sysmacros.patch b/meta/recipes-extended/mdadm/files/include_sysmacros.patch deleted file mode 100644 index 8a1d8342d8..0000000000 --- a/meta/recipes-extended/mdadm/files/include_sysmacros.patch +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | include sys/sysmacros.h for major/minor macro definitions | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | --- a/mdadm.h | ||
6 | +++ b/mdadm.h | ||
7 | @@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd, | ||
8 | |||
9 | #include <sys/types.h> | ||
10 | #include <sys/stat.h> | ||
11 | +#include <sys/sysmacros.h> | ||
12 | #include <stdint.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <time.h> | ||
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 7a2c888701..ecd1f037d0 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,4 +1,4 @@ | |||
1 | From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001 | 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> | 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 | 3 | Date: Sun, 15 Mar 2015 09:02:14 +0000 |
4 | Subject: [PATCH] mdadm: Fix build in x32 ABI | 4 | Subject: [PATCH] mdadm: Fix build in x32 ABI |
@@ -12,16 +12,15 @@ data type in x32 ABI is long long int. | |||
12 | Upstream-Status: Pending | 12 | Upstream-Status: Pending |
13 | 13 | ||
14 | Signed-off-by: AnÃbal Limón <anibal.limon@linux.intel.com> | 14 | Signed-off-by: AnÃbal Limón <anibal.limon@linux.intel.com> |
15 | |||
16 | --- | 15 | --- |
17 | monitor.c | 5 ++++- | 16 | monitor.c | 5 ++++- |
18 | 1 file changed, 4 insertions(+), 1 deletion(-) | 17 | 1 file changed, 4 insertions(+), 1 deletion(-) |
19 | 18 | ||
20 | diff --git a/monitor.c b/monitor.c | 19 | diff --git a/monitor.c b/monitor.c |
21 | index 81537ed..7c33382 100644 | 20 | index 4acec67..8dcdfd6 100644 |
22 | --- a/monitor.c | 21 | --- a/monitor.c |
23 | +++ b/monitor.c | 22 | +++ b/monitor.c |
24 | @@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds) | 23 | @@ -447,9 +447,12 @@ static int read_and_act(struct active_array *a, fd_set *fds) |
25 | if (FD_ISSET(mdi->bb_fd, fds)) | 24 | if (FD_ISSET(mdi->bb_fd, fds)) |
26 | check_for_cleared_bb(a, mdi); | 25 | check_for_cleared_bb(a, mdi); |
27 | } | 26 | } |
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 deleted file mode 100644 index 8e2a8a9043..0000000000 --- a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 911f6ea9be0c334885aeff66853b111cbd4066df Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Wed, 10 Feb 2016 17:28:05 +0200 | ||
4 | Subject: [PATCH] mdadm-fix-ptest-build-errors | ||
5 | |||
6 | builds fail with ptest enabled: | ||
7 | |||
8 | | restripe.c: In function 'test_stripes': | ||
9 | | restripe.c:845:4: error: ignoring return value of 'read', declared with | ||
10 | | attribute warn_unused_result [-Werror=unused-result] | ||
11 | | read(source[i], stripes[i], chunk_size); | ||
12 | | ^ | ||
13 | | cc1: all warnings being treated as errors | ||
14 | | Makefile:214: recipe for target 'test_stripe' failed | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
19 | |||
20 | --- | ||
21 | restripe.c | 6 +++++- | ||
22 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/restripe.c b/restripe.c | ||
25 | index 31b07e8..592ba5d 100644 | ||
26 | --- a/restripe.c | ||
27 | +++ b/restripe.c | ||
28 | @@ -864,10 +864,14 @@ int test_stripes(int *source, unsigned long long *offsets, | ||
29 | |||
30 | while (length > 0) { | ||
31 | int disk; | ||
32 | + ssize_t ret; | ||
33 | |||
34 | for (i = 0 ; i < raid_disks ; i++) { | ||
35 | lseek64(source[i], offsets[i]+start, 0); | ||
36 | - read(source[i], stripes[i], chunk_size); | ||
37 | + ret = read(source[i], stripes[i], chunk_size); | ||
38 | + if (ret == -1) { | ||
39 | + printf("Read Failed\n"); | ||
40 | + } | ||
41 | } | ||
42 | for (i = 0 ; i < data_disks ; i++) { | ||
43 | int disk = geo_map(i, start/chunk_size, raid_disks, | ||
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest index fae8071d43..c3f201491e 100644 --- a/meta/recipes-extended/mdadm/files/run-ptest +++ b/meta/recipes-extended/mdadm/files/run-ptest | |||
@@ -1,7 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | mkdir -p /mdadm-testing-dir | 3 | logdir=$PWD/logs |
4 | # make the test continue to execute even one fail | 4 | targetdir=/mdadm-testing-dir |
5 | dir=. ./test --keep-going --disable-integrity | 5 | |
6 | rm -rf $targetdir $logdir | ||
7 | mkdir -p $targetdir $logdir | ||
6 | 8 | ||
7 | rm -rf /mdadm-testing-dir/* | 9 | # make the test continue to execute even one fail |
10 | ./test --keep-going --disable-integrity --skip-broken --save-logs --logdir=$logdir | ||
diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.3.bb index 001d3331a7..228fc6f84e 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.3.bb | |||
@@ -1,8 +1,9 @@ | |||
1 | SUMMARY = "Tool for managing software RAID under Linux" | 1 | SUMMARY = "Tool for managing software RAID under Linux" |
2 | HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" | 2 | HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" |
3 | DESCRIPTION = "mdadm is a Linux utility used to manage and monitor software RAID devices." | ||
3 | 4 | ||
4 | # Some files are GPLv2+ while others are GPLv2. | 5 | # Some files are GPL-2.0-only while others are GPL-2.0-or-later. |
5 | LICENSE = "GPLv2 & GPLv2+" | 6 | LICENSE = "GPL-2.0-only & GPL-2.0-or-later" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
7 | file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ | 8 | file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ |
8 | file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" | 9 | file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" |
@@ -11,42 +12,41 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ | 12 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ |
12 | file://run-ptest \ | 13 | file://run-ptest \ |
13 | file://mdadm-3.3.2_x32_abi_time_t.patch \ | 14 | file://mdadm-3.3.2_x32_abi_time_t.patch \ |
14 | file://mdadm-fix-ptest-build-errors.patch \ | ||
15 | file://0001-mdadm.h-Undefine-dprintf-before-redefining.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 \ | 16 | 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 \ | 17 | file://0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch \ |
18 | file://0001-Compute-abs-diff-in-a-standard-compliant-way.patch \ | ||
19 | file://0001-fix-gcc-8-format-truncation-warning.patch \ | 18 | file://0001-fix-gcc-8-format-truncation-warning.patch \ |
20 | file://debian-no-Werror.patch \ | 19 | file://debian-no-Werror.patch \ |
21 | file://0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch \ | ||
22 | file://mdadm.init \ | 20 | file://mdadm.init \ |
23 | file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ | 21 | file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ |
24 | file://include_sysmacros.patch \ | 22 | file://0001-Makefile-install-mdcheck.patch \ |
25 | file://0001-mdadm-skip-test-11spare-migration.patch \ | 23 | 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 \ | ||
25 | file://0001-util.c-add-limits.h-include-for-NAME_MAX-definition.patch \ | ||
26 | file://0001-include-libgen.h-for-basename-API.patch \ | ||
26 | " | 27 | " |
27 | 28 | ||
28 | SRC_URI[md5sum] = "51bf3651bd73a06c413a2f964f299598" | 29 | SRC_URI[sha256sum] = "416727ae1f1080ea6e3090cea36dd076826fc369151e36ab736557ba92196f9f" |
29 | SRC_URI[sha256sum] = "ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a" | ||
30 | 30 | ||
31 | inherit autotools-brokensep ptest systemd | 31 | inherit autotools-brokensep ptest systemd |
32 | 32 | ||
33 | SYSTEMD_SERVICE_${PN} = "mdmonitor.service" | 33 | DEPENDS = "udev" |
34 | SYSTEMD_AUTO_ENABLE = "disable" | ||
35 | 34 | ||
36 | CFLAGS_append_toolchain-clang = " -Wno-error=address-of-packed-member" | 35 | SYSTEMD_SERVICE:${PN} = "mdmonitor.service" |
36 | SYSTEMD_AUTO_ENABLE = "disable" | ||
37 | 37 | ||
38 | # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h | 38 | # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h |
39 | # prevents 64-bit userland from seeing this definition, instead defaulting | 39 | # prevents 64-bit userland from seeing this definition, instead defaulting |
40 | # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get | 40 | # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get |
41 | # int-ll64.h included | 41 | # int-ll64.h included |
42 | CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__' | 42 | CFLAGS:append:powerpc64 = ' -D__SANE_USERSPACE_TYPES__' |
43 | CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' | 43 | CFLAGS:append:mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' |
44 | CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' | 44 | CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' |
45 | 45 | ||
46 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_unitdir}/system \ | 46 | EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ |
47 | BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev"' | 47 | BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}"' |
48 | 48 | ||
49 | DEBUG_OPTIMIZATION_append = " -Wno-error" | 49 | DEBUG_OPTIMIZATION:append = " -Wno-error" |
50 | 50 | ||
51 | do_compile() { | 51 | do_compile() { |
52 | oe_runmake SYSROOT="${STAGING_DIR_TARGET}" | 52 | oe_runmake SYSROOT="${STAGING_DIR_TARGET}" |
@@ -57,14 +57,14 @@ do_install() { | |||
57 | autotools_do_install | 57 | autotools_do_install |
58 | } | 58 | } |
59 | 59 | ||
60 | do_install_append() { | 60 | do_install:append() { |
61 | install -d ${D}/${sysconfdir}/ | 61 | install -d ${D}/${sysconfdir}/ |
62 | install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf | 62 | install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf |
63 | install -d ${D}/${sysconfdir}/init.d | 63 | install -d ${D}/${sysconfdir}/init.d |
64 | install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor | 64 | install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor |
65 | } | 65 | } |
66 | 66 | ||
67 | do_install_append() { | 67 | do_install:append() { |
68 | oe_runmake install-systemd DESTDIR=${D} | 68 | oe_runmake install-systemd DESTDIR=${D} |
69 | } | 69 | } |
70 | 70 | ||
@@ -76,7 +76,6 @@ do_install_ptest() { | |||
76 | cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests | 76 | cp -R --no-dereference --preserve=mode,links -v ${S}/tests ${D}${PTEST_PATH}/tests |
77 | cp ${S}/test ${D}${PTEST_PATH} | 77 | cp ${S}/test ${D}${PTEST_PATH} |
78 | sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test | 78 | sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/test |
79 | sed -e 's!/var/tmp!/mdadm-testing-dir!g' -i ${D}${PTEST_PATH}/tests/* | ||
80 | sed -i -e '/echo -ne "$_script... "/d' \ | 79 | sed -i -e '/echo -ne "$_script... "/d' \ |
81 | -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \ | 80 | -e 's/echo "succeeded"/echo -e "PASS: $_script"/g' \ |
82 | -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \ | 81 | -e '/save_log fail/N; /_fail=1/i\\t\t\techo -ne "FAIL: $_script"' \ |
@@ -90,12 +89,26 @@ do_install_ptest() { | |||
90 | do | 89 | do |
91 | install -D -m 755 $prg ${D}${PTEST_PATH}/ | 90 | install -D -m 755 $prg ${D}${PTEST_PATH}/ |
92 | done | 91 | done |
92 | |||
93 | # Disable tests causing intermittent autobuilder failures | ||
94 | echo "intermittent failure on autobuilder" > ${D}${PTEST_PATH}/tests/19raid6check.broken | ||
95 | echo "intermittent failure on autobuilder" > ${D}${PTEST_PATH}/tests/20raid5journal.broken | ||
96 | echo "intermittent failure on autobuilder" > ${D}${PTEST_PATH}/tests/21raid5cache.broken | ||
97 | echo "intermittent failure on autobuilder" > ${D}${PTEST_PATH}/tests/10ddf-fail-spare.broken | ||
98 | echo "intermittent failure on autobuilder" > ${D}${PTEST_PATH}/tests/10ddf-fail-stop-readd.broken | ||
93 | } | 99 | } |
94 | 100 | ||
95 | RDEPENDS_${PN}-ptest += "bash e2fsprogs-mke2fs" | 101 | RDEPENDS:${PN} += "bash" |
96 | RRECOMMENDS_${PN}-ptest += " \ | 102 | RDEPENDS:${PN}-ptest += " \ |
103 | bash \ | ||
104 | e2fsprogs-mke2fs \ | ||
105 | util-linux-lsblk \ | ||
106 | util-linux-losetup \ | ||
107 | util-linux-blockdev \ | ||
108 | strace \ | ||
109 | " | ||
110 | RRECOMMENDS:${PN}-ptest += " \ | ||
97 | coreutils \ | 111 | coreutils \ |
98 | util-linux \ | ||
99 | kernel-module-loop \ | 112 | kernel-module-loop \ |
100 | kernel-module-linear \ | 113 | kernel-module-linear \ |
101 | kernel-module-raid0 \ | 114 | kernel-module-raid0 \ |
@@ -104,4 +117,11 @@ RRECOMMENDS_${PN}-ptest += " \ | |||
104 | kernel-module-raid456 \ | 117 | kernel-module-raid456 \ |
105 | " | 118 | " |
106 | 119 | ||
107 | FILES_${PN} += "${systemd_unitdir}/*" | 120 | FILES:${PN} += "${systemd_unitdir}/*" |
121 | |||
122 | # strace is not yet ported to rv32 | ||
123 | RDEPENDS:${PN}-ptest:remove:riscv32 = "strace" | ||
124 | do_install_ptest:append:riscv32 () { | ||
125 | echo "disabled, no strace" > ${D}${PTEST_PATH}/tests/07revert-grow.broken | ||
126 | echo "disabled, no strace" > ${D}${PTEST_PATH}/tests/07revert-inplace.broken | ||
127 | } | ||