From 6783cbac7865a9c897a3cb96862b15b28e237dc7 Mon Sep 17 00:00:00 2001
From: Doug Goldstein <cardoe@gentoo.org>
Date: Tue, 2 Oct 2007 22:02:24 +0000
Subject: Adds baselayout-2 compatible init script to fix bug #177954
 Package-Manager: portage-2.1.3.11

---
 sys-fs/mdadm/ChangeLog                   |  8 ++++-
 sys-fs/mdadm/Manifest                    | 27 ++++++++++++-----
 sys-fs/mdadm/files/digest-mdadm-2.6.3-r1 |  3 ++
 sys-fs/mdadm/files/mdraid.rc             | 26 +++++++++++++++++
 sys-fs/mdadm/mdadm-2.6.3-r1.ebuild       | 50 ++++++++++++++++++++++++++++++++
 5 files changed, 105 insertions(+), 9 deletions(-)
 create mode 100644 sys-fs/mdadm/files/digest-mdadm-2.6.3-r1
 create mode 100644 sys-fs/mdadm/files/mdraid.rc
 create mode 100644 sys-fs/mdadm/mdadm-2.6.3-r1.ebuild

(limited to 'sys-fs/mdadm')

diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index 40a277197ffb..3445038183b3 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,12 @@
 # ChangeLog for sys-fs/mdadm
 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.80 2007/09/01 03:52:40 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.81 2007/10/02 22:02:23 cardoe Exp $
+
+*mdadm-2.6.3-r1 (02 Oct 2007)
+
+  02 Oct 2007; Doug Goldstein <cardoe@gentoo.org> +files/mdraid.rc,
+  +mdadm-2.6.3-r1.ebuild:
+  Adds baselayout-2 compatible init script to fix bug #177954
 
 *mdadm-2.6.3 (01 Sep 2007)
 
diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 92862361f15c..0cd121252a18 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -17,6 +17,10 @@ AUX mdadm.rc 574 RMD160 69640d0b1fbd11bd7078c0e7791d247420653b73 SHA1 39044e7d6a
 MD5 3a0f44453c505d6636b9b9769ba3acd2 files/mdadm.rc 574
 RMD160 69640d0b1fbd11bd7078c0e7791d247420653b73 files/mdadm.rc 574
 SHA256 3073b14619cb7b2c99c33f2d6cfd1e59ce5557899bffebaa65fa52f3caffadc7 files/mdadm.rc 574
+AUX mdraid.rc 608 RMD160 9687cc3bc538ef42ac49cf4bee89eaccd6ee3486 SHA1 00f2b5a77431a249fc674bd32f60481968595f0b SHA256 6183ee2f39cf8a8c6a2e6798870e89dc1dceef262133022641761245b350ba41
+MD5 fda2c052132a68bd7c0a3d434792905b files/mdraid.rc 608
+RMD160 9687cc3bc538ef42ac49cf4bee89eaccd6ee3486 files/mdraid.rc 608
+SHA256 6183ee2f39cf8a8c6a2e6798870e89dc1dceef262133022641761245b350ba41 files/mdraid.rc 608
 AUX raid-start.sh 1606 RMD160 8adf7b5a60bb3b7e69fcd317b7866072acb9c3c9 SHA1 03daf3b0a4b0f64f6b35b7f6596b7edc2725db10 SHA256 bd6923697c571e29cbbbba7f36a71993f7af30579e1ee176303c3ced39ff16f6
 MD5 49f82cf9a0a1343b71400a2d2d4706af files/raid-start.sh 1606
 RMD160 8adf7b5a60bb3b7e69fcd317b7866072acb9c3c9 files/raid-start.sh 1606
