Skip to contentSkip to conversation

package/mdadm: bump to version 4.6

PATCH Superseded Maxin John 2 participants 3 messages Apr 25

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Maxin John

author
#0 lore raw

PATCH v2 1/1 package/mdadm: bump to version 4.6

Drop upstreamed/backported patches.

Release announcements:
4.6:
https://lore.kernel.org/linux-raid/CALTww2_2pjjOSsVj-WT++m35555CjnPWokU7fut+HwUJVV-=ZQ@mail.gmail.com/

4.5:
https://lore.kernel.org/linux-raid/CALTww293wnLE2+eZsZ42oyNZhS_cc2agB4GNqTz8j3xiP0ALWA@mail.gmail.com/

4.4:
https://lore.kernel.org/linux-raid/20241213121438.7ed6a0fd@mtkaczyk-private-dev/

Upstream mdadm project has moved its primary development to GitHub:
https://github.com/md-raid-utilities/mdadm
Updated download site accordingly.

---
Changes v1 -> v2:
- add missing 4.4 and 4.5 release links
- switch download site to GitHub
- drop unnecessary MDADM_SOURCE

---
 ...not-require-libudev-h-if-DNO_LIBUDEV.patch | 34 ---------------
 ...ts-h-include-for-NAME_MAX-definition.patch | 32 --------------
 .../0003-Create.c-fix-uclibc-build.patch      | 42 -------------------
 .../0004-Makefile-Move-pie-to-LDFLAGS.patch   | 40 ------------------
 package/mdadm/mdadm.hash                      |  5 ++-
 package/mdadm/mdadm.mk                        |  5 +--
 6 files changed, 5 insertions(+), 153 deletions(-)
 delete mode 100644 package/mdadm/0001-udev-c-Do-not-require-libudev-h-if-DNO_LIBUDEV.patch
 delete mode 100644 package/mdadm/0002-util-c-add-limits-h-include-for-NAME_MAX-definition.patch
 delete mode 100644 package/mdadm/0003-Create.c-fix-uclibc-build.patch
 delete mode 100644 package/mdadm/0004-Makefile-Move-pie-to-LDFLAGS.patch
package/mdadm/0001-udev-c-Do-not-require-libudev-h-if-DNO_LIBUDEV.patch deleted +0 -34
deleted file mode 100644
index 5c3d6e03b436..000000000000
@@ -1,34 +0,0 @@
-From 1750758c7ff526e3560433f6235e5cfa35cf646a Mon Sep 17 00:00:00 2001
-From: Mariusz Tkaczyk <[email protected]>
-Date: Wed, 6 Mar 2024 15:50:55 +0100
-Subject: 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 <[email protected]>
-Signed-off-by: Mariusz Tkaczyk <[email protected]>
-
-Upstream: https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=1750758c7ff526e3560433f6235e5cfa35cf646a
-Signed-off-by: Fabrice Fontaine <[email protected]>
----
- udev.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-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;
- 
--- 
-cgit 1.2.3-korg
-
package/mdadm/0002-util-c-add-limits-h-include-for-NAME_MAX-definition.patch deleted +0 -32
deleted file mode 100644
index ceaf7f923caf..000000000000
@@ -1,32 +0,0 @@
-From 8bda86099089b44129ef6206764f9de47a45f0db Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <[email protected]>
-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 <[email protected]>
-Signed-off-by: Mariusz Tkaczyk <[email protected]>
-
-Upstream: https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=8bda86099089b44129ef6206764f9de47a45f0db
-Signed-off-by: Fabrice Fontaine <[email protected]>
----
- 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
-
package/mdadm/0003-Create.c-fix-uclibc-build.patch deleted +0 -42

42 lines not on this page · raw message

