summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-04-20 02:53:14 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-04-20 02:53:14 +0000
commitb9dc3eb0daf43e39ecfbf56e9d7e1c3d81b161f5 (patch)
treec35823b36bc295e299725c340a43a0f1ad7148ac /sys-fs
parentVersion bump. (diff)
downloadhistorical-b9dc3eb0daf43e39ecfbf56e9d7e1c3d81b161f5.tar.gz
historical-b9dc3eb0daf43e39ecfbf56e9d7e1c3d81b161f5.tar.bz2
historical-b9dc3eb0daf43e39ecfbf56e9d7e1c3d81b161f5.zip
Alpha cannot use the 151-r2 version due to non-availability of newer kernels, so provide an older ebuild with static libraries for lvm2 bumping.
Package-Manager: portage-2.2_rc67/cvs/Linux i686
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/lvm2/Manifest5
-rw-r--r--sys-fs/udev/ChangeLog9
-rw-r--r--sys-fs/udev/Manifest4
-rw-r--r--sys-fs/udev/udev-146-r3.ebuild570
4 files changed, 585 insertions, 3 deletions
diff --git a/sys-fs/lvm2/Manifest b/sys-fs/lvm2/Manifest
index 5cd780f2e6f7..f3ec44695620 100644
--- a/sys-fs/lvm2/Manifest
+++ b/sys-fs/lvm2/Manifest
@@ -33,6 +33,7 @@ AUX lvm2-2.02.56-always-make-static-libdm.patch 1418 RMD160 f5102745ad3ee4613a21
AUX lvm2-2.02.56-device-mapper-export-format.patch 10774 RMD160 0e7c4d0b955e73663941f707315f18cfdccdb343 SHA1 e5247915cb3a6c49b3a5b04cb16e3c97531e51b2 SHA256 dd3cd1417bd8eef8da65d993c0178861265c14a166edde4f83c4ea18e7fa71c9
AUX lvm2-2.02.56-dmeventd.patch 539 RMD160 8fbdf28707ae18ac8e2f45aabfbf10b8b89aa76b SHA1 6e61c3aa6be93b9cc90504e70959d02d0a165fdd SHA256 c70b96d7c3d9fbd78d00c8711a4243d1a874745dcb175b63620015301ee99c10
AUX lvm2-2.02.56-lvm2create_initrd.patch 2032 RMD160 5e9ff47cb85829c41d9876048ee4be4e26554973 SHA1 bd83079490b19efca6846435b92b891aa1ff764a SHA256 b892d0544e05350e78ea400c16e6fd3657671d9bdf50bfae70505fd79bdda081
+AUX lvm2-2.02.63-always-make-static-libdm.patch 1420 RMD160 16079ddc546aa6dc6a21bdb3e7f81df7342b93f8 SHA1 3cd5011ec1177aee12d7d2d0768a5874bdf021ad SHA256 1c498b5efce77ed16bbbfcd9e0ec6da404a9c70c7ad0959ed7b60733adfcfc21
AUX lvm2-start.sh 1025 RMD160 fa27385e4640d59c33f2ca42db9d38f80def3977 SHA1 83a86ff292192b3f62e4686b70bbbfcc39158b53 SHA256 8c7da13b6326a383888110b25f53a4902cbec7d0dace274b9c5f1d6b0a775039
AUX lvm2-start.sh-2.02.28-r2 1180 RMD160 3ec85899a19c56d4d49e4654e1b05f53bc7d9c93 SHA1 80fce53cc1925990fbb103e57314b3c1740de6ed SHA256 a891855ed04d4c59f17fc0b19dc61813a4ca3cc183166867606d92cb58498460
AUX lvm2-start.sh-2.02.49-r1 1200 RMD160 b88e37e7e228fecdedf359c1132723077a3d4c94 SHA1 85eb83a83c598b3ea405ec4c597a9c77364e7fb4 SHA256 94d15b5dbeabb275b4d91b284b3113cd812b7e7c90ec3018693803b3e91d9535
@@ -53,6 +54,7 @@ DIST LVM2.2.02.48.tgz 762435 RMD160 2ae5061c408db553f8b8af954552916c3d768130 SHA
DIST LVM2.2.02.49.tgz 766327 RMD160 e5ef6d165e37c3d2534c612bbfd861f114e6e6aa SHA1 178eecfaeaef2dea67c76c0878be1e69b3a6ea37 SHA256 718f082f51bdd6474bb61a743acef269f2c77b8e2d19e7ddc463f2dd91fb9dd7
DIST LVM2.2.02.51.tgz 790458 RMD160 7ca55e29c6d780b4b052b07eeabbd731a034721f SHA1 307281dfced6b5ab5904761a41c6a6775a511172 SHA256 7d88ebb1e74e46617f226c1ca987e337aa30c3f637c7a502e8f355096f36a4df
DIST LVM2.2.02.56.tgz 822318 RMD160 b9bb04df127fe58d2b483035b2c17e2b049695d3 SHA1 1a70cb4d4fe7566aace9d38ee18413c79e91b684 SHA256 9c96ef2cb4a9606cb6a4af795cbb5503b04d676179b0c70a9883593992622f43
+DIST LVM2.2.02.63.tgz 862513 RMD160 49f005520ec92013d8dcb246e82236429aa09869 SHA1 0333d51b33a73cd2f38854557e72577a0523b7c2 SHA256 e41a163ba97de66e0825188311b1f0b4b181943a16e0a04971653baf99ad3036
EBUILD lvm2-2.01.13.ebuild 1470 RMD160 125ecf8a32609d67876e16afa155aa256bdc22ee SHA1 95c96a2158c40bc325da6eeaded050e9e426a0e5 SHA256 b3ee4c923da035604cdf69673c12824c7b74a1716550496ce38d9281d39fa6ef
EBUILD lvm2-2.02.33-r1.ebuild 4538 RMD160 c754ec3bd1ed9a4e405f72966fef3ec0736c824b SHA1 ef5a5926d943a94f055a6326817e301295e20c48 SHA256 ae0289f37158c00ef8b5c10de351452ed55d7dfa8e9bbf40fa54659adefc947c
EBUILD lvm2-2.02.33.ebuild 4509 RMD160 c71985cd049d14ae22eea86b2ba742478a2683c1 SHA1 44dbc8c1c4c3f6c9f5e05fd00393233df6309ded SHA256 8fc4a8ae48d6ae2683cd58edd7c978b2b2e30738b3a2f8d747e045be3e7a21c9
@@ -78,5 +80,6 @@ EBUILD lvm2-2.02.56-r1.ebuild 6515 RMD160 465bc0946b640a75a91cf859a13ee191f55b15
EBUILD lvm2-2.02.56-r2.ebuild 6817 RMD160 3af9e5eeba6494c62a7d96e741c617a5694b0433 SHA1 b203e97bb92d83ac808f2cecd21d11f039d2c64f SHA256 24f7f8d079b9cd8b74a6b4acbdb2ee29732f2feadbcfefb00d906e9e3d73dd3a
EBUILD lvm2-2.02.56-r3.ebuild 6832 RMD160 f37db7d87ba735470f965654d7f15dea0373c027 SHA1 e8f30604b3ac337e974dbea2f0994b9ceff65185 SHA256 6f73480ae96bb3195b0ce8a349e86ac8a15697bc1f80b4742be87ae0645b0b00
EBUILD lvm2-2.02.56.ebuild 6486 RMD160 3a14e38c19adf2f87e03cf092cb921817e43a029 SHA1 e25b584d20c400c2ad98e0547cdfe907f22ce5ba SHA256 78b5d0ef4ac096bda9926445980582e08ee9b48343720aa5671912c218234a20
-MISC ChangeLog 34994 RMD160 80e426785decbc7a43d13267cc90d4d3dc019e44 SHA1 e46ac6e8700b1e408311364a777648d743da4aeb SHA256 1171ae732cc4d6d92378ad2cce9167f2f3404640bf16e742e2bd5eff8aceab10
+EBUILD lvm2-2.02.63.ebuild 7093 RMD160 daf6b145e5269dbfa401303f51baf6f646185239 SHA1 4f98a64c73788c20a8ffc055bfa306dffb14c7b4 SHA256 809702d01c21629a67e29a636175b8318004fc0d1084071bd9646177d49af62f
+MISC ChangeLog 35356 RMD160 2815ea73b4f561621c98f51f3b1f69b90e78a9f5 SHA1 485ecd883a75cb51609b3bb6578c15f942abfe1c SHA256 841597a228c70e787bdedc5fee8f3eb9e7147bb4bfa850cdc3d75c4ef51f8b57
MISC metadata.xml 792 RMD160 f60db9169ee273ca2f97fa5e69d4e5329e988164 SHA1 42f85f30477c65a164a11e172db7e250f442dca5 SHA256 87ced5a3a6102985f7c2a619dd52f65e62ae916f8921c8e7115a25452cd44b7f
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index 433b53272b45..785b0fd648b0 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,13 @@
# 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.535 2010/04/19 20:57:35 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.536 2010/04/20 02:53:14 robbat2 Exp $
+
+*udev-146-r3 (20 Apr 2010)
+
+ 20 Apr 2010; Robin H. Johnson <robbat2@gentoo.org> +udev-146-r3.ebuild:
+ Alpha cannot use the 151-r2 version due to non-availability of newer
+ kernels, so provide an older ebuild with static libraries for lvm2
+ bumping.
*udev-151-r2 (19 Apr 2010)
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
index df758c3d4da3..ecc80e59a9f7 100644
--- a/sys-fs/udev/Manifest
+++ b/sys-fs/udev/Manifest
@@ -92,6 +92,7 @@ EBUILD udev-145-r3.ebuild 15431 RMD160 1c6a9f484edc938a2c0c96194e44910f29172694
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 16422 RMD160 c81a082577eda702f96c99d5ad361dbeaa6ca026 SHA1 47cab27021900f355df160b92bb7374fe844940c SHA256 0ee4713d3258e2ef4aa3ed1ec60475dbc34991f9ef01f171abb7592d3771b91c
EBUILD udev-149.ebuild 16538 RMD160 625ea7fe49636171d830b905b5ee3fe0bf1f3f53 SHA1 32d388c29e4fec78462d1d31e82f96f922d934cf SHA256 f659e494e89265530cd3df6a497416a6c12fad7c0aab7710eb548fa06f1f7e0a
@@ -99,5 +100,6 @@ EBUILD udev-150-r1.ebuild 16447 RMD160 cd7e520e7ce68880131ae9e2c2b96e474a644e30
EBUILD udev-151-r1.ebuild 16517 RMD160 b06bf2260cfce1abb21ff51084089f97bae3ac18 SHA1 37c0f273332c1ff60d0627f89421d8261566d043 SHA256 de7001c630ebdb01337ad3eb8d7b51c996c95b8ac4834b8e407ba4dc14dfc5b6
EBUILD udev-151-r2.ebuild 16540 RMD160 361b757db87f7ec32c1a899367bad19047d6c41b SHA1 491aa602e39de9fcc5a28a29e01e0fc913dc493b SHA256 57bde049b67f5cbf36698cf4b50dc8d45670f52d759e7d228b52a24af463e6b4
EBUILD udev-9999.ebuild 16127 RMD160 c73375250a7ad547664ed0610d475472588955a8 SHA1 0cbe1ca95241ed94fb56889763124f0879f5d909 SHA256 79e3ff156f298092cf2a5310de15b9dc386f3ada23256dee773bf1e69f043b80
-MISC ChangeLog 108903 RMD160 c4c6c6489cc25a14a9d5ffb8260fdc7edee2d95f SHA1 d18be7ee5d6a23492c0006c661e60e1f9f949e8b SHA256 efd951ea4ce7324283b35590c3f38f4e7f79f68855fda06f075b38cc87e50f10
+MISC ChangeLog 109157 RMD160 52a6b11cebfe1155082489b9ebb327dd7ccb5ec8 SHA1 d3077da020f627f26dfac2f4d431d1bf319a5069 SHA256 a74491f3bc728124a1ec344531dcd58dc926a2a6d6c6d87ec3a83f5847e9a181
MISC metadata.xml 502 RMD160 f353faee03dd5920d1f7d65c123d93e018c7be53 SHA1 02c5eb9fd660e69127fa84487e0d70b85ee1d3cc SHA256 ca6a239a7be7949fdf1461eb524ca9234a0fd2aee9fc7eeb758a2347b6031664
+MISC udev-146-r3.ebuild.orig 16334 RMD160 b87ebbecb3a5f01945861f06593458b7a2c77957 SHA1 ede126aed84f9f86ffa4a82e0a4ad658b3122ac9 SHA256 a05afc60fcb176e62e42b9e0cfd100112600281c2bad96f5aa9ecc3be89d2f73
diff --git a/sys-fs/udev/udev-146-r3.ebuild b/sys-fs/udev/udev-146-r3.ebuild
new file mode 100644
index 000000000000..c2e17fdf5070
--- /dev/null
+++ b/sys-fs/udev/udev-146-r3.ebuild
@@ -0,0 +1,570 @@
+# 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"
+}