summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2013-11-02 06:35:27 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2013-11-02 06:35:27 +0000
commite695b8180b9d17160b11dd901902e12aa16de069 (patch)
treefb2ef6eb93cebd61b983f7ac2e2f243a3c0ff2a2 /sys-fs
parentBump (diff)
downloadgentoo-2-e695b8180b9d17160b11dd901902e12aa16de069.tar.gz
gentoo-2-e695b8180b9d17160b11dd901902e12aa16de069.tar.bz2
gentoo-2-e695b8180b9d17160b11dd901902e12aa16de069.zip
The Debian patchset has a great tool (checkarray) to run a regular check of arrays , and I think we could benefit from it, since it saved my data at least once already.
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/mdadm/ChangeLog9
-rw-r--r--sys-fs/mdadm/mdadm-3.3-r2.ebuild85
2 files changed, 93 insertions, 1 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index 2550854145e3..41da97c4c260 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/mdadm
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.172 2013/09/28 08:43:48 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.173 2013/11/02 06:35:27 robbat2 Exp $
+
+*mdadm-3.3-r2 (02 Nov 2013)
+
+ 02 Nov 2013; Robin H. Johnson <robbat2@gentoo.org> +mdadm-3.3-r2.ebuild:
+ The Debian patchset has a great tool (checkarray) to run a regular check of
+ arrays , and I think we could benefit from it, since it saved my data at least
+ once already.
*mdadm-3.3-r1 (28 Sep 2013)
diff --git a/sys-fs/mdadm/mdadm-3.3-r2.ebuild b/sys-fs/mdadm/mdadm-3.3-r2.ebuild
new file mode 100644
index 000000000000..f7c0de3ba117
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-3.3-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.3-r2.ebuild,v 1.1 2013/11/02 06:35:27 robbat2 Exp $
+
+EAPI="4"
+inherit multilib 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"
+DEB_PR=2
+SRC_URI="mirror://kernel/linux/utils/raid/mdadm/${P}.tar.xz
+ mirror://debian/pool/main/m/mdadm/${PN}_${PV}-${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}" \
+ 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}" \
+ SYSTEMD_DIR=$(systemd_get_unitdir) \
+ 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
+ systemd_dounit "${FILESDIR}"/mdadm.service
+ systemd_newtmpfilesd "${FILESDIR}"/mdadm.tmpfiles.conf mdadm.conf
+
+ # From the Debian patchset
+ into /usr
+ dodoc "${WORKDIR}/debian/README.checkarray"
+ dosbin "${WORKDIR}/debian/checkarray"
+ sed -i -e 's~/usr/share/mdadm/checkarray~/usr/sbin/checkarray~g' \
+ "${WORKDIR}"/debian/mdadm.cron.d
+ insinto /etc/cron.d/
+ newins "${WORKDIR}"/debian/mdadm.cron.d 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
+}