package/mdadm/0004-Makefile-Move-pie-to-LDFLAGS.patch deleted +0 -40
deleted file mode 100644
index 4d46d5823008..000000000000
@@ -1,40 +0,0 @@
-From 893a55831e5abbcd15b171db66fa1f389fb61506 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Tue, 7 May 2024 19:32:16 +0200
-Subject: Makefile: Move -pie to LDFLAGS
-
-Move -pie from LDLIBS to LDFLAGS and make LDFLAGS configurable to allow
-the user to drop it by setting their own LDFLAGS (e.g. PIE could be
-enabled or disabled by the buildsystem such as buildroot).
-
-Suggested-by: Mariusz Tkaczyk <[email protected]>
-Signed-off-by: Fabrice Fontaine <[email protected]>
-Signed-off-by: Mariusz Tkaczyk <[email protected]>
-
-Upstream: https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=893a55831e5abbcd15b171db66fa1f389fb61506
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 7c221a89..adac7905 100644
---- a/Makefile
-+++ b/Makefile
-@@ -132,12 +132,12 @@ CFLAGS += -DUSE_PTHREADS
- MON_LDFLAGS += -pthread
- endif
- 
--LDFLAGS = -Wl,-z,now,-z,noexecstack
-+LDFLAGS ?= -pie -Wl,-z,now,-z,noexecstack
- 
- # If you want a static binary, you might uncomment these
- # LDFLAGS += -static
- # STRIP = -s
--LDLIBS = -ldl -pie
-+LDLIBS = -ldl
- 
- # To explicitly disable libudev, set -DNO_LIBUDEV in CXFLAGS
- ifeq (, $(findstring -DNO_LIBUDEV,  $(CXFLAGS)))
--- 
-cgit 1.2.3-korg
-
package/mdadm/mdadm.hash +3 -2
index 84bae1aebfd5..90c7c0728e1b 100644
@@ -1,4 +1,5 @@
-# From https://www.kernel.org/pub/linux/utils/raid/mdadm/sha256sums.asc
-sha256  416727ae1f1080ea6e3090cea36dd076826fc369151e36ab736557ba92196f9f  mdadm-4.3.tar.xz
+# Locally calculated
+sha256  202a7525e6f2b44395a9ef2c561082c7d6d8204e9addfe3f6268bfb141efc093  mdadm-4.6.tar.gz
+
 # Locally calculated
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/mdadm/mdadm.mk +2 -3
index 421f06d6953f..785616f1c59b 100644
@@ -4,9 +4,8 @@
 #
 ################################################################################
 
-MDADM_VERSION = 4.3
-MDADM_SOURCE = mdadm-$(MDADM_VERSION).tar.xz
-MDADM_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/raid/mdadm
+MDADM_VERSION = 4.6
+MDADM_SITE = https://github.com/md-raid-utilities/mdadm/archive/refs/tags
 MDADM_LICENSE = GPL-2.0+
 MDADM_LICENSE_FILES = COPYING
 MDADM_CPE_ID_VALID = YES
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Maxin,

Thanks for the v2. This new 4.6 version is introducing 2 issues.

Quoted 5 lines · Maxin John

Drop upstreamed/backported patches.

Release announcements:
4.6:
https://lore.kernel.org/linux-raid/CALTww2_2pjjOSsVj-WT++m35555CjnPWokU7fut+HwUJVV-=ZQ@mail.gmail.com/

First, it breaks the mdadm runtime test. See:
https://gitlab.com/jolivain/buildroot/-/jobs/14088239652

You can reproduce the issue with the command:

utils/docker-run \
support/testing/run-tests \
-k -d dl -o output_folder tests.package.test_mdadm

This new version asks a question and blocks the test.

This commit should make sure the test keep working. So this can be fixed by passing the answer to the question. Adding "--bitmap=none" to the "mdadm --create" options should fix the issue. See:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02.1/support/testing/tests/package/test_mdadm.py?ref_type=tags#L72

Also, this new version breaks with toolchains with old kernel headers. See:
https://gitlab.com/jolivain/buildroot/-/jobs/14088277312

You can reproduce the issue with the command:

utils/test-pkg -p mdadm

