diff options
Diffstat (limited to 'meta/recipes-extended/mdadm/files')
17 files changed, 445 insertions, 146 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch b/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch new file mode 100644 index 0000000000..3fb46cc60a --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch @@ -0,0 +1,74 @@ +From 969fbb35e40100f599d4a9781911251f21792698 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 27 Jan 2022 17:53:01 +0800 +Subject: [PATCH] Fix parsing of "-r" in monitor/manager mode + +This revert commit 546047688e1 [mdadm: fix coredump of mdadm --monitor +-r], and fix the coredump issue of 'mdadm --monitor -r'. + +commit 546047688e1 make -r not work in manager mode, and testcase +00multipath failed. + +Upstream-Status: Submitted [send to maintainer jsorensen@fb.com] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + ReadMe.c | 8 +++++--- + mdadm.c | 2 ++ + mdadm.h | 1 + + 3 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/ReadMe.c b/ReadMe.c +index 8139976..070eea5 100644 +--- a/ReadMe.c ++++ b/ReadMe.c +@@ -81,11 +81,13 @@ char Version[] = "mdadm - v" VERSION " - " VERS_DATE EXTRAVERSION "\n"; + * found, it is started. + */ + +-char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:r:n:x:u:c:d:z:U:N:safRSow1tye:k"; ++char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; + char short_bitmap_options[]= +- "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; ++ "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; + char short_bitmap_auto_options[]= +- "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; ++ "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; ++char short_increment_options[]= ++ "-ABCDEFGIQhVXYWZ:vqbc:i:l:r:p:m:n:x:u:c:d:z:U:N:safRSow1tye:k:"; + + struct option long_options[] = { + {"manage", 0, 0, ManageOpt}, +diff --git a/mdadm.c b/mdadm.c +index 26299b2..2a3b2ee 100644 +--- a/mdadm.c ++++ b/mdadm.c +@@ -227,6 +227,7 @@ int main(int argc, char *argv[]) + shortopt = short_bitmap_auto_options; + break; + case 'F': newmode = MONITOR; ++ shortopt = short_increment_options; + break; + case 'G': newmode = GROW; + shortopt = short_bitmap_options; +@@ -268,6 +269,7 @@ int main(int argc, char *argv[]) + + case NoSharing: + newmode = MONITOR; ++ shortopt = short_increment_options; + break; + } + if (mode && newmode == mode) { +diff --git a/mdadm.h b/mdadm.h +index ecfc137..42148dd 100644 +--- a/mdadm.h ++++ b/mdadm.h +@@ -421,6 +421,7 @@ enum mode { + extern char short_options[]; + extern char short_bitmap_options[]; + extern char short_bitmap_auto_options[]; ++extern char short_increment_options[]; + extern struct option long_options[]; + extern char Version[], Usage[], Help[], OptionHelp[], + *mode_help[], 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 deb7486383..298f276cd6 100644 --- a/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch +++ b/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch @@ -1,4 +1,4 @@ -From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001 +From a9166bf422da1001bac9cc819386bf39b7cd1b73 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" <maxin.john@intel.com> Date: Tue, 9 Feb 2016 11:44:01 +0200 Subject: [PATCH] Fix the path of corosync and dlm header files check @@ -9,25 +9,23 @@ Fix it. Upstream-Status: Inappropriate [Yocto specific] Signed-off-by: Maxin B. John <maxin.john@intel.com> + --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index fd79cfb..34150a9 100644 +index 2767ac6..46bf57b 100644 --- a/Makefile +++ b/Makefile -@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR) - FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots +@@ -91,8 +91,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots SYSTEMD_DIR=/lib/systemd/system + LIB_DIR=/usr/libexec/mdadm -COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) -DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM) -+COROSYNC:=$(shell [ -d $(SYSROOT)/usr/include/corosync ] || echo -DNO_COROSYNC) ++COROSYNC:=$(shell [ -f $(SYSROOT)/usr/include/corosync/cmap.h ] || echo -DNO_COROSYNC) +DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM) DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" --- -2.4.0 - 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..3f76ef54d8 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch @@ -0,0 +1,30 @@ +From 97e776724ab9763c5bca9816370bb1635b7a8232 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Tue, 25 Jan 2022 16:25:01 +0800 +Subject: [PATCH] Makefile: install mdcheck + +The mdcheck_xxx.service files use mdcheck, but it's not installed. +We need to install this script. + +Upstream-Status: Submitted [Sent patch to maintainer] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 2a51d813..db40c7fd 100644 +--- a/Makefile ++++ b/Makefile +@@ -303,6 +303,7 @@ install-systemd: systemd/mdmon@.service + install-bin: mdadm mdmon + $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm + $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon ++ $(INSTALL) -D -m 755 misc/mdcheck $(DESTDIR)/usr/share/mdadm/mdcheck + + uninstall: + rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm +-- +2.17.1 + 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 new file mode 100644 index 0000000000..fb4bc165fb --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Revert-tests-wait-for-complete-rebuild-in-integrity-.patch @@ -0,0 +1,53 @@ +From 02a41c3fd560fb5250186dd6b3cff6b21daa2e2b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <Mingli.Yu@windriver.com> +Date: Mon, 15 Jul 2019 14:12:24 +0800 +Subject: [PATCH] Revert "tests: wait for complete rebuild in integrity checks" + +This reverts commit e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74 +as the logic "check state 'U*'" will make the test enters +infinite loop especially in qemu env, so revert it to +use the previous logic "check wait" which also used +commonly by other tests such as tests/02r5grow, tests/07revert-grow +and etc. + +Upstream-Status: Submitted [https://marc.info/?l=linux-raid&m=156317157314030&w=2] + +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + tests/01r5integ | 2 +- + tests/01raid6integ | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/01r5integ b/tests/01r5integ +index 48676a2..ffb30ce 100644 +--- a/tests/01r5integ ++++ b/tests/01r5integ +@@ -27,7 +27,7 @@ do + exit 1 + fi + mdadm $md0 -a $i +- while ! (check state 'U*'); do check wait; sleep 0.2; done ++ check wait + done + mdadm -S $md0 + done +diff --git a/tests/01raid6integ b/tests/01raid6integ +index 12f4d81..c6fcdae 100644 +--- a/tests/01raid6integ ++++ b/tests/01raid6integ +@@ -47,10 +47,10 @@ do + exit 1 + fi + mdadm $md0 -a $first +- while ! (check state 'U*_U*'); do check wait; sleep 0.2; done ++ check wait + done + mdadm $md0 -a $second +- while ! (check state 'U*'); do check wait; sleep 0.2; done ++ check wait + totest="$totest $second" + done + mdadm -S $md0 +-- +2.7.4 + 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 new file mode 100644 index 0000000000..12bf6a5920 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Use-CC-to-check-for-implicit-fallthrough-warning-sup.patch @@ -0,0 +1,28 @@ +From 37c35f94d9d95dbd2b5f8a919f5478be51453590 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 13 Oct 2017 10:27:34 -0700 +Subject: [PATCH] Use CC to check for implicit-fallthrough warning support + +This warning it new in gcc7 and in cross compile case +its possible that build host gcc is version 7+ but the +cross compile used for compiling mdadm is < version 7 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 46bf57b..a075912 100644 +--- a/Makefile ++++ b/Makefile +@@ -53,7 +53,7 @@ ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif + +-FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) ++FALLTHROUGH := $(shell ${CC} -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) + ifneq "$(FALLTHROUGH)" "0" + CWFLAGS += -Wimplicit-fallthrough=0 + 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 new file mode 100644 index 0000000000..fa9c8cc835 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-fix-gcc-8-format-truncation-warning.patch @@ -0,0 +1,39 @@ +From 3158d3788c2e0fb75ace2c89840bd8a977fb4cb0 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Fri, 14 Dec 2018 15:12:31 +0800 +Subject: [PATCH] fix gcc-8 format-truncation warning + +While compiling with `-Werror=format-truncation=', it failed +[snip] +|super0.c:236:32: error: 'snprintf' output may be truncated +before the last format character [-Werror=format-truncation=] +| snprintf(nb, sizeof(nb), "%4d", d); +| ^ +|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes +into a destination of size 11 +| snprintf(nb, sizeof(nb), "%4d", d); +[snip] + +Upstream-Status: Submitted [https://github.com/neilbrown/mdadm/pull/34] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + super0.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super0.c b/super0.c +index 756cab5..12c28da 100644 +--- a/super0.c ++++ b/super0.c +@@ -229,7 +229,7 @@ static void examine_super0(struct supertype *st, char *homehost) + d++) { + mdp_disk_t *dp; + char *dv; +- char nb[11]; ++ char nb[12]; + int wonly, failfast; + if (d>=0) dp = &sb->disks[d]; + else dp = &sb->this_disk; +-- +2.7.4 + diff --git a/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch b/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch deleted file mode 100644 index acd64ada22..0000000000 --- a/meta/recipes-extended/mdadm/files/0001-include-sys-sysmacros.h-for-major-minor-defintions.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 943616e5dffb79f307e4bd9b249d316212998750 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 18 Dec 2016 08:30:51 +0000 -Subject: [PATCH] include <sys/sysmacros.h> for major/minor defintions - -glibc 2.25 is warning about it if applications depend on -sys/types.h for these macros, it expects to be included -from <sys/sysmacros.h> - -Fixes -| Grow.c:3534:13: error: In the GNU C Library, "minor" is defined -| by <sys/sysmacros.h>. For historical compatibility, it is -| currently defined by <sys/types.h> as well, but we plan to -| remove this soon. To use "minor", include <sys/sysmacros.h> -| directly. If you did not intend to use a system-defined macro -| "minor", you should undefine it after including <sys/types.h>. [-Werror] -| Query.c: In function 'Query': -| Query.c:105:13: error: In the GNU C Library, "makedev" is defined -| by <sys/sysmacros.h>. For historical compatibility, it is -| currently defined by <sys/types.h> as well, but we plan to -| remove this soon. To use "makedev", include <sys/sysmacros.h> -| directly. If you did not intend to use a system-defined macro -| "makedev", you should undefine it after including <sys/types.h>. [-Werror] -| makedev((unsigned)disc.major,(unsigned)disc.minor) == stb.st_rdev) -| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - mdadm.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mdadm.h b/mdadm.h -index 8c8f4d1..3ce13b5 100755 ---- a/mdadm.h -+++ b/mdadm.h -@@ -34,6 +34,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); - #endif - - #include <sys/types.h> -+#include <sys/sysmacros.h> - #include <sys/stat.h> - #include <stdint.h> - #include <stdlib.h> --- -1.9.1 - 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 new file mode 100644 index 0000000000..e00287cab1 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch @@ -0,0 +1,28 @@ +From 5fdc0173cb4fcf8656f0889ad364d2549795607f Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Mon, 1 Jul 2019 11:34:49 +0800 +Subject: [PATCH] mdadm: add option -y for use syslog to recive event report + +fix service startup failed when there is +No mail address or alert command + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + systemd/mdmonitor.service | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/systemd/mdmonitor.service b/systemd/mdmonitor.service +index 46f7b88..3fc4687 100644 +--- a/systemd/mdmonitor.service ++++ b/systemd/mdmonitor.service +@@ -13,4 +13,4 @@ DefaultDependencies=no + Environment= MDADM_MONITOR_ARGS=--scan + EnvironmentFile=-/run/sysconfig/mdadm + ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh +-ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS ++ExecStart=BINDIR/mdadm --monitor -y $MDADM_MONITOR_ARGS +-- +2.7.4 + 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 new file mode 100644 index 0000000000..84517caade --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-skip-test-11spare-migration.patch @@ -0,0 +1,43 @@ +From 1b83afa7c3121f819e72ea74883f8b6d61d6548e Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Fri, 6 Sep 2019 10:59:02 +0800 +Subject: [PATCH] mdadm: skip test 11spare-migration + +11spare-migration is a test series to check mdadm Monitor migrates spares +according to rules in /etc/mdadm.conf defined by POLICY lines. + +[snip] +for scan in no yes; do + for platform in 1.2 imsm; do + try + done +done +[snip] + +"try" includes near 20 sub testcase, so there are nearly 80 subcases need to run, +so it will take long time than ptest-runner timeout limit, skip it as workaround. + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + test | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/test b/test +index 711a3c7..880dd1d 100755 +--- a/test ++++ b/test +@@ -272,6 +272,9 @@ main() { + else + for script in $testdir/$prefix $testdir/$prefix*[^~] + do ++ if [ $script == "$testdir/11spare-migration" ];then ++ continue ++ fi + do_test $script + done + fi +-- +2.7.4 + diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch index 4cf809290d..a1e7e59323 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 @@ -From 6d369e8f226594632ce4260129509daf7030de0a Mon Sep 17 00:00:00 2001 +From b431cb4e1ed060122fa300dc0008f74080d38f73 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 9 May 2016 22:03:57 +0000 Subject: [PATCH] mdadm.h: Undefine dprintf before redefining @@ -14,17 +14,16 @@ In file included from policy.c:25: /mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- Upstream-Status: Pending - +--- mdadm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mdadm.h b/mdadm.h -index 230e60f..8c8f4d1 100755 +index 387e681..bb943bf 100644 --- a/mdadm.h +++ b/mdadm.h -@@ -1554,11 +1554,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) +@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container) } #ifdef DEBUG @@ -38,6 +37,3 @@ index 230e60f..8c8f4d1 100755 #define dprintf(fmt, arg...) \ ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; }) #define dprintf_cont(fmt, arg...) \ --- -1.9.1 - diff --git a/meta/recipes-extended/mdadm/files/debian-no-Werror.patch b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch new file mode 100644 index 0000000000..fa90647489 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/debian-no-Werror.patch @@ -0,0 +1,30 @@ +From adb75f0bdec97dbe4aa15cc988d349775f7995ff Mon Sep 17 00:00:00 2001 +From: "martin f. krafft" <madduck@debian.org> +Date: Mon, 3 Jan 2022 19:14:12 +0000 +Subject: [PATCH] Remove -Werror from compiler flags + +-Werror seems like a bad idea on released/packaged code because a toolchain +update (introducing new warnings) could break the build. We'll let upstream +use it to beautify the code, but remove it for out builds. + +Signed-off-by: martin f. krafft <madduck@debian.org> + +Upstream-Status: Pending + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 716c97c..40354ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -50,7 +50,7 @@ ifeq ($(origin CC),default) + CC := $(CROSS_COMPILE)gcc + endif + CXFLAGS ?= -ggdb +-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter ++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter + ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch deleted file mode 100644 index 54bf1d79ab..0000000000 --- a/meta/recipes-extended/mdadm/files/gcc-4.9.patch +++ /dev/null @@ -1,22 +0,0 @@ -super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value] - snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, - ^ -cc1: all warnings being treated as errors -make: *** [super-intel.o] Error 1 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending - -Index: mdadm-3.3/super-intel.c -=================================================================== ---- mdadm-3.3.orig/super-intel.c 2014-05-02 15:08:21.154319651 -0700 -+++ mdadm-3.3/super-intel.c 2014-05-02 15:09:31.470985794 -0700 -@@ -5060,7 +5060,7 @@ - spare->cache_size = mpb->cache_size, - spare->pwr_cycle_count = __cpu_to_le32(1), - -- snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, -+ (void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, - MPB_SIGNATURE MPB_VERSION_RAID0); - - for (d = super->disks; d; d = d->next) { diff --git a/meta/recipes-extended/mdadm/files/include_sysmacros.patch b/meta/recipes-extended/mdadm/files/include_sysmacros.patch new file mode 100644 index 0000000000..8a1d8342d8 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/include_sysmacros.patch @@ -0,0 +1,14 @@ +include sys/sysmacros.h for major/minor macro definitions + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/mdadm.h ++++ b/mdadm.h +@@ -35,6 +35,7 @@ extern __off64_t lseek64 __P ((int __fd, + + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/sysmacros.h> + #include <stdint.h> + #include <stdlib.h> + #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 c656d073e3..7a2c888701 100644 --- a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch +++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch @@ -1,3 +1,11 @@ +From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> +Date: Sun, 15 Mar 2015 09:02:14 +0000 +Subject: [PATCH] mdadm: Fix build in x32 ABI +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + When try to print time_t values as a long int it causes an error because time_t data type in x32 ABI is long long int. @@ -5,13 +13,17 @@ Upstream-Status: Pending Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> -Index: mdadm-3.3.4/monitor.c -=================================================================== ---- mdadm-3.3.4.orig/monitor.c -+++ mdadm-3.3.4/monitor.c -@@ -257,9 +257,12 @@ static int read_and_act(struct active_ar - mdi->curr_state = read_dev_state(mdi->state_fd); - } +--- + monitor.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/monitor.c b/monitor.c +index 81537ed..7c33382 100644 +--- a/monitor.c ++++ b/monitor.c +@@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds) + if (FD_ISSET(mdi->bb_fd, fds)) + check_for_cleared_bb(a, mdi); } - gettimeofday(&tv, NULL); 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 267c007c21..0000000000 --- a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001 -From: "Maxin B. John" <maxin.john@intel.com> -Date: Wed, 10 Feb 2016 17:28:05 +0200 -Subject: [PATCH] mdadm-fix-ptest-build-errors - -builds fail with ptest enabled: - -| restripe.c: In function 'test_stripes': -| restripe.c:845:4: error: ignoring return value of 'read', declared with -| attribute warn_unused_result [-Werror=unused-result] -| read(source[i], stripes[i], chunk_size); -| ^ -| cc1: all warnings being treated as errors -| Makefile:214: recipe for target 'test_stripe' failed - -Upstream-Status: Pending - -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- - restripe.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/restripe.c b/restripe.c -index 56dca73..d24b2b4 100644 ---- a/restripe.c -+++ b/restripe.c -@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets, - - while (length > 0) { - int disk; -+ ssize_t ret; - - for (i = 0 ; i < raid_disks ; i++) { - lseek64(source[i], offsets[i]+start, 0); -- read(source[i], stripes[i], chunk_size); -+ ret = read(source[i], stripes[i], chunk_size); -+ if (ret == -1) { -+ printf("Read Failed\n"); -+ } - } - for (i = 0 ; i < data_disks ; i++) { - int disk = geo_map(i, start/chunk_size, raid_disks, --- -2.4.0 - diff --git a/meta/recipes-extended/mdadm/files/mdadm.init b/meta/recipes-extended/mdadm/files/mdadm.init new file mode 100644 index 0000000000..cab91b9acc --- /dev/null +++ b/meta/recipes-extended/mdadm/files/mdadm.init @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Start the MD monitor daemon for all active MD arrays if desired. +# +### BEGIN INIT INFO +# Provides: mdadm +# Required-Start: $local_fs $syslog mdadm-raid +# Required-Stop: $local_fs $syslog mdadm-raid +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: MD monitoring daemon +# Description: mdadm provides a monitor mode, in which it will scan for +# problems with the MD devices. If a problem is found, the +# administrator is alerted via email, or a custom script is +# run. +### END INIT INFO +# + +MDADM=/sbin/mdadm +RUNDIR=/var/run/mdadm +PIDFILE=$RUNDIR/monitor.pid +DEBIANCONFIG=/etc/default/mdadm + +test -x "$MDADM" || exit 0 + +test -f /proc/mdstat || exit 0 + +START_DAEMON=true +test -f $DEBIANCONFIG && . $DEBIANCONFIG + +. /lib/lsb/init-functions + +# Include functions +. /etc/init.d/functions + +case "${1:-}" in + start) + if is_true $START_DAEMON; then + log_daemon_msg "Starting MD monitoring service" "mdadm --monitor" + mkdir -p $RUNDIR + start-stop-daemon -S -p $PIDFILE -x $MDADM -- \ + --monitor --pid-file $PIDFILE --daemonise --scan ${DAEMON_OPTIONS:-} + RETVAL=$? + log_end_msg $RETVAL + exit $RETVAL + fi + ;; + stop) + if [ -f $PIDFILE ] ; then + log_daemon_msg "Stopping MD monitoring service" "mdadm --monitor" + start-stop-daemon -K -p $PIDFILE -x $MDADM + RETVAL=$? + rm -f $PIDFILE + log_end_msg $RETVAL + exit $RETVAL + fi + ;; + status) + status -p $PIDFILE "$MDADM" && exit 0 || exit $? + ;; + restart|reload|force-reload) + ${0:-} stop + ${0:-} start + ;; + *) + echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest index 5b276090f5..fae8071d43 100644 --- a/meta/recipes-extended/mdadm/files/run-ptest +++ b/meta/recipes-extended/mdadm/files/run-ptest @@ -1,10 +1,7 @@ #!/bin/sh -./test &>./test.log -if [ $? -eq 0 ] -then - echo "PASS: mdadm" - rm test.log -else - echo "FAIL: mdadm" -fi +mkdir -p /mdadm-testing-dir +# make the test continue to execute even one fail +dir=. ./test --keep-going --disable-integrity + +rm -rf /mdadm-testing-dir/* |