diff options
author | William Hubbs <williamh@gentoo.org> | 2013-05-07 03:21:24 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2013-05-07 03:21:24 +0000 |
commit | b43419cd55175f37d98d1142b2d39f49b5913e49 (patch) | |
tree | 5484c28f9a5466eee7acf20bdb46bec0243da4ff /sys-fs | |
parent | Bump (diff) | |
download | historical-b43419cd55175f37d98d1142b2d39f49b5913e49.tar.gz historical-b43419cd55175f37d98d1142b2d39f49b5913e49.tar.bz2 historical-b43419cd55175f37d98d1142b2d39f49b5913e49.zip |
verssion bump
Package-Manager: portage-2.2.0_alpha174/cvs/Linux i686
Manifest-Sign-Key: 0x30C46538
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/udev/ChangeLog | 7 | ||||
-rw-r--r-- | sys-fs/udev/Manifest | 15 | ||||
-rw-r--r-- | sys-fs/udev/udev-203.ebuild | 463 |
3 files changed, 476 insertions, 9 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog index e27ad6e839a3..cc29faa2c488 100644 --- a/sys-fs/udev/ChangeLog +++ b/sys-fs/udev/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-fs/udev # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.911 2013/04/27 11:10:43 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.912 2013/05/07 03:21:12 williamh Exp $ + +*udev-203 (07 May 2013) + + 07 May 2013; William Hubbs <williamh@gentoo.org> +udev-203.ebuild: + version bump 27 Apr 2013; Samuli Suominen <ssuominen@gentoo.org> udev-200.ebuild, udev-202.ebuild, udev-9999.ebuild: diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest index 15cdad3b779c..50743f456c7b 100644 --- a/sys-fs/udev/Manifest +++ b/sys-fs/udev/Manifest @@ -5,14 +5,17 @@ AUX 80-net-name-slot.rules 1820 SHA256 f958d54247f84cdbac3e1b77261d6bcf7c630343e DIST systemd-197.tar.xz 2054644 SHA256 e6857ea21ae24d7056e7b0f4c2aaaba73b8bf57025b8949c0a8af0c1bc9774b5 SHA512 df158f85dee4c38dc2ff305bc03eee3b71d77eb683ab2739549282f7d552af4d2a247f52241f68e1b7c88c668bce93531986a39937a99cac401791ec95916769 WHIRLPOOL 027fc6aa5972988173721b120b8c1f371bc02d3066e04ea0923d6cc70778a3381f600a865aa136b5789755fbd5358e97304da265f8937d789a28b33cc778df46 DIST systemd-200.tar.xz 2109864 SHA256 9a08baa8fa5c48f0aab683b2f771e4be75c3c852afc45e5cb4df06428ac8c217 SHA512 6ad440f91dfa5a739a29d07c4144a2faad627a523c4f893656693cdfbdf2a6048f84d96e06ebe805ec18d04e5a1760c9efdcec738654d006a348c0385a983833 WHIRLPOOL 7969f2410aad42c60ba5b979727f5e90be62a5826aabfeb3103b8284115120a5c8c944d0631eabff719dfb84a4096b6eebe8e6dc3718ee47a3672dc1089be371 DIST systemd-202.tar.xz 2149860 SHA256 8c43073252a52eb9f9ab9bd698be0192bcb2175ba5daba6057250083dd64e059 SHA512 34a6a8a6c0ac6c0a2c9ea44a11a3f732fcf3e36e2433bf98997df11e6890b26b2c4e526edfa0a1893ef460ad75191b230c60bf761e5ae99d5339c8df55f139da WHIRLPOOL 0045a2365dbd2e7732d12cacfabf76744534916f7d5aef1fa6e88b48755acf9284e5df4c66eeb6d5c42477d80453a044989a916917fb2263f405439471fa97a8 +DIST systemd-203.tar.xz 2185488 SHA256 61b13e4dbce2156452bf85f126f5d540ee259cbcd6846f03d4284e7df3b0fb1d SHA512 cc7f4083bba5b92abb498bb3bc1d7c7a221ce885216b75bfe5a77e4a12cd1f9aa2317cf1685b07158189ce7f63c429758aa42466118efd60b3a6274381df7d41 WHIRLPOOL 87653c9f7760d32995bdb3c8479d9fb96b41927801111c990f1534669c0953f91b62e77bcfad5b6e89b28a6c26ce1fe742ebc0f1a02329c7f55f4904e0a49012 DIST udev-197-patches-5.tar.bz2 4009 SHA256 bc497ec33de05cceb40ad23f5c64965438c747cfce5d6d26dd59e0866764da9b SHA512 5f7529c49bea5f1779dfd6e12e792c53f22a20655257e92d23b142f051bacf01ebea07ad2fd9c7c4c33be65f3fccd91024864412dbd1c707710b661aed03debd WHIRLPOOL 0ff7acf7d10202d86576713d4050ce788fc01135e7cf69b71428009b817c1e39c8f097c744dc7ecf88f411b8705fbadf82bcdd9f109744032093ce4045f05f43 DIST udev-200-patches-1.tar.xz 1712 SHA256 8e1ca63b27a4db7a6d3d76cb700ff88a48404c471795b1994b791460d59b8c71 SHA512 3aadfe615d7dc48adfc2e43a03a2ce9e008da0672acb7c18f917d8b50e2c2e39b9a7c47c36f5474b0de22716541ac83532b1a8dd08d17af003d0d30ac811881e WHIRLPOOL d49f610aeba4b19f4a337e3533815e8648fb5324cd6926570949f67645d150acfb39833ae62af855ff1bfb5c1791f687b4e14328a9b7de1e65e5e09d0308c4f4 DIST udev-202-patches-1.tar.xz 1284 SHA256 96a028e2039d1ead42dd7949625a2f39a851bc26cc62a3fc944382b25d95e21f SHA512 c6f6f2af6c1899d8e39286cc5e9cc81f6add197ccee5f079be0bb3c20c51eea72d7534a1e9c8686d1325aebfce7f95aace81d0624179961fc97ccd2205db6a4b WHIRLPOOL 844a4a5286d579e0a9de73be676d5a73d49ed3e17725457fe52952152f6390bec491f5ec9e0523507ee17438d6c95b77986048864bef0264f7d06569542a77cf +DIST udev-203-patches-1.tar.xz 1284 SHA256 96a028e2039d1ead42dd7949625a2f39a851bc26cc62a3fc944382b25d95e21f SHA512 c6f6f2af6c1899d8e39286cc5e9cc81f6add197ccee5f079be0bb3c20c51eea72d7534a1e9c8686d1325aebfce7f95aace81d0624179961fc97ccd2205db6a4b WHIRLPOOL 844a4a5286d579e0a9de73be676d5a73d49ed3e17725457fe52952152f6390bec491f5ec9e0523507ee17438d6c95b77986048864bef0264f7d06569542a77cf EBUILD udev-197-r8.ebuild 15057 SHA256 854d75fdb78b73399cb6f096c26cfbc640d8ca077fc62b1c63f5e9f6de62f36c SHA512 9e4da40b18bc6da38ccedc6675558672c1d7d73144fde6204fbaeea5f5080fd985429da0f54429613c98e8e9802505f9ce456874c143e5017e191a3df6875964 WHIRLPOOL 4485b8c1096f016f3bbcc96aa7ad119b3ca44604827afd9f1aa6c23172a66705f67522662539b9626b138a79833082d5979fa795777de25e128b7fd125e5e1e4 EBUILD udev-200.ebuild 13602 SHA256 132c46b1cb398e17d3e9479ba6e6c0a96ccfbceaa867cd0b2c68004db8c52736 SHA512 3b8ebc3f7dc4263188edf2db529f6bb108433cb82c0dc3e35967b1b4ade60fe2a2106f7ab6febece842a8325f00aef13a0fe15d57b26f9b745237351b021924a WHIRLPOOL 742c5092c7fe211aef1d747642ab50f508c4cdfec8263830ccf76b65adb76e50bee5bff727d63c8492b937f3288dbe0749532c8145941b948c9e0d03c2556d23 EBUILD udev-202.ebuild 13551 SHA256 9a255cf06c236c9e8e7adf8df26a1e926524251fe8c7d5a9b60a575a3104719f SHA512 19942dea12bc0ca811445e1f99e75deeb53ec0bbea6be428d51fa43d4e6409410da9757fb6d61d39d394d92a6483a648d9147a38662b7b28e02d2b9dbd04a906 WHIRLPOOL b2b3a475f629fc6a4d3fe50f869829432506835bdebbcb4d440286c6af71a41885e0efa1630824ad2c87bc0fb53ae060f02eb7cd1fa19cc2800b9068c2d0b121 +EBUILD udev-203.ebuild 13480 SHA256 52f798e1c936d1a55f5831ebb969c31b815455f4151a605f7e14d97b7696f5b9 SHA512 4dc7b4385dac70fd59b657a6ea18e5d3a041017a99105bc472921c60b44c0acc5d76a222e8e1e655f1988b85235c188b8873a3610676abd3ca68087fdfb2b319 WHIRLPOOL 1a45f72413a88ca0a0eb13d5dceb2fc53a7de6f8789b689e6f6c943e1d6969129e20bb77b6c82073e60db6d060aae4edf61faedbf32cf259fee4b6ff16815c62 EBUILD udev-9999.ebuild 13553 SHA256 f4590d20da3ab10785999a5e246af7396404f2d13ca6e84763b579168b70a865 SHA512 faf8a24c454f5caa81f52c5c9f4126ef591f9a0c72810dad8ac138e95c94b50848ca6dc0379003ab8ac039609c8e494621f9edb9afc6c8063eb5223fb0e10ab9 WHIRLPOOL 2b276f781ed8d8089778b7bcdfa95a6bfd6d95413a3456ed9bbd216c90f8cc505b1f4dbae2098854683a1cc0e32eaf70afc20b13dc5d12fb8e86d36806ad5df7 -MISC ChangeLog 26173 SHA256 3982d2a0e729cdada697f947b82fd7f18d93cd882948b75f0b82e29bfb462664 SHA512 6ef02972ab44b17e55588d2017a9fcb8ea396c61e3d709adc855edfa87dcda8684d9f0711ae3daf80eae5082bd167cc4d389aee7ec8e549e815db0f1a6b1521c WHIRLPOOL 8bb4385c84835639fee20e711f8d2e427be85187df4e448f8b74394a48bc71ea2f1b693ccc11f0df37579361a3d78fa45c0772ddd0fabd651223427a0ead6dfd +MISC ChangeLog 26282 SHA256 8b81bfc08edad56c99dea66060c988de38683411411143394cb835394964aa2e SHA512 4a09850a2175137206e4068907640a356f1677c1fa3872c8aec03ccc28e3160c87946824874b10e26ad8d9400e1e441a880e2402a5fe1eb35dde03e0594a9283 WHIRLPOOL 3f5d90986948d69c25e7636295853de235ae6f3e0e0c99c3dd26f21ddac628375826000244418d7cc80de2405d5e5b506dddc97e5f7d13655711f0f3d3f49166 MISC ChangeLog-2009 105929 SHA256 94137298457e8d6361cf25e664279d2f9b424f6758814e7ba90e9e2cbf1ea7e5 SHA512 f110e1aa70b11c28263ec5e88973c99426717bce62400c8e9ad860b9e7b67d4aadc053596a9e54faa9435a774c1e8aa0954ae8541760cf061beef26867871548 WHIRLPOOL 215252c0a5c249241813d1bb208da62e68c858e07d1df327cf9175ac739f214813a33c09a64afb4821445e93394dd6d6d500b33e35ed912c1eeccff3365cb7fb MISC ChangeLog-2010 10729 SHA256 44fe328d57b1ba342b328c7a256632e7960976a12e8e9c9791a5fc8ce52c67ca SHA512 a8c371aafe757923e24c023cbf55f3ad084f15f0f038eceaee0dffe58919a17b17bc16cb4b7b1d3f65a19c82b20330a854ec2c801f6d7c7799723ab92d255b49 WHIRLPOOL 3d34e758def921d3d2ed7369392ba5f833fc3a899181c2895fd3da6c9846cf41c9eddbf56de60a52fadd76ffd4c66d92b660b0bc6ca4dddbb2fa49fe0f93cb0b MISC ChangeLog-2011 11721 SHA256 363429a267f251b1ac1c34479e7afa5d7ea13811aa1ba46d7c5489860e542276 SHA512 be7bbaa68602c30ba9cb3e5037ee91ff94c35a0c2ff0b96c5eee14c0e81f8e52232bae44f1d01ff23acedabdb03fdc78f3d11a40cfed2cfef1c45fe2492f7bf4 WHIRLPOOL 3e85eb967f26a8224fd0ed5824009c62271fa5269a6a207da8c8abd7b09cc4308ff847021afcae5a86cedd723a5aeca1ce2f6712a187dfbd36118e097d74510f @@ -21,11 +24,7 @@ MISC metadata.xml 726 SHA256 3a229c7b2f88da5884a450d4744b911ee85fc0cc787ba3ed6e9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQEcBAEBCAAGBQJRe7HaAAoJEEdUh39IaPFN/EIH/0ls4SLUwqPUROoOJ0g7okgW -Xn/rcm2wUh9M96skGusRqxcULsGwkfyLjJ/rLOG2CN2UCUW61CUpBqwxRd783NHu -ZLClVYOTKSWotvPbGUMA40z1IHc9V6eJHh2kD2v3jQYExUU2/d2YoiKmYKPUXuKm -WOEFNOHQJjj+HyAF85pt938pv0Vy8a+SGG9Sge393jhDaWXjONQLQeLFdLW1W4+y -aBgdXD6cvU3i2gAMx2uIlLkr5DeF9skFTTWZkSvIpQ+I6Pfrt5Ab4zDP4NCSI2LU -se7SuhC8lMHcPDkejOT2w2d1yLAVOp+r5ZOEJVKq7nQRkunmGoX/3r3oDe112Hs= -=B3mx +iEYEAREIAAYFAlGIczMACgkQblQW9DDEZTgy+ACdG2koX9BoGbruXUs0DzK/19ko +IXMAnRvKaI6FAIQ84sY+M+SpnZTwzNuK +=D0K+ -----END PGP SIGNATURE----- diff --git a/sys-fs/udev/udev-203.ebuild b/sys-fs/udev/udev-203.ebuild new file mode 100644 index 000000000000..34832bc38f7e --- /dev/null +++ b/sys-fs/udev/udev-203.ebuild @@ -0,0 +1,463 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-203.ebuild,v 1.1 2013/05/07 03:21:12 williamh Exp $ + +EAPI=5 + +# accept4() patch is only in non-live version +if [[ ${PV} = 9999* ]]; then + KV_min=2.6.39 +else + KV_min=2.6.32 +fi + +inherit autotools eutils linux-info multilib toolchain-funcs versionator + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" + inherit git-2 +else + patchset=1 + SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz" + if [[ -n "${patchset}" ]]; then + SRC_URI="${SRC_URI} + http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz" + fi + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +fi + +DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" + +LICENSE="LGPL-2.1 MIT GPL-2" +SLOT="0" +IUSE="acl doc +firmware-loader gudev hwdb introspection keymap +kmod +openrc selinux static-libs" + +RESTRICT="test" + +COMMON_DEPEND=">=sys-apps/util-linux-2.20 + acl? ( sys-apps/acl ) + gudev? ( >=dev-libs/glib-2 ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1 ) + kmod? ( >=sys-apps/kmod-13 ) + selinux? ( >=sys-libs/libselinux-2.1.9 ) + !<sys-libs/glibc-2.11 + !sys-apps/systemd" + +DEPEND="${COMMON_DEPEND} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + >=sys-devel/make-3.82-r4 + virtual/os-headers + virtual/pkgconfig + !<sys-kernel/linux-headers-${KV_min} + doc? ( >=dev-util/gtk-doc-1.18 ) + keymap? ( dev-util/gperf )" + +if [[ ${PV} = 9999* ]]; then + DEPEND="${DEPEND} + dev-util/gperf + >=dev-util/intltool-0.50" +fi + +RDEPEND="${COMMON_DEPEND} + openrc? ( !<sys-apps/openrc-0.9.9 ) + !sys-apps/coldplug + !<sys-fs/lvm2-2.02.97-r1 + !sys-fs/device-mapper + !<sys-fs/udev-init-scripts-22 + !<sys-kernel/dracut-017-r1 + !<sys-kernel/genkernel-3.4.25 + !<sec-policy/selinux-base-2.20120725-r10" + +PDEPEND=">=virtual/udev-197-r1 + hwdb? ( >=sys-apps/hwids-20130326.1[udev] ) + openrc? ( >=sys-fs/udev-init-scripts-25 )" + +S=${WORKDIR}/systemd-${PV} + +#QA_MULTILIB_PATHS="lib/systemd/systemd-udevd" + +udev_check_KV() { + if kernel_is lt ${KV_min//./ }; then + return 1 + fi + return 0 +} + +check_default_rules() { + # Make sure there are no sudden changes to upstream rules file + # (more for my own needs than anything else ...) + local udev_rules_md5=7d3733faee4203fd7c75c3f3c0d55741 + MD5=$(md5sum < "${S}"/rules/50-udev-default.rules) + MD5=${MD5/ -/} + if [[ ${MD5} != ${udev_rules_md5} ]]; then + eerror "50-udev-default.rules has been updated, please validate!" + eerror "md5sum: ${MD5}" + die "50-udev-default.rules has been updated, please validate!" + fi +} + +pkg_setup() { + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL" + + linux-info_pkg_setup + + if ! udev_check_KV; then + eerror "Your kernel version (${KV_FULL}) is too old to run ${P}" + eerror "It must be at least ${KV_min}!" + fi + + KV_FULL_SRC=${KV_FULL} + get_running_version + if ! udev_check_KV; then + eerror + eerror "Your running kernel version (${KV_FULL}) is too old" + eerror "for this version of udev." + eerror "You must upgrade your kernel or downgrade udev." + fi +} + +src_prepare() { + if ! [[ ${PV} = 9999* ]]; then + # secure_getenv() disable for non-glibc systems wrt bug #443030 + if ! [[ $(grep -r secure_getenv * | wc -l) -eq 19 ]]; then + eerror "The line count for secure_getenv() failed, see bug #443030" + die + fi + + # gperf disable if keymaps are not requested wrt bug #452760 + if ! [[ $(grep -i gperf Makefile.am | wc -l) -eq 27 ]]; then + eerror "The line count for gperf references failed, see bug 452760" + die + fi + fi + + # backport some patches + if [[ -n "${patchset}" ]]; then + EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch + fi + + # These are missing from upstream 50-udev-default.rules + cat <<-EOF > "${T}"/40-gentoo.rules + # Gentoo specific usb group + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" + # Keep this for Linux 2.6.32 kernels with accept4() support like .60 wrt #457868 + SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666" + EOF + + # Remove requirements for gettext and intltool wrt bug #443028 + if ! has_version dev-util/intltool && ! [[ ${PV} = 9999* ]]; then + sed -i \ + -e '/INTLTOOL_APPLIED_VERSION=/s:=.*:=0.40.0:' \ + -e '/XML::Parser perl module is required for intltool/s|^|:|' \ + configure || die + eval export INTLTOOL_{EXTRACT,MERGE,UPDATE}=/bin/true + eval export {MSG{FMT,MERGE},XGETTEXT}=/bin/true + fi + + # apply user patches + epatch_user + + # compile with older versions of gcc #451110 + version_is_at_least 4.6 $(gcc-version) || \ + sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h + + # change rules back to group uucp instead of dialout for now wrt #454556 + sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ + -i rules/*.rules \ + || die "failed to change group dialout to uucp" + + if [[ ! -e configure ]]; then + if use doc; then + gtkdocize --docdir docs || die "gtkdocize failed" + else + echo 'EXTRA_DIST =' > docs/gtk-doc.make + fi + eautoreconf + else + check_default_rules + elibtoolize + fi + + if ! use elibc_glibc; then #443030 + echo '#define secure_getenv(x) NULL' >> config.h.in + sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die + fi + + # link udevd(8) and systemd-udevd(8) manpages to systemd-udevd.service(8) manpage + echo '.so systemd-udevd.service.8' > "${T}"/udevd.8 + echo '.so systemd-udevd.service.8' > "${T}"/systemd-udevd.8 +} + +src_configure() { + tc-export CC #463846 + use keymap || export ac_cv_prog_ac_ct_GPERF=true #452760 + + local econf_args + + econf_args=( + ac_cv_search_cap_init= + ac_cv_header_sys_capability_h=yes + DBUS_CFLAGS=' ' + DBUS_LIBS=' ' + --bindir=/bin + --docdir=/usr/share/doc/${PF} + --libdir=/usr/$(get_libdir) + --with-html-dir=/usr/share/doc/${PF}/html + --with-rootprefix= + --with-rootlibdir=/$(get_libdir) + --with-bashcompletiondir=/usr/share/bash-completion + --without-python + --disable-audit + --disable-coredump + --disable-hostnamed + --disable-ima + --disable-libcryptsetup + --disable-localed + --disable-logind + --disable-myhostname + --disable-nls + --disable-pam + --disable-quotacheck + --disable-readahead + --enable-split-usr + --disable-tcpwrap + --disable-timedated + --disable-xz + --disable-polkit + $(use_enable acl) + $(use_enable doc gtk-doc) + $(use_enable gudev) + $(use_enable keymap) + $(use_enable kmod) + $(use_enable selinux) + $(use_enable static-libs static) + ) + if use introspection; then + econf_args+=( + --enable-introspection=$(usex introspection) + ) + fi + if use firmware-loader; then + econf_args+=( + --with-firmware-path="/lib/firmware/updates:/lib/firmware" + ) + fi + econf "${econf_args[@]}" +} + +src_compile() { + echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra + emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES + local targets=( + libudev.la + systemd-udevd + udevadm + ata_id + cdrom_id + collect + scsi_id + v4l_id + accelerometer + mtd_probe + man/udev.7 + man/udevadm.8 + man/systemd-udevd.service.8 + ) + use keymap && targets+=( keymap ) + use gudev && targets+=( libgudev-1.0.la ) + + emake "${targets[@]}" + if use doc; then + emake -C docs/libudev + use gudev && emake -C docs/gudev + fi +} + +src_install() { + local lib_LTLIBRARIES="libudev.la" \ + pkgconfiglib_DATA="src/libudev/libudev.pc" + + local targets=( + install-libLTLIBRARIES + install-includeHEADERS + install-libgudev_includeHEADERS + install-binPROGRAMS + install-rootlibexecPROGRAMS + install-udevlibexecPROGRAMS + install-dist_udevconfDATA + install-dist_udevhomeSCRIPTS + install-dist_udevkeymapDATA + install-dist_udevkeymapforcerelDATA + install-dist_udevrulesDATA + install-girDATA + install-man7 + install-man8 + install-pkgconfiglibDATA + install-sharepkgconfigDATA + install-typelibsDATA + install-dist_docDATA + libudev-install-hook + install-directories-hook + install-dist_bashcompletionDATA + ) + + if use gudev; then + lib_LTLIBRARIES+=" libgudev-1.0.la" + pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc" + fi + + # add final values of variables: + targets+=( + rootlibexec_PROGRAMS=systemd-udevd + bin_PROGRAMS=udevadm + lib_LTLIBRARIES="${lib_LTLIBRARIES}" + MANPAGES="man/udev.7 man/udevadm.8 \ + man/systemd-udevd.service.8" + MANPAGES_ALIAS="" + pkgconfiglib_DATA="${pkgconfiglib_DATA}" + INSTALL_DIRS='$(sysconfdir)/udev/rules.d \ + $(sysconfdir)/udev/hwdb.d' + dist_bashcompletion_DATA="shell-completion/bash/udevadm" + ) + emake -j1 DESTDIR="${D}" "${targets[@]}" + if use doc; then + emake -C docs/libudev DESTDIR="${D}" install + use gudev && emake -C docs/gudev DESTDIR="${D}" install + fi + dodoc TODO + + prune_libtool_files --all + rm -f \ + "${D}"/lib/udev/rules.d/99-systemd.rules \ + "${D}"/usr/share/doc/${PF}/LICENSE.* + + # see src_prepare() for content of these files + insinto /lib/udev/rules.d + doins "${T}"/40-gentoo.rules + doman "${T}"/udevd.8 + doman "${T}"/systemd-udevd.8 + + # install udevadm compatibility symlink + dosym {../bin,sbin}/udevadm + + # install udevd to /sbin and remove empty and redudant directory + # /lib/systemd because systemd is installed to /usr wrt #462750 + mv "${D}"/{lib/systemd/systemd-,sbin/}udevd || die + rm -r "${D}"/lib/systemd +} + +pkg_preinst() { + local htmldir + for htmldir in gudev libudev; do + if [[ -d ${ROOT}usr/share/gtk-doc/html/${htmldir} ]]; then + rm -rf "${ROOT}"usr/share/gtk-doc/html/${htmldir} + fi + if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]; then + dosym ../../doc/${PF}/html/${htmldir} \ + /usr/share/gtk-doc/html/${htmldir} + fi + done + preserve_old_lib /{,usr/}$(get_libdir)/libudev$(get_libname 0) +} + +pkg_postinst() { + mkdir -p "${ROOT}"run + + # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 + # So try to remove it here (will only work if empty). + rmdir "${ROOT}"dev/loop 2>/dev/null + if [[ -d ${ROOT}dev/loop ]]; then + ewarn "Please make sure your remove /dev/loop," + ewarn "else losetup may be confused when looking for unused devices." + fi + + # people want reminders, I'll give them reminders. Odds are they will + # just ignore them anyway... + + # 64-device-mapper.rules is related to sys-fs/device-mapper which we block + # in favor of sys-fs/lvm2 + old_dm_rules=${ROOT}etc/udev/rules.d/64-device-mapper.rules + if [[ -f ${old_dm_rules} ]]; then + rm -f "${old_dm_rules}" + einfo "Removed unneeded file ${old_dm_rules}" + fi + + local fstab="${ROOT}"etc/fstab dev path fstype rest + while read -r dev path fstype rest; do + if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then + ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" + ewarn "filesystem. Otherwise udev won't be able to boot." + ewarn "See, http://bugs.gentoo.org/453186" + fi + done < "${fstab}" + + if [[ -d ${ROOT}usr/lib/udev ]]; then + ewarn + ewarn "Please re-emerge all packages on your system which install" + ewarn "rules and helpers in /usr/lib/udev. They should now be in" + ewarn "/lib/udev." + ewarn + ewarn "One way to do this is to run the following command:" + ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" + ewarn "Note that qfile can be found in app-portage/portage-utils" + fi + + local old_net_name="${ROOT}"etc/udev/rules.d/80-net-name-slot.rules + if [[ -f ${old_net_name} ]]; then + local old_net_sum=bebf4bd1b6b668e9ff34a3999aa6ff32 + MD5=$(md5sum < "${old_net_name}") + MD5=${MD5/ -/} + if [[ ${MD5} == ${old_net_sum} ]]; then + ewarn "Removing unmodified file ${old_net_name} from old udev installation to enable" + ewarn "the new predictable network interface naming." + rm -f "${old_net_name}" + fi + fi + + local old_cd_rules="${ROOT}"etc/udev/rules.d/70-persistent-cd.rules + local old_net_rules="${ROOT}"etc/udev/rules.d/70-persistent-net.rules + for old_rules in "${old_cd_rules}" "${old_net_rules}"; do + if [[ -f ${old_rules} ]]; then + ewarn + ewarn "File ${old_rules} is from old udev installation but if you still use it," + ewarn "rename it to something else starting with 70- to silence this deprecation" + ewarn "warning." + fi + done + + if has_version sys-apps/biosdevname; then + ewarn + ewarn "You have sys-apps/biosdevname installed which has been deprecated" + ewarn "in favor of the predictable network interface names." + fi + + ewarn + ewarn "The new predictable network interface names are used by default, see:" + ewarn "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" + ewarn + ewarn "Example command to get the information for the new interface name before booting" + ewarn "(replace <ifname> with, for example, eth0):" + ewarn "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" + ewarn + ewarn "You can use kernel commandline net.ifnames=0 to disable this feature." + + ewarn + ewarn "You need to restart udev as soon as possible to make the upgrade go" + ewarn "into effect." + ewarn "The method you use to do this depends on your init system." + + preserve_old_lib_notify /{,usr/}$(get_libdir)/libudev$(get_libname 0) + + elog + elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" + elog " fixing known issues visit:" + elog " http://wiki.gentoo.org/wiki/Udev/upgrade" + elog " http://www.gentoo.org/doc/en/udev-guide.xml" + + # Update hwdb database in case the format is changed by udev version. + if use hwdb && has_version 'sys-apps/hwids[udev]'; then + udevadm hwdb --update --root="${ROOT%/}" + fi +} |