public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/
@ 2016-01-28 10:22 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2016-01-28 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     6c56d5666a86ec50b41892b0a45ea7762014d54d
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 28 10:08:23 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 10:22:50 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c56d566

sys-fs/mdadm: Bump to version 3.4

Marked cronjob as executable (bug #561564) and commented the AUTOCHECK variable
so people still have to opt in for the autocheck to run.

Package-Manager: portage-2.2.27
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-fs/mdadm/Manifest                |  2 +
 sys-fs/mdadm/files/etc-default-mdadm |  8 ++--
 sys-fs/mdadm/mdadm-3.4.ebuild        | 82 ++++++++++++++++++++++++++++++++++++
 3 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index ba6acd4..0b4720d 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -3,4 +3,6 @@ DIST mdadm-3.3.1.tar.xz 407964 SHA256 d8c74112cfd77bdc1dbc1291fe8d9243c76d91bfa2
 DIST mdadm-3.3.2.tar.xz 410628 SHA256 0f3a7e1a76b13892b79f9fceaf99ecb23513260389a768ac644ffa3ae06e5b8c SHA512 204363e41ec544ac44fa40ddf2758e31cbc1a88d7f038fa32a90b494b07be8e025be1bea8623029847ae495aabe3d1f2c503480db087d8a3dacd240003174936 WHIRLPOOL be7a7b77d6b53decfd03b2171e368d7162e48fe23835e664891acaa8cd1808236f9e34c27c573839c0f613be0e17ea94522df01a6537243eed132e87d3ea8d88
 DIST mdadm-3.3.3.tar.xz 413140 SHA256 f5b50a6b506697fb9968d660444447473b453f9eaefaa9b7d31c184693b8a28c SHA512 f2778e48a094bdf43861da0e83473cf021c3770575be0f494178dd0d386aa493eb486c2844b3b804f757f9168b7589afaa580b71777808c1f7905568e726fc66 WHIRLPOOL 6bc5991fc9eba7a7b79c175e46534070368c922fe3f1fb8ade67c97940df95d4bba9933b7e509e0b06b0e62034d72f739c6c15830e628c0cc51984751d9be08d
 DIST mdadm-3.3.4.tar.xz 413396 SHA256 8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68 SHA512 4393e5d3a50ee148cc7503d48e7dda30419ed72a8098eaa9b883ff1ee81e09c66414edbe40d8c80b28d3ae7a7b5e5b11f6a8e14188a1066c19ac08ca89ddbcb6 WHIRLPOOL 41a8bcf399a11da82c9a0bdf49a31d8c71aeccfcfe2000edf78fe2933c6bdf6f10f2c5450b0589564a75e3a37195abe2e4c0dbbc42911ca9dda4e2d538618caa
+DIST mdadm-3.4.tar.xz 422704 SHA256 27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808 SHA512 5de06f3a2b83333e5346a1e858b15e76f75a13a1d5c5f2032fecc6eb167454b282e12ee111ac2abec778e058ec9554708ac317a476778328546603618e6f70f7 WHIRLPOOL 18a5f2ed027b919e2e365cf9ddc1b616bf1fe315d27196a248ce9600622eb86d5ce825f1b38ecf0a1f5dcf21fa59fd7d88856700aea25a721c8efa37e2b34d39
 DIST mdadm_3.3-2.debian.tar.gz 127889 SHA256 c38b155e7395b35380d506458d979b82c5b853de996f21ccab50b1202d726301 SHA512 92e4c403542caba4b9afb870ba803e6bc7ade143b27efdc27e03b3407f322722a635457cce9e8c195a3ecd7cbce66fdebdd6046fc4f36836e56e27d5d838c037 WHIRLPOOL 8f8ef1142a79044093a5f55b181dc35a142b83041a59a9b71945aa6fe84cd089a7e1b183ec6b5db210a0d07e94efad0ab3a0d0341fc6cbbbf4da9d0254b5c737
+DIST mdadm_3.3.4-1.1.debian.tar.xz 86312 SHA256 16dd6b77c14a15afa23e077f0c157c17ef5cc6054b17ccb38cf5af86f7bf55bd SHA512 ea9b34a9952e1ff836cb931c7eef0ae0c44e3f4d46162c7a7eca24936d6f7168e99d67749b3100bc68ebadc8f256e4833d42da48c531cf71e6e8f3100911828f WHIRLPOOL 44df72008fc89f21a461bc45be230383d906fd0c0ea062327a537024ceff245b47ced301d72d5bfe5a0fcde095e99e14cdf30c614550bce023851e7a6ac0c525

diff --git a/sys-fs/mdadm/files/etc-default-mdadm b/sys-fs/mdadm/files/etc-default-mdadm
index 70ff20b..921c70b 100644
--- a/sys-fs/mdadm/files/etc-default-mdadm
+++ b/sys-fs/mdadm/files/etc-default-mdadm
@@ -1,7 +1,9 @@
 # Based on Debian /etc/default/mdadm
 
-# Gentoo comment: The cronjob checks for this value to decide to actually validate arrays. If missing, it does NOT actually do anything.
+# Gentoo comment: The cronjob checks for this value to decide to actually
+#                 validate arrays. If missing, it does NOT actually do anything.
 # AUTOCHECK:
 #   should mdadm run periodic redundancy checks over your arrays? See
-#   /etc/cron.d/mdadm.
-AUTOCHECK=true
+#   /etc/cron.weekly/mdadm
+
+#AUTOCHECK=true

diff --git a/sys-fs/mdadm/mdadm-3.4.ebuild b/sys-fs/mdadm/mdadm-3.4.ebuild
new file mode 100644
index 0000000..88431e1
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-3.4.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic multilib systemd toolchain-funcs udev
+
+DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools"
+HOMEPAGE="http://neil.brown.name/blog/mdadm"
+DEB_PR=1.1
+SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.xz
+		mirror://debian/pool/main/m/mdadm/${PN}_3.3.4-${DEB_PR}.debian.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static"
+
+DEPEND="virtual/pkgconfig
+	app-arch/xz-utils"
+RDEPEND=">=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"
+
+mdadm_emake() {
+	emake \
+		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+		CC="$(tc-getCC)" \
+		CWFLAGS="-Wall" \
+		CXFLAGS="${CFLAGS}" \
+		UDEVDIR="$(get_udevdir)" \
+		SYSTEMD_DIR="$(systemd_get_unitdir)" \
+		"$@"
+}
+
+src_compile() {
+	use static && append-ldflags -static
+	mdadm_emake all mdassemble
+}
+
+src_test() {
+	mdadm_emake test
+
+	sh ./test || die
+}
+
+src_install() {
+	mdadm_emake DESTDIR="${D}" install install-systemd
+	into /
+	dosbin mdassemble
+	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
+
+	insinto /etc
+	newins 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/README.checkarray
+	dosbin "${WORKDIR}"/debian/checkarray
+	insinto /etc/default
+	newins "${FILESDIR}"/etc-default-mdadm mdadm
+
+	exeinto /etc/cron.weekly
+	newexe "${FILESDIR}"/mdadm.weekly mdadm
+}
+
+pkg_postinst() {
+	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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/
@ 2017-01-10 19:05 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2017-01-10 19:05 UTC (permalink / raw
  To: gentoo-commits

commit:     82299c2b5f256f547f321d1af9385adb0c91bf00
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 10 19:02:24 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan 10 19:05:19 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82299c2b

sys-fs/mdadm: Removed old.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-fs/mdadm/Manifest                           |  2 -
 sys-fs/mdadm/files/mdadm-3.2.1-mdassemble.patch | 16 -----
 sys-fs/mdadm/files/mdadm-3.2.x-udevdir.patch    | 26 --------
 sys-fs/mdadm/files/mdadm.service                | 13 ----
 sys-fs/mdadm/files/mdadm.tmpfiles.conf          |  1 -
 sys-fs/mdadm/mdadm-3.2.6-r1.ebuild              | 75 ----------------------
 sys-fs/mdadm/mdadm-3.3.4.ebuild                 | 82 -------------------------
 7 files changed, 215 deletions(-)

diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 82052a8..2e5193d 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -1,6 +1,4 @@
-DIST mdadm-3.2.6.tar.bz2 371525 SHA256 c44ed3b31238b41cffe67caffaf45067d01e095de94988889ea8a94e22dc6c38 SHA512 1ebcd4c797cd9f7388f9a27372a19205dc81a4b19adc83e1d6d7cfd4ef18f40a211fddf59ed027a1bf35bd36d4b6795e88e8086c3b022c188ec6e9f68bf1a4ee WHIRLPOOL 61d07512758491326c21bb745ca457a9f3d9215292358d7b4755eb84bb72877058fb239cbffe25c8121caff066aded84e8353b9716e9d4a45d724777f01a6714
 DIST mdadm-3.3.1.tar.xz 407964 SHA256 d8c74112cfd77bdc1dbc1291fe8d9243c76d91bfa276fcb95f2a75ca7717ab02 SHA512 46fc1889e97d2d14b72ac26ee07eb4301467dc4a0e838ba89920253484fcd443749f3afccb3d792f7e468b20021d50dbc29dda7033d9b5a8fbaee664200f1981 WHIRLPOOL ca690bd35ab8ff475694d8f0420cd762704cc1777116edfdc9394973efa0d6decce1721dc1f7c8c84728d7434073cb6ab5161e5518c46aa8b4a7a5547ebb011d
-DIST mdadm-3.3.4.tar.xz 413396 SHA256 8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68 SHA512 4393e5d3a50ee148cc7503d48e7dda30419ed72a8098eaa9b883ff1ee81e09c66414edbe40d8c80b28d3ae7a7b5e5b11f6a8e14188a1066c19ac08ca89ddbcb6 WHIRLPOOL 41a8bcf399a11da82c9a0bdf49a31d8c71aeccfcfe2000edf78fe2933c6bdf6f10f2c5450b0589564a75e3a37195abe2e4c0dbbc42911ca9dda4e2d538618caa
 DIST mdadm-3.4.tar.xz 422704 SHA256 27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808 SHA512 5de06f3a2b83333e5346a1e858b15e76f75a13a1d5c5f2032fecc6eb167454b282e12ee111ac2abec778e058ec9554708ac317a476778328546603618e6f70f7 WHIRLPOOL 18a5f2ed027b919e2e365cf9ddc1b616bf1fe315d27196a248ce9600622eb86d5ce825f1b38ecf0a1f5dcf21fa59fd7d88856700aea25a721c8efa37e2b34d39
 DIST mdadm-4.0.tar.xz 430780 SHA256 1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9 SHA512 12fb26e6b9c1912698defa406e5e47a7ca8d68d4a9aa7acdc9b463ee2d4a37fc6ecef6beb5395ff619018c3f6bdb6d8c573060d027707540f645ad2265170e8b WHIRLPOOL 6587c7817556fbf47f7624a05d000c3a8396c84fbabe43aa574b649a119f987181b909f4347b93b07a45bf4d6519e1c8a39b1c0245538d64fb0eddd27e3e4054
 DIST mdadm_3.3-2.debian.tar.gz 127889 SHA256 c38b155e7395b35380d506458d979b82c5b853de996f21ccab50b1202d726301 SHA512 92e4c403542caba4b9afb870ba803e6bc7ade143b27efdc27e03b3407f322722a635457cce9e8c195a3ecd7cbce66fdebdd6046fc4f36836e56e27d5d838c037 WHIRLPOOL 8f8ef1142a79044093a5f55b181dc35a142b83041a59a9b71945aa6fe84cd089a7e1b183ec6b5db210a0d07e94efad0ab3a0d0341fc6cbbbf4da9d0254b5c737

diff --git a/sys-fs/mdadm/files/mdadm-3.2.1-mdassemble.patch b/sys-fs/mdadm/files/mdadm-3.2.1-mdassemble.patch
deleted file mode 100644
index 6e12dc2..00000000
--- a/sys-fs/mdadm/files/mdadm-3.2.1-mdassemble.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-http://bugs.gentoo.org/211426
-
-make default mdassemble sane
-
---- a/Makefile
-+++ b/Makefile
-@@ -181,8 +181,7 @@
- 	$(CC) $(CXFLAGS) $(LDFLAGS) -o raid6check raid6check.o $(CHECK_OBJS)
- 
- mdassemble : $(ASSEMBLE_SRCS) $(INCL)
--	rm -f $(OBJS)
--	$(DIET_GCC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS)  $(STATICSRC)
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(ASSEMBLE_FLAGS) -DHAVE_STDINT_H -o mdassemble $(ASSEMBLE_SRCS) $(STATICSRC)
- 
- mdassemble.static : $(ASSEMBLE_SRCS) $(INCL)
- 	rm -f $(OBJS)

diff --git a/sys-fs/mdadm/files/mdadm-3.2.x-udevdir.patch b/sys-fs/mdadm/files/mdadm-3.2.x-udevdir.patch
deleted file mode 100644
index 8bfdcd5..00000000
--- a/sys-fs/mdadm/files/mdadm-3.2.x-udevdir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-http://bugs.gentoo.org/430900
-
---- Makefile
-+++ Makefile
-@@ -97,6 +97,12 @@
- MAN4DIR = $(MANDIR)/man4
- MAN5DIR = $(MANDIR)/man5
- MAN8DIR = $(MANDIR)/man8
-+PKG_CONFIG ?= pkg-config
-+
-+UDEVDIR := $(shell $(PKG_CONFIG) --variable=udevdir udev 2>/dev/null)
-+ifndef UDEVDIR
-+  UDEVDIR = lib/udev
-+endif
- 
- OBJS =  mdadm.o config.o policy.o mdstat.o  ReadMe.o util.o maps.o lib.o \
- 	Manage.o Assemble.o Build.o \
-@@ -254,7 +260,7 @@
- 	$(INSTALL) -D -m 644 mdadm.conf.5 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5
- 
- install-udev: udev-md-raid.rules
--	$(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/lib/udev/rules.d/64-md-raid.rules
-+	$(INSTALL) -D -m 644 udev-md-raid.rules $(DESTDIR)/$(UDEVDIR)/rules.d/64-md-raid.rules
- 
- uninstall:
- 	rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm

diff --git a/sys-fs/mdadm/files/mdadm.service b/sys-fs/mdadm/files/mdadm.service
deleted file mode 100644
index 342177d..00000000
--- a/sys-fs/mdadm/files/mdadm.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Software RAID monitoring and management
-ConditionPathExists=/etc/mdadm.conf
-
-[Service]
-Type=forking
-PIDFile=/run/mdadm/mdadm.pid
-EnvironmentFile=/etc/conf.d/mdadm
-ExecStart=/sbin/mdadm --monitor --scan -f --pid-file=/run/mdadm/mdadm.pid $MDADM_OPTS
-
-[Install]
-WantedBy=multi-user.target
-

diff --git a/sys-fs/mdadm/files/mdadm.tmpfiles.conf b/sys-fs/mdadm/files/mdadm.tmpfiles.conf
deleted file mode 100644
index 3207dda..00000000
--- a/sys-fs/mdadm/files/mdadm.tmpfiles.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/mdadm 0710 root root -

diff --git a/sys-fs/mdadm/mdadm-3.2.6-r1.ebuild b/sys-fs/mdadm/mdadm-3.2.6-r1.ebuild
deleted file mode 100644
index 7a34dd4..00000000
--- a/sys-fs/mdadm/mdadm-3.2.6-r1.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-inherit multilib eutils flag-o-matic systemd toolchain-funcs
-
-DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools"
-HOMEPAGE="http://neil.brown.name/blog/mdadm"
-SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="static"
-
-DEPEND="virtual/pkgconfig"
-RDEPEND="!<sys-apps/baselayout-2.1-r1
-	!<sys-apps/openrc-0.10
-	>=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"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-3.2.1-mdassemble.patch #211426
-	epatch "${FILESDIR}"/${PN}-3.2.x-udevdir.patch #430900
-}
-
-mdadm_emake() {
-	emake \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CC="$(tc-getCC)" \
-		CWFLAGS="-Wall" \
-		CXFLAGS="${CFLAGS}" \
-		MAP_DIR=/run/mdadm \
-		"$@"
-}
-
-src_compile() {
-	use static && append-ldflags -static
-	mdadm_emake all mdassemble
-}
-
-src_test() {
-	mdadm_emake test
-
-	sh ./test || die
-}
-
-src_install() {
-	emake DESTDIR="${D}" install
-	into /
-	dosbin mdassemble
-	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
-
-	insinto /etc
-	newins 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
-	systemd_dounit "${FILESDIR}/mdadm.service"
-	systemd_newtmpfilesd "${FILESDIR}/mdadm.tmpfiles.conf" mdadm.conf
-}
-
-pkg_preinst() {
-	if ! has_version ${CATEGORY}/${PN} ; 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
-}

diff --git a/sys-fs/mdadm/mdadm-3.3.4.ebuild b/sys-fs/mdadm/mdadm-3.3.4.ebuild
deleted file mode 100644
index ffa2141..00000000
--- a/sys-fs/mdadm/mdadm-3.3.4.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-inherit eutils flag-o-matic multilib systemd toolchain-funcs udev
-
-DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools"
-HOMEPAGE="http://neil.brown.name/blog/mdadm"
-DEB_PR=2
-SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.xz
-		mirror://debian/pool/main/m/mdadm/${PN}_3.3-${DEB_PR}.debian.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="static"
-
-DEPEND="virtual/pkgconfig
-	app-arch/xz-utils"
-RDEPEND=">=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"
-
-mdadm_emake() {
-	emake \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CC="$(tc-getCC)" \
-		CWFLAGS="-Wall" \
-		CXFLAGS="${CFLAGS}" \
-		UDEVDIR="$(get_udevdir)" \
-		SYSTEMD_DIR="$(systemd_get_unitdir)" \
-		"$@"
-}
-
-src_compile() {
-	use static && append-ldflags -static
-	mdadm_emake all mdassemble
-}
-
-src_test() {
-	mdadm_emake test
-
-	sh ./test || die
-}
-
-src_install() {
-	mdadm_emake DESTDIR="${D}" install install-systemd
-	into /
-	dosbin mdassemble
-	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
-
-	insinto /etc
-	newins 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/README.checkarray
-	dosbin "${WORKDIR}"/debian/checkarray
-	insinto /etc/default
-	newins "${FILESDIR}"/etc-default-mdadm mdadm
-
-	insinto /etc/cron.weekly
-	newins "${FILESDIR}"/mdadm.weekly mdadm
-}
-
-pkg_postinst() {
-	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
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/
@ 2018-03-27  9:13 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2018-03-27  9:13 UTC (permalink / raw
  To: gentoo-commits

commit:     597d7c451eec97fc4b4a00fed47dbd3cd2979ff3
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 27 09:12:46 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Mar 27 09:13:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=597d7c45

sys-fs/mdadm: Removed old.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-fs/mdadm/Manifest                              |   2 -
 ...date-metadata_update-size-before-using-it.patch |  44 -------
 ...-not-try-to-restart-if-reshape-is-running.patch |  45 --------
 ....1-Grow-fix-removal-of-line-in-wrong-case.patch |  39 -------
 ...-use-strcpy-rather-than-pointless-strncpy.patch |  32 ------
 ...date-metadata_update-size-before-using-it.patch | 128 ---------------------
 ...file-install-mdadm-grow-continue-.service.patch |  28 -----
 ...on-allow-prepare_update-to-report-failure.patch | 119 -------------------
 ...e-Unix-domain-socket-is-created-with-safe.patch |  34 ------
 sys-fs/mdadm/mdadm-3.3.1-r2.ebuild                 |  95 ---------------
 10 files changed, 566 deletions(-)

diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 1f58dd0f95a..c40d02b9473 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -1,8 +1,6 @@
-DIST mdadm-3.3.1.tar.xz 407964 BLAKE2B 7494f6431729c3278412080aa3db7676a02d963148e5be7522f3de3e73acb1af9bf9e0be0042e13ee0c7524155e772a252a924eb4965c430d6918dc37aede246 SHA512 46fc1889e97d2d14b72ac26ee07eb4301467dc4a0e838ba89920253484fcd443749f3afccb3d792f7e468b20021d50dbc29dda7033d9b5a8fbaee664200f1981
 DIST mdadm-3.4.tar.xz 422704 BLAKE2B 0e8251fefb2db853a921215a07f1f7e70dfcd6650c20493cb487d4ce32cb609fe8191297046161e62f802c75150e6628b52192bb466d72c4cabfb1bcfae09839 SHA512 5de06f3a2b83333e5346a1e858b15e76f75a13a1d5c5f2032fecc6eb167454b282e12ee111ac2abec778e058ec9554708ac317a476778328546603618e6f70f7
 DIST mdadm-4.0.tar.xz 430780 BLAKE2B f08a67452398c864d73c78e2a7258d89c5c81b83dd136d4cd7e31e46b22d75ff67ecf553dc22f55dca418409daded51a399728dfdbd36039e828cad3233774e6 SHA512 12fb26e6b9c1912698defa406e5e47a7ca8d68d4a9aa7acdc9b463ee2d4a37fc6ecef6beb5395ff619018c3f6bdb6d8c573060d027707540f645ad2265170e8b
 DIST mdadm-4.1-rc1.tar.xz 440336 BLAKE2B af2e4b9e9fd7f75e92d30a29b0a240e4b078e34f3906a583cf10cda1c89717a27d0044d1ba72e9d41b96becda370a423f880c09cd5f2d783715bf2519e401b3c SHA512 07d75ba511a252de95356bc63e480b3c196ad0715d719f75599d1fa2995d649ea86a63f74aee7558316d728ebaae2c87d86806089cba735532e1c39641baf727
-DIST mdadm_3.3-2.debian.tar.gz 127889 BLAKE2B f7cfe5e59e16bf71561f672e3c7f7a480658919665490a0b6c32b47979050880b51e481c4f0869efdeb791c8bd34d3db5d4034b40bbf9b55f5b8bbdf73040618 SHA512 92e4c403542caba4b9afb870ba803e6bc7ade143b27efdc27e03b3407f322722a635457cce9e8c195a3ecd7cbce66fdebdd6046fc4f36836e56e27d5d838c037
 DIST mdadm_3.3.4-1.1.debian.tar.xz 86312 BLAKE2B 367a9ed4b16b73a63b613e8029934ee8fbb056e33ca621e92964408ac9a3b3d107af03b657dbfe572f63150e5438879f6dd29a7e7cca1599b213ba135249e78d SHA512 ea9b34a9952e1ff836cb931c7eef0ae0c44e3f4d46162c7a7eca24936d6f7168e99d67749b3100bc68ebadc8f256e4833d42da48c531cf71e6e8f3100911828f
 DIST mdadm_3.4-4.debian.tar.xz 81200 BLAKE2B 393bac2310139788935ced77b736d60d11f58e86349990034367af5460483e97239eef5a6622405b68a7aa6f65059bc5692518172e422c3596ab879527619952 SHA512 86a9edb8f29931fdfa40037d535ca80f0bf59539fe1ef16f2639e666a5ac1bd90ec617ec1635080ae62a02f7986a6e10c97dce5389555ab7d417885f216c0f93
 DIST mdadm_4.0-2.debian.tar.xz 81844 BLAKE2B f8b33e27dacfa83292cc0632dd2d9a83b9d5a69e5360cdfb7494b489400504f20c7ab213ec455dfefc68d5a7f8a48fb2085710fe420b9791df9f8ebbe05d1a10 SHA512 a118df3edbe492e28dda054672a0adfe2c1ce276655f70509c2f24082aecd5193ade84ca3f0ee93280f646ee6a1636d703607046b7e27388086627bed911037a

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch b/sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch
deleted file mode 100644
index befb7da9173..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1f17f96b538793a0e665e471f602c6fa490ec167 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Thu, 10 Jul 2014 15:59:06 +1000
-Subject: [PATCH 12/14] DDF: validate metadata_update size before using it.
-
-process_update already checks update->len, for all but
-the 'magic', prepare_update doesn't at all.
-
-So add tests to prepare_update that we don't exceed the buffer.
-This will consequently protect process_update from looking
-for a 'magic' which isn't there.
-
-Reported-by: Vincent Berg <vberg@ioactive.com>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- super-ddf.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/super-ddf.c b/super-ddf.c
-index 1e43ca2..8957c2e 100644
---- a/super-ddf.c
-+++ b/super-ddf.c
-@@ -4914,10 +4914,16 @@ static int ddf_prepare_update(struct supertype *st,
- 	 * If a malloc is needed, do it here.
- 	 */
- 	struct ddf_super *ddf = st->sb;
--	be32 *magic = (be32 *)update->buf;
-+	be32 *magic;
-+	if (update->len < 4)
-+		return 0;
-+	magic = (be32 *)update->buf;
- 	if (be32_eq(*magic, DDF_VD_CONF_MAGIC)) {
- 		struct vcl *vcl;
--		struct vd_config *conf = (struct vd_config *) update->buf;
-+		struct vd_config *conf;
-+		if (update->len < (int)sizeof(*conf))
-+			return 0;
-+		conf = (struct vd_config *) update->buf;
- 		if (posix_memalign(&update->space, 512,
- 				   offsetof(struct vcl, conf)
- 				   + ddf->conf_rec_len * 512) != 0) {
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch b/sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch
deleted file mode 100644
index 717317b8a2d..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 13ffbe89b6103c146c08eb1c9a70833306c8322b Mon Sep 17 00:00:00 2001
-From: Pawel Baldysiak <pawel.baldysiak@intel.com>
-Date: Wed, 16 Jul 2014 12:20:34 +0200
-Subject: [PATCH 14/14] Grow: Do not try to restart if reshape is running
-
-Grow process did not check if reshape is already started
-when deciding about restarting.
-Sync_action should be checked in this case, and if
-reshape is running - restart flag should not be set.
-Otherwise, Grow process will fail to write data to
-sysfs, and reshape will not be continued.
-
-Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
-Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- Grow.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/Grow.c b/Grow.c
-index a2f4f14..ea9cc60 100644
---- a/Grow.c
-+++ b/Grow.c
-@@ -2822,6 +2822,7 @@ static int reshape_array(char *container, int fd, char *devname,
- 	unsigned long long array_size;
- 	int done;
- 	struct mdinfo *sra = NULL;
-+	char buf[20];
- 
- 	/* when reshaping a RAID0, the component_size might be zero.
- 	 * So try to fix that up.
-@@ -2869,7 +2870,9 @@ static int reshape_array(char *container, int fd, char *devname,
- 		goto release;
- 	}
- 
--	if (st->ss->external && restart && (info->reshape_progress == 0)) {
-+	if (st->ss->external && restart && (info->reshape_progress == 0) &&
-+	    !((sysfs_get_str(info, NULL, "sync_action", buf, sizeof(buf)) > 0) &&
-+	      (strncmp(buf, "reshape", 7) == 0))) {
- 		/* When reshape is restarted from '0', very begin of array
- 		 * it is possible that for external metadata reshape and array
- 		 * configuration doesn't happen.
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch b/sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch
deleted file mode 100644
index acc38267d16..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e339dba2a1744dc6860a58e286ded39fc993c2db Mon Sep 17 00:00:00 2001
-From: Pawel Baldysiak <pawel.baldysiak@intel.com>
-Date: Wed, 11 Jun 2014 15:18:44 +0000
-Subject: [PATCH 02/14] Grow: fix removal of line in wrong case
-
-Commit 18d9bcfa33939cee345d4d7735bc6081bcc409c8
-removed wrong line (in case RAID0->RAID4).
-This patch corrects this mistake
-(line should be removed in case RAID4->RAID4).
-
-Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- Grow.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Grow.c b/Grow.c
-index 12730e2..a2f4f14 100644
---- a/Grow.c
-+++ b/Grow.c
-@@ -1324,6 +1324,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
- 
- 		switch (re->level) {
- 		case 4:
-+			re->before.layout = 0;
- 			re->after.layout = 0;
- 			break;
- 		case 5:
-@@ -1339,7 +1340,6 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
- 
- 		switch (re->level) {
- 		case 4:
--			re->before.layout = 0;
- 			re->after.layout = 0;
- 			break;
- 		case 5:
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch b/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch
deleted file mode 100644
index b63b1e732d3..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 6d8d290a2f09a3bfd9e44f382ae5daea128772f7 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Thu, 3 Jul 2014 15:04:01 +1000
-Subject: [PATCH 03/14] IMSM: use strcpy rather than pointless strncpy.
-
-As strncpy doesn't guarantee to nul-terminate, some static
-analysers get upset that it is followed by a 'strncat'.
-So just use a 'strcpy' - strlen(disk_by_path) is constant
-and definitely less than PATH_MAX.
-
-Link: https://github.com/neilbrown/mdadm/issues/4
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- super-intel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/super-intel.c b/super-intel.c
-index 9dd807a..0106b4f 100644
---- a/super-intel.c
-+++ b/super-intel.c
-@@ -9357,7 +9357,7 @@ static const char *imsm_get_disk_controller_domain(const char *path)
- 	char *drv=NULL;
- 	struct stat st;
- 
--	strncpy(disk_path, disk_by_path, PATH_MAX - 1);
-+	strcpy(disk_path, disk_by_path);
- 	strncat(disk_path, path, PATH_MAX - strlen(disk_path) - 1);
- 	if (stat(disk_path, &st) == 0) {
- 		struct sys_dev* hba;
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch b/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch
deleted file mode 100644
index b1610835753..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 095b8088fa99ad1195d1aba03af2aa561b4a6379 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Thu, 10 Jul 2014 16:09:28 +1000
-Subject: [PATCH 13/14] IMSM: validate metadata_update size before using it.
-
-Every case in prepare_update check that the size message
-size is sufficient, so process_update doesn't need to check anything.
-
-Reported-by: Vincent Berg <vberg@ioactive.com>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- super-intel.c | 44 +++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 41 insertions(+), 3 deletions(-)
-
-diff --git a/super-intel.c b/super-intel.c
-index 2547b4a..b4efa72 100644
---- a/super-intel.c
-+++ b/super-intel.c
-@@ -8587,7 +8587,7 @@ static void imsm_process_update(struct supertype *st,
- 	}
- 	case update_add_remove_disk: {
- 		/* we may be able to repair some arrays if disks are
--		 * being added, check teh status of add_remove_disk
-+		 * being added, check the status of add_remove_disk
- 		 * if discs has been added.
- 		 */
- 		if (add_remove_disk_update(super)) {
-@@ -8617,19 +8617,28 @@ static int imsm_prepare_update(struct supertype *st,
- 	 * integrated by the monitor thread without worrying about live pointers
- 	 * in the manager thread.
- 	 */
--	enum imsm_update_type type = *(enum imsm_update_type *) update->buf;
-+	enum imsm_update_type type;
- 	struct intel_super *super = st->sb;
- 	struct imsm_super *mpb = super->anchor;
- 	size_t buf_len;
- 	size_t len = 0;
- 
-+	if (update->len < (int)sizeof(type))
-+		return 0;
-+
-+	type = *(enum imsm_update_type *) update->buf;
-+
- 	switch (type) {
- 	case update_general_migration_checkpoint:
-+		if (update->len < (int)sizeof(struct imsm_update_general_migration_checkpoint))
-+			return 0;
- 		dprintf("imsm: prepare_update() "
- 			"for update_general_migration_checkpoint called\n");
- 		break;
- 	case update_takeover: {
- 		struct imsm_update_takeover *u = (void *)update->buf;
-+		if (update->len < (int)sizeof(*u))
-+			return 0;
- 		if (u->direction == R0_TO_R10) {
- 			void **tail = (void **)&update->space_list;
- 			struct imsm_dev *dev = get_imsm_dev(super, u->subarray);
-@@ -8670,6 +8679,9 @@ static int imsm_prepare_update(struct supertype *st,
- 		struct intel_dev *dl;
- 		void **space_tail = (void**)&update->space_list;
- 
-+		if (update->len < (int)sizeof(*u))
-+			return 0;
-+
- 		dprintf("imsm: imsm_prepare_update() for update_reshape\n");
- 
- 		for (dl = super->devlist; dl; dl = dl->next) {
-@@ -8702,6 +8714,9 @@ static int imsm_prepare_update(struct supertype *st,
- 		void *s;
- 		int current_level = -1;
- 
-+		if (update->len < (int)sizeof(*u))
-+			return 0;
-+
- 		dprintf("imsm: imsm_prepare_update() for update_reshape\n");
- 
- 		/* add space for bigger array in update
-@@ -8769,6 +8784,13 @@ static int imsm_prepare_update(struct supertype *st,
- 		break;
- 	}
- 	case update_size_change: {
-+		if (update->len < (int)sizeof(struct imsm_update_size_change))
-+			return 0;
-+		break;
-+	}
-+	case update_activate_spare: {
-+		if (update->len < (int)sizeof(struct imsm_update_activate_spare))
-+			return 0;
- 		break;
- 	}
- 	case update_create_array: {
-@@ -8781,6 +8803,9 @@ static int imsm_prepare_update(struct supertype *st,
- 		int i;
- 		int activate = 0;
- 
-+		if (update->len < (int)sizeof(*u))
-+			return 0;
-+
- 		inf = get_disk_info(u);
- 		len = sizeof_imsm_dev(dev, 1);
- 		/* allocate a new super->devlist entry */
-@@ -8802,9 +8827,22 @@ static int imsm_prepare_update(struct supertype *st,
- 		}
- 		len += activate * sizeof(struct imsm_disk);
- 		break;
--	default:
-+	}
-+	case update_kill_array: {
-+		if (update->len < (int)sizeof(struct imsm_update_kill_array))
-+			return 0;
- 		break;
- 	}
-+	case update_rename_array: {
-+		if (update->len < (int)sizeof(struct imsm_update_rename_array))
-+			return 0;
-+		break;
-+	}
-+	case update_add_remove_disk:
-+		/* no update->len needed */
-+		break;
-+	default:
-+		return 0;
- 	}
- 
- 	/* check if we need a larger metadata buffer */
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch b/sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch
deleted file mode 100644
index 431bfd1abe3..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 616f197f9d6d044afb9e27ddc9cd087d21d610f0 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Tue, 10 Jun 2014 20:34:40 +1000
-Subject: [PATCH 01/14] Makefile: install mdadm-grow-continue@.service
-
-Forgot to add this to install-systemd target
-
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index c7e7a42..1a4a5dc 100644
---- a/Makefile
-+++ b/Makefile
-@@ -290,7 +290,7 @@ install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules
- 
- install-systemd: systemd/mdmon@.service
- 	@for file in mdmon@.service mdmonitor.service mdadm-last-resort@.timer \
--		mdadm-last-resort@.service ; \
-+		mdadm-last-resort@.service mdadm-grow-continue@.service; \
- 	do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp && \
- 	   echo $(INSTALL) -D -m 644 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
- 	   $(INSTALL) -D -m 644 .install.tmp $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch b/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch
deleted file mode 100644
index 772248b19c3..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 5fe6f031d9a21a935f0ef1b1fbdb314b53f2199f Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Thu, 10 Jul 2014 15:54:02 +1000
-Subject: [PATCH 11/14] mdmon: allow prepare_update to report failure.
-
-If 'prepare_update' fails for some reason there is little
-point continuing on to 'process_update'.
-For now only malloc failures are caught, but other failures
-will be considered in future.
-
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- managemon.c   | 3 ++-
- mdadm.h       | 5 ++++-
- super-ddf.c   | 8 +++++---
- super-intel.c | 9 +++++----
- 4 files changed, 16 insertions(+), 9 deletions(-)
-
-diff --git a/managemon.c b/managemon.c
-index 5f7e2ce..1c9eccc 100644
---- a/managemon.c
-+++ b/managemon.c
-@@ -819,7 +819,8 @@ static void handle_message(struct supertype *container, struct metadata_update *
- 		mu->space_list = NULL;
- 		mu->next = NULL;
- 		if (container->ss->prepare_update)
--			container->ss->prepare_update(container, mu);
-+			if (!container->ss->prepare_update(container, mu))
-+				free_updates(&mu);
- 		queue_metadata_update(mu);
- 	}
- }
-diff --git a/mdadm.h b/mdadm.h
-index 914d67c..02a9288 100644
---- a/mdadm.h
-+++ b/mdadm.h
-@@ -929,7 +929,10 @@ extern struct superswitch {
- 	void (*sync_metadata)(struct supertype *st);
- 	void (*process_update)(struct supertype *st,
- 			       struct metadata_update *update);
--	void (*prepare_update)(struct supertype *st,
-+	/* Prepare updates allocates extra memory that might be
-+	 * needed.  If the update cannot be understood,  return 0.
-+	 */
-+	int (*prepare_update)(struct supertype *st,
- 			       struct metadata_update *update);
- 
- 	/* activate_spare will check if the array is degraded and, if it
-diff --git a/super-ddf.c b/super-ddf.c
-index ab9fc46..1e43ca2 100644
---- a/super-ddf.c
-+++ b/super-ddf.c
-@@ -4906,8 +4906,8 @@ static void ddf_process_update(struct supertype *st,
- 	/* case DDF_SPARE_ASSIGN_MAGIC */
- }
- 
--static void ddf_prepare_update(struct supertype *st,
--			       struct metadata_update *update)
-+static int ddf_prepare_update(struct supertype *st,
-+			      struct metadata_update *update)
- {
- 	/* This update arrived at managemon.
- 	 * We are about to pass it to monitor.
-@@ -4922,15 +4922,17 @@ static void ddf_prepare_update(struct supertype *st,
- 				   offsetof(struct vcl, conf)
- 				   + ddf->conf_rec_len * 512) != 0) {
- 			update->space = NULL;
--			return;
-+			return 0;
- 		}
- 		vcl = update->space;
- 		vcl->conf.sec_elmnt_count = conf->sec_elmnt_count;
- 		if (alloc_other_bvds(ddf, vcl) != 0) {
- 			free(update->space);
- 			update->space = NULL;
-+			return 0;
- 		}
- 	}
-+	return 1;
- }
- 
- /*
-diff --git a/super-intel.c b/super-intel.c
-index 7734bde..2547b4a 100644
---- a/super-intel.c
-+++ b/super-intel.c
-@@ -8607,8 +8607,8 @@ static void imsm_process_update(struct supertype *st,
- 
- static struct mdinfo *get_spares_for_grow(struct supertype *st);
- 
--static void imsm_prepare_update(struct supertype *st,
--				struct metadata_update *update)
-+static int imsm_prepare_update(struct supertype *st,
-+			       struct metadata_update *update)
- {
- 	/**
- 	 * Allocate space to hold new disk entries, raid-device entries or a new
-@@ -8828,6 +8828,7 @@ static void imsm_prepare_update(struct supertype *st,
- 		else
- 			super->next_buf = NULL;
- 	}
-+	return 1;
- }
- 
- /* must be called while manager is quiesced */
-@@ -9716,8 +9717,8 @@ static void imsm_update_metadata_locally(struct supertype *st,
- 	mu.space = NULL;
- 	mu.space_list = NULL;
- 	mu.next = NULL;
--	imsm_prepare_update(st, &mu);
--	imsm_process_update(st, &mu);
-+	if (imsm_prepare_update(st, &mu))
-+		imsm_process_update(st, &mu);
- 
- 	while (mu.space_list) {
- 		void **space = mu.space_list;
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch b/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch
deleted file mode 100644
index 9780196e28c..00000000000
--- a/sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 120ec6f7b96455e42bdfa9131c0c9026c57eaf19 Mon Sep 17 00:00:00 2001
-From: NeilBrown <neilb@suse.de>
-Date: Thu, 3 Jul 2014 17:06:45 +1000
-Subject: [PATCH 09/14] mdmon: ensure Unix domain socket is created with safe
- permissions.
-
-In the unlikely case that mdmon is started with an overly
-permissive umask, we don't want to risk giving away world acccess.
-
-All other "mkdir" and  "O_CREAT" calls in mdmon and mdadm set
-a suitably restrictive permission mask.  'bind' don't take an
-explicit mask so it needs an implicit one.
-
-Reported-by: Vincent Berg <vberg@ioactive.com>
-Signed-off-by: NeilBrown <neilb@suse.de>
----
- mdmon.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mdmon.c b/mdmon.c
-index b84d4d9..21221cd 100644
---- a/mdmon.c
-+++ b/mdmon.c
-@@ -232,6 +232,7 @@ static int make_control_sock(char *devname)
- 
- 	addr.sun_family = PF_LOCAL;
- 	strcpy(addr.sun_path, path);
-+	umask(077); /* ensure no world write access */
- 	if (bind(sfd, &addr, sizeof(addr)) < 0) {
- 		close(sfd);
- 		return -1;
--- 
-2.0.0
-

diff --git a/sys-fs/mdadm/mdadm-3.3.1-r2.ebuild b/sys-fs/mdadm/mdadm-3.3.1-r2.ebuild
deleted file mode 100644
index c667861c611..00000000000
--- a/sys-fs/mdadm/mdadm-3.3.1-r2.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit eutils flag-o-matic multilib systemd toolchain-funcs udev
-
-DESCRIPTION="Tool for running RAID systems - replacement for the raidtools"
-HOMEPAGE="http://neil.brown.name/blog/mdadm"
-DEB_PR=2
-SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.xz
-		mirror://debian/pool/main/m/mdadm/${PN}_3.3-${DEB_PR}.debian.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="static"
-
-DEPEND="virtual/pkgconfig
-	app-arch/xz-utils"
-RDEPEND=">=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"
-
-mdadm_emake() {
-	emake \
-		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
-		CC="$(tc-getCC)" \
-		CWFLAGS="-Wall" \
-		CXFLAGS="${CFLAGS}" \
-		UDEVDIR="$(get_udevdir)" \
-		SYSTEMD_DIR="$(systemd_get_unitdir)" \
-		"$@"
-}
-
-src_prepare() {
-	# These are important bugfixes from upstream git after 3.3.1 release,
-	# and before and including 17 Jul 2014:
-	epatch \
-		"${FILESDIR}"/${P}-Makefile-install-mdadm-grow-continue-.service.patch \
-		"${FILESDIR}"/${P}-Grow-fix-removal-of-line-in-wrong-case.patch \
-		"${FILESDIR}"/${P}-IMSM-use-strcpy-rather-than-pointless-strncpy.patch \
-		"${FILESDIR}"/${P}-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch \
-		"${FILESDIR}"/${P}-mdmon-allow-prepare_update-to-report-failure.patch \
-		"${FILESDIR}"/${P}-DDF-validate-metadata_update-size-before-using-it.patch \
-		"${FILESDIR}"/${P}-IMSM-validate-metadata_update-size-before-using-it.patch \
-		"${FILESDIR}"/${P}-Grow-Do-not-try-to-restart-if-reshape-is-running.patch
-}
-
-src_compile() {
-	use static && append-ldflags -static
-	mdadm_emake all mdassemble
-}
-
-src_test() {
-	mdadm_emake test
-
-	sh ./test || die
-}
-
-src_install() {
-	# Use split lines because of bug #517218
-	mdadm_emake DESTDIR="${D}" install
-	mdadm_emake DESTDIR="${D}" install-systemd
-	into /
-	dosbin mdassemble
-	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
-
-	insinto /etc
-	newins 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/README.checkarray
-	dosbin "${WORKDIR}"/debian/checkarray
-
-	insinto /etc/cron.weekly
-	newins "${FILESDIR}"/mdadm.weekly mdadm
-}
-
-pkg_postinst() {
-	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
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/
@ 2024-02-19 21:00 Robin H. Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Robin H. Johnson @ 2024-02-19 21:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b0152d3ed507c45608377046bc2f65a48b47ec10
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 19 20:32:53 2024 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Feb 19 21:00:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0152d3e

sys-fs/mdadm: improve mdmonitor on systemd

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Closes: https://bugs.gentoo.org/628968

 sys-fs/mdadm/files/mdadm-4.2-mdadm_env.patch |  36 ++++++++++
 sys-fs/mdadm/mdadm-4.2-r3.ebuild             | 104 +++++++++++++++++++++++++++
 2 files changed, 140 insertions(+)

diff --git a/sys-fs/mdadm/files/mdadm-4.2-mdadm_env.patch b/sys-fs/mdadm/files/mdadm-4.2-mdadm_env.patch
new file mode 100644
index 000000000000..bd09da553820
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-4.2-mdadm_env.patch
@@ -0,0 +1,36 @@
+--- mdadm-4.2/systemd/SUSE-mdadm_env.sh	2021-12-30 11:43:35.000000000 -0800
++++ mdadm-4.2/systemd/SUSE-mdadm_env.sh	2024-02-19 12:20:56.509632098 -0800
+@@ -6,6 +7,12 @@
+ 
+ MDADM_SCAN="yes"
+ 
++# Gentoo: source conf.d
++mdadmd_CONFIG=/etc/conf.d/mdadm
++if test -r $mdadmd_CONFIG; then
++   . $mdadmd_CONFIG
++fi
++
+ # Following adapted from /etc/init.d/mdadmd on openSUSE
+ 
+ mdadmd_CONFIG=/etc/sysconfig/mdadm
+@@ -42,7 +49,8 @@
+ fi
+ 
+ mkdir -p /run/sysconfig
+-echo "MDADM_MONITOR_ARGS=$MDADM_RAIDDEVICES $MDADM_DELAY $MDADM_MAIL $MDADM_PROGRAM $MDADM_SCAN $MDADM_SEND_MAIL $MDADM_CONFIG" > /run/sysconfig/mdadm
++# Gentoo: added $MDADM_OPTS to the end.
++echo "MDADM_MONITOR_ARGS=$MDADM_RAIDDEVICES $MDADM_DELAY $MDADM_MAIL $MDADM_PROGRAM $MDADM_SCAN $MDADM_SEND_MAIL $MDADM_CONFIG $MDADM_OPTS" > /run/sysconfig/mdadm
+ if [ -n "$MDADM_CHECK_DURATION" ]; then
+  echo "MDADM_CHECK_DURATION=$MDADM_CHECK_DURATION" >> /run/sysconfig/mdadm
+ fi
+--- mdadm-4.2.orig/Makefile	2024-02-19 12:27:19.512400849 -0800
++++ mdadm-4.2/Makefile	2024-02-19 12:27:39.517338433 -0800
+@@ -298,7 +298,7 @@
+ 	   $(INSTALL) -D -m 755  .install.tmp.3 $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
+ 	   rm -f .install.tmp.3; \
+ 	done
+-	if [ -f /etc/SuSE-release -o -n "$(SUSE)" ] ;then $(INSTALL) -D -m 755 systemd/SUSE-mdadm_env.sh $(DESTDIR)$(LIB_DIR)/mdadm_env.sh ;fi
++	$(INSTALL) -D -m 755 systemd/SUSE-mdadm_env.sh $(DESTDIR)$(LIB_DIR)/mdadm_env.sh
+ 
+ install-bin: mdadm mdmon
+ 	$(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm

diff --git a/sys-fs/mdadm/mdadm-4.2-r3.ebuild b/sys-fs/mdadm/mdadm-4.2-r3.ebuild
new file mode 100644
index 000000000000..0b2549330957
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-4.2-r3.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic systemd toolchain-funcs udev
+
+DESCRIPTION="Tool for running RAID systems - replacement for the raidtools"
+HOMEPAGE="https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/"
+DEB_PF="4.2~rc2-7"
+SRC_URI="https://www.kernel.org/pub/linux/utils/raid/mdadm/${P/_/-}.tar.xz
+		mirror://debian/pool/main/m/mdadm/${PN}_${DEB_PF}.debian.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" = *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="static systemd +udev"
+
+REQUIRED_USE="static? ( !udev )"
+
+BDEPEND="app-arch/xz-utils
+	virtual/pkgconfig"
+DEPEND="udev? ( virtual/libudev:= )"
+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=(
+	"${FILESDIR}/${PN}"-3.4-sysmacros.patch #580188
+	"${FILESDIR}/${PN}"-4.2-in_initrd-collision.patch #830461
+	"${FILESDIR}/${PN}"-4.2-mdadm_env.patch #628968
+)
+
+mdadm_emake() {
+	# We should probably make corosync & libdlm into USE flags. #573782
+	local args=(
+		PKG_CONFIG="$(tc-getPKG_CONFIG)"
+		CC="$(tc-getCC)"
+		CWFLAGS="-Wall"
+		CXFLAGS="${CFLAGS}"
+		UDEVDIR="$(get_udevdir)"
+		SYSTEMD_DIR="$(systemd_get_systemunitdir)"
+		COROSYNC="-DNO_COROSYNC"
+		DLM="-DNO_DLM"
+
+		# https://bugs.gentoo.org/732276
+		STRIP=
+
+		"$@"
+	)
+	emake "${args[@]}"
+}
+
+src_compile() {
+	use static && append-ldflags -static
+
+	# CPPFLAGS won't work for this
+	use udev || append-cflags -DNO_LIBUDEV
+
+	mdadm_emake all
+}
+
+src_test() {
+	mdadm_emake test
+
+	sh ./test || die
+}
+
+src_install() {
+	mdadm_emake DESTDIR="${D}" install install-systemd
+	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-*
+
+	insinto /etc
+	newins 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/README.checkarray
+	dosbin "${WORKDIR}"/debian/checkarray
+	insinto /etc/default
+	newins "${FILESDIR}"/etc-default-mdadm mdadm
+
+	exeinto /etc/cron.weekly
+	newexe "${FILESDIR}"/mdadm.weekly mdadm
+}
+
+pkg_postinst() {
+	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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/
@ 2024-03-14  3:42 Robin H. Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Robin H. Johnson @ 2024-03-14  3:42 UTC (permalink / raw
  To: gentoo-commits

commit:     16001ee3172451f6574dbe8c5b7f71ac0d43d3e2
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 14 03:39:47 2024 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 03:42:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16001ee3

sys-fs/mdadm: bump

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Closes: https://bugs.gentoo.org/833000

 sys-fs/mdadm/Manifest                              |   2 +
 .../files/mdadm-4.3-in_initrd-collision.patch      |  45 ++++++++
 sys-fs/mdadm/files/mdadm-4.3-ldflags.patch         |  11 ++
 sys-fs/mdadm/mdadm-4.3.ebuild                      | 124 +++++++++++++++++++++
 sys-fs/mdadm/metadata.xml                          |   3 +
 5 files changed, 185 insertions(+)

diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 961f422d5fb6..51cfc9e15326 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -1,2 +1,4 @@
 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.2~rc2-7.debian.tar.xz 89904 BLAKE2B dd04f2dd044d0bca85920eaf5c79a288d69c47a7ad7e36509a126c01ef63bd045d7e0530450650028de39d74ad852995ca080c3a73dbcb1cf1b3783118109f35 SHA512 3d36533d2713b663606919b2bfec18b15e18a6a0194e333e38e4a58f175da96af7b1fe16f0c36ee148e14492a4e0710b9fad6ac7856495b63c0176ebb7333be6
+DIST mdadm_4.3-1.debian.tar.xz 86972 BLAKE2B 52af9ddacc402d8c3318bac31b4cd5ac3045e564832546146ba0a18d6a43866ae2c21270ac15f48df98c4f76af0eeae41679ea9e0e265dad44914bd58f27d689 SHA512 1c5203523f0c7fe271d850ab4ad376a449e870f8f1549dc4460adede1f59a1a364e741562954297e7848bae19d1cfe273a31f1bfaf739dd37559a0666abd8517

diff --git a/sys-fs/mdadm/files/mdadm-4.3-in_initrd-collision.patch b/sys-fs/mdadm/files/mdadm-4.3-in_initrd-collision.patch
new file mode 100644
index 000000000000..54e4aadacb58
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-4.3-in_initrd-collision.patch
@@ -0,0 +1,45 @@
+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
+@@ -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,
+@@ -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/sys-fs/mdadm/files/mdadm-4.3-ldflags.patch b/sys-fs/mdadm/files/mdadm-4.3-ldflags.patch
new file mode 100644
index 000000000000..e8e93d424592
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-4.3-ldflags.patch
@@ -0,0 +1,11 @@
+--- mdadm-4.3/Makefile.orig	2024-03-13 20:11:48.949678469 -0700
++++ mdadm-4.3/Makefile	2024-03-13 20:11:52.773671814 -0700
+@@ -132,7 +132,7 @@
+ MON_LDFLAGS += -pthread
+ endif
+ 
+-LDFLAGS = -Wl,-z,now,-z,noexecstack
++LDFLAGS += -Wl,-z,now,-z,noexecstack
+ 
+ # If you want a static binary, you might uncomment these
+ # LDFLAGS += -static

diff --git a/sys-fs/mdadm/mdadm-4.3.ebuild b/sys-fs/mdadm/mdadm-4.3.ebuild
new file mode 100644
index 000000000000..c78553aa7558
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-4.3.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic systemd toolchain-funcs udev
+
+DESCRIPTION="Tool for running RAID systems - replacement for the raidtools"
+HOMEPAGE="https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/"
+DEB_PF="4.3-1"
+SRC_URI="https://www.kernel.org/pub/linux/utils/raid/mdadm/${P/_/-}.tar.xz
+		mirror://debian/pool/main/m/mdadm/${PN}_${DEB_PF}.debian.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" = *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="static systemd +udev corosync"
+
+REQUIRED_USE="static? ( !udev )"
+
+BDEPEND="app-arch/xz-utils
+	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=(
+	#"${FILESDIR}/${PN}"-3.4-sysmacros.patch #580188 # upstream has it later in the list of includes as of 4.3.
+	"${FILESDIR}/${PN}"-4.3-in_initrd-collision.patch #830461
+	"${FILESDIR}/${PN}"-4.2-mdadm_env.patch #628968
+	"${FILESDIR}/${PN}"-4.3-ldflags.patch
+	"${WORKDIR}/debian/patches/debian/0001-fix-manpages.patch"
+	"${WORKDIR}/debian/patches/debian/0003-host-name-in-default-mailfrom.patch"
+	"${WORKDIR}/debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch"
+	"${WORKDIR}/debian/patches/debian/0007-no-Werror.patch"
+)
+
+mdadm_emake() {
+	# We should probably make corosync & libdlm into USE flags. #573782
+	local args=(
+		PKG_CONFIG="$(tc-getPKG_CONFIG)"
+		CC="$(tc-getCC)"
+		CWFLAGS="-Wall"
+		CXFLAGS="${CFLAGS}"
+		LDFLAGS="${LDFLAGS}"
+		UDEVDIR="$(get_udevdir)"
+		SYSTEMD_DIR="$(systemd_get_systemunitdir)"
+		COROSYNC="$(usex corosync '' -DNO_COROSYNC)"
+		DLM="-DNO_DLM"
+
+		# https://bugs.gentoo.org/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
+	dodoc ChangeLog INSTALL TODO README* ANNOUNCE-*
+
+	# install mdcheck_start.service
+	# needed for systemd units https://bugs.gentoo.org/833000
+	exeinto /usr/share/mdadm/
+	doexe misc/mdcheck
+
+	insinto /etc
+	newins 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
+}

diff --git a/sys-fs/mdadm/metadata.xml b/sys-fs/mdadm/metadata.xml
index 536bb38d9f1d..1ce6bb33ddd3 100644
--- a/sys-fs/mdadm/metadata.xml
+++ b/sys-fs/mdadm/metadata.xml
@@ -5,6 +5,9 @@
 	<email>base-system@gentoo.org</email>
 	<name>Gentoo Base System</name>
 </maintainer>
+<use>
+	<flag name="corosync">Support for corosync cluster engine</flag>
+</use>
 <upstream>
 	<remote-id type="cpe">cpe:/a:mdadm_project:mdadm</remote-id>
 </upstream>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/
@ 2024-04-30 15:38 Andreas K. Hüttel
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas K. Hüttel @ 2024-04-30 15:38 UTC (permalink / raw
  To: gentoo-commits

commit:     e61a70fcbe1a8cd07355938471f01bf25e013b64
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 30 15:35:39 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Apr 30 15:38:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e61a70fc

sys-fs/mdadm: Add a first musl-1.2.5 build fix

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-fs/mdadm/files/mdadm-4.3-musl125-1.patch | 44 ++++++++++++++++++++++++++++
 sys-fs/mdadm/mdadm-4.3.ebuild                |  1 +
 2 files changed, 45 insertions(+)

diff --git a/sys-fs/mdadm/files/mdadm-4.3-musl125-1.patch b/sys-fs/mdadm/files/mdadm-4.3-musl125-1.patch
new file mode 100644
index 000000000000..a10b56b67b94
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-4.3-musl125-1.patch
@@ -0,0 +1,44 @@
+
+Note- This is also needed for musl-1.2.5 (aside other fixes)- dilfridge
+
+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/sys-fs/mdadm/mdadm-4.3.ebuild b/sys-fs/mdadm/mdadm-4.3.ebuild
index 4e84a51e91b3..f132d354e746 100644
--- a/sys-fs/mdadm/mdadm-4.3.ebuild
+++ b/sys-fs/mdadm/mdadm-4.3.ebuild
@@ -36,6 +36,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}"-4.2-mdadm_env.patch #628968
 	"${FILESDIR}/${PN}"-4.3-ldflags.patch
 	"${FILESDIR}/${PN}"-4.3-no-udev.patch
+	"${FILESDIR}/${PN}"-4.3-musl125-1.patch
 	"${WORKDIR}/debian/patches/debian/0001-fix-manpages.patch"
 	"${WORKDIR}/debian/patches/debian/0003-host-name-in-default-mailfrom.patch"
 	"${WORKDIR}/debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch"


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-30 15:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 19:05 [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/files/, sys-fs/mdadm/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2024-04-30 15:38 Andreas K. Hüttel
2024-03-14  3:42 Robin H. Johnson
2024-02-19 21:00 Robin H. Johnson
2018-03-27  9:13 Lars Wendler
2016-01-28 10:22 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox