summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-12-18 20:00:22 +0000
committerRichard Yao <ryao@gentoo.org>2012-12-18 20:00:22 +0000
commit00726f2cf4d60ca8f4c41dd1096bc27d125f669e (patch)
treeba80ae62deaf249b905b438a4daaee17b1832af0 /sys-fs
parentStable for ia64, wrt bug #445208 (diff)
downloadhistorical-00726f2cf4d60ca8f4c41dd1096bc27d125f669e.tar.gz
historical-00726f2cf4d60ca8f4c41dd1096bc27d125f669e.tar.bz2
historical-00726f2cf4d60ca8f4c41dd1096bc27d125f669e.zip
Backport accept4 fallback path from eudev-1_beta1, approved by WilliamH and ssuominen
Package-Manager: portage-2.1.11.31/cvs/Linux x86_64
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/udev/ChangeLog8
-rw-r--r--sys-fs/udev/Manifest14
-rw-r--r--sys-fs/udev/udev-171-r10.ebuild593
3 files changed, 603 insertions, 12 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index c6b5a569ebe2..fcbec4db3c06 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-fs/udev
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.750 2012/12/02 09:30:04 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.751 2012/12/18 20:00:20 ryao Exp $
+
+*udev-171-r10 (18 Dec 2012)
+
+ 18 Dec 2012; Richard Yao <ryao@gentoo.org> +udev-171-r10.ebuild:
+ Backport accept4 fallback path from eudev-1_beta1, approved by WilliamH and
+ ssuominen
02 Dec 2012; Samuli Suominen <ssuominen@gentoo.org> -udev-196.ebuild:
old
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
index b1f098fd0ada..652517929ef7 100644
--- a/sys-fs/udev/Manifest
+++ b/sys-fs/udev/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
AUX 40-gentoo.rules 349 SHA256 5d618b899475925ceccc330b6a738644aedd582d039f0cc404502637351347ea SHA512 b8d90037c08f30c9fb9e22a43c59a3627c218313b0421d4b70feba1731cda76ddc4ee6bdb99dca8df61e11f8d656a8769e172f0a584d7620213973dacfbbb4aa WHIRLPOOL a4086cd5f0e8849369389aa29ec42f5d906b00e3d650724d38ff8b4df4e36de7d3a37393b14f2f30a7102d6f2859b6847b5f4b7813be12d945ce1515494ce120
DIST systemd-195.tar.xz 1441308 SHA256 e9041a8b84ed971d08df2b96f1b7dbb1d49b788e275c7cc39912f656bd826303 SHA512 2ccd6ad065cd70aad7e666c1beba9fb31bff4dca7d54d00bfa54976e91795c1e19d5f595e88660ea3797699001613ae9204cf538fe8b0c321ba42bd7a4c402f5 WHIRLPOOL 24bd54fe3b0ddf523b9d1d30e64052ec96ac56644efce272f87d5d2cf65ec5660da404dc6c61b7ee8d66a97660fd11ce71abad0a4e7b61c6d991a07c7bfcd592
DIST systemd-196.tar.xz 1967216 SHA256 6bd4a658a5dd8198235b17ad1b1f0cc56d9e6f00d646ddcffdfc6f058b55e4bf SHA512 89206b63bbc34ad72e4a99dfec1907e0ab68953df44a28ae18cef40c00682b7f6d88d241ca513be6dbac44d83f9d0fd05a230b81a6961cd797526867db5cdc3a WHIRLPOOL 131493428dc1b3bbe560ffeb61465192b1ced14f9061031ef2981c016b03da5368a1201ee68e1a71046e7c701cb3d48358403dd6f3cdc515986086bf8953c0c2
@@ -14,6 +11,7 @@ DIST udev-151-testsys.tar.bz2 137712 SHA256 727e2127e497cd0c41e27bda6f1e8e838312
DIST udev-151.tar.bz2 509815 SHA256 d37a94e75b962182ce940e4a839f07b1c7024dbe7e4b870a120bf0fe9ed0d55d SHA512 9ec1859d50ddc7b03107bdc5cf1c08980442e2f2b10daad2ce9e55a2fcbd7a93270ea42bcccb2eeec50519b9e6bca303c2cb7f1da3084608a712afc7042b8173 WHIRLPOOL 8cfbf9068948a6c83431a4fba8a2d0e7fec93f13e7fd9b4d7e75f3600709eb1b3083c2a6d5fff135876f585dac29c06c185867b2f3605d0f718633172a218d0c
DIST udev-164.tar.bz2 557126 SHA256 81db1a089e4c13fd73fbb5ace7974ab84e2d92d8a39fad81d3707d92b6429258 SHA512 c71ec548e555e088d1242129c8741ba83533219929b316a01563d7f11a6b5ff9b2b31eee591cb76a9f5d5c2dd6adbfaab95ebc0ee6303e4b6bf117c9fc3e7270 WHIRLPOOL 50dd6ce82ed6b9bfdac6c4dbeb49d8d4017eab1a47855c4b68b24d8eb381e30719bb750282477a76b6144f10b1ac5223d780da9fe227c9758baadc52818db774
DIST udev-171-gentoo-patchset-v1.tar.bz2 796 SHA256 9524e64068d67bb55ddad16dd36a27c3ef87323421254a5bfe2431693b1bc983 SHA512 d2eef776c3cc331b5df339e865838b67b70da01e10fa75c5cb0d45cff388adfa6af4dd36677eb05cee9936331445afadcd4158ed7d96f3499ce93d6ee1e3feb6 WHIRLPOOL d1451d2002263db7bd30baa2d126fcb3ffff6a4b310f8ebfea755760b3afbd3a76ab2aa0d16e1a88cff13567a153155720c4c16c1d4624dd2a4405b29dbb3997
+DIST udev-171-gentoo-patchset-v2.tar.bz2 2961 SHA256 9a4a11f8da06337a48291fad02e83b7787c3e5d0fea848f9ac8e67d9306587fd SHA512 2aea1c27596c61a0cfac573d74863783bd81e586ba56de01735856ac7c36738912e1d54663705a2af70fbbbb2043765933ea4e409ab913232913fe22369e78f6 WHIRLPOOL 8d4b54ff916ccf95b78577c5d5ca003460d4d8bdb4065053c03aee937ac28107ffba718cf9fc80bf3a50803ae09c161f72da0a6c57dce806afdcff2057bd17bc
DIST udev-171-testsys.tar.bz2 155001 SHA256 7383701b64701f58f16e0ddb19fe33b4eb53fac6fc6068bdcbff7e6325b79dcc SHA512 f3f537d771e36b87c71004f5576f7672ffeb815d0b5337bb6bbb6e842c32a28d1d92b4eb0ee2edc60c0b8bd576fc2f36e8b0ed16ec9c0cff9c216e04fb1438ad WHIRLPOOL 0ee66df2f52496d592d0dd3de7c628f6deee7f41c2d21e745f22d74e61c276e01cc6ba584c65b05d36c8a4fb14bc54e3e1a89b975751929b19e91458e3550253
DIST udev-171.tar.bz2 597937 SHA256 fed1e46074c1a16c828193ebd73b3940b7905cc7dcaeb0b3c720d4615210695e SHA512 dea189d79b195f8c10740507b11de2c2074442301ee52a0b2c62efa8663e1793c1a78b03b95510ba19bc93d4dcc497120fbf6bb5784878aa903973f76b92d42f WHIRLPOOL a93241b0f0645696e6a88ddb152c3ef8f2c73b5bf3591892384f180fc7abeb580c59642013480546eac00ad5028b1900ad35b88f6a27ad2d07792e9f34e59743
DIST udev-195-patches-1.tar.bz2 1288 SHA256 d0995c6dea2c62d234f25b24ebb6e45ea7860f2036d4356ff0c727442cb8643a SHA512 760443b298ab0acb0a0c3cf7c1ff85ae0c2cbbf2c50e335fb14910b362c60abf2de1471abe5e14522f0524bca6f3e2390593c2a94ab336c175ab5df2ef98ea6b WHIRLPOOL a4645389fb302659804f2687830e0e288cbc0dad7c6f9a53de8810568d2ff10f91b5b20bb4fce6852097a41835225229b0e95092ce0ea14ba75955c94d440a8d
@@ -27,17 +25,11 @@ EBUILD udev-146-r1.ebuild 15409 SHA256 1b373dbf4f548640eb94560bd90a4c7b83b626340
EBUILD udev-149.ebuild 16485 SHA256 65c3b0fba6c00c8399777879a7a8d354c5cced74cd2a5e8290fd969dd1370d06 SHA512 1548e5418af5990cf3955c95712fe14b3cb6255e550ad611c16899b04ce8ba7b8c47d18b7e9f2e72b74afab46f347cebc2a29fce84d4f3fccb12fadb5248e05b WHIRLPOOL 843e8b51e6c6f76c82e44eef7cca4e7c33b20ea89cadbb76d2f4ab7dce34f2bb932ffa57b1cce1cc1dd8f77c6a435f63bdaea182968e3865599c493c6a90043c
EBUILD udev-151-r4.ebuild 16804 SHA256 7315f6e89edd97ef057259e64465aa669b53fe020ac9781928aebd4980767ebc SHA512 51254d2164d63a36d5616dd92d9d3b0a03f88fe78ab98c55541372ed691bbcb86b2e449b275aa2f0f8351f6c8e0425da82d9f079271e1cad237abc6bdd70e382 WHIRLPOOL d513c9145b466619f288925c8fa9d598767e78e5f0a502f62a9ecda4fc667d2fd5e298e4cfb6026879c84aedcf4be02671115107688efab93c7283927afc4d83
EBUILD udev-164-r2.ebuild 15179 SHA256 e957e7d9bb99f29a20de5f5666c19db0e645fdf70751741926819cf85dfe8365 SHA512 8c9143207389a70ff3919753d250ef1d68bbdae6b4ca224d43a3f3314a5f80e2617d4b0af4678bf1d08afb7ada6984459d1bc10ec502bf278f093e058c6fde8e WHIRLPOOL e778db14702ae5e9559afef46b70315829f7c0d0f4c40a1e85c8af5a6ef9be7ab2e8e15274f2f82b363f75123dfee631ced2aa56c7c0997babb4d25ba702c064
+EBUILD udev-171-r10.ebuild 16113 SHA256 6ea7a8f6f468c011db876363559be8504ffb6e8c868587cb2e07d67cfd6e3039 SHA512 49b6ee43de09052461b094d2441c2e14f15390fc4839c56e6e58e78e2ac0f7df37e2d8b0b6934c0baf8a153822c9ec416560f7288a9c601759ec58c8e360e0b9 WHIRLPOOL 028762c4c77afa2c3a5c5359e75c92dee59b50e6b369970c5c15e5f3e3ef2bbbe68b9523e3b9218e47b61a395c420eab3a52ae68adb4457bf5b4c3f07701a70b
EBUILD udev-171-r9.ebuild 16105 SHA256 1b21d6b2fd4af6382ab5cf3c255cb6c2b2f026ffbfbd808db8662b958de30f1b SHA512 efce00bbb87120a476fc2bfd497a460b3656024389fc2ac999dcaac8e95e2450d101038b0838d0a9f8dbc948c4b1f42e6cc3819df2857839564806f7293e5af9 WHIRLPOOL 7e73e343a7778bffdb5002fa0994a3d4e55972d230877d6501afc777717244eb81b16a50e9a28ed698b8842c8b5c44b182825ac9c551217a2401009eb31b1761
EBUILD udev-195.ebuild 11412 SHA256 f653139c9ea79bc7c743c9991febf1e74fc38e04aa487698492e0e34c2b278f7 SHA512 88d74d73158f3a7d4d2f24935abbfd60afae80c9778493d30558555852762b0356625e67ed2327baf1d0c9bb4ade41911b19ffc702ae4153e1f0a17d1b683f51 WHIRLPOOL 113a3d56da645744dbfc8c8278dd429807dae42f2179c502725412dec155681c0e70fe4d36d0420c3506a69bedc6523c344a258e4510d0349439108484394314
EBUILD udev-196-r1.ebuild 10318 SHA256 59fc1cc0540202d2406c4ad2ddb3d902b17f7fd67eecf8d727901aeee1fd57b4 SHA512 e9871d9d3258867d3f62444bd471b76504affeb1738e1e2059c59d493ab6d9735f3beed3234a9a9f080e1622a23593c85cc9ec80dfe9483b23d37d6cbb46373e WHIRLPOOL 0e58f4f2e68db2667e9e4e9e31eb0e447951b975aaf5f992150e5ed8f92fff35cf9e5766c2fd812c2a9b9d08b15c97c3689181fecbbe6be89dfb4ce488dd0537
EBUILD udev-9999.ebuild 10317 SHA256 26b5f903176eec7dfa6699ef6aad61522c59acb9bbebbb06e1b34070d7791869 SHA512 ad1eec7e1445aa77521e7319411fa13b6fd6f134938798fb47b90c8f4543a69e8461c89cd7b322046298aef9059463dcaef06140c71e5fc561a7a1fb16613106 WHIRLPOOL d7a0a815a4f8774874bcebf5aea4e49b1ecd1663c4b6a7f9568d5f3f9cbf941367def50cd3099931eac164c03bea06014750b53d600b40982f1be2f163fc1a84
-MISC ChangeLog 45096 SHA256 815693ed3665b05a0c51b464785f4e393fb2d0c2a6dca4db4e8d9a47d56ba6d6 SHA512 bc1642a11557b2b4d9cc134f43f2a9788666202efaed1ede7c83fcfd82af70f9451badd750000da22fda7091a5a472284cb36a6b0848c7e348ce574aeabb9cfc WHIRLPOOL cc7fa13306c98323e691f3f23ce107c2f66f9c61118e21271deff9ae4d71ec1bfe568a834d068dd206f86568169e2c66554d0ab28c4c1aaca8b9b8f6935954a4
+MISC ChangeLog 45278 SHA256 29958c1d9c6f439f5587f36069e4c1897fb5023b98991e667d9df39d4cbba807 SHA512 a3538896063fc0a1c755d2da91340bca26ffab44b1656b14209d66a93a76a2a1e231d435baa96e9d390c4ff9e5c2c98a6484ec05f16f69d70af2efa315487b34 WHIRLPOOL bc2b1bdcd31471db51c03e7f4d11ece69691710787f4e5683f9afbd94a97a65bcd316929651f1196a5d12e12d5b14229fc26a5bf061dcfe5fd9286579a1d8dec
MISC ChangeLog-2009 105929 SHA256 7a8d7123b7395dc5bbde09a8c0cee1c5110d24faf87a68a8210b0c6bdf862c1c SHA512 3b577c97224e7f85ae5fb0a0ead538f8aa83c738e6014fadaf5247f34d3863df4bc10f9d15a5e117813d081a8af1913ea41a5e60d00ed521ea0c1e5b71a91a2b WHIRLPOOL c9f527ba19e787f9973a26ed535dbf7af760c3a519f4b062cf2a8069e134a803ebe669450deace804be70619995b389529febf03e8aeb7183c3ea984c0dfdaa5
MISC metadata.xml 1281 SHA256 6315e69296f31468a999b4fbfce2e2a5ff3246d653e5f6337778fd7b068ef790 SHA512 aa5da08d7c6e2c9d20c85b46875c9a5707e173ded718bba6258c68ac2b04e43e0370b5cadac2eae06689cb2f37a7c5bc0406117f4ae519ce55d8230c5a25f5f4 WHIRLPOOL 88cc83f43ad815497b524847ed19a140c171c7a170356f9f3b38330da7ffa86f94b1758803efe2b0d412a2b9106a43fca48bca38d360abe97b909b791b756607
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
-
-iEYEAREIAAYFAlC/sAQACgkQblQW9DDEZTgsAwCgq/pzYEzXmTX5okeHSLJSHdDu
-oxkAoIAQcTF/YZQNfWu8oGYSqZO8LuUf
-=jLLw
------END PGP SIGNATURE-----
diff --git a/sys-fs/udev/udev-171-r10.ebuild b/sys-fs/udev/udev-171-r10.ebuild
new file mode 100644
index 000000000000..837f6710349b
--- /dev/null
+++ b/sys-fs/udev/udev-171-r10.ebuild
@@ -0,0 +1,593 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-171-r10.ebuild,v 1.1 2012/12/18 20:00:20 ryao Exp $
+
+EAPI=4
+
+KV_min=2.6.32
+KV_reliable=2.6.32
+PATCHSET=${P}-gentoo-patchset-v2
+scriptversion=7.1
+scriptname=udev-gentoo-scripts
+[[ -n "${scriptversion}" ]] && scriptname="${scriptname}-${scriptversion}"
+
+if [[ ${PV} == "9999" ]]
+then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
+ EGIT_BRANCH="master"
+ inherit autotools git-2
+fi
+
+inherit eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool
+
+if [[ ${PV} != "9999" ]]
+then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
+ SRC_URI="mirror://gentoo/${P}.tar.bz2
+ test? ( mirror://gentoo/${PN}-171-testsys.tar.bz2 )
+ mirror://gentoo/${PN}-gentoo-legacy-patchset-2.tar.bz2"
+ if [[ -n "${PATCHSET}" ]]
+ then
+ SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
+ fi
+fi
+SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2"
+
+DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
+HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="build selinux test debug +rule_generator hwdb gudev introspection
+ keymap floppy edd action_modeswitch extras"
+
+COMMON_DEPEND="selinux? ( sys-libs/libselinux )
+ extras? ( dev-libs/glib:2
+ dev-libs/gobject-introspection
+ virtual/libusb:0 )
+ gudev? ( dev-libs/glib:2 )
+ introspection? ( dev-libs/gobject-introspection )
+ action_modeswitch? ( virtual/libusb:0 )
+ >=sys-apps/util-linux-2.16
+ !<sys-libs/glibc-2.11"
+
+DEPEND="${COMMON_DEPEND}
+ keymap? ( dev-util/gperf )
+ extras? ( dev-util/gperf )
+ virtual/pkgconfig
+ virtual/os-headers
+ !<sys-kernel/linux-headers-2.6.34
+ test? ( app-text/tree )"
+
+RDEPEND="${COMMON_DEPEND}
+ hwdb?
+ (
+ >=sys-apps/usbutils-0.82
+ || (
+ ( sys-apps/hwids >=sys-apps/pciutils-3.1.9-r2 )
+ >=sys-apps/pciutils-3.1.9-r1[-compress-db]
+ <sys-apps/pciutils-3.1.9-r1[-zlib]
+ )
+ )
+ extras?
+ (
+ >=sys-apps/usbutils-0.82
+ sys-apps/pciutils
+ )
+ !sys-apps/coldplug
+ !<sys-fs/lvm2-2.02.45
+ !sys-fs/device-mapper
+ >=sys-apps/baselayout-2"
+
+if [[ ${PV} == "9999" ]]
+then
+ # for documentation processing with xsltproc
+ DEPEND="${DEPEND}
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd
+ dev-util/gtk-doc"
+fi
+
+# required kernel options
+CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
+ ~!IDE ~BLK_DEV_BSG"
+
+# Return values:
+# 2 - reliable
+# 1 - unreliable
+# 0 - too old
+udev_check_KV() {
+ local ok=0
+ if kernel_is -ge ${KV_reliable//./ }
+ then
+ ok=2
+ elif kernel_is -ge ${KV_min//./ }
+ then
+ ok=1
+ fi
+ return $ok
+}
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ # always print kernel version requirements
+ ewarn
+ ewarn "${P} does not support Linux kernel before version ${KV_min}!"
+ if [[ ${KV_min} != ${KV_reliable} ]]
+ then
+ ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
+ fi
+
+ udev_check_KV
+ case "$?" in
+ 2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;;
+ 1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P},"
+ ewarn "but it may be unreliable in some cases."
+ ;;
+ 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
+ ;;
+ esac
+
+ KV_FULL_SRC=${KV_FULL}
+ get_running_version
+ udev_check_KV
+ if [[ "$?" = "0" ]]
+ then
+ eerror
+ eerror "udev cannot be restarted after emerging,"
+ eerror "as your running kernel version (${KV_FULL}) is too old."
+ eerror "You really need to use a newer kernel after a reboot!"
+ NO_RESTART=1
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ if [[ ${PV} == "9999" ]]
+ then
+ git-2_src_unpack
+ fi
+}
+
+src_prepare() {
+ if use test && [[ -d "${WORKDIR}"/test/sys ]]
+ then
+ mv "${WORKDIR}"/test/sys "${S}"/test/
+ fi
+
+ # patches go here...
+ epatch "${WORKDIR}"/${P}-path_id-skip-ATA-transport.patch #437418
+
+ # backport some patches
+ if [[ -n "${PATCHSET}" ]]
+ then
+ EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+ fi
+
+ # change rules back to group uucp instead of dialout for now
+ sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
+ -i rules/{rules.d,arch}/*.rules \
+ || die "failed to change group dialout to uucp"
+
+ if [[ ${PV} != 9999 ]]
+ then
+ # Make sure there is no sudden changes to upstream rules file
+ # (more for my own needs than anything else ...)
+ MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
+ MD5=${MD5/ -/}
+ if [[ ${MD5} != a9954d57e97aa0ad2e0ed53899d9559a ]]
+ then
+ eerror "50-udev-default.rules has been updated, please validate!"
+ eerror "md5sum: ${MD5}"
+ die "50-udev-default.rules has been updated, please validate!"
+ fi
+ fi
+
+ if [[ ${PV} == 9999 ]]
+ then
+ gtkdocize --copy || die "gtkdocize failed"
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+use_extras() { use extras && echo "--enable-${2:-$1}" || use_enable "$@" ; }
+src_configure() {
+ econf \
+ --prefix="${EPREFIX}/usr" \
+ --sysconfdir="${EPREFIX}/etc" \
+ --sbindir="${EPREFIX}/sbin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --with-rootlibdir="${EPREFIX}/$(get_libdir)" \
+ --libexecdir="${EPREFIX}/lib/udev" \
+ --enable-logging \
+ --enable-static \
+ $(use_with selinux) \
+ $(use_enable debug) \
+ $(use_extras rule_generator) \
+ $(use_extras hwdb) \
+ --with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
+ --with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
+ --disable-udev_acl \
+ $(use_extras gudev) \
+ $(use_extras introspection) \
+ $(use_extras keymap) \
+ $(use_extras floppy) \
+ $(use_extras edd) \
+ $(use_extras action_modeswitch) \
+ $(systemd_with_unitdir)
+}
+
+src_compile() {
+ filter-flags -fprefetch-loop-arrays
+
+ emake
+}
+
+src_install() {
+ into /
+ emake DESTDIR="${D}" install
+
+ exeinto /lib/udev
+ keepdir /lib/udev/state
+ keepdir /lib/udev/devices
+
+ # create symlinks for these utilities to /sbin
+ # where multipath-tools expect them to be (Bug #168588)
+ dosym "../lib/udev/scsi_id" /sbin/scsi_id
+
+ # Add gentoo stuff to udev.conf
+ echo "# If you need to change mount-options, do it in /etc/fstab" \
+ >> "${ED}"/etc/udev/udev.conf
+
+ # let the dir exist at least
+ keepdir /etc/udev/rules.d
+
+ # Now installing rules
+ cd "${S}"/rules
+ insinto /lib/udev/rules.d/
+
+ # support older kernels
+ doins misc/30-kernel-compat.rules
+
+ # Adding arch specific rules
+ if [[ -f arch/40-${ARCH}.rules ]]
+ then
+ doins "arch/40-${ARCH}.rules"
+ fi
+ cd "${S}"
+
+ insinto /etc/modprobe.d
+ newins "${WORKDIR}"/blacklist-146 blacklist.conf
+ newins "${WORKDIR}"/pnp-aliases pnp-aliases.conf
+
+ # documentation
+ dodoc ChangeLog README TODO
+
+ # keep doc in just one directory, Bug #281137
+ rm -rf "${ED}/usr/share/doc/${PN}"
+ if use keymap
+ then
+ dodoc extras/keymap/README.keymap.txt
+ fi
+
+ cd "${WORKDIR}/${scriptname}"
+ sed -i -e 's/2.6.34/2.6.32/' init.d/udev
+ doconfd conf.d/*
+ exeinto /lib/udev
+ doexe helpers/*
+ doexe "${WORKDIR}"/shell-compat-KV.sh
+ doinitd init.d/*
+ insinto /etc/modprobe.d
+ doins modprobe.d/*
+ insinto /lib/udev/rules.d
+ doins rules.d/*
+}
+
+src_test() {
+ local emake_cmd="${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE}"
+
+ cd "${S}"
+ einfo ">>> Test phase [udev:check]: ${CATEGORY}/${PF}"
+ has userpriv $FEATURES && einfo "Disable FEATURES userpriv to run the udev tests"
+ if ! $emake_cmd -j1 check
+ then
+ has test $FEATURES && die "udev: Make test failed. See above for details."
+ has test $FEATURES || eerror "udev: Make test failed. See above for details."
+ fi
+}
+
+pkg_preinst() {
+ # moving old files to support newer modprobe, 12 May 2009
+ local f dir=${EROOT}/etc/modprobe.d/
+ for f in pnp-aliases blacklist; do
+ if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
+ then
+ elog "Moving $dir/$f to $f.conf"
+ mv -f "$dir/$f" "$dir/$f.conf"
+ fi
+ done
+
+ if [[ -d ${EROOT}/lib/udev-state ]]
+ then
+ mv -f "${EROOT}"/lib/udev-state/* "${ED}"/lib/udev/state/
+ rm -r "${EROOT}"/lib/udev-state
+ fi
+
+ if [[ -f ${EROOT}/etc/udev/udev.config &&
+ ! -f ${EROOT}/etc/udev/udev.rules ]]
+ then
+ mv -f "${EROOT}"/etc/udev/udev.config "${EROOT}"/etc/udev/udev.rules
+ fi
+
+ # delete the old udev.hotplug symlink if it is present
+ if [[ -h ${EROOT}/etc/hotplug.d/default/udev.hotplug ]]
+ then
+ rm -f "${EROOT}"/etc/hotplug.d/default/udev.hotplug
+ fi
+
+ # delete the old wait_for_sysfs.hotplug symlink if it is present
+ if [[ -h ${EROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
+ then
+ rm -f "${EROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
+ fi
+
+ # delete the old wait_for_sysfs.hotplug symlink if it is present
+ if [[ -h ${EROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
+ then
+ rm -f "${EROOT}"/etc/hotplug.d/default/10-udev.hotplug
+ fi
+
+ has_version "=${CATEGORY}/${PN}-103-r3"
+ previous_equal_to_103_r3=$?
+
+ has_version "<${CATEGORY}/${PN}-104-r5"
+ previous_less_than_104_r5=$?
+
+ has_version "<${CATEGORY}/${PN}-106-r5"
+ previous_less_than_106_r5=$?
+
+ has_version "<${CATEGORY}/${PN}-113"
+ previous_less_than_113=$?
+}
+
+# 19 Nov 2008
+fix_old_persistent_net_rules() {
+ local rules=${EROOT}/etc/udev/rules.d/70-persistent-net.rules
+ [[ -f ${rules} ]] || return
+
+ elog
+ elog "Updating persistent-net rules file"
+
+ # Change ATTRS to ATTR matches, Bug #246927
+ sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
+
+ # Add KERNEL matches if missing, Bug #246849
+ sed -ri \
+ -e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
+ "${rules}"
+}
+
+# See Bug #129204 for a discussion about restarting udevd
+restart_udevd() {
+ if [[ ${NO_RESTART} = "1" ]]
+ then
+ ewarn "Not restarting udevd, as your kernel is too old!"
+ return
+ fi
+
+ # need to merge to our system
+ [[ ${EROOT} = / ]] || return
+
+ # check if root of init-process is identical to ours (not in chroot)
+ [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
+
+ # abort if there is no udevd running
+ [[ -n $(pidof udevd) ]] || return
+
+ # abort if no /dev/.udev exists
+ [[ -e /dev/.udev ]] || return
+
+ elog
+ elog "restarting udevd now."
+
+ killall -15 udevd &>/dev/null
+ sleep 1
+ killall -9 udevd &>/dev/null
+
+ /sbin/udevd --daemon
+ sleep 3
+ if [[ ! -n $(pidof udevd) ]]
+ then
+ eerror "FATAL: udev died, please check your kernel is"
+ eerror "new enough and configured correctly for ${P}."
+ eerror
+ eerror "Please have a look at this before rebooting."
+ eerror "If in doubt, please downgrade udev back to your old version"
+ fi
+}
+
+postinst_init_scripts() {
+ local enable_postmount=false
+
+ # FIXME: inconsistent handling of init-scripts here
+ # * udev is added to sysinit in openrc-ebuild
+ # * we add udev-postmount to default in here
+ #
+
+ # If we are building stages, add udev and udev-mount to the sysinit runlevel
+ # automatically.
+ if use build
+ then
+ if [[ -x "${EROOT}"/etc/init.d/udev \
+ && -d "${EROOT}"/etc/runlevels/sysinit ]]
+ then
+ ln -s "${EPREFIX}"/etc/init.d/udev "${EROOT}"/etc/runlevels/sysinit/udev
+ fi
+ if [[ -x "${ROOT}"/etc/init.d/udev-mount \
+ && -d "${ROOT}"/etc/runlevels/sysinit ]]
+ then
+ ln -s /etc/init.d/udev-mount \
+ "${ROOT}"/etc/runlevels/sysinit/udev-mount
+ fi
+ enable_postmount=true
+ fi
+
+ # Warn the user about adding the scripts to their sysinit runlevel
+ if [[ -e "${EROOT}"/etc/runlevels/sysinit ]]
+ then
+ if [[ ! -e "${EROOT}"/etc/runlevels/sysinit/udev ]]
+ then
+ ewarn
+ ewarn "You need to add udev to the sysinit runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not be able to boot!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add udev sysinit"
+ fi
+ if [[ ! -e "${EROOT}"/etc/runlevels/sysinit/udev-mount ]]
+ then
+ ewarn
+ ewarn "You need to add udev-mount to the sysinit runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not be able to boot!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add udev-mount sysinit"
+ fi
+ fi
+
+ # add udev-postmount to default runlevel instead of that ugly injecting
+ # like a hotplug event, 2009/10/15
+
+ # already enabled?
+ [[ -e "${EROOT}"/etc/runlevels/default/udev-postmount ]] && return
+
+ [[ -e "${EROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
+ [[ "${EROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
+
+ if $enable_postmount
+ then
+ local initd=udev-postmount
+
+ if [[ -e ${EROOT}/etc/init.d/${initd} ]] && \
+ [[ ! -e ${EROOT}/etc/runlevels/default/${initd} ]]
+ then
+ ln -snf "${EPREFIX}"/etc/init.d/${initd} "${EROOT}"/etc/runlevels/default/${initd}
+ elog "Auto-adding '${initd}' service to your default runlevel"
+ fi
+ else
+ elog "You should add the udev-postmount service to default runlevel."
+ elog "Run this to add it:"
+ elog "\trc-update add udev-postmount default"
+ fi
+}
+
+pkg_postinst() {
+ fix_old_persistent_net_rules
+
+ # "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
+
+ restart_udevd
+
+ postinst_init_scripts
+
+ # people want reminders, I'll give them reminders. Odds are they will
+ # just ignore them anyway...
+
+ # delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
+ if [[ $previous_equal_to_103_r3 = 0 ]] &&
+ [[ -e ${EROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
+ then
+ ewarn "Deleting stray 40-scsi-hotplug.rules"
+ ewarn "installed by sys-fs/udev-103-r3"
+ rm -f "${EROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
+ fi
+
+ # Removing some device-nodes we thought we need some time ago, 25 Jan 2007
+ if [[ -d ${EROOT}/lib/udev/devices ]]
+ then
+ rm -f "${EROOT}"/lib/udev/devices/{null,zero,console,urandom}
+ fi
+
+ # Removing some old file, 29 Jan 2007
+ if [[ $previous_less_than_104_r5 = 0 ]]
+ then
+ rm -f "${EROOT}"/etc/dev.d/net/hotplug.dev
+ rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/net 2>/dev/null
+ fi
+
+ # 19 Mar 2007
+ if [[ $previous_less_than_106_r5 = 0 ]] &&
+ [[ -e ${EROOT}/etc/udev/rules.d/95-net.rules ]]
+ then
+ rm -f "${EROOT}"/etc/udev/rules.d/95-net.rules
+ fi
+
+ # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
+ if [[ -d ${EROOT}/etc/dev.d ]]
+ then
+ rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/default "${EROOT}"/etc/dev.d 2>/dev/null
+ if [[ -d ${EROOT}/etc/dev.d ]]
+ then
+ ewarn "You still have the directory /etc/dev.d on your system."
+ ewarn "This is no longer used by udev and can be removed."
+ fi
+ fi
+
+ # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
+ # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
+ if [[ $previous_less_than_113 = 0 ]] &&
+ [[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
+ ! has_version sys-fs/device-mapper
+ then
+ rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules
+ einfo "Removed unneeded file 64-device-mapper.rules"
+ fi
+
+ # requested in Bug #225033:
+ elog
+ elog "persistent-net does assigning fixed names to network devices."
+ elog "If you have problems with the persistent-net rules,"
+ elog "just delete the rules file"
+ elog "\trm ${EROOT}etc/udev/rules.d/70-persistent-net.rules"
+ elog "and then reboot."
+ elog
+ elog "This may however number your devices in a different way than they are now."
+
+ ewarn
+ ewarn "If you build an initramfs including udev, then please"
+ ewarn "make sure that the /sbin/udevadm binary gets included,"
+ ewarn "and your scripts changed to use it,as it replaces the"
+ ewarn "old helper apps udevinfo, udevtrigger, ..."
+
+ ewarn
+ ewarn "mount options for directory /dev are no longer"
+ ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
+ ewarn "as for other directories."
+
+ ewarn
+ ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
+ ewarn "then please migrate over to using the device names"
+ ewarn "/dev/md*, /dev/loop* and /dev/ram*."
+ ewarn "The devfs-compat rules have been removed."
+ ewarn "For reference see Bug #269359."
+
+ ewarn
+ ewarn "Rules for /dev/hd* devices have been removed"
+ ewarn "Please migrate to libata."
+
+ elog
+ elog "For more information on udev on Gentoo, writing udev rules, and"
+ elog " fixing known issues visit:"
+ elog " http://www.gentoo.org/doc/en/udev-guide.xml"
+}