summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2010-09-27 19:25:36 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2010-09-27 19:25:36 +0000
commit4c29a7ef4a6fd574cc9e149882938b462807f728 (patch)
tree17b8c2bba0fbdcd56ee5cf93bce65f0064aab227 /sys-fs
parentRemove old, bug #270893 (diff)
downloadhistorical-4c29a7ef4a6fd574cc9e149882938b462807f728.tar.gz
historical-4c29a7ef4a6fd574cc9e149882938b462807f728.tar.bz2
historical-4c29a7ef4a6fd574cc9e149882938b462807f728.zip
Removed a lot of old versions.
Package-Manager: portage-2.2_rc87/cvs/Linux x86_64
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/udev/ChangeLog18
-rw-r--r--sys-fs/udev/Manifest53
-rw-r--r--sys-fs/udev/files/151/shell-compat-KV.sh45
-rw-r--r--sys-fs/udev/files/151/shell-compat-addon.sh71
-rwxr-xr-xsys-fs/udev/files/151/udev-dev-tarball.initd95
-rwxr-xr-xsys-fs/udev/files/151/udev-mount.initd119
-rwxr-xr-xsys-fs/udev/files/151/udev-postmount.initd35
-rw-r--r--sys-fs/udev/files/151/udev-start.sh55
-rw-r--r--sys-fs/udev/files/151/udev-stop.sh13
-rw-r--r--sys-fs/udev/files/151/udev.confd56
-rw-r--r--sys-fs/udev/files/151/udev.initd263
-rw-r--r--sys-fs/udev/files/udev-146-printer-usb_device-permission.diff31
-rw-r--r--sys-fs/udev/files/udev-159-path_id.patch19
-rw-r--r--sys-fs/udev/files/udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch29
-rw-r--r--sys-fs/udev/udev-145-r1.ebuild537
-rw-r--r--sys-fs/udev/udev-145-r2.ebuild544
-rw-r--r--sys-fs/udev/udev-145-r3.ebuild544
-rw-r--r--sys-fs/udev/udev-145.ebuild488
-rw-r--r--sys-fs/udev/udev-146-r2.ebuild569
-rw-r--r--sys-fs/udev/udev-146-r3.ebuild570
-rw-r--r--sys-fs/udev/udev-146.ebuild540
-rw-r--r--sys-fs/udev/udev-147-r1.ebuild571
-rw-r--r--sys-fs/udev/udev-150-r1.ebuild575
-rw-r--r--sys-fs/udev/udev-151-r1.ebuild576
-rw-r--r--sys-fs/udev/udev-151-r2.ebuild577
-rw-r--r--sys-fs/udev/udev-151-r3.ebuild584
-rw-r--r--sys-fs/udev/udev-154.ebuild556
-rw-r--r--sys-fs/udev/udev-156.ebuild556
-rw-r--r--sys-fs/udev/udev-157.ebuild559
-rw-r--r--sys-fs/udev/udev-158.ebuild559
-rw-r--r--sys-fs/udev/udev-159.ebuild561
-rw-r--r--sys-fs/udev/udev-160.ebuild559
-rw-r--r--sys-fs/udev/udev-161.ebuild561
33 files changed, 21 insertions, 11467 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index 035187f83512..ff0ccf1ab6c5 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,22 @@
# ChangeLog for sys-fs/udev
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.558 2010/09/12 12:05:23 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.559 2010/09/27 19:25:35 zzam Exp $
+
+ 27 Sep 2010; Matthias Schwarzott <zzam@gentoo.org> -udev-146.ebuild,
+ -udev-146-r2.ebuild, -udev-146-r3.ebuild,
+ -files/udev-146-printer-usb_device-permission.diff,
+ -files/151/shell-compat-addon.sh, -udev-147-r1.ebuild,
+ -files/151/udev.confd, -udev-145.ebuild, -udev-150-r1.ebuild,
+ -udev-151-r1.ebuild, -udev-151-r2.ebuild, -udev-151-r3.ebuild,
+ -udev-154.ebuild, -udev-156.ebuild, -udev-157.ebuild, -udev-158.ebuild,
+ -udev-159.ebuild, -files/udev-159-path_id.patch, -files/151/udev.initd,
+ -udev-160.ebuild, -files/151/udev-dev-tarball.initd, -udev-145-r1.ebuild,
+ -udev-161.ebuild,
+ -files/udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch,
+ -files/151/shell-compat-KV.sh, -files/151/udev-mount.initd,
+ -files/151/udev-postmount.initd, -files/151/udev-start.sh,
+ -udev-145-r2.ebuild, -files/151/udev-stop.sh, -udev-145-r3.ebuild:
+ Removed a lot of old versions.
*udev-162 (12 Sep 2010)
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
index 59772c6eff25..497d779275d7 100644
--- a/sys-fs/udev/Manifest
+++ b/sys-fs/udev/Manifest
@@ -28,15 +28,6 @@ AUX 151-r4/udev-start.sh 1355 RMD160 e2347f29110ca50ce2e608b4f7f62b2054da590e SH
AUX 151-r4/udev-stop.sh 237 RMD160 dea1f6d7525e792484c3d2c31d36e8b4d78ebda8 SHA1 72174a2e5e6be2133b2e5f68e477d0fa342b46ce SHA256 1dbdaa45b9f1e54faba9d153a93c0043aabe5b51270c233d3a5e48a6c1d20a1d
AUX 151-r4/udev.confd 2002 RMD160 2c8171f4426cac028fbde55c768e784ff379e3b0 SHA1 e6b360334e7ca599d7bf9f4fc7f8ea58b77e256f SHA256 b797379b93d03accf9d8b65f0c4a2f26de1c634c8ba7846f3238dea9211aa153
AUX 151-r4/udev.initd 6719 RMD160 83b6021bddf695293608184098fa0c5f6be1a891 SHA1 467bb84c90d948d241687fea3c454b23ffadf498 SHA256 f10b0a19e29f4a78f68d30454549010f680ed64140fcd3bccb6e0788ff489818
-AUX 151/shell-compat-KV.sh 1012 RMD160 5bc85047b4237d502f7b0ccc7181f9974c2b0898 SHA1 bbc58d6181f3fc8d623de1537eddcc1ede919202 SHA256 2393918bc65c69e1c19d7712292c945a4adfe45ce02b88ae7663167b8745cf8b
-AUX 151/shell-compat-addon.sh 1706 RMD160 feda3632aacbda824df059313a9b62fbfa2d087e SHA1 a0fa72aa1129b4abcdb8fc4060313c7bc432c20c SHA256 481eb655c58cbb65163a2ac58022b730d1e720d4066273358627a4fe98c52a1f
-AUX 151/udev-dev-tarball.initd 2579 RMD160 b7feb34f854a3eb08d1203f1faabf9cecee3101c SHA1 10ecda997314851d86a175db8cbfcc6a343e9bb2 SHA256 a829fa3efb9d6aadb137cb8879b8bc2660ef6500b2dbb8d55db8edf52f332d60
-AUX 151/udev-mount.initd 3027 RMD160 ea148758a48ddb47ee51d838e1d7feb64e31aeb5 SHA1 f6b5ec06037dab5a794406ac6b66bad11b1ca5d7 SHA256 12d79f025cd55feda9510fe9097fdcd90fc6096f19e03b495ab0f6b8566c3ec4
-AUX 151/udev-postmount.initd 803 RMD160 1a7a7a119a65b5a4b4065fb94bf14f7e996b30e4 SHA1 96db1dc7f4373ad9b56445098072c1c56da57ff7 SHA256 a50cf8a53199721c2682962b9b4d9621c4965c7fb2c696603179c5f37dd88934
-AUX 151/udev-start.sh 1355 RMD160 e2347f29110ca50ce2e608b4f7f62b2054da590e SHA1 8f4dcac83e64253bb32b8fc78f84e46114510b3f SHA256 2721826100e6180d0f76c3a15b14fe0c7d2d09af3dc16f88ceeca312abf1abb6
-AUX 151/udev-stop.sh 237 RMD160 dea1f6d7525e792484c3d2c31d36e8b4d78ebda8 SHA1 72174a2e5e6be2133b2e5f68e477d0fa342b46ce SHA256 1dbdaa45b9f1e54faba9d153a93c0043aabe5b51270c233d3a5e48a6c1d20a1d
-AUX 151/udev.confd 1764 RMD160 255afed98d59675108bc96e1639f9b7e8baed4b3 SHA1 19f465c7140818860ce5031e85118d48544c3629 SHA256 6918ce2ad61a7998088e1628e5bd1b59a9082cdb89dc23b1385f641d8a59cdb6
-AUX 151/udev.initd 6397 RMD160 fe4e87aacfa7dbb606dca67f9844b703cb5d7754 SHA1 30a9ef04846fdef08fc4b31de838b0c0ab4e39b4 SHA256 cb63f3d539db30cda6a6ee77b2b4331031f185147e602894dffcb05211064e3c
AUX 156/40-gentoo.rules 349 RMD160 e2f86db2c5839ce73b08006889c0aa6ff9ba1185 SHA1 14db0043b408e10c8c2e7e4d03de96c10208e5c9 SHA256 5d618b899475925ceccc330b6a738644aedd582d039f0cc404502637351347ea
AUX 156/90-network.rules 280 RMD160 5e6877819613fbdb0d0c7e8d042e3f3f91247c29 SHA1 25f5abe857a1fe21fa3b035bb88f3d3f81e77b4e SHA256 ba1628cf8df2780546fb158946f1591ef4e4177186d44705e27e71b417590b55
AUX 156/shell-compat-KV.sh 1012 RMD160 5bc85047b4237d502f7b0ccc7181f9974c2b0898 SHA1 bbc58d6181f3fc8d623de1537eddcc1ede919202 SHA256 2393918bc65c69e1c19d7712292c945a4adfe45ce02b88ae7663167b8745cf8b
@@ -77,11 +68,8 @@ AUX udev-124-cdrom-autoclose-bug.diff 1381 RMD160 7e1ee6fa9f59f2528df7c4b3deb1d8
AUX udev-124-encoding-overflow.patch 326 RMD160 8f08aa593d93451d67bdbfe0b9ea2d59e7a5947e SHA1 9f476abc669656b2ae55eca244a4cc956525ab39 SHA256 870b7347a57909c27cc5c6c03af0b2cf71f18c07b826f8d2d16ac688430d7d28
AUX udev-124-netlink-owner-check.patch 1162 RMD160 420a22a2762930479df5c7b609931685bba29a6c SHA1 0fbdd35ad860e9b09d141735757fad0319bd08b3 SHA256 c2354e23c451883ab1597603467caf24e0a6893af4d8a3b86aee2ba98917a45e
AUX udev-141-remove-devfs-names.diff 557 RMD160 c8dbcb0dcc815d78b9f33a6b49290cf21f2b7eee SHA1 5167dc1227e2f07664fad66a24365af192c8ab14 SHA256 9d1d64b41a6ff423fb218a36c56cbdec2d79827741060f39aed2f8ce2d03693f
-AUX udev-146-printer-usb_device-permission.diff 1419 RMD160 64afbfbf7d8756112ad830d6bc95d7c6c07e1a58 SHA1 4e6140ef8a6bf639384f1105158adaacf31196dd SHA256 b6b4dc88433703a18d07bc90d74afe7a20786ef7350e89d56f31e5ee5ace8238
AUX udev-150-fix-missing-firmware-timeout.diff 1065 RMD160 79a9fa2321d9d9fc6cf0399ecf326dc5f975719c SHA1 379bdb522edc45a9d9ed748be84f9087bee5b438 SHA256 863f394783ac282a3d83eb84ff0ed0f5dd7982e1b40d10e1081c567f38825371
AUX udev-151-readd-hd-rules.diff 2759 RMD160 5a3e52ce6442ef14f5f89faa36f98ddeb06fda00 SHA1 d954725615e963ba2854c0e4c0a424450e89280e SHA256 47eb3b3dd8c8c3199148aa083a47b2cbd29953b647b6ed06391424a353e6d39c
-AUX udev-159-path_id.patch 944 RMD160 333e37c6eecd22e075fe6c764d1f2ba9a984bb2d SHA1 bc02857518110e3cd205740f68fd93516815810b SHA256 a145d19190cafa5a5e8007c52660610c6033dd4b9f395e0e140fa050af4672c2
-AUX udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch 1244 RMD160 f21636c926d58a962af6a5695e023afa1c8a8652 SHA1 6a10fb649c4cf798f308e5d7915668e1b78f06cb SHA256 0fd942e688f93970410d7a81ad0277a4105479d33cac993d743e25d6cd10172b
AUX udev-postmount-initd-111-r2 508 RMD160 e1f42197fe3003ec4691b768a921029ce085becb SHA1 7ceb08150d429bd6b5cef88d76847575c6e89f22 SHA256 607deb133ab4be0d2fcb16346e86b3d8ae00bd62d2cbc1329458f278a1b1ff5c
AUX udev-start-113-r2.sh 6515 RMD160 2ecaa37fd9e498e60f8cd5978cb4f7930594cf99 SHA1 670bb1845ed70442fe598a5580101be75e2402c9 SHA256 438bc31605c8d2e50bebedd7fbff1410845738372ab3bc03d6f5ed1427ddd046
AUX udev-start-114-r1.sh 6218 RMD160 a7348ac44768096b3da712a9be0ef4bf9af6ec17 SHA1 6dfcb9aed5e066d21bebee03d29137722db19b56 SHA256 a639a6f1093f05da197c3fc548c31f7078b2f0023f66f3caade0721c60819268
@@ -101,27 +89,13 @@ DIST udev-115.tar.bz2 198893 RMD160 bf72a4e20b9ba50a5b0c3da09f77e67ec819b9fa SHA
DIST udev-119.tar.bz2 201836 RMD160 b827a1a5697fa32e43dec0a08081e92e2eddda52 SHA1 ae0d35a99e9f1983c1069378fd9d561de26cee7e SHA256 3bbab9b7f5e733a4c0a1da164e58511608014a3c5f0a4e8487c90d10c2a57349
DIST udev-124.tar.bz2 208381 RMD160 3a7affb0f11087fdb5d016d13add32b0442d13df SHA1 5b5426d8b9dc2e7a7b7602ba9fb8fca62e96d8ee SHA256 a497914660d9d9db9863dead25395fc944e934e8a7bef4a639f5b31d057a5542
DIST udev-141.tar.bz2 448373 RMD160 54da17bd8d37c00a97d0914e6b003096dedf5753 SHA1 f82279e4b4759b9e3134f99a538ccd1a437bf7f0 SHA256 51e0128c3fc29971d978050839fd59f103fddae4a47c8fd2b36f2836cfb59d35
-DIST udev-145-gentoo-patchset-v2.tar.bz2 10568 RMD160 465e4f82b6392e388cc3f2454e021f46bb2ba776 SHA1 0745c10aa2996a6bcb4f50c291fffff218d106dc SHA256 5f133eb5b0576ab9dc9160638a0249839bfa0d8e66857f6813fea7129ea8ed8d
-DIST udev-145-gentoo-patchset.tar.bz2 8765 RMD160 93bc0a8dbe220311931ff2a25dba60ef91143578 SHA1 e02cab5edf191f5f928d98be3cd7b7f86df9c1f0 SHA256 dceb7dcf7dbbf32da9c52fcba5dc5f667b6c9a5f76a34122b5d2e008ecb08cbd
-DIST udev-145.tar.bz2 529739 RMD160 7291e0d75fe2278a6820c7cc671e8757d209ec52 SHA1 bb4a557de1fcef2cbeefea8b8e7cb7938bb54760 SHA256 3bfae3386345b0650a30e35f071f2c830425d64eaf6ed4b113a8b463cd5db1fe
DIST udev-146-gentoo-patchset-v1.tar.bz2 8370 RMD160 f6efbaa10ea0ae143bec4935e28c30df5342cbb0 SHA1 ad0995abc31daef5b8e843ba712fdca084e11bcc SHA256 d89845257847c34c9e617c5c64c686902833343dd617401d1ac196cd0589c95c
DIST udev-146.tar.bz2 531445 RMD160 78077a918385f94dd36656d206899a089b9ceab4 SHA1 befdcfe5833e3905497a246fd1f91734cfa80ced SHA256 6c20e1980d62638e139da04c0d591bf9a96ae279a755f9dd40fb0eea918a0fa5
-DIST udev-147-gentoo-patchset-v1.tar.bz2 2056 RMD160 d7ee9e4f46e009be995fa62192a620ddc498e653 SHA1 7606e18957de1a14f8d9de5253af9967b8d0b88c SHA256 4fbfe443bb89eb32a6bff144aa819cdb50792e762966ab5ff0cbf16036ce946d
-DIST udev-147.tar.bz2 539979 RMD160 6b33fe8a491d8a5650e0bbe77ca64361ec43758d SHA1 ab6a629b719158fe342d1fb3a787a68e457fa230 SHA256 6517acde28bf319fc52c2b65fef7ef9f35a62bd669bbda6ad65de354d74d8d6b
DIST udev-149-gentoo-patchset-v1.tar.bz2 3688 RMD160 e6c05d466248604378c3283cae0dc8e7a2cccfff SHA1 40dfc685180fc37f564e935a4c6f8f975ad5d2a9 SHA256 67098d8a713461e528460116d9d504d5c56e2f32bb46f7a28d67aa4d21ae7d45
DIST udev-149-testsys.tar.bz2 137828 RMD160 9cf12d225857166c844344ce09f69ef6115e5484 SHA1 c822dd513ef927c615e29e8b02969de236d385ee SHA256 c12d806936d4e1e1346e12ce35f310250d59ba2885005f40e36ec96c764544e6
DIST udev-149.tar.bz2 543356 RMD160 ae0262ed8d5fa79269313a15678b211393b5d89c SHA1 c68a39e011b179b47f0abfa25163047132b62a2b SHA256 63cc177dbc2eba5445eceeea65eea59813ac2f7c29f06f18310b54de545aee1d
-DIST udev-150-gentoo-patchset-v1.tar.bz2 3566 RMD160 fb24b25c8735ab828928b44d5e969de5322b52c4 SHA1 38ec8335c20b60fa67dc777344196f4b5c9284e4 SHA256 0b49d0d9d0de6adae6e2ad414855d9aa2fa9316fd7ef9f481ab927062d69b755
-DIST udev-150.tar.bz2 521727 RMD160 7b07fda028d09b9fffde04e1f8f82d7d320eca16 SHA1 3c77d76d495adf1144be959401c90660adfd7a89 SHA256 35ff1767095c49693eb692523afd74acbeeb260e7fbd6143965622e81c58bef5
DIST udev-151-testsys.tar.bz2 137712 RMD160 be8c9c99a770b9ba48449dbbea3b4a6367c0c626 SHA1 7194c9e86f88ad64be4bf706d9a33e58882c8231 SHA256 727e2127e497cd0c41e27bda6f1e8e83831226f84c63e732fe78a64ed91a322e
DIST udev-151.tar.bz2 509815 RMD160 4faf310f72df791fae7f579e57964ba9ab705638 SHA1 04bab1fd73797815b0f2412edcf1070acd35bce1 SHA256 d37a94e75b962182ce940e4a839f07b1c7024dbe7e4b870a120bf0fe9ed0d55d
-DIST udev-154.tar.bz2 532687 RMD160 154fbec374171b73de0c942c92245e859d9ef18f SHA1 3b4be32e8fd5b717dfeeeb3bb482fd006258ef62 SHA256 0c5466dd3fecb03aae7dc7fd61fc18f01a8a8c533b3a6ba09c5bab6792dd85ab
-DIST udev-156.tar.bz2 533910 RMD160 475f1d7a2ec91baeced954245c93273cee3275f4 SHA1 82be4dee6d47ca6b5488223f491b01ac43068084 SHA256 fb265933691a0bfe00d542e26ed4e3467b24386328da832a0c7073124cbd309c
-DIST udev-157.tar.bz2 535440 RMD160 04e6a6873699df1a0807547517ca4314c377649c SHA1 15b958077466b7be3fb4e8d1d8431b5fa44cbcd2 SHA256 4eca83f6afa72f378b058b2c18604bea79a5c6d3beb07640cf905299654a2e14
-DIST udev-158.tar.bz2 538272 RMD160 ddefa72ffcf800f635bde1002d551c215eb14dc9 SHA1 b8651e3a8195707894ffe47fa1f2ca6cd1aed448 SHA256 48448845c9a6f274efb0781f2d9132f953dc456a695799e3d5a44d920a5dab03
-DIST udev-159.tar.bz2 541578 RMD160 a2d8c558565106e286ff05ba0c23de0730260856 SHA1 b15364df803c21888d5425a1924249b93f3a80b7 SHA256 317f3e078272e6d8627eedc924ddd84ed1145306f5f63ae3491fc83faf43b748
-DIST udev-160.tar.bz2 541966 RMD160 bf09f734b496d37249a2ceba3a19c0ab08669314 SHA1 3ab26ef4554a49e3d89aa8d25b2bede89d43b706 SHA256 226447e2bdeffaa82543dd2a6d3e0cfc373dbf8e420e7e2640113917fb1aa473
-DIST udev-161.tar.bz2 544451 RMD160 13913653533817e32947401991650cbf1ea1c710 SHA1 fc7946048db6915469ab396cdcf5911d09829d5e SHA256 ee4f5ea4bb4bce563aeb2b5a21c529999150d49dea1ccc3f6077b8e4cb4e4111
DIST udev-162.tar.bz2 547687 RMD160 eae0acab1053ce71d6adaecea4539c70c981cc6b SHA1 fca52717a09502b093a7c5f4ecc98a735e52c982 SHA256 dc1534fe1713e28fcf3c89b20cfeee027b8d74dfed1ccd98761cc86cc818becc
EBUILD udev-114.ebuild 9053 RMD160 71cf9942c2680b37cde18fb1e6b45661863add68 SHA1 a61fd58682ed8e206468f15f35c718a838f6b2c7 SHA256 fa7bf704f3406c70bc55e1e9c9995d487266707d3c93e9ea7c44844e9fbee493
EBUILD udev-115-r1.ebuild 10130 RMD160 499b32c67f89eca774a1335b00e1c067747d453a SHA1 93ebcd32a7e1a10409464fed8e23e1bd3e8a6d24 SHA256 ce4c791c230e3430783efc180da8dce72104f337660690f8df0f90c4e37496aa
@@ -130,36 +104,17 @@ EBUILD udev-124-r1.ebuild 10678 RMD160 6b6267b7bbc071d5f36f7197badc7d8ac646e671
EBUILD udev-124-r2.ebuild 11035 RMD160 6d17242ff354b614312f6033d19e82a982cf1d7f SHA1 8157db46b65cf6e8de606f1345e4873974efeec9 SHA256 eeee3f1060b90828326f5ed63226769fc6e20aa91299e15d7983a9d2c54a1a57
EBUILD udev-141-r1.ebuild 13131 RMD160 8d502aa20b57883a209f5404fa8c11e7b31655a4 SHA1 ecc5a67f83aa70a1d41500de01419498573b66ad SHA256 691db9575d234a9ca1f24dc1e5aa98ff14b574de333c21290ff04be99b59ece0
EBUILD udev-141.ebuild 12466 RMD160 c26b96b03e66a274f7ef990d0fe82fd45b683f15 SHA1 f8219f44bbeffb532d35aa5e9d1129ef46cbb9af SHA256 d7702783f853acde088cf63c16677a674a428a39227d2eac13db67a739493d8b
-EBUILD udev-145-r1.ebuild 15085 RMD160 d380e76812a1a221d5811024b817e671bbc047c3 SHA1 5025b0a82af480cfb13d55dee0c2a757ccc70247 SHA256 54955625e1bfe2a1c07e4d92da15b5104f0306644cf33149eb9b65f1f15fbaf3
-EBUILD udev-145-r2.ebuild 15428 RMD160 3895e00bad0344e474f279096c4b0e388b6b2b27 SHA1 516027b98203bad8d6e9c5e11986ab4f031a6379 SHA256 42cc130b2cf17852b8515fde8ae0f579a77ad3779ff58e1f95066bf210b8ba0c
-EBUILD udev-145-r3.ebuild 15431 RMD160 1c6a9f484edc938a2c0c96194e44910f29172694 SHA1 1a5489be2ad7a09a3a7b8b41064c9d422e7d47d7 SHA256 ea3518a9f130329fe8910af94535266a6a77b922ec5aa30fe37299e4aea4f7cb
-EBUILD udev-145.ebuild 13631 RMD160 23dcabbd707d89337d54e3f37b8c537c8eba24d3 SHA1 9cadb9b37203e504c69e9486ad7a7329633a6cca SHA256 c9fa4ca34458fb6e560e690643e3e92e54b313a6fc07e8910cb06c6a9db79fd1
EBUILD udev-146-r1.ebuild 15421 RMD160 a35f9fdf0cc5c80860e82b7c12c16681ee10d149 SHA1 28dbc886e8b8c8910128f3f1daad05e860101ba0 SHA256 b1316a6302b290273a9ab576ab84f43b2bc736e1d4cc7b17d78356825df8168c
-EBUILD udev-146-r2.ebuild 16334 RMD160 b87ebbecb3a5f01945861f06593458b7a2c77957 SHA1 ede126aed84f9f86ffa4a82e0a4ad658b3122ac9 SHA256 a05afc60fcb176e62e42b9e0cfd100112600281c2bad96f5aa9ecc3be89d2f73
-EBUILD udev-146-r3.ebuild 16357 RMD160 d0222ba2a54e8898ba87d96eda97c0abb38d945c SHA1 35aec6faa2de73467f2be463d1db949053e88995 SHA256 af3bc1a71d2f829e4b30d5855b5cd0ad5e7e27cfcfb53da950d3c490d28b0e5c
-EBUILD udev-146.ebuild 15364 RMD160 9faf4630f84b0de4d7517281354c64a7c234dea6 SHA1 b29fedb828650d8d6b1e34a671e81e5fc9f0437a SHA256 b205626922847edc7dc81ea7102b9713a3bb831b6bf3224a25f70a08f38af875
-EBUILD udev-147-r1.ebuild 16425 RMD160 a106bf7542e3461f1ced88a73e0fd5f0e65f0188 SHA1 d1f7fac234535856d3d3273b53b127c18558189d SHA256 143df9e556145e83a95a2a1aa5baeeb1de4511af10ab90d4bf32e88ed7e3f549
EBUILD udev-149.ebuild 16579 RMD160 f3288d98ef291f33b688ca37688a939dda5ed421 SHA1 dae4c4fbe990b638b3590447c0d056393aa2bd0a SHA256 7e1d1d41049c498b99d384c3695948af0b3633c6a88c576fc61adecb9bee71f9
-EBUILD udev-150-r1.ebuild 16491 RMD160 acc6d9e6699e7184cbedc33d14df825355974227 SHA1 c9669be1b7c16f512b27a390957df600c31f9bc1 SHA256 cf87091ece0f9fdf1c45f45cb492420a66063cbf91d49fdf00fb63bbcfbd66fe
-EBUILD udev-151-r1.ebuild 16561 RMD160 46ae6d23c0cfe2934794becccdaeaad6a5d9454d SHA1 676713b2f4d8164fddda80258b5adf9da0a305a0 SHA256 5386631fc263aec170bca9a3659bfa8bc84cc95384fb8f212ce3a8e5df2dcc49
-EBUILD udev-151-r2.ebuild 16581 RMD160 16a4405d7d7d62a214100b89482b2275349674e4 SHA1 5c6447dc56c64a833ca3a2a47244f11f5a1ae342 SHA256 4765424f37fc57191d2a674cb643010ba4f9f22a7352b65664e5f5aca887c7a7
-EBUILD udev-151-r3.ebuild 16827 RMD160 74305057fb2b553ec897afacf1ea094c13e2afd7 SHA1 cec1e86fd5fc641cfca115913070bdf4ba6be7a1 SHA256 2a0b2e63045a8be2acaa858bba511d24775473906ae487d08892c6104f2075d3
EBUILD udev-151-r4.ebuild 16823 RMD160 7b9e7bbeb67469936abdc11d744c94e50efc9d26 SHA1 9a68111b7edfcd3f7813e3be45f5d4afe322538b SHA256 c46259b4065e50d60056cd64d820f278b077a5e836b0dc90acc1b843114e1e6f
-EBUILD udev-154.ebuild 15933 RMD160 00cb642b460a97f34527b4596f81918d2d0ed896 SHA1 4a72fbea697d21dcffeb6fc75a686bebc044581b SHA256 a6600653ea622145097cafc0be19205cad83156fc305f9afc4aadb21dfcadb73
-EBUILD udev-156.ebuild 15930 RMD160 0d8d8fd23838f2f23d3d8c8de6784eee7c82b171 SHA1 4fffcb05824283f9c6c1b89ccf5eb5c32f44e094 SHA256 1652886764007852a3bf12bb94d04296b752f68d5888d40f5c91e4822168ec86
-EBUILD udev-157.ebuild 15980 RMD160 a9aa4573c06d0cd86c8376f725b2c82ffa75edb0 SHA1 1c6129f61f2c4035c09a988d853dffc905912474 SHA256 b4a23c4b7bbc424ab6ce6fb4c8a7e8f013e94dcb5bb15b05cebb59230346c830
-EBUILD udev-158.ebuild 15980 RMD160 debb7820bb80daf6e085d09c12fa1e9f9c87dbed SHA1 3d01e94d0af7fd63558ce3c56e5249b889265369 SHA256 98568ae8d1a124a81f137063c855f25d9aedac08e0cad214b045fccc3635f23a
-EBUILD udev-159.ebuild 16026 RMD160 483ece21c9348a292a002ff166c8da60f239cb69 SHA1 e8c01c5e5107d2c636e41eed6875de28dca5f606 SHA256 0848156b744dcba7d94dd4babd89559425a7bcc05a4ca1f65cb70a1206f7d222
-EBUILD udev-160.ebuild 15980 RMD160 23ca71745f613a6768056e7e6528e100c834b09b SHA1 174d1aae24985d559b3c340406ea2543972ca2a9 SHA256 ad23682fd65bc4c359573e40ba892f422c923570292ec01653d8d1548df2720e
-EBUILD udev-161.ebuild 16095 RMD160 94da48363b5e7a54d7e2accfa6c7ec9949eaa17d SHA1 3f1f5aa97bccd3d9a02e6d75044d16a1d5a0d79a SHA256 e4012f4f6309d455355e779fd77cfcb2e7ce196d0187efeb1973637aced7ea52
EBUILD udev-162.ebuild 16011 RMD160 ae2acf58a16ee3834883ead2b11c535ef3664909 SHA1 a70f08516ef780f10c2c500b6fc3253d54b4ec7d SHA256 cc656960f29040db9dba06595d426940e0c38fa991d0060dc876585c2870ddc0
EBUILD udev-9999.ebuild 15906 RMD160 eccb13d05abc0f7d53952a57fc8307310424b08a SHA1 0a85ac5886c0cb5bbc48b777b898b53c3d41e458 SHA256 71baec39e758add66fd8adedea72df90af659f1a7369c8bca0b94ad53ae43a7d
-MISC ChangeLog 114539 RMD160 a4552dc22b99f010f86a3f37b6d803398fb2ccea SHA1 eaf74a30f9183438c007741a70e880ed03cbf99d SHA256 d7ff23adec2e550e27fa6f2fe398c183c9afeeaceb5a8a94dc8bedd917d7f15b
+MISC ChangeLog 115436 RMD160 287a9d05459036139da05cdd86d67baa8b5418cb SHA1 14ed645fee7ab5f75267bc207f8468999471430f SHA256 1a29858a60c5a28da8136eb2298c96ada0feee3be56e1a3913093fa880b70c00
MISC metadata.xml 502 RMD160 f353faee03dd5920d1f7d65c123d93e018c7be53 SHA1 02c5eb9fd660e69127fa84487e0d70b85ee1d3cc SHA256 ca6a239a7be7949fdf1461eb524ca9234a0fd2aee9fc7eeb758a2347b6031664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
-iEYEARECAAYFAkyMwXkACgkQt2vP6XvVdOfu2gCfVnBhA1IzEIukPc5zbIyDc/Mt
-GJAAoJEj8DroXa/qVXG65zglnXrybY26
-=/awK
+iEYEARECAAYFAkyg7xwACgkQt2vP6XvVdOdO3ACgq9km9WycR0K9u3xkfxWn3el2
+QFcAoMez79uCJmUc+XATPJUUV1b+HYQq
+=iver
-----END PGP SIGNATURE-----
diff --git a/sys-fs/udev/files/151/shell-compat-KV.sh b/sys-fs/udev/files/151/shell-compat-KV.sh
deleted file mode 100644
index be74fe49e3d6..000000000000
--- a/sys-fs/udev/files/151/shell-compat-KV.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# provides get_KV and KV_to_int as not all openrc-versions installed via ebuild have these
-
-cmd_exist()
-{
- type "$1" >/dev/null 2>&1
-}
-
-# does exist in baselayout-1
-# does not exist in openrc, but is added by openrc-ebuild since some time
-if ! cmd_exist KV_to_int; then
- KV_to_int() {
- [ -z $1 ] && return 1
-
- local x=${1%%-*}
- local KV_MAJOR=${x%%.*}
- x=${x#*.}
- local KV_MINOR=${x%%.*}
- x=${x#*.}
- local KV_MICRO=${x%%.*}
- local KV_int=$((${KV_MAJOR} * 65536 + ${KV_MINOR} * 256 + ${KV_MICRO} ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- [ "${KV_int}" -lt 131584 ] && return 1
-
- echo "${KV_int}"
- }
-fi
-
-# same as KV_to_int
-if ! cmd_exist get_KV; then
- _RC_GET_KV_CACHE=""
- get_KV() {
- [ -z "${_RC_GET_KV_CACHE}" ] \
- && _RC_GET_KV_CACHE="$(uname -r)"
-
- echo "$(KV_to_int "${_RC_GET_KV_CACHE}")"
-
- return $?
- }
-fi
-
diff --git a/sys-fs/udev/files/151/shell-compat-addon.sh b/sys-fs/udev/files/151/shell-compat-addon.sh
deleted file mode 100644
index c271abfd548f..000000000000
--- a/sys-fs/udev/files/151/shell-compat-addon.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# functions that may not be defined, but are used by the udev-start and udev-stop addon
-# used by baselayout-1 and openrc before version 0.4.0
-
-cmd_exist()
-{
- type "$1" >/dev/null 2>&1
-}
-
-# does not exist in baselayout-1, does exist in openrc
-if ! cmd_exist yesno; then
- yesno() {
- [ -z "$1" ] && return 1
- case "$1" in
- yes|Yes|YES) return 0 ;;
- esac
- return 1
- }
-fi
-
-# does not exist in baselayout-1, does exist in openrc
-#
-# mountinfo <path>
-# check if some filesystem is mounted at mountpoint <path>
-#
-# return value:
-# 0 filesystem is mounted at <path>
-# 1 no filesystem is mounted exactly at <path>
-if ! cmd_exist mountinfo; then
- mountinfo() {
- [ "$1" = "-q" ] && shift
- local dir="$1"
-
- # check if entry is in /proc/mounts
- local ret=$(gawk 'BEGIN { found="false"; }
- $1 ~ "^#" { next }
- $2 == "'$dir'" { found="true"; }
- END { print found; }
- ' /proc/mounts)
-
- "${ret}"
- }
-fi
-
-# does not exist in baselayout-1, does exist in openrc
-#
-# used syntax: fstabinfo --mount /dev
-# it should mount /dev if an entry exists in /etc/fstab
-#
-# return value:
-# 0 mount succeeded
-# 1 mount failed or no entry exists
-#
-if ! cmd_exist fstabinfo; then
- fstabinfo() {
- [ "$1" = "--mount" ] || return 1
- local dir="$2"
-
- # RC_USE_FSTAB does only exist in baselayout-1
- # this emulation is only needed on bl-1, so check always
- yesno "${RC_USE_FSTAB}" || return 1
-
- # no need to check fstab, mount does this already for us
-
- # try mounting - better first check fstab and then mount without surpressing errors
- mount -n "${dir}" 2>/dev/null
- return $?
- }
-fi
diff --git a/sys-fs/udev/files/151/udev-dev-tarball.initd b/sys-fs/udev/files/151/udev-dev-tarball.initd
deleted file mode 100755
index 2cdce4ff226b..000000000000
--- a/sys-fs/udev/files/151/udev-dev-tarball.initd
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Maintain a tarball of not udev managed device nodes"
-[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev
-
-rc_device_tarball=${rc_device_tarball:-${RC_DEVICE_TARBALL:-NO}}
-device_tarball=/lib/udev/state/devices.tar.bz2
-
-depend() {
- if [ -f /etc/init.d/sysfs ]; then
- need udev-mount
- fi
-}
-
-start()
-{
- _start
-}
-
-_start() {
- if yesno "${rc_device_tarball}" && \
- [ -s "${device_tarball}" ]
- then
- ebegin "Populating /dev with saved device nodes"
- tar -jxpf "${device_tarball}" -C /dev
- eend $?
- fi
-}
-
-stop() {
- if [ -e /dev/.devfsd ] || [ ! -e /dev/.udev ] || [ ! -z "${CDBOOT}" ] || \
- ! yesno "${rc_device_tarball}" || \
- ! touch "${device_tarball}" 2>/dev/null
- then
- return 0
- fi
-
- ebegin "Saving device nodes"
- # Handle our temp files
- save_tmp_base=/tmp/udev.savedevices."$$"
- devices_udev="${save_tmp_base}"/devices.udev
- devices_real="${save_tmp_base}"/devices.real
- devices_totar="${save_tmp_base}"/devices.totar
- device_tmp_tarball="${save_tmp_base}"/devices
-
- rm -rf "${save_tmp_base}"
- mkdir "${save_tmp_base}"
- touch "${devices_udev}" "${devices_real}" \
- "${devices_totar}" "${device_tmp_tarball}"
-
- if [ -f "${devices_udev}" -a -f "${devices_real}" -a \
- -f "${devices_totar}" -a -f "${device_tmp_tarball}" ]
- then
- cd /dev
- # Find all devices, but ignore .udev directory
- find . -xdev -type b -or -type c -or -type l | \
- cut -d/ -f2- | \
- grep -v ^\\.udev >"${devices_real}"
-
- # Figure out what udev created
- udevadm info --export-db | sed -ne 's,^[SN]: \(.*\),\1,p' >"${devices_udev}"
- # These ones we also do not want in there
- for x in MAKEDEV core fd initctl pts shm stderr stdin stdout root; do
- echo "${x}" >> "${devices_udev}"
- done
- if [ -d /lib/udev/devices ]; then
- cd /lib/udev/devices
- find . -xdev -type b -or -type c -or -type l | \
- cut -d/ -f2- >> "${devices_udev}"
- cd /dev
- fi
-
- fgrep -x -v -f "${devices_udev}" "${devices_real}" > "${devices_totar}"
-
- # Now only tarball those not created by udev if we have any
- if [ -s "${devices_totar}" ]; then
- # we dont want to descend into mounted filesystems (e.g. devpts)
- # looking up username may involve NIS/network
- # and net may be down
- tar --one-file-system --numeric-owner \
- -jcpf "${device_tmp_tarball}" -T "${devices_totar}"
- mv -f "${device_tmp_tarball}" "${device_tarball}"
- else
- rm -f "${device_tarball}"
- fi
- eend 0
- else
- eend 1 "Could not create temporary files!"
- fi
-
- rm -rf "${save_tmp_base}"
-}
-
diff --git a/sys-fs/udev/files/151/udev-mount.initd b/sys-fs/udev/files/151/udev-mount.initd
deleted file mode 100755
index 4acdf0981841..000000000000
--- a/sys-fs/udev/files/151/udev-mount.initd
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Mount tmpfs on /dev"
-[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev
-
-# get_KV and KV_to_int
-. /lib/udev/shell-compat-KV.sh
-
-# FIXME
-# Instead of this script testing kernel version, udev itself should
-# Maybe something like udevd --test || exit $?
-check_kernel()
-{
- if [ $(get_KV) -lt $(KV_to_int '%KV_MIN%') ]; then
- eerror "Your kernel is too old to work with this version of udev."
- eerror "Current udev only supports Linux kernel %KV_MIN% and newer."
- return 1
- fi
-
- yesno "${unreliable_kernel_warning:-yes}" || return 0
-
- if [ $(get_KV) -lt $(KV_to_int '%KV_MIN_RELIABLE%') ]; then
- ewarn "You need at least Linux kernel %KV_MIN_RELIABLE% for reliable operation of udev."
- fi
- return 0
-}
-
-
-mount_dev_directory()
-{
- if mountinfo -q /dev; then
- einfo "/dev is already mounted"
- return 0
- fi
-
- # No options are processed here as they should all be in /etc/fstab
- ebegin "Mounting /dev"
- if ! fstabinfo --mount /dev; then
- # we mount devtmpfs if supported
- local fs=tmpfs
- grep -qs devtmpfs /proc/filesystems && fs=devtmpfs
-
- # Some devices require exec, Bug #92921
- mount -n -t "$fs" -o "exec,nosuid,mode=0755,size=10M" udev /dev
- fi
- eend $?
-}
-
-seed_dev()
-{
- # Seed /dev with some things that we know we need
-
- # creating /dev/console, /dev/tty and /dev/tty1 to be able to write
- # to $CONSOLE with/without bootsplash before udevd creates it
- [ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
- [ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1
- [ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0
-
- # udevd will dup its stdin/stdout/stderr to /dev/null
- # and we do not want a file which gets buffered in ram
- [ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
- ${HAVE_SELINUX} && restorecon /dev/null
-
- # so udev can add its start-message to dmesg
- [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
-
- # copy over any persistant things
- if [ -d /lib/udev/devices ]; then
- cp -RPp /lib/udev/devices/* /dev 2>/dev/null
- fi
-
- # Not provided by sysfs but needed
- ln -snf /proc/self/fd /dev/fd
- ln -snf fd/0 /dev/stdin
- ln -snf fd/1 /dev/stdout
- ln -snf fd/2 /dev/stderr
- [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
-
- # Create problematic directories
- mkdir -p /dev/pts /dev/shm
- ${HAVE_SELINUX} && restorecon -R /dev >/dev/null
- return 0
-}
-
-
-start()
-{
- # do not run this on too old baselayout - udev-addon is already loaded!
- if [ ! -f /etc/init.d/sysfs ]; then
- eerror "The $SVCNAME init-script is written for baselayout-2!"
- eerror "Please do not use it with baselayout-1!".
- return 1
- fi
-
- _start
-}
-
-_start()
-{
- check_kernel || return 1
- mount_dev_directory || return 1
-
- # Selinux lovin; /selinux should be mounted by selinux-patched init
- if [ -x /sbin/restorecon -a -c /selinux/null ]; then
- HAVE_SELINUX=true
- restorecon /dev > /selinux/null
- else
- HAVE_SELINUX=false
- fi
-
- # make sure it exists
- mkdir -p /dev/.udev /dev/.udev/rules.d
-
- seed_dev
-
- return 0
-}
diff --git a/sys-fs/udev/files/151/udev-postmount.initd b/sys-fs/udev/files/151/udev-postmount.initd
deleted file mode 100755
index 1619d5addab4..000000000000
--- a/sys-fs/udev/files/151/udev-postmount.initd
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/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/udev/files/151/udev-postmount.initd,v 1.1 2010/01/29 21:14:43 zzam Exp $
-
-depend() {
- need localmount
- after dbus # for trigger failed
-}
-
-dir_writeable()
-{
- mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$
-}
-
-start() {
- # check if this system uses udev
- [ -d /dev/.udev/ ] || return 0
-
- # Run the events that failed at first udev trigger
- udevadm trigger --type=failed -v
-
- # only continue if rules-directory is writable
- dir_writeable /etc/udev/rules.d || return 0
-
- # store persistent-rules that got created while booting
- # when / was still read-only
- /lib/udev/move_tmp_persistent_rules.sh
-}
-
-stop() {
- :
-}
-
-# vim:ts=4
diff --git a/sys-fs/udev/files/151/udev-start.sh b/sys-fs/udev/files/151/udev-start.sh
deleted file mode 100644
index e927e8c14427..000000000000
--- a/sys-fs/udev/files/151/udev-start.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev
-
-. /lib/udev/shell-compat-addon.sh
-
-compat_volume_nodes()
-{
- # Only do this for baselayout-1*
- # This check is likely to get false positives due to some multilib stuff,
- # but that should not matter, as this can only happen on old openrc versions
- # no longer available as ebuilds.
- if [ ! -e /lib/librc.so ]; then
-
- # Create nodes that udev can't
- [ -x /sbin/lvm ] && \
- /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null
- # Running evms_activate on a LiveCD causes lots of headaches
- [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \
- /sbin/evms_activate -q &>/dev/null
- fi
-}
-
-start_initd()
-{
- (
- . /etc/init.d/"$1"
- _start
- )
-}
-
-# set it as openrc does
-RC_BOOTLEVEL=${BOOTLEVEL:-default}
-RC_DEFAULTLEVEL=${DEFAULTLEVEL:-default}
-
-# mount tmpfs on /dev
-start_initd udev-mount || exit 1
-
-# Create a file so that our rc system knows it's still in sysinit.
-# Existance means init scripts will not directly run.
-# rc will remove the file when done with sysinit.
-# this is no longer needed as of openrc-0.4.0
-touch /dev/.rcsysinit
-
-# load device tarball
-start_initd udev-dev-tarball
-
-# run udevd
-start_initd udev || exit 1
-
-compat_volume_nodes
-
-# udev started successfully
-exit 0
diff --git a/sys-fs/udev/files/151/udev-stop.sh b/sys-fs/udev/files/151/udev-stop.sh
deleted file mode 100644
index 47e095607f0a..000000000000
--- a/sys-fs/udev/files/151/udev-stop.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# for function yesno
-. /lib/udev/shell-compat-addon.sh
-
-# store device tarball
-(
- . /etc/init.d/udev-dev-tarball
- stop
-)
-
-exit 0
diff --git a/sys-fs/udev/files/151/udev.confd b/sys-fs/udev/files/151/udev.confd
deleted file mode 100644
index bffea3569f9b..000000000000
--- a/sys-fs/udev/files/151/udev.confd
+++ /dev/null
@@ -1,56 +0,0 @@
-# /etc/conf.d/udev: config file for udev
-
-# We discourage to disable persistent-net!!
-# this may lead to random interface naming
-
-# Disable adding new rules for persistent-net
-persistent_net_disable="no"
-
-# Disable adding new rules for persistent-cd
-# Disabling this will stop new cdrom devices to appear
-# as /dev/{cdrom,cdrw,dvd,dvdrw}
-persistent_cd_disable="no"
-
-# Set to "yes" if you want to save /dev to a tarball on shutdown
-# and restore it on startup. This is useful if you have a lot of
-# custom device nodes that udev does not handle/know about.
-#
-# As this option is fragile, we recommend you
-# to create your devices in /lib/udev/devices.
-# These will be copied to /dev on boot.
-#rc_device_tarball="NO"
-
-# udev can trigger coldplug events which cause services to start and
-# kernel modules to be loaded.
-# Services are deferred to start in the boot runlevel.
-# Set rc_coldplug="NO" if you don't want this.
-# If you want module coldplugging but not coldplugging of services then you
-# can disable service coldplugging in baselayout/openrc config files.
-# The setting is named different in different versions.
-# in /etc/rc.conf: rc_hotplug="!*" or
-# in /etc/conf.d/rc: rc_plug_services="!*"
-#rc_coldplug="YES"
-
-
-
-
-# Expert options:
-
-# Disable warning about unreliable kernel/udev combination
-#unreliable_kernel_warning="no"
-
-# Timeout in seconds to wait for processing of uevents at boot.
-# There should be no need to change this.
-#udev_settle_timeout="60"
-
-# Run udevadmin monitor to get a log of all events
-# in /dev/.udev/udevmonitor.log
-#udev_monitor="YES"
-
-# Keep udevmonitor running after populating /dev.
-#udev_monitor_keep_running="no"
-
-# Set cmdline options for udevmonitor.
-# could be some of --env --kernel --udev
-#udev_monitor_opts="--env"
-
diff --git a/sys-fs/udev/files/151/udev.initd b/sys-fs/udev/files/151/udev.initd
deleted file mode 100644
index 8a0d4ad126e8..000000000000
--- a/sys-fs/udev/files/151/udev.initd
+++ /dev/null
@@ -1,263 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-description="Run udevd and create the device-nodes"
-
-[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf
-
-rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}}
-
-depend()
-{
- if [ -f /etc/init.d/sysfs ]; then
- # require new enough openrc with sysinit being extra runlevel
- # on linux we just check if sysfs init-script exists
- # this is to silence out ugly warnings about not-existing sysfs script
- provide dev
- if yesno "${rc_device_tarball:-no}"; then
- need sysfs udev-mount udev-dev-tarball
- else
- need sysfs udev-mount
- fi
- before checkfs fsck
-
- # udev does not work inside vservers
- keyword novserver nolxc noopenvz
- fi
-}
-
-cleanup()
-{
- # fail more gracely and not leave udevd running
- start-stop-daemon --stop --exec /sbin/udevd
- exit 1
-}
-
-disable_hotplug_agent()
-{
- if [ -e /proc/sys/kernel/hotplug ]; then
- echo "" >/proc/sys/kernel/hotplug
- fi
-}
-
-root_link()
-{
- /lib/udev/write_root_link_rule
-}
-
-rules_disable_switch()
-{
- # this function disables rules files
- # by creating new files with the same name
- # in a temp rules directory with higher priority
- local f=/dev/.udev/rules.d/"$1" bname="$1" onoff="$2"
-
- if yesno "${onoff}"; then
- echo "# This file disables ${bname} due to /etc/conf.d/udev" \
- > "${f}"
- else
- rm -f "${f}"
- fi
-}
-
-# only called on openrc
-is_service_enabled() {
- local svc="$1"
-
- [ ! -e "/etc/init.d/${svc}" ] && return 1
-
- [ -e "/etc/runlevels/${RC_BOOTLEVEL}/${svc}" ] && return 0
- [ -e "/etc/runlevels/${RC_DEFAULTLEVEL}/${svc}" ] && return 0
- return 1
-}
-
-check_openrc_net()
-{
- local f=/dev/.udev/rules.d/90-network.rules
- is_service_enabled network || return 0
-
- # disable network hotplugging
- echo "# This file disables network hotplug events calling old-style openrc net scripts" >> "${f}"
- echo "# as we use new-style network init script /etc/init.d/network" >> "${f}"
-}
-
-start_udevd()
-{
- # load unix domain sockets if built as module, Bug #221253
- if [ -e /proc/modules ] ; then
- modprobe -q unix 2>/dev/null
- fi
- ebegin "Starting udevd"
- start-stop-daemon --start --exec /sbin/udevd -- --daemon
- eend $?
-}
-
-# populate /dev with devices already found by the kernel
-populate_dev()
-{
- if get_bootparam "nocoldplug" ; then
- rc_coldplug="NO"
- ewarn "Skipping udev coldplug as requested in kernel cmdline"
- fi
-
- ebegin "Populating /dev with existing devices through uevents"
- if yesno "${rc_coldplug}"; then
- udevadm trigger
- else
- # Do not run any init-scripts, Bug #206518
- udevadm control --env do_not_run_plug_service=1
-
- # only create device nodes
- udevadm trigger --attr-match=dev
-
- # run persistent-net stuff, bug 191466
- udevadm trigger --subsystem-match=net
- fi
- eend $?
-
- # we can speed up booting under these conditions:
- # * using devtmpfs so kernel creates device nodes for us
- # * only using kernel created device nodes at boot (in /etc/fstab and elsewhere)
- #
- ebegin "Waiting for uevents to be processed"
- udevadm settle --timeout=${udev_settle_timeout:-60}
- eend $?
-
- udevadm control --env do_not_run_plug_service=
- return 0
-}
-
-# for debugging
-start_udevmonitor()
-{
- yesno "${udev_monitor:-no}" || return 0
-
- udevmonitor_log=/dev/.udev/udevmonitor.log
- udevmonitor_pid=/dev/.udev/udevmonitor.pid
-
- einfo "udev: Running udevadm monitor ${udev_monitor_opts} to get a log of all events"
- start-stop-daemon --start --stdout "${udevmonitor_log}" \
- --make-pidfile --pidfile "${udevmonitor_pid}" \
- --background --exec /sbin/udevadm -- monitor ${udev_monitor_opts}
-}
-
-stop_udevmonitor()
-{
- yesno "${udev_monitor:-no}" || return 0
-
- if yesno "${udev_monitor_keep_running:-no}"; then
- ewarn "udev: udevmonitor is still running and writing into ${udevmonitor_log}"
- else
- einfo "udev: Stopping udevmonitor: Log is in ${udevmonitor_log}"
- start-stop-daemon --stop --pidfile "${udevmonitor_pid}" --exec /sbin/udevadm
- fi
-}
-
-display_hotplugged_services() {
- local svcfile= svc= services=
- for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
- svc="${svcfile##*/}"
- [ -x "${svcfile}" ] || continue
-
- services="${services} ${svc}"
- done
- [ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}"
-}
-
-check_persistent_net()
-{
- # check if there are problems with persistent-net
- local syspath= devs= problem=false
- for syspath in /sys/class/net/*_rename*; do
- if [ -d "${syspath}" ]; then
- devs="${devs} ${syspath##*/}"
- problem=true
- fi
- done
-
- ${problem} || return 0
-
- eerror "UDEV: Your system has a problem assigning persistent names"
- eerror "to these network interfaces: ${devs}"
-
- einfo "Checking persistent-net rules:"
- # the sed-expression lists all duplicate lines
- # from the input, like "uniq -d" does, but uniq
- # is installed into /usr/bin and not available at boot.
- dups=$(
- RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'
- . /lib/udev/rule_generator.functions
- find_all_rules 'NAME=' '.*' | \
- tr ' ' '\n' | \
- sort | \
- sed '$!N; s/^\(.*\)\n\1$/\1/; t; D'
- )
- if [ -n "${dups}" ]; then
- ewarn "The rules create multiple entries assigning these names:"
- eindent
- ewarn "${dups}"
- eoutdent
- else
- ewarn "Found no duplicate names in persistent-net rules,"
- ewarn "there must be some other problem!"
- fi
- return 1
-}
-
-check_udev_works()
-{
- # should exist on every system, else udev failed
- if [ ! -e /dev/zero ]; then
- eerror "Assuming udev failed somewhere, as /dev/zero does not exist."
- return 1
- fi
- return 0
-}
-
-start()
-{
- # do not run this on old baselayout where udev-addon gets loaded
- if [ ! -f /etc/init.d/sysfs ]; then
- eerror "The $SVCNAME init-script is written for baselayout-2!"
- eerror "Please do not use it with baselayout-1!".
- return 1
- fi
-
- check_openrc_net
- _start
-
- display_hotplugged_services
-
- return 0
-}
-
-_start()
-{
- if [ ! -e /etc/runlevels/${RC_DEFAULTLEVEL:-default}/udev-postmount ]; then
- ewarn "You should add udev-postmount service to your default runlevel."
- fi
-
- root_link
- rules_disable_switch 75-persistent-net-generator.rules "${persistent_net_disable:-no}"
- rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disable:-no}
-
- disable_hotplug_agent
- start_udevd || cleanup
- start_udevmonitor
- populate_dev || cleanup
-
- check_persistent_net
-
- check_udev_works || cleanup
- stop_udevmonitor
-
- return 0
-}
-
-stop() {
- ebegin "Stopping udevd"
- start-stop-daemon --stop --exec /sbin/udevd
- eend $?
-}
-
diff --git a/sys-fs/udev/files/udev-146-printer-usb_device-permission.diff b/sys-fs/udev/files/udev-146-printer-usb_device-permission.diff
deleted file mode 100644
index 5e6c2d0261d4..000000000000
--- a/sys-fs/udev/files/udev-146-printer-usb_device-permission.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-commit f61e72d8973cf9d889a4f1233150870085c0b3e1
-Author: Martin Pitt <martin.pitt@ubuntu.com>
-Date: Fri Sep 4 17:12:28 2009 +0200
-
- make raw USB printer devices accessible for lp
-
- Starting from version 1.4, cups now uses libusb and printer USB devices instead
- of the usblp generated /dev/usb/lpX ones. In order to not require the cups USB
- backend to run as root now, change raw USB printer devices to be root:lp 0660,
- similar to usblpX devices.
-
- This might also enable the hplip backend to not run as root, since this has
- always used raw device nodes.
-
- https://launchpad.net/bugs/420015
-
-diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
-index 2507420..4e9a737 100644
---- a/rules/rules.d/50-udev-default.rules
-+++ b/rules/rules.d/50-udev-default.rules
-@@ -60,6 +60,10 @@ SUBSYSTEM=="ppdev", GROUP="lp"
- SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
- KERNEL=="lp[0-9]*", GROUP="lp"
- KERNEL=="irlpt[0-9]*", GROUP="lp"
-+# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to
-+# the ones from the old usblp kernel module
-+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
-+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"
-
- # block
- SUBSYSTEM=="block", GROUP="disk"
diff --git a/sys-fs/udev/files/udev-159-path_id.patch b/sys-fs/udev/files/udev-159-path_id.patch
deleted file mode 100644
index ea5570d0c7f5..000000000000
--- a/sys-fs/udev/files/udev-159-path_id.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 847b4f84c671e98f29f22d8e3e0d70a231d71a7b
-Author: Harald Hoyer <harald@redhat.com>
-Date: Wed Jul 7 10:57:09 2010 +0200
-
- 60-persistent-storage-tape: s/path_id.sh/path_id/
-
-diff --git a/rules/rules.d/60-persistent-storage-tape.rules b/rules/rules.d/60-persistent-storage-tape.rules
-index 338da5f..d9df35a 100644
---- a/rules/rules.d/60-persistent-storage-tape.rules
-+++ b/rules/rules.d/60-persistent-storage-tape.rules
-@@ -17,7 +17,7 @@ KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$en
- KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
-
- # by-path (parent device path)
--KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id.sh %p"
-+KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p"
- KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}"
- KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}"
-
diff --git a/sys-fs/udev/files/udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch b/sys-fs/udev/files/udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch
deleted file mode 100644
index 2dc26d7db1ab..000000000000
--- a/sys-fs/udev/files/udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-commit b367a1c9d8a0f565effcdb45f86a365be1c8b622
-Author: Jan Drzewiecki <jonie@icpnet.pl>
-Date: Fri Aug 13 07:24:29 2010 +0200
-
- cdrom_id: Drop MEDIA_SESSION_NEXT for DVD-RW-RO
-
- Commit cf2205a fixed the media status for fresh DVD-RW in restricted overwrite
- mode, but missed a detail: We should not report the ID_CDROM_MEDIA_SESSION_NEXT
- property either, since in that mode you can never append tracks/sessions; this
- just works in sequential mode.
-
- Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
-
-diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
-index d59991c..f9d6e0b 100644
---- a/extras/cdrom_id/cdrom_id.c
-+++ b/extras/cdrom_id/cdrom_id.c
-@@ -690,8 +690,9 @@ static int cd_media_info(struct udev *udev, int fd)
- }
-
- determined:
-- /* "other" is e. g. DVD-RAM, can't append sessions there either */
-- if ((header[2] & 3) < 2)
-+ /* "other" is e. g. DVD-RAM, can't append sessions there; DVDs in
-+ * restricted overwrite mode can never append, only in sequential mode */
-+ if ((header[2] & 3) < 2 && !cd_media_dvd_rw_ro)
- cd_media_session_next = header[10] << 8 | header[5];
- cd_media_session_count = header[9] << 8 | header[4];
- cd_media_track_count = header[11] << 8 | header[6];
diff --git a/sys-fs/udev/udev-145-r1.ebuild b/sys-fs/udev/udev-145-r1.ebuild
deleted file mode 100644
index 5a07867d88b5..000000000000
--- a/sys-fs/udev/udev-145-r1.ebuild
+++ /dev/null
@@ -1,537 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-145-r1.ebuild,v 1.10 2010/03/15 21:43:05 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-if [[ ${PV} == "9999" ]]; then
- # for documentation processing with xsltproc
- DEPEND="${DEPEND}
- app-text/docbook-xsl-stylesheets
- app-text/docbook-xml-dtd
- doc? ( dev-util/gtk-doc )"
- IUSE="${IUSE} -doc"
-fi
-
-# required kernel options
-CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- KV_PATCH_min=25
- KV_PATCH_reliable=25
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != f63e6fe591aa749131906d75a2a3cb01 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- if use doc; then
- gtkdocize --copy
- else
- epatch "${FILESDIR}/udev-9999-disable-doc.diff"
- fi
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/136"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-110 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind)
- coldplug_stale=""
- if [[ -f ${ROOT}/etc/init.d/coldplug ]]
- then
- coldplug_stale="1"
- 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=$?
-}
-
-fix_old_persistent_net_rules() {
- local rules=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- restart_udevd
-
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- if [[ ${coldplug_stale} == 1 ]]
- then
- ewarn "A stale coldplug init script found. You should run:"
- ewarn
- ewarn " rc-update del coldplug"
- ewarn " rm -f /etc/init.d/coldplug"
- ewarn
- ewarn "udev now provides its own coldplug functionality."
- fi
-
- # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${ROOT}/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 "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago
- if [[ -d ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-145-r2.ebuild b/sys-fs/udev/udev-145-r2.ebuild
deleted file mode 100644
index aea7ddba9dcb..000000000000
--- a/sys-fs/udev/udev-145-r2.ebuild
+++ /dev/null
@@ -1,544 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-145-r2.ebuild,v 1.5 2010/03/15 21:43:05 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-PATCHSET=${P}-gentoo-patchset
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != 2b3b6328ab175f89cd6b80a43707b015 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/136"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind)
- coldplug_stale=""
- if [[ -f ${ROOT}/etc/init.d/coldplug ]]
- then
- coldplug_stale="1"
- 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=$?
-}
-
-fix_old_persistent_net_rules() {
- local rules=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- restart_udevd
-
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- if [[ ${coldplug_stale} == 1 ]]
- then
- ewarn "A stale coldplug init script found. You should run:"
- ewarn
- ewarn " rc-update del coldplug"
- ewarn " rm -f /etc/init.d/coldplug"
- ewarn
- ewarn "udev now provides its own coldplug functionality."
- fi
-
- # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${ROOT}/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 "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago
- if [[ -d ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-145-r3.ebuild b/sys-fs/udev/udev-145-r3.ebuild
deleted file mode 100644
index 0e1f06aa92cb..000000000000
--- a/sys-fs/udev/udev-145-r3.ebuild
+++ /dev/null
@@ -1,544 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-145-r3.ebuild,v 1.4 2010/03/15 21:43:05 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-PATCHSET=${P}-gentoo-patchset-v2
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != 04cb32870a7b1bc8e3de323eb7424e43 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/136"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind)
- coldplug_stale=""
- if [[ -f ${ROOT}/etc/init.d/coldplug ]]
- then
- coldplug_stale="1"
- 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=$?
-}
-
-fix_old_persistent_net_rules() {
- local rules=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- restart_udevd
-
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- if [[ ${coldplug_stale} == 1 ]]
- then
- ewarn "A stale coldplug init script found. You should run:"
- ewarn
- ewarn " rc-update del coldplug"
- ewarn " rm -f /etc/init.d/coldplug"
- ewarn
- ewarn "udev now provides its own coldplug functionality."
- fi
-
- # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${ROOT}/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 "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago
- if [[ -d ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-145.ebuild b/sys-fs/udev/udev-145.ebuild
deleted file mode 100644
index e5d982b0a9e6..000000000000
--- a/sys-fs/udev/udev-145.ebuild
+++ /dev/null
@@ -1,488 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-145.ebuild,v 1.7 2010/03/15 21:43:05 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs versionator
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/device-mapper-1.02.19-r1
- >=sys-apps/baselayout-1.12.5"
-
-if [[ ${PV} == "9999" ]]; then
- # for documentation processing with xsltproc
- DEPEND="${DEPEND}
- app-text/docbook-xsl-stylesheets
- app-text/docbook-xml-dtd
- doc? ( dev-util/gtk-doc )"
- IUSE="${IUSE} -doc"
-fi
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-pkg_setup() {
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # comparing kernel version without linux-info.eclass to not pull
- # virtual/linux-sources
-
- local KV=$(uname -r)
- local KV_MAJOR=$(get_major_version ${KV})
- local KV_MINOR=$(get_version_component_range 2 ${KV})
- local KV_MICRO=$(get_version_component_range 3 ${KV})
-
- local KV_min_micro=25 KV_min_micro_reliable=25
- KV_min=2.6.${KV_min_micro}
- KV_min_reliable=2.6.${KV_min_micro_reliable}
-
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if [[ ${KV_MICRO} -ge ${KV_min_micro_reliable} ]]; then
- ok=2
- elif [[ ${KV_MICRO} -ge ${KV_min_micro} ]]; then
- ok=1
- fi
- fi
-
- if [[ ${ok} -lt 1 ]]
- then
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- fi
- if [[ ${ok} -lt 2 ]]; then
- ewarn "If you want to use udev reliable you should update"
- ewarn "to at least kernel version ${KV_min_reliable}!"
- ewarn
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != f63e6fe591aa749131906d75a2a3cb01 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- if use doc; then
- gtkdocize --copy
- else
- epatch "${FILESDIR}/udev-9999-disable-doc.diff"
- fi
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/136"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- if [[ "$(get_libdir)" != "lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_min_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-110 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind)
- coldplug_stale=""
- if [[ -f ${ROOT}/etc/init.d/coldplug ]]
- then
- coldplug_stale="1"
- 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=$?
-}
-
-fix_old_persistent_net_rules() {
- local rules=${ROOT}/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() {
- # need to merge to our system
- [[ ${ROOT} = / ]] || 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
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- restart_udevd
-
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- if [[ ${coldplug_stale} == 1 ]]
- then
- ewarn "A stale coldplug init script found. You should run:"
- ewarn
- ewarn " rc-update del coldplug"
- ewarn " rm -f /etc/init.d/coldplug"
- ewarn
- ewarn "udev now provides its own coldplug functionality."
- fi
-
- # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${ROOT}/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 "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago
- if [[ -d ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-146-r2.ebuild b/sys-fs/udev/udev-146-r2.ebuild
deleted file mode 100644
index aba4fb131bb6..000000000000
--- a/sys-fs/udev/udev-146-r2.ebuild
+++ /dev/null
@@ -1,569 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-146-r2.ebuild,v 1.3 2010/03/15 21:43:05 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != d2fdf2614797f525677001d9146509a0 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/147"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-146-r3.ebuild b/sys-fs/udev/udev-146-r3.ebuild
deleted file mode 100644
index c2e17fdf5070..000000000000
--- a/sys-fs/udev/udev-146-r3.ebuild
+++ /dev/null
@@ -1,570 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-146-r3.ebuild,v 1.1 2010/04/20 02:53:14 robbat2 Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != d2fdf2614797f525677001d9146509a0 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/147"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-146.ebuild b/sys-fs/udev/udev-146.ebuild
deleted file mode 100644
index 2e4bce7eff83..000000000000
--- a/sys-fs/udev/udev-146.ebuild
+++ /dev/null
@@ -1,540 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-146.ebuild,v 1.6 2010/03/15 21:43:05 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # allow cups to access usb_device nodes of printers, Bug #285166
- epatch "${FILESDIR}"/udev-146-printer-usb_device-permission.diff
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != c1ad7decce54b92a3bee448fa95783f9 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras)
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/136"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-alsa.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind)
- coldplug_stale=""
- if [[ -f ${ROOT}/etc/init.d/coldplug ]]
- then
- coldplug_stale="1"
- 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=$?
-}
-
-fix_old_persistent_net_rules() {
- local rules=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- restart_udevd
-
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- if [[ ${coldplug_stale} == 1 ]]
- then
- ewarn "A stale coldplug init script found. You should run:"
- ewarn
- ewarn " rc-update del coldplug"
- ewarn " rm -f /etc/init.d/coldplug"
- ewarn
- ewarn "udev now provides its own coldplug functionality."
- fi
-
- # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${ROOT}/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 "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago
- if [[ -d ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-147-r1.ebuild b/sys-fs/udev/udev-147-r1.ebuild
deleted file mode 100644
index 233f886c53bb..000000000000
--- a/sys-fs/udev/udev-147-r1.ebuild
+++ /dev/null
@@ -1,571 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-147-r1.ebuild,v 1.6 2010/07/10 11:47:15 armin76 Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 -sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.7"
-
-DEPEND="${COMMON_DEPEND}
- extras? ( dev-util/gperf )
- >=sys-kernel/linux-headers-2.6.29"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != f38d3e1344588b6e44746097e1dfd149 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/147"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
- cd "${S}"
-
- echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev
- doenvd 20udev
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-150-r1.ebuild b/sys-fs/udev/udev-150-r1.ebuild
deleted file mode 100644
index b092d38fa1c2..000000000000
--- a/sys-fs/udev/udev-150-r1.ebuild
+++ /dev/null
@@ -1,575 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-150-r1.ebuild,v 1.8 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat -extras test"
-
-RESTRICT="test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
-
- # Bug 301667
- epatch "${FILESDIR}"/udev-150-fix-missing-firmware-timeout.diff
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != f9b06078926d497a25be996be9d79fcc ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/147"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
- # without this code, multilib-strict is angry
- if [[ "$(get_libdir)" != "lib" ]]; then
- # check if this code is needed, bug #281338
- if [[ -d "${D}/lib" ]]; then
- # we can not just rename /lib to /lib64, because
- # make install creates /lib64 and /lib
- einfo "Moving lib to $(get_libdir)"
- mkdir -p "${D}/$(get_libdir)"
- mv "${D}"/lib/* "${D}/$(get_libdir)/"
- rmdir "${D}"/lib
- else
- einfo "There is no ${D}/lib, move code can be deleted."
- fi
- fi
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-
- cd docs/writing_udev_rules
- mv index.html writing_udev_rules.html
- dohtml *.html
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-151-r1.ebuild b/sys-fs/udev/udev-151-r1.ebuild
deleted file mode 100644
index 2fd704497b53..000000000000
--- a/sys-fs/udev/udev-151-r1.ebuild
+++ /dev/null
@@ -1,576 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-151-r1.ebuild,v 1.8 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat +old-hd-rules -extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- if [[ -n "${PATCHSET}" ]]; then
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # Bug 301667
- epatch "${FILESDIR}"/udev-150-fix-missing-firmware-timeout.diff
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != 5685cc3878df54845dda5e08d712447a ]]
- then
- echo
- 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 use old-hd-rules; then
- epatch "${FILESDIR}"/udev-151-readd-hd-rules.diff
- fi
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/151"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- if use old-hd-rules; then
- ewarn
- ewarn "old-hd-rules use flag is enabled (by default)."
- ewarn "This adds the removed rules for /dev/hd* devices"
- ewarn "Please migrate to the new libata."
- ewarn "These rules will be removed in the future"
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-151-r2.ebuild b/sys-fs/udev/udev-151-r2.ebuild
deleted file mode 100644
index c5f4726cb53c..000000000000
--- a/sys-fs/udev/udev-151-r2.ebuild
+++ /dev/null
@@ -1,577 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-151-r2.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux +devfs-compat +old-hd-rules -extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- if [[ -n "${PATCHSET}" ]]; then
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # Bug 301667
- epatch "${FILESDIR}"/udev-150-fix-missing-firmware-timeout.diff
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != 5685cc3878df54845dda5e08d712447a ]]
- then
- echo
- 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 use old-hd-rules; then
- epatch "${FILESDIR}"/udev-151-readd-hd-rules.diff
- fi
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/151"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled (by default)."
- ewarn "This enables devfs compatible device names."
- 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 will be removed in the future."
- ewarn "For reference see Bug #269359."
- fi
-
- if use old-hd-rules; then
- ewarn
- ewarn "old-hd-rules use flag is enabled (by default)."
- ewarn "This adds the removed rules for /dev/hd* devices"
- ewarn "Please migrate to the new libata."
- ewarn "These rules will be removed in the future"
- fi
-
- 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"
-}
diff --git a/sys-fs/udev/udev-151-r3.ebuild b/sys-fs/udev/udev-151-r3.ebuild
deleted file mode 100644
index e651f7120374..000000000000
--- a/sys-fs/udev/udev-151-r3.ebuild
+++ /dev/null
@@ -1,584 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-151-r3.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux devfs-compat old-hd-rules -extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- if [[ -n "${PATCHSET}" ]]; then
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # Bug 301667
- epatch "${FILESDIR}"/udev-150-fix-missing-firmware-timeout.diff
-
- if ! use devfs-compat; then
- # see Bug #269359
- epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,packages,gentoo}/*.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} != 5685cc3878df54845dda5e08d712447a ]]
- then
- echo
- 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 use old-hd-rules; then
- epatch "${FILESDIR}"/udev-151-readd-hd-rules.diff
- fi
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/151"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
- doins packages/40-isdn.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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."
-
- if use devfs-compat; then
- ewarn
- ewarn "devfs-compat use flag is enabled."
- ewarn "This enables devfs compatible device names."
- else
- ewarn
- ewarn "This version of udev no longer has devfs-compat enabled"
- fi
- 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 will be removed on the next udev update."
- ewarn "For reference see Bug #269359."
-
- if use old-hd-rules; then
- ewarn
- ewarn "old-hd-rules use flag is enabled"
- ewarn "This adds the removed rules for /dev/hd* devices"
- else
- ewarn
- ewarn "This version of udev no longer has use flag old-hd-rules enabled"
- ewarn "So all special rules for /dev/hd* devices are missing"
- fi
- ewarn "Please migrate to the new libata if you need these rules."
- ewarn "They will be completely removed on the next udev update."
-
- 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"
-}
diff --git a/sys-fs/udev/udev-154.ebuild b/sys-fs/udev/udev-154.ebuild
deleted file mode 100644
index e2e9bba6c4c5..000000000000
--- a/sys-fs/udev/udev-154.ebuild
+++ /dev/null
@@ -1,556 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-154.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # 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,packages,gentoo}/*.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} != b6c2aaa16d1e4d415d67d6a7373ee50a ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/151-r4"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}
diff --git a/sys-fs/udev/udev-156.ebuild b/sys-fs/udev/udev-156.ebuild
deleted file mode 100644
index d9e3bbde2602..000000000000
--- a/sys-fs/udev/udev-156.ebuild
+++ /dev/null
@@ -1,556 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-156.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # 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,packages,gentoo}/*.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} != cd0976a4888819e1c23eb615c88fb750 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/156"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins gentoo/??-*.rules
-
- # Adding arch specific rules
- if [[ -f packages/40-${ARCH}.rules ]]
- then
- doins "packages/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}
diff --git a/sys-fs/udev/udev-157.ebuild b/sys-fs/udev/udev-157.ebuild
deleted file mode 100644
index 2f46918eecbf..000000000000
--- a/sys-fs/udev/udev-157.ebuild
+++ /dev/null
@@ -1,559 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-157.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # 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} != 31f446c8ec2538b281d798afcdcc3f68 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/156"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins "${scriptdir}"/??-*.rules
-
- # 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}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}
diff --git a/sys-fs/udev/udev-158.ebuild b/sys-fs/udev/udev-158.ebuild
deleted file mode 100644
index 56799b70b481..000000000000
--- a/sys-fs/udev/udev-158.ebuild
+++ /dev/null
@@ -1,559 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-158.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # 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} != 61eda71c840620ff70386715d8010438 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/156"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins "${scriptdir}"/??-*.rules
-
- # 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}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}
diff --git a/sys-fs/udev/udev-159.ebuild b/sys-fs/udev/udev-159.ebuild
deleted file mode 100644
index 3aed96b7f38a..000000000000
--- a/sys-fs/udev/udev-159.ebuild
+++ /dev/null
@@ -1,561 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-159.ebuild,v 1.6 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- epatch "${FILESDIR}/udev-159-path_id.patch"
-
- # 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} != 61eda71c840620ff70386715d8010438 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/156"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins "${scriptdir}"/??-*.rules
-
- # 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}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}
diff --git a/sys-fs/udev/udev-160.ebuild b/sys-fs/udev/udev-160.ebuild
deleted file mode 100644
index 89d0426a4dbc..000000000000
--- a/sys-fs/udev/udev-160.ebuild
+++ /dev/null
@@ -1,559 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-160.ebuild,v 1.5 2010/08/24 18:28:32 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
-
- # 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} != 61eda71c840620ff70386715d8010438 ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/156"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins "${scriptdir}"/??-*.rules
-
- # 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}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}
diff --git a/sys-fs/udev/udev-161.ebuild b/sys-fs/udev/udev-161.ebuild
deleted file mode 100644
index 550c405b5467..000000000000
--- a/sys-fs/udev/udev-161.ebuild
+++ /dev/null
@@ -1,561 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-161.ebuild,v 1.1 2010/08/24 18:41:29 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info
-
-#PATCHSET=${P}-gentoo-patchset-v1
-scriptversion=161
-
-if [[ ${PV} == "9999" ]]; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-151-testsys.tar.bz2 )"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="selinux extras test"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? (
- sys-apps/acl
- >=sys-apps/usbutils-0.82
- virtual/libusb:0
- sys-apps/pciutils
- dev-libs/glib:2
- )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.9"
-
-DEPEND="${COMMON_DEPEND}
- extras? (
- dev-util/gperf
- dev-util/pkgconfig
- )
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.29
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-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"
-
-# We need the lib/rcscripts/addon support
-PROVIDE="virtual/dev-manager"
-
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- udev_libexec_dir="/$(get_libdir)/udev"
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=25
- KV_PATCH_reliable=27
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- 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."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- 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
- ebeep
- fi
-}
-
-sed_libexec_dir() {
- sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@"
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- unpack ${A}
-
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- cd "${S}"
-
- # patches go here...
- epatch "${FILESDIR}/udev-161-cdrom_id_Drop_MEDIA_SESSION_NEXT_for_DVD-RW-RO.patch"
-
- # 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} != 4c325a57c0624e240c2180744385fa3a ]]
- then
- echo
- 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
-
- sed_libexec_dir \
- rules/rules.d/50-udev-default.rules \
- rules/rules.d/78-sound-card.rules \
- extras/rule_generator/write_*_rules \
- || die "sed failed"
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir="${udev_libexec_dir}" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable extras) \
- --disable-introspection
- # we don't have gobject-introspection in portage tree
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- local scriptdir="${FILESDIR}/${scriptversion}"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto "${udev_libexec_dir}"
- newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly"
- newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \
- || die "move_tmp_persistent_rules.sh not installed properly"
- newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \
- || die "write_root_link_rule not installed properly"
-
- doexe "${scriptdir}"/shell-compat-KV.sh \
- || die "shell-compat.sh not installed properly"
- doexe "${scriptdir}"/shell-compat-addon.sh \
- || die "shell-compat.sh not installed properly"
-
- keepdir "${udev_libexec_dir}"/state
- keepdir "${udev_libexec_dir}"/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto "${udev_libexec_dir}"/rules.d/
-
- # Our rules files
- doins "${scriptdir}"/??-*.rules
-
- # 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}"
-
- # our udev hooks into the rc system
- insinto /$(get_libdir)/rcscripts/addons
- doins "${scriptdir}"/udev-start.sh \
- || die "udev-start.sh not installed properly"
- doins "${scriptdir}"/udev-stop.sh \
- || die "udev-stop.sh not installed properly"
-
- local init
- # udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984
- for init in udev udev-mount udev-dev-tarball udev-postmount; do
- newinitd "${scriptdir}/${init}.initd" "${init}" \
- || die "initscript ${init} not installed properly"
- done
-
- # insert minimum kernel versions
- sed -e "s/%KV_MIN%/${KV_min}/" \
- -e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \
- -i "${D}"/etc/init.d/udev-mount
-
- # config file for init-script and start-addon
- newconfd "${scriptdir}/udev.confd" udev \
- || die "config file not installed properly"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # convert /lib/udev to real used dir
- sed_libexec_dir \
- "${D}/$(get_libdir)"/rcscripts/addons/*.sh \
- "${D}/${udev_libexec_dir}"/write_root_link_rule \
- "${D}"/etc/conf.d/udev \
- "${D}"/etc/init.d/udev* \
- "${D}"/etc/modprobe.d/*
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use extras; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/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 ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/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=${ROOT}/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
- [[ ${ROOT} = / ]] || 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"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- # FIXME: we may need some code that detects if this is a system bootstrap
- # and auto-enables udev then
- #
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- local enable_postmount=0
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1
-
- if [[ ${enable_postmount} = 1 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/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
-
- 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 ${ROOT}/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 "${ROOT}"/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 ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/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 "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/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 ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in bug #275974, added 2009/09/05
- ewarn
- ewarn "If after the udev update removable devices or CD/DVD drives"
- ewarn "stop working, try re-emerging HAL before filling a bug report"
-
- # 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 ${ROOT}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"
-}