summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch28
-rw-r--r--user/mdadm/APKBUILD18
-rw-r--r--user/mdadm/falloc.patch41
-rw-r--r--user/mdadm/missing-header.patch29
-rw-r--r--user/mdadm/sysmacros.patch31
-rw-r--r--user/mdadm/time64.patch2
6 files changed, 110 insertions, 39 deletions
diff --git a/user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch b/user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch
new file mode 100644
index 000000000..d0e63fc98
--- /dev/null
+++ b/user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch
@@ -0,0 +1,28 @@
+From 1750758c7ff526e3560433f6235e5cfa35cf646a Mon Sep 17 00:00:00 2001
+From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+Date: Wed, 6 Mar 2024 15:50:55 +0100
+Subject: [PATCH] udev.c: Do not require libudev.h if DNO_LIBUDEV
+
+libudev may not be presented at all, do not require it.
+
+Reported-by: Boian Bonev <bbonev@ipacct.com>
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+
+diff --git a/udev.c b/udev.c
+index bc4722b0..066e6ab1 100644
+--- a/udev.c
++++ b/udev.c
+@@ -26,7 +26,10 @@
+ #include <signal.h>
+ #include <limits.h>
+ #include <syslog.h>
++
++#ifndef NO_LIBUDEV
+ #include <libudev.h>
++#endif
+
+ static char *unblock_path;
+
+--
+2.43.4
+
diff --git a/user/mdadm/APKBUILD b/user/mdadm/APKBUILD
index 13adda8e2..c39bf46ba 100644
--- a/user/mdadm/APKBUILD
+++ b/user/mdadm/APKBUILD
@@ -2,8 +2,8 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=mdadm
-pkgver=4.1
-pkgrel=2
+pkgver=4.3
+pkgrel=0
pkgdesc="Tool for managing Linux soft RAID arrays"
url="http://neil.brown.name/blog/mdadm"
arch="all"
@@ -17,12 +17,14 @@ source="https://mirrors.kernel.org/pub/linux/utils/raid/$pkgname/$pkgname-$pkgve
$pkgname.initd
$pkgname.confd
$pkgname-raid.initd
- sysmacros.patch
time64.patch
+ falloc.patch
+ missing-header.patch
+ 0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch
"
build() {
- make
+ make CXFLAGS="${CFLAGS} -DNO_LIBUDEV"
}
package() {
@@ -49,9 +51,11 @@ misc() {
install -Dm755 "$builddir"/misc/syslog-events "$subpkgdir"/usr/sbin/handle-mdadm-events
}
-sha512sums="f9bff760795ba7361f19fd1cbc02efedcdaa4b0125b99cf1369e78f30e5c128126751915fde41407d46c544514d864bf82b508419bc08f1db7aa447557e2ca9e mdadm-4.1.tar.gz
+sha512sums="a77af2b371ed27b7bd89b7991302282f0fc77999eb93d7959446fc4b1c28388582d08ff0abfc470a9f9a8c8036acb0158edc44d9a8d406f807ca28111bf74459 mdadm-4.3.tar.gz
ca5f4e3ff5b284102b44e818d11622e1889066e3d18edce2d62c1a44ee8f4cfdc0979121c0462a916c638423c5ebc706c46aa996a7c4f68e030589adc62803f4 mdadm.initd
7d45bf489ef93a4f217ffcf72311eb661b8de7fbf63a5344697252c0d3a684b0123ff60efa5f218da4eb4cda7c88d91c2ef3625d5e44a588e3e1210cb60b0ab9 mdadm.confd
37022593ba090eb0690669b99d6386152242c017c1e608cea7b5420b7a6f754b377e916e4f81e2abf9941e791db78b5820e63db0e706d5de8b35e796678e921c mdadm-raid.initd
-47564bba9d45dfb39d63df9e6cd96ad03b37b314e794af180911481feb4e038035aa1ea6d3de2061982f46b51d1a205168f98e6f0a092f55f6f8e760dbabdae6 sysmacros.patch
-53c2fe442e8657a7a5a011eab1cd1bfcca6c315ee42e4148a50e1314d238f957e7e722e1264c64c548d398a2c6b10600cccf45a4fb69351d3d9ad403f90c1fde time64.patch"
+cb21650ffb7f8bd1a7a72e27e48e5f18de7158cb8ba23315f9fc48ff5fa79662d0a64128d8b61eff76da7a41e0ccbc5be375a10c852823d489aa648baab76ba4 time64.patch
+72544b173499c4ecbcf85284cd4ca5560c2e3548e319e8e7e99967e369f3334e7b77950ff7ed2ed61b6e3c338894595154b2a7c6ccb30b5be1bbd2b75756738c falloc.patch
+669e0f14df7de0650eaa7a395167be3e12c08ed8c53ed0388d45be2a17c2e34dc08a2a77dc0d8692b2cd051154a644d6cc7cfcadbe58125dd4c09f9349bb2451 missing-header.patch
+b8fdfad727872a0bfc9bc97024b0fb49d6d39ae6d9eac81c65adb0c524add014a27bd9157f2c47b14a54fbe30abf87b64fbeb9218f2bc5a0ada48d06e0e6ea66 0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch"
diff --git a/user/mdadm/falloc.patch b/user/mdadm/falloc.patch
new file mode 100644
index 000000000..9f8d4ddd9
--- /dev/null
+++ b/user/mdadm/falloc.patch
@@ -0,0 +1,41 @@
+From 52bead95d2957437c691891fcdc49bd6afccdd49 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 12 Apr 2024 18:45:13 +0200
+Subject: Create.c: fix uclibc build
+
+Define FALLOC_FL_ZERO_RANGE if needed as FALLOC_FL_ZERO_RANGE is only
+defined for aarch64 on uclibc-ng resulting in the following or1k build
+failure since commit 577fd10486d8d1472a6b559066f344ac30a3a391:
+
+Create.c: In function 'write_zeroes_fork':
+Create.c:155:35: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
+ 155 | if (fallocate(fd, FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE,
+ | ^~~~~~~~~~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/0e04bcdb591ca5642053e1f7e31384f06581e989
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+---
+ Create.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Create.c b/Create.c
+index 4397ff49..d94253b1 100644
+--- a/Create.c
++++ b/Create.c
+@@ -32,6 +32,10 @@
+ #include <sys/signalfd.h>
+ #include <sys/wait.h>
+
++#ifndef FALLOC_FL_ZERO_RANGE
++#define FALLOC_FL_ZERO_RANGE 16
++#endif
++
+ static int round_size_and_verify(unsigned long long *size, int chunk)
+ {
+ if (*size == 0)
+--
+cgit 1.2.3-korg
+
diff --git a/user/mdadm/missing-header.patch b/user/mdadm/missing-header.patch
new file mode 100644
index 000000000..85dea22a8
--- /dev/null
+++ b/user/mdadm/missing-header.patch
@@ -0,0 +1,29 @@
+From 8bda86099089b44129ef6206764f9de47a45f0db Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Tue, 12 Mar 2024 11:01:50 +0100
+Subject: util.c: add limits.h include for NAME_MAX definition
+
+Add limits.h include for NAME_MAX definition.
+
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+---
+ util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.c b/util.c
+index 05ad3343..49a9c6e2 100644
+--- a/util.c
++++ b/util.c
+@@ -36,7 +36,7 @@
+ #include <ctype.h>
+ #include <dirent.h>
+ #include <dlfcn.h>
+-
++#include <limits.h>
+
+ /*
+ * following taken from linux/blkpg.h because they aren't
+--
+cgit 1.2.3-korg
+
diff --git a/user/mdadm/sysmacros.patch b/user/mdadm/sysmacros.patch
deleted file mode 100644
index 22a393447..000000000
--- a/user/mdadm/sysmacros.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/580188
-
-From 5c97e465b33bf8fefb17da7f553a1c3812e508d5 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 19 Apr 2016 18:10:54 -0400
-Subject: [PATCH] include sys/sysmacros.h for major/minor/makedev prototypes
-
-These funcs are defined in sys/sysmacros.h, so include it for them.
-It works today due to an implicit include by sys/types.h, but the
-various Linux C libraries are moving away from that.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- mdadm.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mdadm.h b/mdadm.h
-index d209488..b8767a7 100755
---- a/mdadm.h
-+++ b/mdadm.h
-@@ -33,6 +33,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
- # endif
- #endif
-
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <stdint.h>
---
-2.7.4
-
diff --git a/user/mdadm/time64.patch b/user/mdadm/time64.patch
index fd05fcb2f..aff2af9cd 100644
--- a/user/mdadm/time64.patch
+++ b/user/mdadm/time64.patch
@@ -8,7 +8,7 @@
#include <sys/syscall.h>
#include <sys/select.h>
#include <signal.h>
-@@ -447,7 +448,7 @@
+@@ -449,7 +450,7 @@
}
gettimeofday(&tv, NULL);