summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-12 21:06:44 +0000
committerMike Frysinger <vapier@gentoo.org>2011-11-12 21:06:44 +0000
commit9900590ae9e878c78ba04bd0d99e17311a9a0a52 (patch)
tree21a1088accc7cef605f3444951c60ae3752faba7 /sys-fs
parentFix kdeenablefinal build (bug 349620), remove old (diff)
downloadgentoo-2-9900590ae9e878c78ba04bd0d99e17311a9a0a52.tar.gz
gentoo-2-9900590ae9e878c78ba04bd0d99e17311a9a0a52.tar.bz2
gentoo-2-9900590ae9e878c78ba04bd0d99e17311a9a0a52.zip
Drop support for baselayout-1, and move to EAPI=2.
(Portage version: 2.2.0_alpha72/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/mdadm/ChangeLog6
-rw-r--r--sys-fs/mdadm/files/mdraid.rc40
-rw-r--r--sys-fs/mdadm/mdadm-3.2.1.ebuild18
3 files changed, 52 insertions, 12 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index c3db524b529b..26913735158e 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/mdadm
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.145 2011/06/11 21:12:39 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.146 2011/11/12 21:06:44 vapier Exp $
+
+ 12 Nov 2011; Mike Frysinger <vapier@gentoo.org> mdadm-3.2.1.ebuild,
+ +files/mdraid.rc:
+ Drop support for baselayout-1, and move to EAPI=2.
11 Jun 2011; Markus Meier <maekke@gentoo.org> mdadm-3.1.4.ebuild,
mdadm-3.1.5.ebuild:
diff --git a/sys-fs/mdadm/files/mdraid.rc b/sys-fs/mdadm/files/mdraid.rc
new file mode 100644
index 000000000000..27421e26ec20
--- /dev/null
+++ b/sys-fs/mdadm/files/mdraid.rc
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdraid.rc,v 1.6 2011/11/12 21:06:44 vapier Exp $
+
+depend() {
+ before checkfs fsck
+ after modules
+}
+
+start() {
+ local output
+
+ ebegin "Starting up RAID devices"
+ output=$(mdadm -As 2>&1)
+ eend $? "${output}"
+
+ local pat="/dev/md_d*"
+ set -- ${pat}
+ if [ "$*" != "${pat}" ] ; then
+ ebegin "Creating RAID device partitions"
+ blockdev "$@"
+ eend $?
+ # wait because vgscan runs next, and we want udev to fire
+ sleep 1
+ fi
+
+ return 0
+}
+
+stop() {
+ local output
+
+ # XXX: Maybe drop this check ?
+ [ ! -e /etc/mdadm/mdadm.conf ] && [ ! -e /etc/mdadm.conf ] && return 0
+
+ ebegin "Shutting down RAID devices (mdadm)"
+ output=$(mdadm -Ss 2>&1)
+ eend $? "${output}"
+}
diff --git a/sys-fs/mdadm/mdadm-3.2.1.ebuild b/sys-fs/mdadm/mdadm-3.2.1.ebuild
index d452ab8c30b6..04be7630085a 100644
--- a/sys-fs/mdadm/mdadm-3.2.1.ebuild
+++ b/sys-fs/mdadm/mdadm-3.2.1.ebuild
@@ -1,7 +1,8 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.2.1.ebuild,v 1.1 2011/04/08 00:13:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.2.1.ebuild,v 1.2 2011/11/12 21:06:44 vapier Exp $
+EAPI="2"
inherit eutils flag-o-matic toolchain-funcs
DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools"
@@ -15,20 +16,18 @@ SLOT="0"
IUSE="static"
DEPEND=""
-RDEPEND=">=sys-apps/util-linux-2.16"
+RDEPEND="!<sys-apps/baselayout-2
+ >=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_unpack() {
- unpack ${A}
- cd "${S}"
+src_prepare() {
epatch "${FILESDIR}"/${PN}-3.0-dont-make-man.patch
epatch "${FILESDIR}"/${PN}-3.2.1-syslog-updates.patch
epatch "${FILESDIR}"/${PN}-3.2.1-mdassemble.patch #211426
epatch "${FILESDIR}"/${PN}-3.1.5-cflags.patch #336175
- use static && append-ldflags -static
}
mdadm_emake() {
@@ -41,6 +40,7 @@ mdadm_emake() {
}
src_compile() {
+ use static && append-ldflags -static
mdadm_emake all mdassemble
}
@@ -56,15 +56,11 @@ src_install() {
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
- newexe "${FILESDIR}"/raid-stop.sh raid-stop.sh || die
-
insinto /etc
newins mdadm.conf-example mdadm.conf
newinitd "${FILESDIR}"/mdadm.rc mdadm || die
newconfd "${FILESDIR}"/mdadm.confd mdadm || die
- newinitd "${FILESDIR}"/mdraid.rc-3.1.1 mdraid || die
+ newinitd "${FILESDIR}"/mdraid.rc mdraid || die
newconfd "${FILESDIR}"/mdraid.confd mdraid || die
# do not rely on /lib -> /libXX link