summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-08-23 11:19:38 +0000
committerMike Frysinger <vapier@gentoo.org>2009-08-23 11:19:38 +0000
commitdb3dad15c1a804a366fbb9a1a7b71a21300be73c (patch)
tree6b7a88c94edde8a872317897e645b7c19ba61369 /sys-fs/mdadm
parentFix bug #282354, applet did not appear into panel due to missing call to gnom... (diff)
downloadgentoo-2-db3dad15c1a804a366fbb9a1a7b71a21300be73c.tar.gz
gentoo-2-db3dad15c1a804a366fbb9a1a7b71a21300be73c.tar.bz2
gentoo-2-db3dad15c1a804a366fbb9a1a7b71a21300be73c.zip
Version bump #274444 by Michael Evans. Stop creating devices nodes ourselves in boot hook #266724 by Sven E.
(Portage version: 2.2_rc38/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs/mdadm')
-rw-r--r--sys-fs/mdadm/ChangeLog9
-rw-r--r--sys-fs/mdadm/files/mdadm-3.0-dont-make-man.patch11
-rwxr-xr-xsys-fs/mdadm/files/raid-start.sh-3.031
-rw-r--r--sys-fs/mdadm/mdadm-3.0.ebuild62
4 files changed, 112 insertions, 1 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index 5db0445de29c..9847ef318f89 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/mdadm
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.111 2009/07/29 19:14:32 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.112 2009/08/23 11:19:38 vapier Exp $
+
+*mdadm-3.0 (23 Aug 2009)
+
+ 23 Aug 2009; Mike Frysinger <vapier@gentoo.org> +files/raid-start.sh-3.0,
+ +mdadm-3.0.ebuild, +files/mdadm-3.0-dont-make-man.patch:
+ Version bump #274444 by Michael Evans. Stop creating devices nodes
+ ourselves in boot hook #266724 by Sven E.
*mdadm-2.6.9-r1 (29 Jul 2009)
diff --git a/sys-fs/mdadm/files/mdadm-3.0-dont-make-man.patch b/sys-fs/mdadm/files/mdadm-3.0-dont-make-man.patch
new file mode 100644
index 000000000000..8c43fef82abb
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-3.0-dont-make-man.patch
@@ -0,0 +1,11 @@
+The .man files are never installed so there's no point in
+generating them, especially since the source manpages are
+installed.
+
+--- mdadm-3.0/Makefile
++++ mdadm-3.0/Makefile
+@@ -69,3 +69,3 @@
+
+-all : mdadm mdmon mdadm.man md.man mdadm.conf.man mdmon.man
++all : mdadm mdmon
+
diff --git a/sys-fs/mdadm/files/raid-start.sh-3.0 b/sys-fs/mdadm/files/raid-start.sh-3.0
new file mode 100755
index 000000000000..7a12fee370c9
--- /dev/null
+++ b/sys-fs/mdadm/files/raid-start.sh-3.0
@@ -0,0 +1,31 @@
+# /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0,v 1.1 2009/08/23 11:19:38 vapier Exp $
+
+[ -f /proc/mdstat ] || exit 0
+
+# Start software raid with mdadm (new school)
+mdadm_conf="/etc/mdadm/mdadm.conf"
+[ -e /etc/mdadm.conf ] && mdadm_conf="/etc/mdadm.conf"
+if [ -x /sbin/mdadm -a -f "${mdadm_conf}" ] ; then
+ devs=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' "${mdadm_conf}")
+ if [ -n "${devs}" ]; then
+ ebegin "Starting up RAID devices"
+ output=$(mdadm -As 2>&1)
+ ret=$?
+ [ ${ret} -ne 0 ] && echo "${output}"
+ eend ${ret}
+ fi
+fi
+
+partitioned_devs=$(ls /dev/md_d* 2>/dev/null)
+if [ -n "${partitioned_devs}" ]; then
+ ebegin "Creating RAID device partitions"
+ /sbin/blockdev ${partitioned_devs}
+ eend 0
+ # wait because vgscan runs next, and we want udev to fire
+ sleep 1
+fi
+
+# vim:ts=4
diff --git a/sys-fs/mdadm/mdadm-3.0.ebuild b/sys-fs/mdadm/mdadm-3.0.ebuild
new file mode 100644
index 000000000000..7376a42d4a2a
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-3.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.0.ebuild,v 1.1 2009/08/23 11:19:38 vapier Exp $
+
+inherit eutils flag-o-matic
+
+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=""
+RDEPEND=">=sys-apps/util-linux-2.16"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-3.0-dont-make-man.patch
+ epatch "${FILESDIR}"/${PN}-2.6-syslog-updates.patch
+ epatch "${FILESDIR}"/${PN}-2.6.4-mdassemble.patch #211426
+ use static && append-ldflags -static
+}
+
+src_compile() {
+ emake \
+ CROSS_COMPILE=${CHOST}- \
+ CWFLAGS="-Wall" \
+ CXFLAGS="${CFLAGS}" \
+ all mdassemble \
+ || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ into /
+ dosbin mdassemble || die
+ dodoc ChangeLog INSTALL TODO README* ANNOUNCE-${PV}
+
+ exeinto /$(get_libdir)/rcscripts/addons
+ newexe "${FILESDIR}"/raid-start.sh-3.0 raid-start.sh || die "addon failed"
+ newexe "${FILESDIR}"/raid-stop.sh raid-stop.sh || die "addon failed"
+
+ insinto /etc
+ newins mdadm.conf-example mdadm.conf
+ newinitd "${FILESDIR}"/mdadm.rc mdadm || die "installing mdadm.rc failed"
+ newconfd "${FILESDIR}"/mdadm.confd mdadm || die "installing mdadm.confd failed"
+ newinitd "${FILESDIR}"/mdraid.rc mdraid || die "installing mdraid.rc failed"
+
+ insinto /etc/udev/rules.d/
+ newins "${FILESDIR}"/udev-145-64-md-raid.rules 64-md-raid.rules || die
+}
+
+pkg_postinst() {
+ elog "If using baselayout-2 and not relying on kernel auto-detect"
+ elog "of your RAID devices, you need to add 'mdraid' to your 'boot'"
+ elog "runlevel. Run the following command:"
+ elog "rc-update add mdraid boot"
+}