summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-06-28 16:44:39 +0000
committerMike Frysinger <vapier@gentoo.org>2008-06-28 16:44:39 +0000
commit41000408aafed911cd2f98a8640e606dc37dcafd (patch)
treed4de733ef872f02e5881afbb3d295e03eb33dcac /sys-fs/mdadm
parentShuffle files around. (diff)
downloadhistorical-41000408aafed911cd2f98a8640e606dc37dcafd.tar.gz
historical-41000408aafed911cd2f98a8640e606dc37dcafd.tar.bz2
historical-41000408aafed911cd2f98a8640e606dc37dcafd.zip
Fix mdraid on no-multilib systems and tweak minor node discovery #229501 by Ian Kelling.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.25 x86_64
Diffstat (limited to 'sys-fs/mdadm')
-rw-r--r--sys-fs/mdadm/ChangeLog9
-rw-r--r--sys-fs/mdadm/Manifest11
-rw-r--r--sys-fs/mdadm/files/mdraid.rc27
-rwxr-xr-xsys-fs/mdadm/files/raid-start.sh50
-rw-r--r--sys-fs/mdadm/mdadm-2.6.4-r3.ebuild59
5 files changed, 151 insertions, 5 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index 6a76673a11e9..a39034aabc03 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/mdadm
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.99 2008/06/28 16:36:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.100 2008/06/28 16:44:39 vapier Exp $
+
+*mdadm-2.6.4-r3 (28 Jun 2008)
+
+ 28 Jun 2008; Mike Frysinger <vapier@gentoo.org> +files/mdraid.rc,
+ +files/raid-start.sh, +mdadm-2.6.4-r3.ebuild:
+ Fix mdraid on no-multilib systems and tweak minor node discovery #229501
+ by Ian Kelling.
28 Jun 2008; Mike Frysinger <vapier@gentoo.org>
-files/raid-stop.sh-2.6.3-r2, +files/64-md-raid.rules,
diff --git a/sys-fs/mdadm/Manifest b/sys-fs/mdadm/Manifest
index 643d7aae64a6..cd528db0ad0c 100644
--- a/sys-fs/mdadm/Manifest
+++ b/sys-fs/mdadm/Manifest
@@ -7,18 +7,21 @@ AUX mdadm-2.6-syslog-updates.patch 1117 RMD160 c7de674fc76eb444d1d5f97a5a4c59c95
AUX mdadm-2.6.4-mdassemble.patch 465 RMD160 4abcfcd75242d552f674a850ea116835a8f56aea SHA1 609161b594c51644f30de98a7a74473361bdb98b SHA256 015321cbb219f80444c9d56d01bde36f828d2814c57712a7655bdbae811ff8c4
AUX mdadm.confd 205 RMD160 9b4af661ef05e6dbab9ead55506a1ef0670a9076 SHA1 46d75372ecfcfcb34b1576bd994c22cae24f2a79 SHA256 ec55674955af7a31da51b8b72b599e8519809287dad796a9b16155bcba471b79
AUX mdadm.rc 574 RMD160 69640d0b1fbd11bd7078c0e7791d247420653b73 SHA1 39044e7d6ad63c44669baf9775230670f04b201c SHA256 3073b14619cb7b2c99c33f2d6cfd1e59ce5557899bffebaa65fa52f3caffadc7
+AUX mdraid.rc 637 RMD160 64741e62695e9dbefba5dcef37137e93d621f5e6 SHA1 c443e5cb47359b307515d942ca3d6b713b4f2244 SHA256 55c37752aa34db35bc36f566b0f093e21022ee9ae9dd11465e472d192a8631d2
AUX mdraid.rc-2.6.3-r4 637 RMD160 6cd883833e8327256b61567eef3372c0b539824f SHA1 083569014fad29efdf23ca5522163cec31623853 SHA256 c460a68a9ceed95d9ddd3c862c0c58f482a289e074c37dc6ab82f564e04f70ec
+AUX raid-start.sh 1445 RMD160 6c210b05103376ea0e6d9c251ef8cc3b7b74957f SHA1 dda9e22d1fa9ed9dd5d27dbb635bbaba71263893 SHA256 73161840031941f178d6e3cab3880ae8919128e4b2adeffee97fa3401c7ffbc2
AUX raid-start.sh-2.6.4 1470 RMD160 c779e6f5ff5fb74c46c8d590a87bc07d97f21943 SHA1 4cd319c799b2ff9c186b89d16a80da64506e7b02 SHA256 f9a65d5947053bc7c6930f2b011b7e4b3a37f1f390beac7a72f0ac3a54d0d174
AUX raid-stop.sh 645 RMD160 a2855fbdad1222044a9de5b7a9f441592d42960b SHA1 daa2052a3835ca178005a96a3675759a96119203 SHA256 167a6bd452b5831cd5235eb80bf5f91bb2e5a10db132408fce29e60eb9d200db
DIST mdadm-2.6.4.tar.bz2 152401 RMD160 dcd17d2f4c42061de44c27f3bf80cf5fee6aaab3 SHA1 efcd1ef9a5fc5fbce30d03d371cbd6997a4e2c40 SHA256 1d39f110eda550b9e7dbe9d1e56098ef77197029cb8c5f5d638d2c255feaf23d
EBUILD mdadm-2.6.4-r1.ebuild 1813 RMD160 00d28b3a8b5558f6cbbe66a23931e3d0a478ccf6 SHA1 454926263053c403f3a97488c079d2316554d47f SHA256 b766ca3cae7ad05213e9dc007a073d08705e4c3e92c112c1860e6e3f5a9d0dcc
EBUILD mdadm-2.6.4-r2.ebuild 1934 RMD160 81ad3cd0ee45ce3fc90710b0e94bcc79fc0b1878 SHA1 c6e66e609439e76ce4673538f5510340a73f8b74 SHA256 9776ed5ddf707f50f8c6f89a25abe1577fd8df4d28ab7ef56a52fcc144341ebd
-MISC ChangeLog 15744 RMD160 33883935dc44115040aaface24ba95746e3da8e1 SHA1 34fe7ea62e2200e7bd4e971909c17ec05d976faa SHA256 c897c1b20f92e9b0fcd312c0b7e7688424648465f08a30d9cb86602adcc94727
+EBUILD mdadm-2.6.4-r3.ebuild 1919 RMD160 510abe2d735bef32d8891e4ed87637277e22e61f SHA1 e9b06a6f4d17b0609184a1285e7ea895dcfe5f5d SHA256 177a565875bde702854ffe1b78fc812933cae5c0b2ad43ec1683f7205b24921e
+MISC ChangeLog 15986 RMD160 6ea67a8eca0508506245f8ea06e4e57b879b06fb SHA1 c4ad137a8c90117d3efcf3efe4ffa07939c6648f SHA256 5fd6995cbb1ff11b6fe22b4151e58933cea81ef0059cb25ca69feacce8ea76db
MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEUEARECAAYFAkhmaKMACgkQ67wieSYcaxfAdgCYh7klTbGhM5ucQAnkLx17iKUW
-rQCg35l6tJFylzVx9FJU1dxTGquWaQ0=
-=INdo
+iEYEARECAAYFAkhman0ACgkQ67wieSYcaxeO1wCgtN1VxQQDCsuRqPEBHv/zo6Ym
+an0Ani3WFmaXo0W4YisPYgNTXDwJWeCi
+=IP66
-----END PGP SIGNATURE-----
diff --git a/sys-fs/mdadm/files/mdraid.rc b/sys-fs/mdadm/files/mdraid.rc
new file mode 100644
index 000000000000..eaf314c7bfbf
--- /dev/null
+++ b/sys-fs/mdadm/files/mdraid.rc
@@ -0,0 +1,27 @@
+#!/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.4 2008/06/28 16:44:39 vapier Exp $
+
+depend() {
+ if [ ! -e /sbin/functions.sh ] ; then
+ # on baselayout-1 this could cause
+ # dependency-cycles with checkroot (before *)
+ before checkfs fsck
+ after modules
+ fi
+}
+
+start() {
+ if [ -e /sbin/functions.sh ] ; 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/files/raid-start.sh b/sys-fs/mdadm/files/raid-start.sh
new file mode 100755
index 000000000000..784094c51b4f
--- /dev/null
+++ b/sys-fs/mdadm/files/raid-start.sh
@@ -0,0 +1,50 @@
+# /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot
+# Copyright 1999-2008 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,v 1.7 2008/06/28 16:44:39 vapier Exp $
+
+[ -f /proc/mdstat ] || exit 0
+
+# We could make this dynamic, but eh
+#[ -z ${MAJOR} ] && export MAJOR=$(awk '$2 == "md" { print $1 }' /proc/devices)
+MAJOR=9
+
+# Try to make sure the devices exist before we use them
+create_devs() {
+ local node dir
+ for node in "$@" ; do
+ [ "${node#/dev}" = "${node}" ] && node="/dev/${node}"
+ [ -e "${node}" ] && continue
+
+ dir=${node%/*}
+ [ ! -d "${dir}" ] && mkdir -p "${dir}"
+
+ mknod "${node}" b ${MAJOR} ${node##*[![:digit:]]}
+ done
+}
+
+# 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"
+ create_devs ${devs}
+ 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-2.6.4-r3.ebuild b/sys-fs/mdadm/mdadm-2.6.4-r3.ebuild
new file mode 100644
index 000000000000..ad81970e3620
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-2.6.4-r3.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-2.6.4-r3.ebuild,v 1.1 2008/06/28 16:44:39 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"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.9.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 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}"/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"
+}