diff options
5 files changed, 21 insertions, 83 deletions
diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile index f6696bf21c..553728194e 100644 --- a/package/utils/mdadm/Makefile +++ b/package/utils/mdadm/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mdadm -PKG_VERSION:=4.1 -PKG_RELEASE:=2 +PKG_VERSION:=4.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm -PKG_HASH:=ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a +PKG_HASH:=461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_CPE_ID:=cpe:/a:mdadm_project:mdadm @@ -48,11 +48,16 @@ TARGET_CFLAGS += \ -DCONFFILE='\"/var/etc/mdadm.conf\"' \ -DMAP_DIR='\"/var/run/mdadm\"' \ -DMDMON_DIR='\"/var/run/mdadm\"' \ - -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"' + -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"' \ + -DNO_LIBUDEV + +TARGET_CXFLAGS = -DNO_LIBUDEV TARGET_LDFLAGS += -Wl,--gc-sections -MAKE_FLAGS += CHECK_RUN_DIR=0 +MAKE_FLAGS += \ + CHECK_RUN_DIR=0 \ + CXFLAGS="$(TARGET_CXFLAGS)" define Build/Compile $(call Build/Compile/Default,mdadm) diff --git a/package/utils/mdadm/patches/100-cross_compile.patch b/package/utils/mdadm/patches/100-cross_compile.patch index 0a5fa017c6..790d7755b0 100644 --- a/package/utils/mdadm/patches/100-cross_compile.patch +++ b/package/utils/mdadm/patches/100-cross_compile.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -97,7 +97,7 @@ DLM:=$(shell [ -f /usr/include/libdlm.h +@@ -99,7 +99,7 @@ DLM:=$(shell [ -f /usr/include/libdlm.h DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\" diff --git a/package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch b/package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch deleted file mode 100644 index 356d0deec8..0000000000 --- a/package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6d369e8f226594632ce4260129509daf7030de0a 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 - -dprintf is also defined in libc see -usr/include/bits/stdio2.h, this comes into -play especially when fortify sources is enabled -and compilers like clang reports the override - -In file included from policy.c:25: -./mdadm.h:1562:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined] - ^ -/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(+) - ---- a/mdadm.h -+++ b/mdadm.h -@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct m - } - - #ifdef DEBUG -+#undef dprintf - #define dprintf(fmt, arg...) \ - fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##arg) - #define dprintf_cont(fmt, arg...) \ - fprintf(stderr, fmt, ##arg) - #else -+#undef dprintf - #define dprintf(fmt, arg...) \ - ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; }) - #define dprintf_cont(fmt, arg...) \ diff --git a/package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch b/package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch deleted file mode 100644 index 891b5c62f0..0000000000 --- a/package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 452dc4d13a012cdcb05088c0dbc699959c4d6c73 Mon Sep 17 00:00:00 2001 -From: Baruch Siach <baruch@tkos.co.il> -Date: Tue, 6 Aug 2019 16:05:23 +0300 -Subject: mdadm.h: include sysmacros.h unconditionally - -musl libc now also requires sys/sysmacros.h for the major/minor macros. -All supported libc implementations carry sys/sysmacros.h, including -diet-libc, klibc, and uclibc-ng. - -Cc: Hauke Mehrtens <hauke@hauke-m.de> -Signed-off-by: Baruch Siach <baruch@tkos.co.il> -Signed-off-by: Jes Sorensen <jsorensen@fb.com> ---- - mdadm.h | 2 -- - 1 file changed, 2 deletions(-) - ---- a/mdadm.h -+++ b/mdadm.h -@@ -45,10 +45,8 @@ extern __off64_t lseek64 __P ((int __fd, - #include <errno.h> - #include <string.h> - #include <syslog.h> --#ifdef __GLIBC__ - /* Newer glibc requires sys/sysmacros.h directly for makedev() */ - #include <sys/sysmacros.h> --#endif - #ifdef __dietlibc__ - #include <strings.h> - /* dietlibc has deprecated random and srandom!! */ diff --git a/package/utils/mdadm/patches/200-reduce_size.patch b/package/utils/mdadm/patches/200-reduce_size.patch index 6905c2ccfe..163e125c22 100644 --- a/package/utils/mdadm/patches/200-reduce_size.patch +++ b/package/utils/mdadm/patches/200-reduce_size.patch @@ -1,19 +1,19 @@ --- a/Incremental.c +++ b/Incremental.c -@@ -1619,6 +1619,10 @@ static int Incremental_container(struct - if (ra_all == ra_blocked) - return 0; +@@ -983,6 +983,10 @@ static int array_try_spare(char *devname + goto next; + } -+#ifndef MDADM_FULL -+ return 0; -+#endif ++ #ifndef MDADM_FULL ++ return 0; ++ #endif + - /* Now move all suitable spares from spare container */ - domains = domain_from_array(list, st->ss->name); - memcpy(suuid, uuid_zero, sizeof(int[4])); + dl = domain_from_array(sra, st2->ss->name); + if (domain_test(dl, pol, st2->ss->name) != 1) { + /* domain test fails */ --- a/util.c +++ b/util.c -@@ -1220,7 +1220,9 @@ void wait_for(char *dev, int fd) +@@ -1147,7 +1147,9 @@ void wait_for(char *dev, int fd) struct superswitch *superlist[] = { &super0, &super1, |