diff options
author | William Hubbs <williamh@gentoo.org> | 2015-07-09 03:54:09 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2015-07-09 03:54:09 +0000 |
commit | bd47a448f8fd0cc8da14caa3f5eca58fe6f4329d (patch) | |
tree | 966142af4dfba09b6ac7a53fb9aeba6d042a1799 /sys-fs | |
parent | re-add due to dep by keystone-2014.2.3-r2 (diff) | |
download | historical-bd47a448f8fd0cc8da14caa3f5eca58fe6f4329d.tar.gz historical-bd47a448f8fd0cc8da14caa3f5eca58fe6f4329d.tar.bz2 historical-bd47a448f8fd0cc8da14caa3f5eca58fe6f4329d.zip |
version bump
Package-Manager: portage-2.2.20/cvs/Linux x86_64
Manifest-Sign-Key: 0x30C46538
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/udev/ChangeLog | 7 | ||||
-rw-r--r-- | sys-fs/udev/Manifest | 10 | ||||
-rw-r--r-- | sys-fs/udev/udev-222.ebuild | 473 |
3 files changed, 485 insertions, 5 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog index 9253259a7adf..27d5e5425fdf 100644 --- a/sys-fs/udev/ChangeLog +++ b/sys-fs/udev/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-fs/udev # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.1115 2015/06/17 20:30:36 williamh Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.1116 2015/07/09 03:53:58 williamh Exp $ + +*udev-222 (09 Jul 2015) + + 09 Jul 2015; William Hubbs <williamh@gentoo.org> +udev-222.ebuild: + version bump *udev-220-r3 (17 Jun 2015) diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest index 6cc1f5c57c6d..4b4e5edca4e4 100644 --- a/sys-fs/udev/Manifest +++ b/sys-fs/udev/Manifest @@ -14,6 +14,7 @@ DIST udev-218-patches-1.tar.xz 616 SHA256 80c0e57caa2845164b3fda1a9a74d07763a6b1 DIST udev-220-patches-1.tar.xz 1760 SHA256 ac2e778776db9dc13d431b871d5b67aad378bc4bd0b7108476500313ab9c8d2a SHA512 0cbaf904a5aadedfc3bd8aee735f700b2489112e51938ea54ed34a7fdef4e8f26749eb251a82bbc409fb631f1abc4f70c732cf9b2de7ced739efd3cfadcd5cc2 WHIRLPOOL 75e67af7592c9177d81f43a4aa403b1c359fd4695007f3324e73f65289f1d2b8c3575556980c77473717198eaac03b59c4e7e0575586bde1735cfe6942dde53e DIST udev-220-patches-3.tar.xz 2812 SHA256 885e3f4a52e7f178272da5591d22baf87954d2c8e6fed188193deff493b0ab13 SHA512 15a5bbd3f4ac95d14ffc7c95cd2494b4d74cfd95674f3b0ac3ed9ae955e88a026ad9be82e9229aaf81a2ac9649411aa178fccba2beee688f287e925a8bf3057c WHIRLPOOL 3f1f24eddb80d29da4cba0a32dd8697a9a1f7fc45c00207effe5d944f8ad4c09aae86c0d45dc7af560f42ccdecf0cd69267c46ddd853123bfcae202c5bd90d75 DIST udev-220-patches-4.tar.xz 3432 SHA256 b17c676c7984d90bcafb57d087e77bc9e435a3244187f51e8c5ce1b3d4248ac9 SHA512 747e6d36faaed145bbe630e794bdd636d4e39d55fc2fc422d815cee3ab4aa579f15abbd1ff88c0448667546c8b04f72663cffa46d07861199076912bd009d25d WHIRLPOOL 0a349daae71b6ac95afc7414aa931f8aaa7328d2a0e7058cf6099b794531a1148bcd198f404d5d4bab7b250b1390adeb6938e8771da90fb7f56114560fd03a82 +DIST udev-222.tar.gz 4015599 SHA256 b49f51f9855127987adc98aad3b6d608e4e53eaa029b629f2ea2089ce0234f34 SHA512 83f0acf0ca90c89c902c268af6eef4b61380a30380013cbe89c929357959f51682cd3961a6a4f772abc09d5ca09404ae290edf2c3253fab1b20dc2b5b3ecde47 WHIRLPOOL dd0151034de374b072e70448e7a9ff47693df0190e8a2a11488593400d3d7e53e0a91d86037d027c750584089e6c68e58c437647d608a72f8826f091e3253879 EBUILD udev-208-r1.ebuild 15755 SHA256 213b2d12e016f6ee92703be1feb672b4077483aea7f2ff1b77a1bd96f6111e8f SHA512 08010a5cb9957978521f7a63d84acd9f727c70db5f865d73f1def5f4ca0093db17e210d32570079e63e9b42215fabd3f3b64665bd47f79837e939ccf6e8b554d WHIRLPOOL 3dd87881c67fae3e1cb866b3f28854e4316a7c5b1d9362801c4ea267740876e247bfb4d95019057d78025a84a6fa2f942b76409a2baa0c7f9313f0babc0a149b EBUILD udev-216.ebuild 15313 SHA256 7551bd46987fa8030dd89675b2d821cd868af9037d5e6b7e9458729a63d37fbc SHA512 64305d912001c0aa6298b033e913037fc720d080ba56d984e6134327c240bdef61a9094c446b9a0b2bd96a882d9a2df53e40262701bebb54adad3020af06d04d WHIRLPOOL 0d66063f0d1a298a102247e2dbce728e326597349c13f85a05e19e541203e7b6628ac91d95d02fbb6a4b335f7fefe262eae1670435513232ca74f6dc2a246188 EBUILD udev-217.ebuild 15554 SHA256 cb3d882ec4cc8910fc4f8caf149903e4ff8d8e4f90368b40ad6b31d3a30cfeb0 SHA512 28335b988f562130fa4878dab8134243baf635caf2d07a1d33374cf3ca771f6ad87c31c938bec26dfc8ebb8030d010f5221f6ec2ff95a39ef046ed0214fe552e WHIRLPOOL dc6d6ea69ee22a0133450139e65fcc0e3547025fa69ee5f26ceb2dffb1952a4162c42c16dbf5a3d5fab0303f2aababf834b2cda1ac7de7be95ec51bb45f02a8c @@ -22,8 +23,9 @@ EBUILD udev-219.ebuild 15662 SHA256 0fdad8ed3fcc5042e16767be2517f6ba3f557a540ea1 EBUILD udev-220-r1.ebuild 15793 SHA256 8fb809d0861408b956bd9376ed3c3ae5aa114933c8b41d3df0b2a51d1c83eb36 SHA512 b1fbafa1196c55a5da852fbe10155831633f75c440d7fe8e30d2429fe8361ad9413de639d6176e1659784163159ba30a4aed2af1afbce8a7271e7221ce2e36ee WHIRLPOOL 9d8091d3cae1d40db088703c8663c603fd9e02b43338f44d0f366576f52d155f85130abf9e28964a9b5cbc8a3106b115b26d644430f5a85420e413c2406f70fc EBUILD udev-220-r2.ebuild 15794 SHA256 4c3e0804ad6cd3faec252f9b1d1b55724ebd791b6832ca73670d8e10bbb2ae96 SHA512 1cfbc253411a9a16e24bdfce6e652ad48656976248797c3096a6f69df7af0e9c341024d61ee893b63255d35d2d1fc324d6c0da7d0a0b0d785b443a13dd2b46ab WHIRLPOOL 14a6c7742b152af3adaa2a8c070d3750be6372c1a3a68f292372711bd43a8a352531e787c8754bc8eea4c5633e444677c757f9e0123c93361bba7f61bcee95a1 EBUILD udev-220-r3.ebuild 15794 SHA256 2fb0aaf8da8c887308de3fd121418557ca9fa52a2d991830f89c3b41954a9f05 SHA512 9b4ce896300ab7be9cf0f80ccefa2a80448ac2fc24a3d286cc1bc9fb9b6cecd6412dc1df23cde4bbbf796cc363fbe83972cf47c1b060481af436fe3d91b6e4b0 WHIRLPOOL 70c4e170873c65b76fcef8d2f17ec37e2e20e92769bba357ba76619a92d26b1f42fcb49ab875574943cb36dbe697f7fb94a1da6f48156fb9a15f7328c4ce3acb +EBUILD udev-222.ebuild 14719 SHA256 02d5be45d9cbbc279d811a1dd4b22267ef7e961bbfa0ac49464895d58ae6bd0e SHA512 57566410e0e50b54adc5d52a704b3742c3d1464337124c8cb52d5f50ac641ef054d0cf5d7749351de422709b4874eb7772e3045ad9e5f5875b7128d702822e40 WHIRLPOOL 78bd6331a35900ca28feb6ecffc147d57330e3a94d84e28ad765bb6db696e017f69d5ada091e74fafd3fb2f544d3b05160ad7856ac0f9b60096aef9d8f8983b3 EBUILD udev-9999.ebuild 14776 SHA256 157068bd412e884a3397fd8474bcb45f213381337c41daa8d3d899c82a45ef71 SHA512 72bd8354bcc2686cb9a7b57d24eeb57e0292ff1b059473137825ee6e141ba15558aa977ac796fba80971e2b00943dec8698b81625ad3081fcd7424938783b3d8 WHIRLPOOL a1b320a8ebd7db6fac4f8791b2c3cb06e581dd1faa6c55f9bc3154951f9e004f4a470b805d4bc178c36440230711e0104558239417409268872476cb3153d552 -MISC ChangeLog 61969 SHA256 083868f417ae7d5dc3a25d449aa585b7155ab1b06c8790d4163d8c95fd34f4e6 SHA512 b4dfaa39dc78a69ea07683b6607a3183d1481b6798452d1cf66a473527aac3833f0409219f5ec786760ef3ceb25302e118a96e29838929d9b417f440433bdc16 WHIRLPOOL 79d6808885de398064abd8041855c629e00e0b36000fe1b55f9ca940d37f264ad96fd50c8a6ec2dfbe09d35e137e7e2bdbb3c1e1681875b1c0598a2558a2e3cd +MISC ChangeLog 62079 SHA256 0c65f44817d537aa8617e6c1db1acb64d63f1183f08ddc629759ee7a8879fcd2 SHA512 033d64d1dc73afce5772b375926177993588af7e0282f93ac2b0760cf73cd76a4a4f6ce4a879305f1e3d63179092ff8ff471004f95cae2ff4b297e754f04543d WHIRLPOOL 3e619ecbdcd5547a345b24a377bcf72336bc919b8ab2fc667d894f628d207294a5b9c124c418c9d70763ea07dde42efcd064faa54440bbe522873d580065f1e1 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 @@ -32,7 +34,7 @@ MISC metadata.xml 610 SHA256 5483522dfe99f75e0f48a38a03338037f8229e8dbdb4b94aaa6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iEYEAREIAAYFAlWB2Q8ACgkQblQW9DDEZTgioQCgoCk7R2d1Gd20pyokiIZseivs -2QoAn2WvQx6vvdnzx+Ye71+iEdaStGCP -=pXh4 +iEYEAREIAAYFAlWd8GEACgkQblQW9DDEZTjfoQCeLRUsMoRx3kp8WzLBlqOe45yD +E/gAoKLAI88wKTngzKcJdr4vmzcY2p5Q +=l3sM -----END PGP SIGNATURE----- diff --git a/sys-fs/udev/udev-222.ebuild b/sys-fs/udev/udev-222.ebuild new file mode 100644 index 000000000000..84eefca9d932 --- /dev/null +++ b/sys-fs/udev/udev-222.ebuild @@ -0,0 +1,473 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-222.ebuild,v 1.1 2015/07/09 03:53:58 williamh Exp $ + +EAPI=5 + +inherit autotools bash-completion-r1 eutils linux-info multilib multilib-minimal toolchain-funcs udev user versionator + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" + inherit git-r3 +else + patchset= + SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + if [[ -n "${patchset}" ]]; then + SRC_URI="${SRC_URI} + http://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz + http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz" + fi + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 +kmod selinux static-libs" + +RESTRICT="test" + +COMMON_DEPEND=">=sys-apps/util-linux-2.20 + acl? ( sys-apps/acl ) + kmod? ( >=sys-apps/kmod-16 ) + selinux? ( >=sys-libs/libselinux-2.1.9 ) + !<sys-libs/glibc-2.11 + !sys-apps/gentoo-systemd-integration + !sys-apps/systemd + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +# Force new make >= -r4 to skip some parallel build issues +DEPEND="${COMMON_DEPEND} + dev-util/gperf + >=sys-apps/coreutils-8.16 + sys-libs/libcap + virtual/os-headers + virtual/pkgconfig + >=sys-devel/make-3.82-r4 + >=sys-kernel/linux-headers-3.9 + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt" +RDEPEND="${COMMON_DEPEND} + !<sys-fs/lvm2-2.02.103 + !<sec-policy/selinux-base-2.20120725-r10" +PDEPEND=">=sys-apps/hwids-20140304[udev] + >=sys-fs/udev-init-scripts-26" + +S=${WORKDIR}/systemd-${PV} + +# The multilib-build.eclass doesn't handle situation where the installed headers +# are different in ABIs. In this case, we install libgudev headers in native +# ABI but not for non-native ABI. +multilib_check_headers() { :; } + +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=b8ad860dccae0ca51656b33c405ea2ca + 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() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER" + linux-info_pkg_setup + + # CONFIG_FHANDLE was introduced by 2.6.39 + local MINKV=2.6.39 + + if kernel_is -lt ${MINKV//./ }; then + eerror "Your running kernel is too old to run this version of ${P}" + eerror "You need to upgrade kernel at least to ${MINKV}" + fi + + if kernel_is -lt 3 7; then + ewarn "Your running kernel is too old to have firmware loader and" + ewarn "this version of ${P} doesn't have userspace firmware loader" + ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" + fi + 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 28 ]]; then + eerror "The line count for secure_getenv() failed, see bug #443030" + die + fi + fi + + # backport some patches + if [[ -n "${patchset}" ]]; then + EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch + fi + + cat <<-EOF > "${T}"/40-gentoo.rules + # Gentoo specific floppy and usb groups + SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" + EOF + + # change rules back to group uucp instead of dialout for now wrt #454556 + sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die + + # stub out the am_path_libcrypt function + echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4 + + # apply user patches + epatch_user + + eautoreconf + + if ! [[ ${PV} = 9999* ]]; then + check_default_rules + fi + + # Restore possibility of running --enable-static wrt #472608 + sed -i \ + -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \ + configure || die + + 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 +} + +multilib_src_configure() { + tc-export CC #463846 + export cc_cv_CFLAGS__flto=no #502950 + + # Keep sorted by ./configure --help and only pass --disable flags + # when *required* to avoid external deps or unnecessary compile + local econf_args + econf_args=( + ac_cv_search_cap_init= + --libdir=/usr/$(get_libdir) + --docdir=/usr/share/doc/${PF} + $(multilib_native_use_enable static-libs static) + --disable-nls + $(multilib_native_use_enable doc gtk-doc) + --disable-python-devel + --disable-dbus + $(multilib_native_use_enable kmod) + --disable-xkbcommon + --disable-seccomp + $(multilib_native_use_enable selinux) + --disable-xz + --disable-lz4 + --disable-pam + $(multilib_native_use_enable acl) + --disable-gcrypt + --disable-audit + --disable-libcryptsetup + --disable-qrencode + --disable-microhttpd + --disable-gnutls + --disable-libcurl + --disable-libidn + --disable-quotacheck + --disable-logind + --disable-polkit + --disable-terminal + --disable-myhostname + $(multilib_is_native_abi || echo "--disable-manpages") + --enable-split-usr + --with-html-dir=/usr/share/doc/${PF}/html + --without-python + --with-bashcompletiondir="$(get_bashcompdir)" + --with-rootprefix= + $(multilib_is_native_abi && echo "--with-rootlibdir=/$(get_libdir)") + ) + + if ! multilib_is_native_abi; then + econf_args+=( + MOUNT_{CFLAGS,LIBS}=' ' + ) + fi + + # Use pregenerated copies when possible wrt #480924 + [[ ${PV} = 9999* ]] || econf_args+=( --disable-manpages ) + + ECONF_SOURCE=${S} econf "${econf_args[@]}" +} + +multilib_src_compile() { + echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra + emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES + + # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4, + # but not everything -- separate building of the binaries as a workaround, + # which will force internal libraries required for the helpers to be built + # early enough, like eg. libsystemd-shared.la + if multilib_is_native_abi; then + local lib_targets=( libudev.la ) + emake "${lib_targets[@]}" + + local exec_targets=( + systemd-udevd + udevadm + ) + emake "${exec_targets[@]}" + + local helper_targets=( + ata_id + cdrom_id + collect + scsi_id + v4l_id + accelerometer + mtd_probe + ) + emake "${helper_targets[@]}" + + if [[ ${PV} = 9999* ]]; then + local man_targets=( + man/udev.conf.5 + man/systemd.link.5 + man/udev.7 + man/systemd-udevd.service.8 + man/udevadm.8 + ) + emake "${man_targets[@]}" + fi + + if use doc; then + emake -C docs/libudev + fi + else + local lib_targets=( libudev.la ) + emake "${lib_targets[@]}" + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + local lib_LTLIBRARIES="libudev.la" \ + pkgconfiglib_DATA="src/libudev/libudev.pc" + + local targets=( + install-libLTLIBRARIES + install-includeHEADERS + install-rootbinPROGRAMS + install-rootlibexecPROGRAMS + install-udevlibexecPROGRAMS + install-dist_udevconfDATA + install-dist_udevrulesDATA + install-girDATA + install-pkgconfiglibDATA + install-pkgconfigdataDATA + install-typelibsDATA + install-dist_docDATA + libudev-install-hook + install-directories-hook + install-dist_bashcompletionDATA + install-dist_networkDATA + ) + + # add final values of variables: + targets+=( + rootlibexec_PROGRAMS=systemd-udevd + rootbin_PROGRAMS=udevadm + lib_LTLIBRARIES="${lib_LTLIBRARIES}" + pkgconfiglib_DATA="${pkgconfiglib_DATA}" + pkgconfigdata_DATA="src/udev/udev.pc" + INSTALL_DIRS='$(sysconfdir)/udev/rules.d \ + $(sysconfdir)/udev/hwdb.d \ + $(sysconfdir)/systemd/network' + dist_bashcompletion_DATA="shell-completion/bash/udevadm" + dist_network_DATA="network/99-default.link" + ) + emake -j1 DESTDIR="${D}" "${targets[@]}" + + if use doc; then + emake -C docs/libudev DESTDIR="${D}" install + fi + + if [[ ${PV} = 9999* ]]; then + doman man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8} + else + doman "${S}"/man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8} + fi + else + local lib_LTLIBRARIES="libudev.la" \ + pkgconfiglib_DATA="src/libudev/libudev.pc" \ + include_HEADERS="src/libudev/libudev.h" + + local targets=( + install-libLTLIBRARIES + install-includeHEADERS + install-pkgconfiglibDATA + ) + + targets+=( + lib_LTLIBRARIES="${lib_LTLIBRARIES}" + pkgconfiglib_DATA="${pkgconfiglib_DATA}" + include_HEADERS="${include_HEADERS}" + ) + emake -j1 DESTDIR="${D}" "${targets[@]}" + fi +} + +multilib_src_install_all() { + dodoc TODO + + prune_libtool_files --all + rm -f \ + "${D}"/lib/udev/rules.d/99-systemd.rules \ + "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h} + + # see src_prepare() for content of 40-gentoo.rules + insinto /lib/udev/rules.d + doins "${T}"/40-gentoo.rules + + # maintainer note: by not letting the upstream build-sys create the .so + # link, you also avoid a parallel make problem + mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8 + + if ! [[ ${PV} = 9999* ]]; then + insinto /usr/share/doc/${PF}/html/libudev + doins "${S}"/docs/libudev/html/* + fi +} + +pkg_preinst() { + local htmldir + for htmldir in 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 +} + +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 + + 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_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 + + elog + elog "Starting from version >= 197 the new predictable network interface names are" + elog "used by default, see:" + elog "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" + elog "http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" + elog + elog "Example command to get the information for the new interface name before booting" + elog "(replace <ifname> with, for example, eth0):" + elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" + elog + elog "You can use either kernel parameter \"net.ifnames=0\", create empty" + elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" + elog "to disable the feature." + + if has_version 'sys-apps/biosdevname'; then + ewarn + ewarn "You can replace the functionality of sys-apps/biosdevname which has been" + ewarn "detected to be installed with the new predictable network interface names." + fi + + 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." + if has_version 'sys-apps/openrc'; then + ewarn "For sys-apps/openrc users it is:" + ewarn "# /etc/init.d/udev --nodeps restart" + fi + + 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" + elog "http://wiki.gentoo.org/wiki/Udev/upgrade" + + # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, + # do the same for 80-net-setup-link.rules to keep the old behavior + local net_move=no + local net_name_slot_sym=no + local net_rules_path="${ROOT%/}"/etc/udev/rules.d + local net_name_slot="${net_rules_path}"/80-net-name-slot.rules + local net_setup_link="${net_rules_path}"/80-net-setup-link.rules + if [[ ! -e ${net_setup_link} ]]; then + [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes + if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then + net_move=yes + net_name_slot_sym=yes + fi + fi + if [[ ${net_move} == yes ]]; then + ebegin "Copying ${net_name_slot} to ${net_setup_link}" + + if [[ ${net_name_slot_sym} == yes ]]; then + ln -nfs /dev/null "${net_setup_link}" + else + cp "${net_name_slot}" "${net_setup_link}" + fi + eend $? + fi + + # http://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 + # http://bugs.gentoo.org/246847 + # http://bugs.gentoo.org/514174 + enewgroup input + + # Update hwdb database in case the format is changed by udev version. + if has_version 'sys-apps/hwids[udev]'; then + udevadm hwdb --update --root="${ROOT%/}" + # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd + # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda + [[ -z ${REPLACING_VERSIONS} ]] && udev_reload + fi +} |