mdadm: upgrade 4.4 -> 4.5
PATCH v3 1/2 mdadm: upgrade 4.4 -> 4.5
From: Ankur Tyagi <[email protected]>
Changelog:
https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/tree/CHANGELOG.md?h=mdadm-4.5
Replaced 0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch with 0001-raid6check.c-restripe.c-Use-64-bit-off_t-across-both.patch as partial changes from first patch are part of the upstream version[1].
Dropped patches that are part of upstream version
- xmalloc.patch [2]
- 0001-Makefile-install-mdcheck.patch [3]
Also refreshed other patches.
[1] https://github.com/md-raid-utilities/mdadm/commit/787cc1b60130b8031be59e49d54463c58cd8cf74
[2] https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/raid6check.c?h=mdadm-4.5&id=e0df6c4c984d564e9e40913727e916a6cd8f466e
[3] https://github.com/md-raid-utilities/mdadm/commit/934d81184880d2231b0d7b3836b12358516ea35c
---
...-corosync-and-dlm-header-files-check.patch | 6 +-
.../files/0001-Makefile-install-mdcheck.patch | 27 ---
...tripe.c-Use-64-bit-off_t-across-both.patch | 54 ++++++
...FILE_OFFSET_BITS-to-enable-largefile.patch | 155 ------------------
...-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch | 6 +-
.../mdadm/files/xmalloc.patch | 32 ----
.../mdadm/{mdadm_4.4.bb => mdadm_4.5.bb} | 8 +-
7 files changed, 63 insertions(+), 225 deletions(-)
delete mode 100644 meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch
create mode 100644 meta/recipes-extended/mdadm/files/0001-raid6check.c-restripe.c-Use-64-bit-off_t-across-both.patch
delete mode 100644 meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch
delete mode 100644 meta/recipes-extended/mdadm/files/xmalloc.patch
rename meta/recipes-extended/mdadm/{mdadm_4.4.bb => mdadm_4.5.bb} (93%)meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch +3 -3
@@ -1,4 +1,4 @@ -From 232101e2fcc6359fb6db2bc232570e373e368c75 Mon Sep 17 00:00:00 2001 +From 77e9527a0ea995ed377e00813eeeb17175dbce72 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" <[email protected]> Date: Tue, 9 Feb 2016 11:44:01 +0200 Subject: [PATCH] Fix the path of corosync and dlm header files check
@@ -14,10 +14,10 @@ Signed-off-by: Maxin B. John <[email protected]> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index bcd092de..0a78cd22 100644 +index 8031ce24..788ff5d9 100644 --- a/Makefile +++ b/Makefile -@@ -130,8 +130,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots +@@ -120,8 +120,8 @@ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots SYSTEMD_DIR=/lib/systemd/system LIB_DIR=/usr/libexec/mdadm
meta/recipes-extended/mdadm/files/0001-Makefile-install-mdcheck.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From 407691e11037709af888ce2cf6bd5eac6971ac61 Mon Sep 17 00:00:00 2001 -From: Chen Qi <[email protected]> -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 <[email protected]> ---- - Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile b/Makefile -index 981e16fa..b28e7855 100644 ---- a/Makefile -+++ b/Makefile -@@ -345,6 +345,7 @@ install-systemd: systemd/[email protected] - 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
meta/recipes-extended/mdadm/files/0001-raid6check.c-restripe.c-Use-64-bit-off_t-across-both.patch new file +54 -0
54 lines not on this page · raw message
meta/recipes-extended/mdadm/files/0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch deleted +0 -155
155 lines not on this page · raw message
meta/recipes-extended/mdadm/files/0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch +3 -3
@@ -1,4 +1,4 @@ -From 8de073c637a1ea968b7304f373a20b13a4a47bbc Mon Sep 17 00:00:00 2001 +From b7e51fbedc1fbc44af00398a4a7aef51cdf191ee Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Tue, 12 Mar 2024 10:54:08 +0100 Subject: [PATCH] Create.c: include linux/falloc.h for FALLOC_FL_ZERO_RANGE
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]> 1 file changed, 1 insertion(+) diff --git a/Create.c b/Create.c -index fd6c9215..3210a03e 100644 +index 4aa75b7e..5d5fc806 100644 --- a/Create.c +++ b/Create.c -@@ -33,6 +33,7 @@ +@@ -31,6 +31,7 @@ #include <signal.h> #include <sys/signalfd.h> #include <sys/wait.h>
meta/recipes-extended/mdadm/files/xmalloc.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From c5cf5a83be4e3ce04ebf3250f77aeb465eeb53a1 Mon Sep 17 00:00:00 2001 -From: Xiao Ni <[email protected]> -Date: Fri, 17 Jan 2025 15:15:40 +0800 -Subject: [PATCH] mdadm/raid6check: add xmalloc.h to raid6check.c - -It reports building error: -raid6check.c:324:26: error: implicit declaration of function xmalloc - -Add xmalloc.h to raid6check.c file to fix this. - -Signed-off-by: Xiao Ni <[email protected]> -Link: https://lore.kernel.org/r/[email protected] -Signed-off-by: Song Liu <[email protected]> - -Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?h=main&id=e0df6c4c984d564e9e40913727e916a6cd8f466e] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - raid6check.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/raid6check.c b/raid6check.c -index 8e7f1421..486b10c6 100644 ---- a/raid6check.c -+++ b/raid6check.c -@@ -26,6 +26,7 @@ - #define _FILE_OFFSET_BITS 64 - - #include "mdadm.h" -+#include "xmalloc.h" - #include <stdint.h> - #include <sys/mman.h> -
meta/recipes-extended/mdadm/mdadm_4.5.bb renamed from meta/recipes-extended/mdadm/mdadm_4.4.bb +3 -5
@@ -12,13 +12,11 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git;protocol=https;bra file://run-ptest \ file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \ file://mdadm.init \ - file://0001-Makefile-install-mdcheck.patch \ - file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \ file://0002-Create.c-include-linux-falloc.h-for-FALLOC_FL_ZERO_R.patch \ - file://xmalloc.patch \ + file://0001-raid6check.c-restripe.c-Use-64-bit-off_t-across-both.patch \ " -SRCREV = "8e56efac9afd7080bb42bae4b77cdad5f345633a" +SRCREV = "8f0c7692d48414ff7b3fe927ce75799c65ef24b1" inherit ptest systemd
@@ -37,7 +35,7 @@ CFLAGS:append:mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_system_unitdir} \ BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev" LDFLAGS="${LDFLAGS}" \ - SYSROOT="${STAGING_DIR_TARGET}" STRIP=' + SYSROOT="${STAGING_DIR_TARGET}" MISCDIR="${datadir}/${BPN}" STRIP=' DEBUG_OPTIMIZATION:append = " -Wno-error"
PATCH v3 2/2 mdadm: catch sed substitution failure during install
From: Ankur Tyagi <[email protected]>
This patch is to validate a possible race condition theory during install. Also fail the build if sed substitution still fails for further investigation.
Details: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16166
[YOCTO #16166]
--- meta/recipes-extended/mdadm/mdadm_4.5.bb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
meta/recipes-extended/mdadm/mdadm_4.5.bb +11 -1
@@ -40,11 +40,21 @@ EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${sys DEBUG_OPTIMIZATION:append = " -Wno-error" do_install() { - oe_runmake 'DESTDIR=${D}' install install-systemd + install -d ${D}/${datadir}/ + + oe_runmake -j 1 'DESTDIR=${D}' install install-systemd + install -d ${D}/${sysconfdir}/ install -m 644 ${S}/documentation/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf install -d ${D}/${sysconfdir}/init.d install -m 755 ${UNPACKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor + # temp change + install -m 644 ${S}/udev-md-raid-safe-timeouts.rules ${D}/${sysconfdir}/tmp-file + + if grep -q "BINDIR" ${D}${datadir}/${BPN}/mdcheck; then + bberror "Build failed: 'BINDIR' placeholder found in mdcheck." + bbfatal_log "sed command in Makefile failed to execute correctly." + fi } do_compile_ptest() {
Re: [OE-core][PATCH v3 2/2] mdadm: catch sed substitution failure during install
Quoted 11 lines · Ankur Tyagi via lists.openembedded.org
From: Ankur Tyagi <[email protected]>
This patch is to validate a possible race condition theory during install. Also fail the build if sed substitution still fails for further investigation.
Details: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16166
[YOCTO #16166]
Signed-off-by Ankur Tyagi <[email protected]>---
Hi Ankur,
Just a quick update on this: I continue to run it on the autobuilder, but I'm at about 15 runs without any issue.
I will keep you in touch if the reproducibility issue appears again.
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [OE-core][PATCH v3 2/2] mdadm: catch sed substitution failure during install
Quoted 14 lines · Mathieu Dubois-Briand
Quoted 11 lines · Ankur Tyagi via lists.openembedded.org
From: Ankur Tyagi <[email protected]>
This patch is to validate a possible race condition theory during install. Also fail the build if sed substitution still fails for further investigation.
Details: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16166
[YOCTO #16166]
Signed-off-by Ankur Tyagi <[email protected]>---
Quoted 7 lines
Hi Ankur,
Just a quick update on this: I continue to run it on the autobuilder, but I'm at about 15 runs without any issue.
I will keep you in touch if the reproducibility issue appears again.
Thanks Mathieu,
So does it imply hash equivalence related issues which Alex was alluding to?
Quoted 8 lines
Thanks,
Mathieu--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Re: [OE-core][PATCH v3 2/2] mdadm: catch sed substitution failure during install
Quoted 1 line · Ankur Tyagi via lists.openembedded.org
So does it imply hash equivalence related issues which Alex was alluding to?
It's possible that by random chance the issue hasn't happened yet, it may be specific to a particular host distro.
This new patch could also be improved, if you drop these tweaks as they potentially can obscure the issue we're chasing:
- oe_runmake 'DESTDIR=${D}' install install-systemd
+ install -d ${D}/${datadir}/
+
+ oe_runmake -j 1 'DESTDIR=${D}' install install-systemd
+
Alex
Re: [OE-core][PATCH v3 2/2] mdadm: catch sed substitution failure during install
Quoted 12 lines · Alexander Kanavin
Quoted 1 line · Ankur Tyagi via lists.openembedded.org
So does it imply hash equivalence related issues which Alex was alluding to?
It's possible that by random chance the issue hasn't happened yet, it may be specific to a particular host distro.
This new patch could also be improved, if you drop these tweaks as they potentially can obscure the issue we're chasing:
meta/recipes-extended/mdadm/mdadm_4.5.bb EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${sys · line 46
Quoted 5 lines
meta/recipes-extended/mdadm/mdadm_4.5.bb +4
-1- oe_runmake 'DESTDIR=${D}' install install-systemd + install -d ${D}/${datadir}/ + + oe_runmake -j 1 'DESTDIR=${D}' install install-systemd +
sent v4 with suggested improvements
Quoted 1 line
Alex