commit:     f3a618d336bbf468e0a58fe7cfd5339fdceabe4a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 13 11:55:40 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 11:56:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3a618d3

sys-fs/mdadm: add 4.4

Note that this drops mdadm_env.sh as was done upstream in 
a7a5e676a7eb2ac97acd31b13f75515e9573f891,
it's not like it was working correctly anyway for systemd, and for OpenRC,
the default config only had --syslog in there - yet for OpenRC, it'll continue
working anyway as it wasn't using mdadm_env.sh to begin with.

Bug: https://bugs.gentoo.org/926289
Closes: https://bugs.gentoo.org/948994
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/mdadm/Manifest         |   2 +
 sys-fs/mdadm/mdadm-4.4.ebuild | 122 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 124 insertions(+)

diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 51cfc9e15326..d8a958ec1cd8 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -1,4 +1,6 @@
 DIST mdadm-4.2.tar.xz 453624 BLAKE2B 
de7c4318dc5479de41378233869ab84ca2cd0e8a42310157b1acb969e7152af61556fbbe6f17bf6af4dfaf5543e49b1c982d2baeedf1c39b000032f4db7f5502
 SHA512 
57897a2b7fb8b0b88bece50501099872bb45ddb076cfc323d563588096d2b66b1ecba3724534943f651ace2bfe591482570700616500dc3398552e4f9ff0c37d
 DIST mdadm-4.3.tar.xz 465820 BLAKE2B 
3b6955339adb6c254a69d698e3b807838f8840e37f7f94280f4a1fbffb082ee694309f4b6f9adc8edfa2071fde324bf00ae0493d5b2e6c8d87796783dfa3ee1c
 SHA512 
e44977f2f80d2471cb313803a60c92dafe8282ac06bbbfd41ae90ca493c64a3da94db924538788d045fd7f0667333912dabedb0b070f9abf5c0540b32e0fa08f
+DIST mdadm-4.4.tar.gz 619823 BLAKE2B 
d368681d94e31db2127a1114ad21b76647ee4b62f701705a93ca8482a58ec10d9cd58c5394bb346da0c58339f759fa6168441250a504931e43c0943b74ceef85
 SHA512 
08682b27f41a230f188d3b61e22e95ff8808b36c8fc2cba1dff443d39a72b35ba2eaf29ed64c7e5583c177fe6b71df983ec9a80a4128d8f07d58b7435d4700f6
 DIST mdadm_4.2~rc2-7.debian.tar.xz 89904 BLAKE2B 
dd04f2dd044d0bca85920eaf5c79a288d69c47a7ad7e36509a126c01ef63bd045d7e0530450650028de39d74ad852995ca080c3a73dbcb1cf1b3783118109f35
 SHA512 
3d36533d2713b663606919b2bfec18b15e18a6a0194e333e38e4a58f175da96af7b1fe16f0c36ee148e14492a4e0710b9fad6ac7856495b63c0176ebb7333be6
 DIST mdadm_4.3-1.debian.tar.xz 86972 BLAKE2B 
52af9ddacc402d8c3318bac31b4cd5ac3045e564832546146ba0a18d6a43866ae2c21270ac15f48df98c4f76af0eeae41679ea9e0e265dad44914bd58f27d689
 SHA512 
1c5203523f0c7fe271d850ab4ad376a449e870f8f1549dc4460adede1f59a1a364e741562954297e7848bae19d1cfe273a31f1bfaf739dd37559a0666abd8517
+DIST mdadm_4.4-3.debian.tar.xz 88948 BLAKE2B 
48d2af9477b420f1bbaffebbeaf2389038f8f58846264fcda5f25d72c64c5543a2cd73eb3fba4c7dc834810e3367f571628bdcc43989724f773fc3789514c765
 SHA512 
8be55fb40e21ad4026339e8e03df1c4889b66f36d4c41627dd60528dc424e5faa10cb20e8e3fbe737eb9af4705eed10bd4e7017353e773ac73cbeaaa3670d2ff

