summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-07-25 12:12:26 +0000
committerAnthony G. Basile <blueness@gentoo.org>2014-07-25 12:12:26 +0000
commit468000e1a0766358bab4dfcea77da2db45f65d41 (patch)
tree8ccd0f7b9303ffae587d5826d4d82795dba39b89 /sys-fs/eudev
parentBump to EAPI=5 (diff)
downloadhistorical-468000e1a0766358bab4dfcea77da2db45f65d41.tar.gz
historical-468000e1a0766358bab4dfcea77da2db45f65d41.tar.bz2
historical-468000e1a0766358bab4dfcea77da2db45f65d41.zip
Add upstream patch for excluding md devices from block device ownership, bug #517986
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'sys-fs/eudev')
-rw-r--r--sys-fs/eudev/ChangeLog9
-rw-r--r--sys-fs/eudev/Manifest30
-rw-r--r--sys-fs/eudev/eudev-1.9-r2.ebuild301
-rw-r--r--sys-fs/eudev/files/eudev-exclude-MD.patch53
4 files changed, 378 insertions, 15 deletions
diff --git a/sys-fs/eudev/ChangeLog b/sys-fs/eudev/ChangeLog
index 1cdf150165aa..9005aad4831a 100644
--- a/sys-fs/eudev/ChangeLog
+++ b/sys-fs/eudev/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/eudev
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v 1.128 2014/07/25 12:04:22 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v 1.129 2014/07/25 12:12:15 blueness Exp $
+
+*eudev-1.9-r2 (25 Jul 2014)
+
+ 25 Jul 2014; Anthony G. Basile <blueness@gentoo.org> +eudev-1.9-r2.ebuild,
+ +files/eudev-exclude-MD.patch:
+ Add upstream patch for excluding md devices from block device ownership, bug
+ #517986
25 Jul 2014; Anthony G. Basile <blueness@gentoo.org> -eudev-1.7.ebuild,
-eudev-1.8.ebuild, -files/eudev-fix-typo-util.c.patch,
diff --git a/sys-fs/eudev/Manifest b/sys-fs/eudev/Manifest
index 56eaef5c4f74..dfb268b7f328 100644
--- a/sys-fs/eudev/Manifest
+++ b/sys-fs/eudev/Manifest
@@ -2,6 +2,7 @@
Hash: SHA256
AUX 40-gentoo.rules 365 SHA256 e11d66732dc0d629fdb8c06357db8be5339f2ecf28c2572c5af8637449f549ec SHA512 7554879eaeb12869a78835e4ac814b63c41ddd8715ff9b8d1b75e5b13edf697906371eb10d6c4f0a4c6cb9a44b21a4839985811a3357e18d3b8a842181666e0b WHIRLPOOL 54d962fa515255df5f37bc5c71a3774a909a809809138dba12ed22c6fda78ef336f4e98014f37dbc44289de1ba08f5f2ea31311e14b29a0bbe2cc3d6587d7425
+AUX eudev-exclude-MD.patch 2887 SHA256 3e9889862756ad7b683593e5a63316b4531a1836bec324c0dec647339f53cf53 SHA512 955013bcb849f156b8c3b17d99c52699ac371b05c0fa866a473b7db049c77cd86ef41192301bf78af97ea944e8e6d09e60288348198b73f340517fd2be19004b WHIRLPOOL 745b16d56a6000d88a2b711a21bbbfe1d96a9d33d8eb6d9e51491a26266924b5092cf8b8a4ffa5f0247887a3ef0a83b2ea4c8ee8ad620c601b9f7ae8e530c57a
AUX eudev-selinux-timespan.patch 844 SHA256 4693649ebe9d0d76edbdb5828c4d5768004c3156128705425828ea318cfc682b SHA512 1acc0124eccb754338ee0969a438c5a184bba1df315fff790960309e7e8f9e104ac6960fdc37930f5da561a92b78b12e6feefcf5b642783eebaafcca9a884f66 WHIRLPOOL 5d4c4c3af3796a7c8273abb2cbcd6e1537b255f28adf638e083da13f4708b9b9cc5e77614ff5f4af8edf06778a93e66cc6acdfdefbc9799acdaf78c582a97c63
AUX udev-postmount 1207 SHA256 0220e949b1f31832a205021c0a8615e77b27b73b7c9b16ef4a61bbd2774aeecb SHA512 a69338328fee67617cddab8375d5008bbed41e82c67610cb9df168ffd95bfa016e3b63544b380afa0b98bb1731e4d76960efbdec5c79bb5e844ca10d6c334e2f WHIRLPOOL c1f027a7200a435d163c7ac66a0afc0b004c97ee9c1ecc8406f981b05e6ef95221d0df51d3abc46e494d3a35a07831cbab8d393b3a7d05b5f0aec70e88d894a2
DIST eudev-1.3.tar.gz 1679385 SHA256 6f1f0b15971a53c7070a44c902c7c1303f952927aa6370dbdf4d84d8bc09fac2 SHA512 5e0016fbe15eebfa68bb04fa7b5aedd7edc7a508afdc030adb7cbec4e9eca84fe16119ca73f5724ec290ad4bba179b42d2d0bc56f3aaf2a07e3c48b18374b3b3 WHIRLPOOL db748742f9149b7a232b0d630a8734e81fb1077ed581fcde88f57f299b6746bcadec0bdd9e7ad914dae848ace9199c7d664006003dc4999af3bfa1e14099f366
@@ -10,23 +11,24 @@ DIST eudev-1.9.tar.gz 1762520 SHA256 8f17e92f1177ce9352bde00360e227a7cbb3b97ac88
EBUILD eudev-1.3.ebuild 7910 SHA256 c859ec0746f5dcd792ec12a0c9403ea04450b775c210f2c9f57d7d350f094fcc SHA512 3017a5fa2e1af8f242aee15989615f8f50bf88060353092ccef02d2b3135d5848c8efc89dc9a89914e801a3442d06b0e0a3219be5407623e39073c81571f1d4c WHIRLPOOL 4ec4ba4da39a55e4c59085b69278bdba395c46044ca3dd6cd618f8f07bbb047d41dc72f20c459a95625dbd8a6811985bed248c6dfa76a9d1825ecd133d4f7799
EBUILD eudev-1.5.3-r1.ebuild 8126 SHA256 5a50ff7a099f06d1ff7316d28acf9d68243992fea4a3ad0b48ecf2afe36d6350 SHA512 f868ef1c7f05c5ead0924a9fe2af97eaaec12701fc17b2c7de1992fd31817eb6db8fe95d6784fd10ab3d658a2abc22328b3c590526338fc07f2094731a43006d WHIRLPOOL 8990d5e7490653f79d7c9f3bd4ca156510aa6e1dd493c0de368799bb279fbdb252bc13e5161c62821ed64ed63b1d4461d49060ee44eccfa730a1c3997f9c273b
EBUILD eudev-1.9-r1.ebuild 9213 SHA256 fa156eeb4179435d618a0cab741f1a54ba6c5dc7820639fd6e526a27ccc04976 SHA512 76efef024c024f1663e9b6bd370476264dab2759f29cd3f8b98bf518109ed2d0eb47f600d1791414a796c8bc44d57a1fe7c391fd2f1e3cc190bda5ac45e1b982 WHIRLPOOL e19a74282b537c03f1ac15c8356f62c0cf48a2c3fe2dd40d92553475336cf8b117c342080b646a1627b1bda7781ebd20bde674b1dee8ee542f89f4149fd4cb84
+EBUILD eudev-1.9-r2.ebuild 9339 SHA256 ad875d009b46b7854e9f127cba73f241e50435c9cb9beb13b05287b0ae98900f SHA512 7bc9446835e25a3dd8228bc790de5d5a938d2412e58d348bc12edae51bd58d8a8b599e5e600a1aff310b75809c16a47572ca4b5a4ab8300b41d9f24ee78293df WHIRLPOOL 4b3e030b234e6fd234fef7df5e50405c622b485aef1acf2704ef493f3b8d01ebc3d6f31e69b7912e9dc7b1b21e0f5f31da559f8dd2bc100364bf1a76bab49bb7
EBUILD eudev-9999.ebuild 9223 SHA256 c56fd27886f24bb06a4cbbb17a2b65d93d0b941c93d23fc832d6f5c5975441c7 SHA512 2f17f9078d9da815958492b3b8f9340c7dec30bb24b7f5e7a50356ffed85189690621d351070526467bf6c23a827d750e5e9444a383028f50bdc01f5049164a1 WHIRLPOOL 406a6d6b518db5c9070a51037bb24ff1b6b1f12409999a410417a1ea6f4ae1817c28b4045108e285c8a407c00724af3b01bb9397ec3f77435abf7b936ef01ceb
-MISC ChangeLog 19022 SHA256 1cdf87f641791afd41811c92fabe084bd18cee1fc5cef80b60a3e470d97ea1ee SHA512 6478b856d50e5602a311e417cde0cc0800512c8026c4a5344f8d02e0fb65cfb8ff4830b9a01579969658f9e5500df9daf0ca15c1f303481be90d0cff4d28d066 WHIRLPOOL 1de6abd866e2c46e12933e5364022255b63907bb50483cea72e868ffa098d702504f2684c7022653437e74d6c7b3b41b9b631baebcfdf29dc5f800970168d08a
+MISC ChangeLog 19251 SHA256 b55eb3161cbc3ff18b4e832d3d216272d7275823f755a248b72095798ddb1a7e SHA512 9919a1df9003fab705cc2d561dc8ac25eabc1605f0f351d91822814f99d0186096629d431c46451309aa294b523c6029855e2234d7138a5b708295a4a5463529 WHIRLPOOL cab3a6bd9f6e2636ba46a7a86cda1f5f007f7c1c4c3172a0a4d8d797745693422069f30334862e95dfe3cb21448df1cc6362ef2a00150321289d56bd3e23ebda
MISC metadata.xml 978 SHA256 273446e57cfba7f612e72c3dcc2e1b93ac0003f878c504aa72daa762f2cdbba5 SHA512 244dc230cf7123afef2c4c0f0caa418bbc621f3da0e6303f7cecfb4f3cc53290fcf0adddf2d176ff208991a5bb27801c5c9f6ad5ea3bada513f7ebb22d02d06a WHIRLPOOL e39a5caec32bcd404eb2fdb54e3abff5631f7115786d039a6f2f04a8503e445f971a993dedd0564022e148133e2f15c4579b3cc664ffd393003a858ac77166c5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJT0kgaAAoJEJOE+m71LUu66fsP/08iqUMe3W4XX4nmMTUD0wyy
-tYEziKadAqjvxvQBBt0+qj0jsZYZIeIFllUuCK4IuUnKeYvq4LF52yUgvh87Bo3d
-LwaG8wu5iskTfhbBY4p8i3OlMoJpV6T9gzg4R8Bz8obfVK9N923B51yxqiRovG9o
-PA4YT+Z1kLK8tUiy9X7JGrRzCkHV+FPU4jB+9Ws7uzDcYMGSWbRP3GMum1mH4QGh
-wSVHZu0FRSllag2t8zRZUaoARAffTOz/qOUpFERCl1eEhBr6YYp+8ieOnp/eCQQA
-UL6inRkzg+DowAY8UF4QNOrPK7tIlvAmtD5T8FnSSG6+RuRq4xiNSO6cHWzync8p
-XOdfYw/uPr50aUVEXKYzp4sFkQ4xXopWgSrO4QL1m9+d5osXM7OK9Oqmcicx0fVG
-4/1DkP7Lvz6D0m0ukmdp5K4jofwcmId4dFXvUP0fhlh+peODBKMXkY2OjdKeDMzM
-wfAjpaTaQxV+giBt4HNgojyrTl6X4buX/LBuUNIwkpenaCMM+cx7PiHkXfAGG7FY
-dqc3+qE/+OxFOff68+7YCgQo4ZjuRdf+NuqeVIk1SzEHOua05KosVyX5eukfwI9v
-B3As5lnPl1PrU6YK83fkjxZjyfg4XznJ7d73o3ZALqr5Q6esPw8ag1iF660AXJeW
-uT87WLeJnKfG8hpRAUZo
-=02M8
+iQIcBAEBCAAGBQJT0kn0AAoJEJOE+m71LUu6KlkQAJFeP9cGNIaTMJ+OPVsLZsgt
+HhEGnvubUqfmLO2/TQMo3JbfhNXn6u/x2CMuMS7wZ6AKpvhgQ/7ixwQHmZxyqk8j
+EtLu0hhKylAggnkwRzyZFlUynK+iGNdPR50HePt3PRaEh16sffwi/ImcN91R5ZRC
+sCyL/QoZRRd0+yNZaJ2zMmaiyLjZpVmGl35PTJfhsDd0Qk441hGQ6sFXmW+L3xLR
+nfTSmgkNA5mIK4d40UX+SscwQTFE+doSQLRMkyPkxqOIrBlVqLTQySwIm3UtaUS8
+MReQxSCRwW/xDMWut0cHL98o/nJQF+195CksiUOBUJF5y+EixCjKg2BqFpb11olL
+mvfnUAFmtncBY7192017VzfVX446KomKZ7hhrFFmyIYXzZpQt+7Fe68Es7zYLI1h
+GWG7hFQl4esG6MmE02xWAvEW8SfifuhVac0iAKw+/nFTwSiymj16OQfvK95wdQIr
+NR3L5MQ1dqs/r5g2JaBkdlNApQ3DSuyzohG8e5CrdOy5Cl7luom6swUA3QwtIUjA
+n+u7s4UsiR1r0xB8zjgG+xUFJJUyvnKfbJMfRBzFLZxFsGx7Mh11H0Yc8mYTiAH4
+nsVDW7nc+YiUutHFdAz9zY3LORcJIJ17eKEYKWvjbqw/WFnRL5UOtTQr38T7Zg0v
+NbfrmOXcSk7RpzXp2QPQ
+=s2HW
-----END PGP SIGNATURE-----
diff --git a/sys-fs/eudev/eudev-1.9-r2.ebuild b/sys-fs/eudev/eudev-1.9-r2.ebuild
new file mode 100644
index 000000000000..bbd2bc673775
--- /dev/null
+++ b/sys-fs/eudev/eudev-1.9-r2.ebuild
@@ -0,0 +1,301 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-1.9-r2.ebuild,v 1.1 2014/07/25 12:12:15 blueness Exp $
+
+EAPI="5"
+
+KV_min=2.6.39
+
+inherit autotools eutils linux-info multilib multilib-minimal user
+
+if [[ ${PV} = 9999* ]]; then
+ EGIT_REPO_URI="git://github.com/gentoo/eudev.git"
+ inherit git-2
+else
+ SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
+HOMEPAGE="https://github.com/gentoo/eudev"
+
+LICENSE="LGPL-2.1 MIT GPL-2"
+SLOT="0"
+IUSE="doc gudev +hwdb +kmod introspection +keymap +modutils +openrc +rule-generator selinux static-libs test"
+
+COMMON_DEPEND=">=sys-apps/util-linux-2.20
+ gudev? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
+ kmod? ( >=sys-apps/kmod-16 )
+ selinux? ( >=sys-libs/libselinux-2.1.9 )
+ !<sys-libs/glibc-2.11
+ !sys-apps/gentoo-systemd-integration
+ !sys-apps/systemd
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${COMMON_DEPEND}
+ keymap? ( dev-util/gperf )
+ virtual/os-headers
+ virtual/pkgconfig
+ >=sys-devel/make-3.82-r4
+ >=sys-kernel/linux-headers-${KV_min}
+ doc? ( >=dev-util/gtk-doc-1.18 )
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ >=dev-util/intltool-0.50
+ test? ( app-text/tree dev-lang/perl )"
+
+RDEPEND="${COMMON_DEPEND}
+ !<sys-fs/lvm2-2.02.103
+ !<sec-policy/selinux-base-2.20120725-r10
+ !sys-fs/udev
+ !sys-apps/systemd"
+
+PDEPEND="hwdb? ( >=sys-apps/hwids-20140304[udev] )
+ keymap? ( >=sys-apps/hwids-20140304[udev] )
+ openrc? ( >=sys-fs/udev-init-scripts-26 )"
+
+REQUIRED_USE="keymap? ( hwdb )"
+
+# The multilib-build.eclass doesn't handle situation where the installed headers
+# are different in ABIs. In this case, we install libgudev headers in native
+# ABI but not for non-native ABI.
+multilib_check_headers() { :; }
+
+pkg_pretend() {
+ if ! use rule-generator; then
+ ewarn
+ ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality,"
+ ewarn "as described in the URL below:"
+ ewarn "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
+ ewarn
+ ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing"
+ ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable"
+ ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules"
+ ewarn "exists:"
+ ewarn "\ttouch /etc/udev/rules.d/80-net-name-slot.rules"
+ ewarn
+ ewarn "We are working on a better solution for the next beta release."
+ ewarn
+ fi
+}
+
+pkg_setup() {
+ CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET"
+ linux-info_pkg_setup
+ get_running_version
+
+ # These are required kernel options, but we don't error out on them
+ # because you can build under one kernel and run under another.
+ if kernel_is lt ${KV_min//./ }; then
+ ewarn
+ ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}."
+ ewarn "Make sure to run udev under kernel version ${KV_min} or above."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ # change rules back to group uucp instead of dialout for now
+ sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
+ || die "failed to change group dialout to uucp"
+
+ # Exclude MD from block device ownership event locking, bug #517986
+ epatch "${FILESDIR}"/${PN}-exclude-MD.patch
+
+ epatch_user
+
+ if [[ ! -e configure ]]; then
+ if use doc; then
+ gtkdocize --docdir docs || die "gtkdocize failed"
+ else
+ echo 'EXTRA_DIST =' > docs/gtk-doc.make
+ fi
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+multilib_src_configure() {
+ tc-export CC #463846
+ export cc_cv_CFLAGS__flto=no #502950
+
+ # Keep sorted by ./configure --help and only pass --disable flags
+ # when *required* to avoid external deps or unnecessary compile
+ local econf_args
+ econf_args=(
+ ac_cv_search_cap_init=
+ ac_cv_header_sys_capability_h=yes
+ DBUS_CFLAGS=' '
+ DBUS_LIBS=' '
+ --with-rootprefix=
+ --docdir=/usr/share/doc/${PF}
+ --libdir=/usr/$(get_libdir)
+ --with-rootlibexecdir=/lib/udev
+ --with-firmware-path="${EPREFIX}usr/lib/firmware/updates:${EPREFIX}usr/lib/firmware:${EPREFIX}lib/firmware/updates:${EPREFIX}lib/firmware"
+ --with-html-dir="/usr/share/doc/${PF}/html"
+ --enable-split-usr
+ --exec-prefix=/
+
+ $(use_enable gudev)
+ )
+
+ # Only build libudev for non-native_abi, and only install it to libdir,
+ # that means all options only apply to native_abi
+ if multilib_is_native_abi; then
+ econf_args+=(
+ --with-rootlibdir=/$(get_libdir)
+ $(use_enable doc gtk-doc)
+ $(use_enable introspection)
+ $(use_enable keymap)
+ $(use_enable kmod libkmod)
+ $(usex kmod --enable-modules $(use_enable modutils modules))
+ $(use_enable static-libs static)
+ $(use_enable selinux)
+ $(use_enable rule-generator)
+ )
+ else
+ econf_args+=(
+ --disable-static
+ --disable-gtk-doc
+ --disable-introspection
+ --disable-keymap
+ --disable-libkmod
+ --disable-modules
+ --disable-selinux
+ --disable-rule-generator
+ )
+ fi
+ ECONF_SOURCE="${S}" econf "${econf_args[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ emake
+ else
+ emake -C src/libudev
+ use gudev && emake -C src/gudev
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install
+ else
+ emake -C src/libudev DESTDIR="${D}" install
+ use gudev && emake -C src/gudev DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_test() {
+ # make sandbox get out of the way
+ # these are safe because there is a fake root filesystem put in place,
+ # but sandbox seems to evaluate the paths of the test i/o instead of the
+ # paths of the actual i/o that results.
+ # also only test for native abi
+ if multilib_is_native_abi; then
+ addread /sys
+ addwrite /dev
+ addwrite /run
+ default_src_test
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files --all
+ rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.*
+
+ use rule-generator && use openrc && doinitd "${FILESDIR}"/udev-postmount
+
+ # drop distributed hwdb files, they override sys-apps/hwids
+ rm -f "${ED}"/etc/udev/hwdb.d/*.hwdb
+
+ insinto /lib/udev/rules.d
+ doins "${FILESDIR}"/40-gentoo.rules
+
+ insinto /usr/share/doc/${PF}/html/gudev
+ doins "${S}"/docs/gudev/html/*
+
+ insinto /usr/share/doc/${PF}/html/libudev
+ doins "${S}"/docs/libudev/html/*
+}
+
+pkg_preinst() {
+ local htmldir
+ for htmldir in gudev libudev; do
+ if [[ -d ${EROOT}usr/share/gtk-doc/html/${htmldir} ]]; then
+ rm -rf "${EROOT}"usr/share/gtk-doc/html/${htmldir}
+ fi
+ if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]]; then
+ dosym ../../doc/${PF}/html/${htmldir} \
+ /usr/share/gtk-doc/html/${htmldir}
+ fi
+ done
+}
+
+pkg_postinst() {
+ mkdir -p "${EROOT}"run
+
+ # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
+ # So try to remove it here (will only work if empty).
+ rmdir "${EROOT}"dev/loop 2>/dev/null
+ if [[ -d ${EROOT}dev/loop ]]; then
+ ewarn "Please make sure your remove /dev/loop,"
+ ewarn "else losetup may be confused when looking for unused devices."
+ fi
+
+ if use hwdb && has_version 'sys-apps/hwids[udev]'; then
+ udevadm hwdb --update --root="${ROOT%/}"
+
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
+ # reload database after it has be rebuilt, but only if we are not upgrading
+ # also pass if we are -9999 since who knows what hwdb related changes there might be
+ if [[ ${REPLACING_VERSIONS%-r*} == ${PV} || -z ${REPLACING_VERSIONS} ]] && \
+ [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then
+ udevadm control --reload
+ fi
+ fi
+
+ ewarn
+ ewarn "You need to restart eudev as soon as possible to make the"
+ ewarn "upgrade go into effect:"
+ ewarn "\t/etc/init.d/udev --nodeps restart"
+
+ if use rule-generator && use openrc && \
+ [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qsv 'boot\|default\|sysinit'; then
+ ewarn
+ ewarn "Please add the udev-postmount init script to your default runlevel"
+ ewarn "to ensure the legacy rule-generator functionality works as reliably"
+ ewarn "as possible."
+ ewarn "\trc-update add udev-postmount default"
+ fi
+
+ elog
+ elog "For more information on eudev on Gentoo, writing udev rules, and"
+ elog "fixing known issues visit:"
+ elog " http://www.gentoo.org/doc/en/udev-guide.xml"
+ elog
+
+ # http://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69
+ # http://bugs.gentoo.org/246847
+ # http://bugs.gentoo.org/514174
+ enewgroup input
+
+ # Update hwdb database in case the format is changed by udev version.
+ if has_version 'sys-apps/hwids[udev]'; then
+ udevadm hwdb --update --root="${ROOT%/}"
+ # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
+ if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then
+ return 0
+ fi
+ udevadm control --reload
+ fi
+ fi
+}
diff --git a/sys-fs/eudev/files/eudev-exclude-MD.patch b/sys-fs/eudev/files/eudev-exclude-MD.patch
new file mode 100644
index 000000000000..d56026168809
--- /dev/null
+++ b/sys-fs/eudev/files/eudev-exclude-MD.patch
@@ -0,0 +1,53 @@
+From 2e5b17d01347d3c3118be2b8ad63d20415dbb1f0 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Thu, 24 Jul 2014 23:37:35 +0200
+Subject: [PATCH] udev: exclude MD from block device ownership event locking
+
+MD instantiates devices at open(). This is incomptible with the
+locking logic, as the "change" event emitted when stopping a
+device will bring it back.
+---
+ src/udev/udevd.c | 23 +++++++----------------
+ 1 file changed, 7 insertions(+), 16 deletions(-)
+
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index a45d324..db935d6 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -285,26 +285,17 @@ static void worker_new(struct event *event)
+ udev_event->exec_delay = exec_delay;
+
+ /*
+- * Take a "read lock" on the device node; this establishes
++ * Take a shared lock on the device node; this establishes
+ * a concept of device "ownership" to serialize device
+- * access. External processes holding a "write lock" will
++ * access. External processes holding an exclusive lock will
+ * cause udev to skip the event handling; in the case udev
+- * acquired the lock, the external process will block until
++ * acquired the lock, the external process can block until
+ * udev has finished its event handling.
+ */
+-
+- /*
+- * <kabi_> since we make check - device seems unused - we try
+- * ioctl to deactivate - and device is found to be opened
+- * <kay> sure, you try to take a write lock
+- * <kay> if you get it udev is out
+- * <kay> if you can't get it, udev is busy
+- * <kabi_> we cannot deactivate openned device (as it is in-use)
+- * <kay> maybe we should just exclude dm from that thing entirely
+- * <kabi_> IMHO this sounds like a good plan for this moment
+- */
+- if (streq_ptr("block", udev_device_get_subsystem(dev)) &&
+- !startswith(udev_device_get_sysname(dev), "dm-")) {
++ if (!streq_ptr(udev_device_get_action(dev), "remove") &&
++ streq_ptr("block", udev_device_get_subsystem(dev)) &&
++ !startswith(udev_device_get_sysname(dev), "dm-") &&
++ !startswith(udev_device_get_sysname(dev), "md")) {
+ struct udev_device *d = dev;
+
+ if (streq_ptr("partition", udev_device_get_devtype(d)))
+--
+1.8.5.5
+