summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-07-29 19:14:33 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-07-29 19:14:33 +0000
commitf055fb5866462ff730b1616b5a760127c8c5afdb (patch)
tree967c3eeccb27499cc8091f052a818684e3691eaa /sys-fs
parentVersion bump (bug #279609). (diff)
downloadgentoo-2-f055fb5866462ff730b1616b5a760127c8c5afdb.tar.gz
gentoo-2-f055fb5866462ff730b1616b5a760127c8c5afdb.tar.bz2
gentoo-2-f055fb5866462ff730b1616b5a760127c8c5afdb.zip
Bug #278305: Newer udev rules for vol_id removal.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/mdadm/ChangeLog8
-rw-r--r--sys-fs/mdadm/files/udev-145-64-md-raid.rules36
-rw-r--r--sys-fs/mdadm/mdadm-2.6.9-r1.ebuild62
3 files changed, 105 insertions, 1 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index 0c3e30b96737..5db0445de29c 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,12 @@
# 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.110 2009/03/20 22:50:13 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.111 2009/07/29 19:14:32 robbat2 Exp $
+
+*mdadm-2.6.9-r1 (29 Jul 2009)
+
+ 29 Jul 2009; Robin H. Johnson <robbat2@gentoo.org> +mdadm-2.6.9-r1.ebuild,
+ +files/udev-145-64-md-raid.rules:
+ Bug #278305: Newer udev rules for vol_id removal.
*mdadm-2.6.9 (20 Mar 2009)
diff --git a/sys-fs/mdadm/files/udev-145-64-md-raid.rules b/sys-fs/mdadm/files/udev-145-64-md-raid.rules
new file mode 100644
index 000000000000..6ba93b661ef9
--- /dev/null
+++ b/sys-fs/mdadm/files/udev-145-64-md-raid.rules
@@ -0,0 +1,36 @@
+# do not edit this file, it will be overwritten on update
+
+SUBSYSTEM!="block", GOTO="md_end"
+ACTION!="add|change", GOTO="md_end"
+
+# import data from a raid member and activate it
+#ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
+# import data from a raid set
+KERNEL!="md*", GOTO="md_end"
+
+# partitions have no md/{array_state,metadata_version}
+ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
+
+# container devices have a metadata version of e.g. 'external:ddf' and
+# never leave state 'inactive'
+ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
+TEST!="md/array_state", GOTO="md_end"
+ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
+LABEL="md_ignore_state"
+
+IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
+ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
+ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
+ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
+ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
+ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
+ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
+ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
+
+IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+OPTIONS+="link_priority=100"
+OPTIONS+="watch"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+
+LABEL="md_end"
diff --git a/sys-fs/mdadm/mdadm-2.6.9-r1.ebuild b/sys-fs/mdadm/mdadm-2.6.9-r1.ebuild
new file mode 100644
index 000000000000..cbf087373341
--- /dev/null
+++ b/sys-fs/mdadm/mdadm-2.6.9-r1.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-2.6.9-r1.ebuild,v 1.1 2009/07/29 19:14:32 robbat2 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}-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}"/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"
+}