diff --git a/sys-fs/mdadm/mdadm-4.4.ebuild b/sys-fs/mdadm/mdadm-4.4.ebuild
new file mode 100644
index 000000000000..5c84dc344eee
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-4.4.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic systemd toolchain-funcs udev
+
+DEB_PF="4.4-3"
+DESCRIPTION="Tool for running RAID systems - replacement for the raidtools"
+HOMEPAGE="https://github.com/md-raid-utilities/mdadm 
https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/";
+SRC_URI="https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/snapshot/${P}.tar.gz";
+SRC_URI+=" mirror://debian/pool/main/m/mdadm/${PN}_${DEB_PF}.debian.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+if [[ ${PV} != *_rc* ]] ; then
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv 
~sparc ~x86"
+fi
+IUSE="static systemd +udev corosync"
+REQUIRED_USE="static? ( !udev )"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+       udev? ( virtual/libudev:= )
+       corosync? ( sys-cluster/corosync )
+"
+RDEPEND="
+       ${DEPEND}
+       >=sys-apps/util-linux-2.16
+"
+
+# The tests edit values in /proc and run tests on software raid devices.
+# Thus, they shouldn't be run on systems with active software RAID devices.
+RESTRICT="test"
+
+PATCHES=(
+       "${WORKDIR}/debian/patches/debian"
+)
+
+mdadm_emake() {
+       # We should probably make libdlm into USE flags (bug #573782)
+       local args=(
+               PKG_CONFIG="$(tc-getPKG_CONFIG)"
+               CC="$(tc-getCC)"
+               CWFLAGS="-Wall -fPIE"
+               CXFLAGS="${CFLAGS}"
+               LDFLAGS="${LDFLAGS}"
+               UDEVDIR="$(get_udevdir)"
+               SYSTEMD_DIR="$(systemd_get_systemunitdir)"
+               COROSYNC="$(usev !corosync '-DNO_COROSYNC')"
+               DLM="-DNO_DLM"
+
+               # bug #732276
+               STRIP=
+
+               "$@"
+       )
+
+       emake "${args[@]}"
+}
+
+src_compile() {
+       use static && append-ldflags -static
+
+       # CPPFLAGS won't work for this
+       use udev || append-cflags -DNO_LIBUDEV
+
+       # bug 907082
+       use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE
+
+       mdadm_emake all
+}
+
+src_test() {
+       mdadm_emake test
+
+       sh ./test || die
+}
+
+src_install() {
+       mdadm_emake DESTDIR="${D}" install install-systemd
+
+       einstalldocs
+
+       # install mdcheck_start.service, needed for systemd units (bug #833000)
+       exeinto /usr/share/mdadm/
+       doexe misc/mdcheck
+
+       insinto /etc
+       newins documentation/mdadm.conf-example mdadm.conf
+       newinitd "${FILESDIR}"/mdadm.rc mdadm
+       newconfd "${FILESDIR}"/mdadm.confd mdadm
+       newinitd "${FILESDIR}"/mdraid.rc mdraid
+       newconfd "${FILESDIR}"/mdraid.confd mdraid
+
+       # From the Debian patchset
+       into /usr
+       dodoc "${WORKDIR}"/debian/local/doc/README.checkarray
+       dosbin "${WORKDIR}"/debian/local/bin/checkarray
+       insinto /etc/default
+       newins "${FILESDIR}"/etc-default-mdadm mdadm
+
+       exeinto /etc/cron.weekly
+       newexe "${FILESDIR}"/mdadm.weekly mdadm
+}
+
+pkg_postinst() {
+       udev_reload
+
+       if ! systemd_is_booted; then
+               if [[ -z ${REPLACING_VERSIONS} ]] ; then
+                       # Only inform people the first time they install.
+                       elog "If you're not relying on kernel auto-detect of 
your RAID"
+                       elog "devices, you need to add 'mdraid' to your 'boot' 
runlevel:"
+                       elog "  rc-update add mdraid boot"
+               fi
+       fi
+}
+
+pkg_postrm() {
+       udev_reload
+}

Reply via email to