From 750475873c1c1627e6c514411c2da02d09f42418 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Thu, 22 Feb 2024 10:07:32 +0100 Subject: [PATCH] mdadm: updated to version 4.3 --- mdadm/.signature | 8 ++-- mdadm/Pkgfile | 7 ++-- mdadm/mdadm-4.2-in_initrd-collision.patch | 36 ------------------ mdadm/mdadm-4.3-in_initrd-collision.patch | 45 +++++++++++++++++++++++ 4 files changed, 53 insertions(+), 43 deletions(-) delete mode 100644 mdadm/mdadm-4.2-in_initrd-collision.patch create mode 100644 mdadm/mdadm-4.3-in_initrd-collision.patch diff --git a/mdadm/.signature b/mdadm/.signature index ef65de6e3..88e1b7440 100644 --- a/mdadm/.signature +++ b/mdadm/.signature @@ -1,6 +1,6 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/QV4z+yAxpSIo1pWGSjC3+35rblNI3f6cRIHYgzUME1Jej1exysW1QwZdUPnFPS8/QO5FpcTw4WxyORFaqlXSg4= -SHA256 (Pkgfile) = 434ea877d0d09bf2fadaf3671f9b8a89ebef2ac2ad213aeaf914defd61384c76 +RWSE3ohX2g5d/SGKBehorKh/iNnYCS9q+Vh8M5d4p0DVU0Yyn0k+dt9uIJy90qGYDc6X0xkg9Ndbz5elyAQdLXdRtFqrtO9GUQc= +SHA256 (Pkgfile) = fd53d880eeb26afcc80bae1ba408323caf02024088c1f1e157f000e137f17458 SHA256 (.footprint) = d7baf236eb68b06048b0bb5b21ad7cbf892f81d7f6f49361fa854c7306ed8a0e -SHA256 (mdadm-4.2.tar.xz) = 461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d -SHA256 (mdadm-4.2-in_initrd-collision.patch) = b51e7df9175cdb2e90d541756ac90c5d2abc2be1e410c3d07e0f349c1a45a39c +SHA256 (mdadm-4.3.tar.gz) = 1a38a5eed3738c130ead8fa5bea7d0ceec4676132c8c69536f176b9951b27b0b +SHA256 (mdadm-4.3-in_initrd-collision.patch) = b6a4962b327b68c15b884a56341d18f14e51463a852b4a5aa726e8fa4f194771 diff --git a/mdadm/Pkgfile b/mdadm/Pkgfile index d36ef3843..073c2a842 100644 --- a/mdadm/Pkgfile +++ b/mdadm/Pkgfile @@ -3,9 +3,10 @@ # Maintainer: Juergen Daubert, jue at crux dot nu name=mdadm -version=4.2 -release=2 -source=(http://www.kernel.org/pub/linux/utils/raid/$name/$name-$version.tar.xz +version=4.3 +release=1 +#source=(https://www.kernel.org/pub/linux/utils/raid/$name/$name-$version.tar.xz +source=(https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/snapshot/$name-$version.tar.gz $name-$version-in_initrd-collision.patch) build() { diff --git a/mdadm/mdadm-4.2-in_initrd-collision.patch b/mdadm/mdadm-4.2-in_initrd-collision.patch deleted file mode 100644 index 689e7d698..000000000 --- a/mdadm/mdadm-4.2-in_initrd-collision.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix collision with libudev symbols when statically linking. - -https://bugs.gentoo.org/830485 ---- a/mdadm.h -+++ b/mdadm.h -@@ -1665,7 +1665,7 @@ - extern void udev_block(char *devnm); - extern void udev_unblock(void); - --extern int in_initrd(void); -+extern int mdadm_in_initrd(void); - - struct cmap_hooks { - void *cmap_handle; /* corosync lib related */ ---- a/mdmon.c -+++ b/mdmon.c -@@ -309,7 +309,7 @@ - {NULL, 0, NULL, 0} - }; - -- if (in_initrd()) { -+ if (mdadm_in_initrd()) { - /* - * set first char of argv[0] to @. This is used by - * systemd to signal that the task was launched from ---- a/util.c -+++ b/util.c -@@ -2219,7 +2219,7 @@ - return 0; - } - --int in_initrd(void) -+int mdadm_in_initrd(void) - { - /* This is based on similar function in systemd. */ - struct statfs s; diff --git a/mdadm/mdadm-4.3-in_initrd-collision.patch b/mdadm/mdadm-4.3-in_initrd-collision.patch new file mode 100644 index 000000000..f22bea07d --- /dev/null +++ b/mdadm/mdadm-4.3-in_initrd-collision.patch @@ -0,0 +1,45 @@ +diff -Nru mdadm-4.3.orig/mdadm.h mdadm-4.3/mdadm.h +--- mdadm-4.3.orig/mdadm.h 2024-02-22 10:01:11.637922391 +0100 ++++ mdadm-4.3/mdadm.h 2024-02-22 10:01:31.351255810 +0100 +@@ -1775,7 +1775,7 @@ + bool stat_is_md_dev(struct stat *st); + extern char *fd2devnm(int fd); + +-extern int in_initrd(void); ++extern int mdadm_in_initrd(void); + + struct cmap_hooks { + void *cmap_handle; /* corosync lib related */ +diff -Nru mdadm-4.3.orig/mdmon.c mdadm-4.3/mdmon.c +--- mdadm-4.3.orig/mdmon.c 2024-02-22 10:01:11.637922391 +0100 ++++ mdadm-4.3/mdmon.c 2024-02-22 10:01:31.351255810 +0100 +@@ -358,7 +358,7 @@ + } + } + +- if (in_initrd()) { ++ if (mdadm_in_initrd()) { + /* + * set first char of argv[0] to @. This is used by + * systemd to signal that the task was launched from +diff -Nru mdadm-4.3.orig/util.c mdadm-4.3/util.c +--- mdadm-4.3.orig/util.c 2024-02-22 10:01:11.641255725 +0100 ++++ mdadm-4.3/util.c 2024-02-22 10:03:34.587922997 +0100 +@@ -1960,7 +1960,7 @@ + int len; + pid_t pid; + int status; +- char *prefix = in_initrd() ? "initrd-" : ""; ++ char *prefix = mdadm_in_initrd() ? "initrd-" : ""; + char pathbuf[1024]; + char *paths[4] = { + pathbuf, +@@ -2270,7 +2270,7 @@ + return 0; + } + +-int in_initrd(void) ++int mdadm_in_initrd(void) + { + return access("/etc/initrd-release", F_OK) >= 0; + }