@@ -31,14 +35,18 @@ EBUILD mdadm-2.6.2.ebuild 1242 RMD160 42a33cf93b617f96afa76a5719381f6d19218acb S
 MD5 de994380d5d7e756e7402ff61c3fe053 mdadm-2.6.2.ebuild 1242
 RMD160 42a33cf93b617f96afa76a5719381f6d19218acb mdadm-2.6.2.ebuild 1242
 SHA256 863f2968c780c1dfed442e6e6efd47285d1d4cd245585202be5689a077c629a1 mdadm-2.6.2.ebuild 1242
+EBUILD mdadm-2.6.3-r1.ebuild 1626 RMD160 c990da75b65f60c9d1252c0cc0dab9b2bd122069 SHA1 460b1fdd01dfd0fdf6b5aceec82905c284d4a292 SHA256 7016b7bbc33260d8735ab8447074d65a2f5fe9a921bd8951047d4a4a11dfde8d
+MD5 0aa51808a7fad68def21dc97b870161a mdadm-2.6.3-r1.ebuild 1626
+RMD160 c990da75b65f60c9d1252c0cc0dab9b2bd122069 mdadm-2.6.3-r1.ebuild 1626
+SHA256 7016b7bbc33260d8735ab8447074d65a2f5fe9a921bd8951047d4a4a11dfde8d mdadm-2.6.3-r1.ebuild 1626
 EBUILD mdadm-2.6.3.ebuild 1247 RMD160 f53ae47db3ee0540384c848adf1828127372f71f SHA1 ffab0c6351454cef193582f598a977a37661a2e4 SHA256 460b31566602f886f18593598edd0a11278caaba12aa069a7b6dc515981026d8
 MD5 7a85f7cdee9603e4369511f1a51a719c mdadm-2.6.3.ebuild 1247
 RMD160 f53ae47db3ee0540384c848adf1828127372f71f mdadm-2.6.3.ebuild 1247
 SHA256 460b31566602f886f18593598edd0a11278caaba12aa069a7b6dc515981026d8 mdadm-2.6.3.ebuild 1247
-MISC ChangeLog 12577 RMD160 b7bc182206821ceafe53164e1448e1d7547b47df SHA1 d5460e5fadbc002ee9098f4983f6237ffcbaabda SHA256 b282b160daa912da88a9c151f064a090c2d185996f33d1832c290783467ba297
-MD5 76494dd426886afbfcba27360d493a43 ChangeLog 12577
-RMD160 b7bc182206821ceafe53164e1448e1d7547b47df ChangeLog 12577
-SHA256 b282b160daa912da88a9c151f064a090c2d185996f33d1832c290783467ba297 ChangeLog 12577
+MISC ChangeLog 12765 RMD160 d59e63b35e972b56f54397b2139b914f9ff2fd72 SHA1 1ef993969a45a356bb447122143692bd3395cf72 SHA256 5a0ffcbdae783f1f055fc9b965456d925834cf47ce3e3af69eba23a3cd3b323c
+MD5 a88c67980c99f70d3c4cdd796f385c70 ChangeLog 12765
+RMD160 d59e63b35e972b56f54397b2139b914f9ff2fd72 ChangeLog 12765
+SHA256 5a0ffcbdae783f1f055fc9b965456d925834cf47ce3e3af69eba23a3cd3b323c ChangeLog 12765
 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164
@@ -49,10 +57,13 @@ SHA256 569dfaebc3aa3228e8bf541fe7c44c297dd4515cda679481f7ea731852909df4 files/di
 MD5 64ca76f35ba4abc60fb0f6da895b5e94 files/digest-mdadm-2.6.3 238
 RMD160 5ae321c8144c93becbc4fba6248b4fe1f7a04302 files/digest-mdadm-2.6.3 238
 SHA256 a6eaa12879f5f167738448a0be8ff5251c8c44113546fcbcb196fb2b34cd1a22 files/digest-mdadm-2.6.3 238