This is due to mdadm upstream commit 71574efb077131701b3da874df0045f259ca3448 (in mdadm 4.0) which introduced a usage of MD_DISK_FAILFAST but was also including the definition. Then upstream commit f5889f9a1b8753a1472dfef9d025da2bae395239 (in mdadm 4.5) removed the usage of those local definitions to use the kernel instead.
So mdadm has now a new requirement on Kernel headers >= 4.10.

The bootlin-aarch64-glibc-old has 4.9 kernel headers and is now failing.

Search for "BR2_TOOLCHAIN_HEADERS_AT_LEAST_" for examples.

Could you add this new requirement in Config.in and the explanation in the commit log please?

Quoted 4 lines

4.5:
https://lore.kernel.org/linux-raid/CALTww293wnLE2+eZsZ42oyNZhS_cc2agB4GNqTz8j3xiP0ALWA@mail.gmail.com/

Quoted 8 lines

4.4:
https://lore.kernel.org/linux-raid/20241213121438.7ed6a0fd@mtkaczyk-private-dev/

Upstream mdadm project has moved its primary development to GitHub:
https://github.com/md-raid-utilities/mdadm
Updated download site accordingly.

Could you send an updated patch addressing those issues, please?

Best regards,

Julien.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

author
#2 lore raw

Hi Julien,

Quoted 57 lines · Julien Olivain

Hi Maxin,

Thanks for the v2. This new 4.6 version is introducing 2 issues.

Quoted 5 lines · Maxin John

Drop upstreamed/backported patches.

Release announcements:
4.6:
https://lore.kernel.org/linux-raid/CALTww2_2pjjOSsVj-WT++m35555CjnPWokU7fut+HwUJVV-=ZQ@mail.gmail.com/

First, it breaks the mdadm runtime test. See:
https://gitlab.com/jolivain/buildroot/-/jobs/14088239652

You can reproduce the issue with the command:

utils/docker-run \
support/testing/run-tests \
-k -d dl -o output_folder tests.package.test_mdadm

This new version asks a question and blocks the test.

This commit should make sure the test keep working. So this can be fixed by passing the answer to the question. Adding "--bitmap=none" to the "mdadm --create" options should fix the issue. See:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02.1/support/testing/tests/package/test_mdadm.py?ref_type=tags#L72

Also, this new version breaks with toolchains with old kernel headers. See:
https://gitlab.com/jolivain/buildroot/-/jobs/14088277312

You can reproduce the issue with the command:

utils/test-pkg -p mdadm

This is due to mdadm upstream commit 71574efb077131701b3da874df0045f259ca3448
(in mdadm 4.0) which introduced a usage of MD_DISK_FAILFAST but was also including the definition. Then upstream commit f5889f9a1b8753a1472dfef9d025da2bae395239 (in mdadm 4.5) removed the usage of those local definitions to use the kernel instead. So mdadm has now a new requirement on Kernel headers >= 4.10.

The bootlin-aarch64-glibc-old has 4.9 kernel headers and is now failing.

Search for "BR2_TOOLCHAIN_HEADERS_AT_LEAST_" for examples.

Could you add this new requirement in Config.in and the explanation in the commit log please?

Quoted 7 lines

4.5:
https://lore.kernel.org/linux-raid/CALTww293wnLE2+eZsZ42oyNZhS_cc2agB4GNqTz8j3xiP0ALWA@mail.gmail.com/

4.4:
https://lore.kernel.org/linux-raid/20241213121438.7ed6a0fd@mtkaczyk-private-dev/

Quoted 8 lines
Quoted 5 lines

Upstream mdadm project has moved its primary development to GitHub:
https://github.com/md-raid-utilities/mdadm
Updated download site accordingly.

Could you send an updated patch addressing those issues, please?

Thanks again for the detailed review and pointers. That was really helpful. I will send a v3.

Quoted 3 lines

Best regards,

Julien.

Best Regards,
Maxin
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot