summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2007-08-22 14:28:01 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2007-08-22 14:28:01 +0000
commit12771dcfeba1200f58f9b6ee996bdbfb580525be (patch)
tree835ca4b398659268d1a6aef20c7cc7e68c3c5d70 /sys-fs/multipath-tools
parentadding power6 profiles (diff)
downloadgentoo-2-12771dcfeba1200f58f9b6ee996bdbfb580525be.tar.gz
gentoo-2-12771dcfeba1200f58f9b6ee996bdbfb580525be.tar.bz2
gentoo-2-12771dcfeba1200f58f9b6ee996bdbfb580525be.zip
Finally fixed udev-rules to have no udev-internal race conditions, bug 171590.
(Portage version: 2.1.3.6)
Diffstat (limited to 'sys-fs/multipath-tools')
-rw-r--r--sys-fs/multipath-tools/ChangeLog11
-rw-r--r--sys-fs/multipath-tools/files/digest-multipath-tools-0.4.7-r23
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.4.7-udev-rules.patch44
-rw-r--r--sys-fs/multipath-tools/multipath-tools-0.4.7-r2.ebuild56
4 files changed, 112 insertions, 2 deletions
diff --git a/sys-fs/multipath-tools/ChangeLog b/sys-fs/multipath-tools/ChangeLog
index ac97d0513023..00525325afe4 100644
--- a/sys-fs/multipath-tools/ChangeLog
+++ b/sys-fs/multipath-tools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/multipath-tools
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/ChangeLog,v 1.13 2006/09/28 08:55:06 vapier Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/ChangeLog,v 1.14 2007/08/22 14:28:00 zzam Exp $
+
+*multipath-tools-0.4.7-r2 (22 Aug 2007)
+
+ 22 Aug 2007; Matthias Schwarzott <zzam@gentoo.org>
+ +files/multipath-tools-0.4.7-udev-rules.patch,
+ +multipath-tools-0.4.7-r2.ebuild:
+ Finally fixed udev-rules to have no udev-internal race conditions, bug 171590.
*multipath-tools-0.4.7-r1 (28 Sep 2006)
diff --git a/sys-fs/multipath-tools/files/digest-multipath-tools-0.4.7-r2 b/sys-fs/multipath-tools/files/digest-multipath-tools-0.4.7-r2
new file mode 100644
index 000000000000..57225a5b6b98
--- /dev/null
+++ b/sys-fs/multipath-tools/files/digest-multipath-tools-0.4.7-r2
@@ -0,0 +1,3 @@
+MD5 0a7574f0dd85f2b50f6aff91d83633ad multipath-tools-0.4.7.tar.bz2 139312
+RMD160 b9ecd84e01e03fe631e9ee9953ea7dbadb04c01d multipath-tools-0.4.7.tar.bz2 139312
+SHA256 1b48684c9ce956bb2294640a92f1da8ddea4e991e4d7b974697660de5e44a9d7 multipath-tools-0.4.7.tar.bz2 139312
diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.4.7-udev-rules.patch b/sys-fs/multipath-tools/files/multipath-tools-0.4.7-udev-rules.patch
new file mode 100644
index 000000000000..6bd6300ccb93
--- /dev/null
+++ b/sys-fs/multipath-tools/files/multipath-tools-0.4.7-udev-rules.patch
@@ -0,0 +1,44 @@
+diff -ru multipath-tools-0.4.7-orig/multipath/Makefile multipath-tools-0.4.7/multipath/Makefile
+--- multipath-tools-0.4.7-orig/multipath/Makefile 2007-08-22 16:19:00.877039944 +0200
++++ multipath-tools-0.4.7/multipath/Makefile 2007-08-22 16:20:00.382334855 +0200
+@@ -39,12 +39,12 @@
+ install -d $(DESTDIR)$(bindir)
+ install -m 755 $(EXEC) $(DESTDIR)$(bindir)/
+ install -d $(DESTDIR)/etc/udev/rules.d
+- install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
++ install -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/65-multipath.rules
+ install -d $(DESTDIR)$(mandir)
+ install -m 644 $(EXEC).8 $(DESTDIR)$(mandir)
+
+ uninstall:
+- rm $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
++ rm $(DESTDIR)/etc/udev/rules.d/64-multipath.rules
+ rm $(DESTDIR)$(bindir)/$(EXEC)
+ rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
+
+diff -ru multipath-tools-0.4.7-orig/multipath/multipath.rules multipath-tools-0.4.7/multipath/multipath.rules
+--- multipath-tools-0.4.7-orig/multipath/multipath.rules 2007-08-22 16:19:22.878997659 +0200
++++ multipath-tools-0.4.7/multipath/multipath.rules 2007-08-22 16:21:02.887896761 +0200
+@@ -1,18 +1,13 @@
++# do not edit this file, it will be overwritten on update
+ #
+ # multipath and multipath partitions nodes are created in /dev/mapper/
+ # this file should be installed in /etc/udev/rules.d
+ #
+-# !! udev must not discard DM events !!
+-# !! check the other installed rules !!
+-#
+
+-# lookup the devmap name
+-#ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
+-# PROGRAM="/sbin/devmap_name %M %m"
+-ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
+- PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c -o name info"
++# DM_NAME is set in 64-device-mapper.rules
+
+ # take care of devmap partitioning
+ ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
+- RUN+="/sbin/kpartx -a /dev/mapper/%c"
++ ENV{DM_NAME}=="?*", \
++ RUN+="/sbin/kpartx -a /dev/mapper/$env{DM_NAME}"
+
diff --git a/sys-fs/multipath-tools/multipath-tools-0.4.7-r2.ebuild b/sys-fs/multipath-tools/multipath-tools-0.4.7-r2.ebuild
new file mode 100644
index 000000000000..084e1d407cc7
--- /dev/null
+++ b/sys-fs/multipath-tools/multipath-tools-0.4.7-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/multipath-tools-0.4.7-r2.ebuild,v 1.1 2007/08/22 14:28:00 zzam Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Device mapper target autoconfig"
+HOMEPAGE="http://christophe.varoqui.free.fr/wiki/wakka.php?wiki=Home"
+SRC_URI="http://christophe.varoqui.free.fr/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=sys-fs/device-mapper-1.00.19-r1
+ sys-fs/udev
+ sys-fs/sysfsutils"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-udev-rules.patch
+}
+
+src_compile() {
+ emake -j1 CC=$(tc-getCC) || die "emake failed"
+}
+
+src_install() {
+ dodir /sbin /usr/share/man/man8
+ make DESTDIR="${D}" install || die "install failed"
+
+ insinto /etc
+ newins "${S}"/multipath.conf.annotated multipath.conf
+ fperms 644 /etc/udev/rules.d/40-multipath.rules
+ newinitd "${FILESDIR}"/rc-multipathd multipathd
+
+ dodoc AUTHOR ChangeLog FAQ README TODO
+ docinto dmadm; dodoc README
+ docinto kpartx; dodoc ChangeLog README
+}
+
+pkg_preinst() {
+ # The dev.d script was previously wrong and is now removed (the udev rules
+ # file does the job instead), but it won't be removed from live systems due
+ # to cfgprotect.
+ # This should help out a little...
+ if [[ -e ${ROOT}/etc/dev.d/block/multipath.dev ]] ; then
+ mkdir -p "${D}"/etc/dev.d/block
+ echo "# Please delete this file. It is obsoleted by /etc/udev/rules.d/40-multipath.rules" \
+ > "${D}"/etc/dev.d/block/multipath.dev
+ fi
+}