+MD5 64ca76f35ba4abc60fb0f6da895b5e94 files/digest-mdadm-2.6.3-r1 238
+RMD160 5ae321c8144c93becbc4fba6248b4fe1f7a04302 files/digest-mdadm-2.6.3-r1 238
+SHA256 a6eaa12879f5f167738448a0be8ff5251c8c44113546fcbcb196fb2b34cd1a22 files/digest-mdadm-2.6.3-r1 238
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.6 (GNU/Linux)
+Version: GnuPG v2.0.7 (GNU/Linux)
 
-iD8DBQFG2OIdp/wUKkr7RBoRAox8AJ0Q+PDgxzuIMOVYCDs0hbjvbYkj5QCgmEyF
-qpr3IV6OJCwIVaeH7ZqzPXc=
-=yNjY
+iD8DBQFHAr/3oeSe8B0zEfwRAgt0AJ91oowr+410+F2jY08SWhRlVyEZWgCfSqDT
+X0RFTe3UgfP12z+MTuWFuTE=
+=vXD1
 -----END PGP SIGNATURE-----
diff --git a/sys-fs/mdadm/files/digest-mdadm-2.6.3-r1 b/sys-fs/mdadm/files/digest-mdadm-2.6.3-r1
new file mode 100644
index 000000000000..53e49f8e561a
--- /dev/null
+++ b/sys-fs/mdadm/files/digest-mdadm-2.6.3-r1
@@ -0,0 +1,3 @@
+MD5 2d3950028253a856f065763e5bd78b1c mdadm-2.6.3.tar.bz2 151822
+RMD160 236f38c021d92e387cf00f66a28d1a35d160740b mdadm-2.6.3.tar.bz2 151822
+SHA256 5da1da7e2e9df39071016e6914769f685574dc50d94b6b2bbfaec18e376c070c mdadm-2.6.3.tar.bz2 151822
diff --git a/sys-fs/mdadm/files/mdraid.rc b/sys-fs/mdadm/files/mdraid.rc
new file mode 100644
index 000000000000..02da6655b297
--- /dev/null
+++ b/sys-fs/mdadm/files/mdraid.rc
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2007 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.1 2007/10/02 22:02:24 cardoe Exp $
+
+depend() {
+	if [ -e /lib/librc.so ]; then
+		# on baselayout-1 this could cause
+		# dependency-cycles with checkroot (before *)
+		before checkfs lvm
+	fi
+}
+
+start() {
+	if [ ! -e /lib/librc.so ]; then
+		eerror "The ${SVCNAME} init script is written for baselayout-2"
+		eerror "Please do not use it with baselayout-1"
+		return 1
+	fi
+
+	start_addon raid
+}
+
+stop() {
+	stop_addon raid
+}
diff --git a/sys-fs/mdadm/mdadm-2.6.3-r1.ebuild b/sys-fs/mdadm/mdadm-2.6.3-r1.ebuild
new file mode 100644
index 000000000000..2b74d104cea3
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-2.6.3-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-2.6.3-r1.ebuild,v 1.1 2007/10/02 22:02:23 cardoe 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://cgi.cse.unsw.edu.au/~neilb/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"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	epatch "${FILESDIR}"/${PN}-1.9.0-dont-make-man.patch
+	epatch "${FILESDIR}"/${PN}-2.6-syslog-updates.patch
+	use static && append-ldflags -static
+}
+
+src_compile() {
+	emake \
+		CROSS_COMPILE=${CHOST}- \
+		CWFLAGS="-Wall" \
+		CXFLAGS="${CFLAGS}" \
+		|| die "emake failed"
+}
+
+src_install() {
+	emake DESTDIR="${D}" install || die "make install failed"
+	exeinto /$(get_libdir)/rcscripts/addons
+	doexe "${FILESDIR}"/raid-{start,stop}.sh || die "addon failed"
+	dodoc INSTALL TODO "ANNOUNCE-${PV}"
+
+	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"
+}
+
+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"
+}
-- 
cgit v1.2.3-65-gdbad