diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2013-02-07 18:50:41 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2013-02-07 18:50:41 +0000 |
commit | d769a572986fffa5a5b6b097ad0de860c2caa1c5 (patch) | |
tree | 5c62813f551383c8deffa0ddf8a7604b909bc86e /sys-fs | |
parent | version bump, eapi 5, add subslot and := deps (diff) | |
download | historical-d769a572986fffa5a5b6b097ad0de860c2caa1c5.tar.gz historical-d769a572986fffa5a5b6b097ad0de860c2caa1c5.tar.bz2 historical-d769a572986fffa5a5b6b097ad0de860c2caa1c5.zip |
offset ROOT support for the hwdb update, thanks lu_zero
Package-Manager: portage-2.2.0_alpha161/cvs/Linux x86_64
Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/udev/ChangeLog | 10 | ||||
-rw-r--r-- | sys-fs/udev/Manifest | 14 | ||||
-rw-r--r-- | sys-fs/udev/udev-197-r8.ebuild | 527 |
3 files changed, 546 insertions, 5 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog index 5f4787760601..1f6607f6fffb 100644 --- a/sys-fs/udev/ChangeLog +++ b/sys-fs/udev/ChangeLog @@ -1,6 +1,14 @@ # 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.820 2013/02/07 18:10:24 williamh Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.821 2013/02/07 18:50:36 ssuominen Exp $ + +*udev-197-r8 (07 Feb 2013) + + 07 Feb 2013; Samuli Suominen <ssuominen@gentoo.org> +udev-197-r8.ebuild: + Support updating hwdb from an offset ${ROOT}. Thanks to Luca Barbato + (lu_zero) for the patch, see: + http://bugs.freedesktop.org/show_bug.cgi?id=60398 + http://github.com/lu-zero/eudev/commit/96da532526fec9bbfc9f53f2c5819520b971710c 07 Feb 2013; William Hubbs <williamh@gentoo.org> ChangeLog: Require >=sys-libs/libselinux-2.1.9 for bug #455214. diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest index 188f2924b645..3a5c957c4188 100644 --- a/sys-fs/udev/Manifest +++ b/sys-fs/udev/Manifest @@ -9,20 +9,26 @@ DIST udev-171-testsys.tar.bz2 155001 SHA256 7383701b64701f58f16e0ddb19fe33b4eb53 DIST udev-171.tar.bz2 597937 SHA256 fed1e46074c1a16c828193ebd73b3940b7905cc7dcaeb0b3c720d4615210695e SHA512 dea189d79b195f8c10740507b11de2c2074442301ee52a0b2c62efa8663e1793c1a78b03b95510ba19bc93d4dcc497120fbf6bb5784878aa903973f76b92d42f WHIRLPOOL a93241b0f0645696e6a88ddb152c3ef8f2c73b5bf3591892384f180fc7abeb580c59642013480546eac00ad5028b1900ad35b88f6a27ad2d07792e9f34e59743 DIST udev-197-patches-1.tar.bz2 1344 SHA256 563479e8860ba6d67366f40d9e58b85e31f9de76c27c2bd5448dc04a64ac46a3 SHA512 374dc69521a05ab45c7080c4957457af25d668efd5b2590701f3d38789e17029a1620098c9fb66beaa6fe78ab48bf65a7b0138c2cd21c4738a3eb3dad3247ebe WHIRLPOOL fcf227acec10cdd1e5df0e263a6f2b282af3c2070a43ca1f07545692c3d808392d57185afb7eedd9302b5d98028b7388234d6a29459a505cec35ce4038ebba87 DIST udev-197-patches-3.tar.bz2 2561 SHA256 c1ddee8e123073c2e38d3451c492b9ff11161e32234353d8061d15fb48867064 SHA512 3807ea74aa401cd76abdf817e9785f8608df00392b6e337d9e4ac1cfed10bdfa8d35ddb47708f56e91b1266527c0e4f1a0368d8c53b3733610d913ecf9dadbe6 WHIRLPOOL 56e13a6c0d7a585a70c5b9da89e47a57fde56407e1fd544bda56db5463fa3ce80ce6734d56cde473aa2daaa0ef46712f7c758d9cf43f796678d028147ee574ea +DIST udev-197-patches-5.tar.bz2 4009 SHA256 bc497ec33de05cceb40ad23f5c64965438c747cfce5d6d26dd59e0866764da9b SHA512 5f7529c49bea5f1779dfd6e12e792c53f22a20655257e92d23b142f051bacf01ebea07ad2fd9c7c4c33be65f3fccd91024864412dbd1c707710b661aed03debd WHIRLPOOL 0ff7acf7d10202d86576713d4050ce788fc01135e7cf69b71428009b817c1e39c8f097c744dc7ecf88f411b8705fbadf82bcdd9f109744032093ce4045f05f43 DIST udev-gentoo-legacy-patchset-2.tar.bz2 14282 SHA256 bb2aefa50c3cc6df8cc88903b0e05a8cc9f44a612a8038abd05f37b342f7e235 SHA512 b18ccdbb4373021ee9f32b4e10dc1b846b64a1222d4a556370ee78efac530d7a868c8924d449a2d503ee12667e603c50514e3f3c4fc08b608a9676574587f073 WHIRLPOOL 765c6f411a793bcdd9d452c7f36719b1d0dd741b3d6da0446fa459d2a0207220d609a0a3ef500411faf7e308ddf315f27a19e179cb7f54bee52ef3f033773a3a DIST udev-gentoo-scripts-7.1.tar.bz2 16257 SHA256 1923768a98b7f00ffdc9bdf5a2c9982c494b978903ec891184d6fa0d10090fb4 SHA512 663fdd750b3f1e52a4c7639d0692290cdda9d202d4408e8aba9bfd38aaccfaa0acb79e303e98872b721cf109c62ac46921785cb5a373cc6ad8b428d0f5192836 WHIRLPOOL 49b600b034f8a6ad5e0ae6ca769971f1bb517fa0b9e31a0a7d0430ae67cf21bf4ab1db981d3eaaf78819d1e75a24a1f101eeb737448763b2990e38da912636be EBUILD udev-171-r10.ebuild 16093 SHA256 37ef3115e14d68f23cfb7cf620423b72b460dba04b36f20f6646607381e2fb40 SHA512 3b392d78a30e1a7cb6c085aae7b876c107a920b777194e475b6e10f9f09231dd3cd69b76b501d2354b7a032582ccefee861d4fbbe2bce5aa7a65fd3310b87d84 WHIRLPOOL f2a7b62bdf984121bd9cc8127ec3e912792a3affe1c097bc7c765a4822720a574412c4d18895e4c705b9bf6fbd8dcc3c554516bf2a8cae28018e39dad8601959 EBUILD udev-197-r4.ebuild 14461 SHA256 f20825f4ff3bdd184372facfba03c690ed6a7c8743de89439ab32b433fa21e88 SHA512 e208f76041b3ae8ffd1cda1b14d7dbd099323937399143724d21e7b35da547546524c0bbed193204295a8631afda65451787842ee7195027682bf2d54e122aca WHIRLPOOL e0e9f6729cc6d3ced1d91d2bbac33e36296a0df838597bdb7222dc4a86f4a4a4cf574ecf191d944af99e35e37b7420b4a09be58ff1498cde4b2247c2b8e7bd10 EBUILD udev-197-r6.ebuild 14957 SHA256 9bafd7485f02708c425ef8d54300641a05224934dc1db384e919d041930b2957 SHA512 c05d33fd584d6f4e561ac5073d1cff3be7ba8a5a81aa3ead2ee8ada0f290e5ed4c20f1a76d8b80a5431842b376685437bf8989ad2a8f4f9f5e9349f4213a6ea1 WHIRLPOOL 474b4f185deb816e24a7e20a9814033cd66b381c408213ee2dc00b93648a262815bee9b8bdb09ed0d003ed07b5d5185a5716980ee133a05d9462ed841b160a2f EBUILD udev-197-r7.ebuild 14974 SHA256 180599cd8ae4e1b551de927f84d27092066fd90c9fba8487246d6f9b09b05a13 SHA512 e26c765c94180385cc0a3e34a92423b1de4ea2fe6ab1bb2af2242250f764a503348baefa3b1e8a56c6dafeb71a7cc27502b7073d31c45c5b384bfda5a676b140 WHIRLPOOL 7af977c7842087a26d87543759fc0bb4452ba810064a4600f92ad64aec03482aeecd729bc20403c6bee0ea4721922878c2ab0c6b3c674990553650913b1082d8 +EBUILD udev-197-r8.ebuild 14994 SHA256 117bc623e3ed97822ce55c319f443022165fd4628f844bb063d8e18aa80a15be SHA512 32f6640f5da6b9fd2e1bbc426db57b355c1b25be5bc2c892f07483cb6c9e69925ace980d601c1e5b93cb0dc7c41110117206ab134d5c0dd54fc5b7ed640ccac4 WHIRLPOOL 359cfceb8e5495bd4619e4ebfd019e9ae4ce6fa7b6f2aa59a4f1d553c65e3d95e5e7c31944135ebd6fe7eae050923e184ad13ebb6af146aa68242be665219ec3 EBUILD udev-9999.ebuild 14956 SHA256 e054a9fff43aabdab899f5bc0a144b72c0e24ebbf9631444dba9db43d3217b05 SHA512 ecf00d7f83be76e72b792d8c6ec3046e913579cd3218a07fd95e318f9c721323fa65d1a5aeec5e97c43bfbbcfc4a185c72e1b9ae6274a81b52fda825b71dc642 WHIRLPOOL 41419848beffe6d2d303f08d04e238aab5a8eb768ed87ef8a909b056921a29cd6e27b34a19c5f785410a8371a431e75459326fe8a1fbd3baf06605d90ae2dac4 -MISC ChangeLog 56475 SHA256 813b588b1bb1e9ab2f5015f03c7e73409d9519ddd0b01e0e9abb885b46054c0d SHA512 ccd17a9c23e03245a8054c68743b1b899c4970584efdea016cb4c25a3d98507aafc248c0ebad0ea0f60509a9b0c7fef67cd0840485c2b64511433621d8852f2d WHIRLPOOL d8d565d3fce3184ef9bb25dd923ad6ec867d1d6bebb1b5b50160bf1c994fd74453f034ad19671fcbfad7ec63fb80d96c50d56846d3ec2f01280bb7f76d949ccd +MISC ChangeLog 56817 SHA256 24dd19d80fcc9edbd9303f807c1c4501f28ee47b0ad04783f489daaa5db390ce SHA512 c77e348a3d383bd91eb46705b76aea5c6151743184b40a96bdc3bec4e761744dd17b3e490ba388800dfe0327a6b52a4e7b8bb710a1051c7c787d862d9eb2ada0 WHIRLPOOL 7a0885b4d3f2bfeca76fc258ead4f23f8212b95089980273d60b4eb67cca522db347a1fc0a89fceb4788896a721d5ec5c601adbc9a2ece567c5296f3eb73f5d1 MISC ChangeLog-2009 105929 SHA256 7a8d7123b7395dc5bbde09a8c0cee1c5110d24faf87a68a8210b0c6bdf862c1c SHA512 3b577c97224e7f85ae5fb0a0ead538f8aa83c738e6014fadaf5247f34d3863df4bc10f9d15a5e117813d081a8af1913ea41a5e60d00ed521ea0c1e5b71a91a2b WHIRLPOOL c9f527ba19e787f9973a26ed535dbf7af760c3a519f4b062cf2a8069e134a803ebe669450deace804be70619995b389529febf03e8aeb7183c3ea984c0dfdaa5 MISC metadata.xml 1098 SHA256 69d8c28e0c2439c252068ae2e0141a9bad7b05e65b9dec27aa2dd3feb4f2393c SHA512 87354f467c3f2ed005a10652a2f80ffda010fbc0c6fb88436b906c92f4cf1543ed1a6cf4a49c93f15c6fea3ba0dcd108e1e120954f7b0860e7ac90072d2b3d67 WHIRLPOOL 9c01df67041d2093e5a2ee4a9ad65df613cdcb163bc366c8592e8e2be84b176da13198261a012687188918c906291d765856665806efe03b8dfb22a5b4eb6834 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlET7hIACgkQblQW9DDEZThxugCfZExdRHE9cL7PO7rCooS0uEQ6 -ZvsAoJqJ/R22uwtKB0djrPVfl1pei5kI -=YRqE +iQEcBAEBCAAGBQJRE/dNAAoJEEdUh39IaPFNHvgIAJOwEm+3H+b5/IQKWi5QAwl8 +5uxVBV5en5pQRcyowbXnORvZZT0iaNtCs9a1K0hvXHPTgQmDIij8FUzEblNGiTUP +Z7+VEb2DNMb69dvIBcLuiZUJHy8u9MaoYx02HyrtOXLDyDNRvlx+mlwI5kfT6d8z +IH8Z5x8hdzuZb4SG8ajAgjBeYfYOHmDGE6RCVl1mlVZ34e9d91lYKDNG6mSktei2 +b//H/XsrtlvQjw5PtdDqr8Sj5a7cryg1a9jCWiET00MQHK1BJ67T//ReH1Qn32LW +jg/hdXKsKzNRI6MbhJ/M5d5kHZpwV8S6I4zlQBJhlN5V5+csFDlnPgJ83+g2Y0E= +=MUMw -----END PGP SIGNATURE----- diff --git a/sys-fs/udev/udev-197-r8.ebuild b/sys-fs/udev/udev-197-r8.ebuild new file mode 100644 index 000000000000..8781a7305864 --- /dev/null +++ b/sys-fs/udev/udev-197-r8.ebuild @@ -0,0 +1,527 @@ +# 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-197-r8.ebuild,v 1.1 2013/02/07 18:50:36 ssuominen Exp $ + +EAPI=4 + +KV_min=2.6.32 + +inherit autotools eutils linux-info multilib systemd toolchain-funcs versionator + +if [[ ${PV} = 9999* ]] +then + EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" + inherit git-2 +else + patchset=5 + 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.bz2 + http://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.bz2" + 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 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-12 ) + selinux? ( >=sys-libs/libselinux-2.1.9 ) + !<sys-libs/glibc-2.11 + !<sys-apps/systemd-${PV}" + +DEPEND="${COMMON_DEPEND} + virtual/os-headers + virtual/pkgconfig + !<sys-kernel/linux-headers-${KV_min} + doc? ( >=dev-util/gtk-doc-1.18 ) + hwdb? ( >=sys-apps/hwids-20130114[udev] ) + keymap? ( dev-util/gperf )" + +if [[ ${PV} = 9999* ]] +then + DEPEND="${DEPEND} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + 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-19 + !<sys-kernel/dracut-017-r1 + !<sys-kernel/genkernel-3.4.25 + !<sec-policy/selinux-base-2.20120725-r10" + +PDEPEND=">=virtual/udev-197 + openrc? ( >=sys-fs/udev-init-scripts-19-r1 )" + +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=66bb698deeae64ab444b710baf54a412 + 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 ~KALLSYMS ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD" + + 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() +{ + # 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 + SUBSYSTEM=="snd", GROUP="audio" + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" + 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 + 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 [[ ${PV} = 9999* ]]; then + # secure_getenv() disable for non-glibc systems wrt bug #443030 + if ! [[ $(grep -r secure_getenv * | wc -l) -eq 16 ]]; 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 24 ]]; then + eerror "The line count for gperf references failed, see bug 452760" + die + fi + 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 +} + +src_configure() +{ + use keymap || export ac_cv_path_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) + --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-silent-rules + $(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 + econf "${econf_args[@]}" +} + +src_compile() +{ + echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra + emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES + local targets=( + systemd-udevd + udevadm + libudev.la + libsystemd-daemon.la + ata_id + cdrom_id + collect + scsi_id + v4l_id + accelerometer + mtd_probe + man/sd_is_fifo.3 + man/sd_notify.3 + man/sd_listen_fds.3 + man/sd-daemon.3 + man/udev.7 + man/udevadm.8 + man/systemd-udevd.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="libsystemd-daemon.la libudev.la" \ + pkgconfiglib_DATA="src/libsystemd-daemon/libsystemd-daemon.pc src/libudev/libudev.pc" + + local targets=( + install-libLTLIBRARIES + install-includeHEADERS + install-libgudev_includeHEADERS + install-binPROGRAMS + install-rootlibexecPROGRAMS + install-udevlibexecPROGRAMS + install-dist_systemunitDATA + install-dist_udevconfDATA + install-dist_udevhomeSCRIPTS + install-dist_udevkeymapDATA + install-dist_udevkeymapforcerelDATA + install-dist_udevrulesDATA + install-girDATA + install-man3 + install-man7 + install-man8 + install-nodist_systemunitDATA + install-pkgconfiglibDATA + install-sharepkgconfigDATA + install-typelibsDATA + install-dist_docDATA + udev-confdirs + systemd-install-hook + libudev-install-hook + libsystemd-daemon-install-hook + install-pkgincludeHEADERS + ) + + 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/sd-daemon.3 man/sd_notify.3 man/sd_listen_fds.3 \ + man/sd_is_fifo.3 man/sd_booted.3 man/udev.7 man/udevadm.8 \ + man/systemd-udevd.service.8" + MANPAGES_ALIAS="man/sd_is_socket.3 man/sd_is_socket_unix.3 \ + man/sd_is_socket_inet.3 man/sd_is_mq.3 man/sd_notifyf.3 \ + man/SD_LISTEN_FDS_START.3 man/SD_EMERG.3 man/SD_ALERT.3 \ + man/SD_CRIT.3 man/SD_ERR.3 man/SD_WARNING.3 man/SD_NOTICE.3 \ + man/SD_INFO.3 man/SD_DEBUG.3 man/systemd-udevd.8" + dist_systemunit_DATA="units/systemd-udevd-control.socket \ + units/systemd-udevd-kernel.socket" + nodist_systemunit_DATA="units/systemd-udevd.service \ + units/systemd-udev-trigger.service \ + units/systemd-udev-settle.service" + pkgconfiglib_DATA="${pkgconfiglib_DATA}" + systemunitdir="$(systemd_get_unitdir)" + pkginclude_HEADERS="src/systemd/sd-daemon.h" + ) + 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 + rm -rf "${D}"/usr/share/doc/${PF}/LICENSE.* + + # install gentoo-specific rules + insinto /lib/udev/rules.d + doins "${T}"/40-gentoo.rules + + # install udevadm symlink + dosym ../bin/udevadm /sbin/udevadm + + # move udevd where it should be and remove unlogical /lib/systemd + mv "${ED}"/lib/systemd/systemd-udevd "${ED}"/sbin/udevd || die + rm -r "${ED}"/lib/systemd + + # install compability symlink for systemd and initramfs tools + dosym /sbin/udevd "$(systemd_get_utildir)"/systemd-udevd + find "${ED}/$(systemd_get_unitdir)" -name '*.service' -exec \ + sed -i -e "/ExecStart/s:/lib/systemd:$(systemd_get_utildir):" {} + + + docinto gentoo + dodoc "${FILESDIR}"/80-net-name-slot.rules + docompress -x /usr/share/doc/${PF}/gentoo/80-net-name-slot.rules +} + +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) +} + +# This function determines if a directory is a mount point. +# It was lifted from dracut. +ismounted() +{ + while read a m a; do + [[ $m = $1 ]] && return 0 + done < "${ROOT}"/proc/mounts + return 1 +} + +pkg_postinst() +{ + mkdir -p "${ROOT}"run + + net_rules="${ROOT}"etc/udev/rules.d/80-net-name-slot.rules + copy_net_rules() { + [[ -f ${net_rules} ]] || cp "${ROOT}"usr/share/doc/${PF}/gentoo/80-net-name-slot.rules "${net_rules}" + } + + if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 197 ]]; then + ewarn "Because this is a upgrade we disable the new predictable network interface" + ewarn "name scheme by default." + copy_net_rules + fi + + if has_version sys-apps/biosdevname; then + ewarn "Because sys-apps/biosdevname is installed we disable the new predictable" + ewarn "network interface name scheme by default." + copy_net_rules + fi + + # "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 now gets installed by sys-fs/device-mapper + # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007 + if [[ -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 + + if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 189 ]]; then + ewarn + ewarn "Upstream has removed the persistent-cd rules" + ewarn "generator. If you need persistent names for these devices," + ewarn "place udev rules for them in ${ROOT}etc/udev/rules.d." + fi + + if ismounted /usr + then + ewarn + ewarn "Your system has /usr on a separate partition. This means" + ewarn "you will need to use an initramfs to pre-mount /usr before" + ewarn "udev runs." + ewarn + ewarn "If this is not set up before your next reboot, udev may work;" + ewarn "However, you also may experience failures which are very" + ewarn "difficult to troubleshoot." + ewarn + ewarn "For a more detailed explanation, see the following URL:" + ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken" + ewarn + ewarn "For more information on setting up an initramfs, see the" + ewarn "following URL:" + ewarn "http://www.gentoo.org/doc/en/initramfs-guide.xml" + fi + + if [ -n "${net_rules}" ]; then + ewarn + ewarn "udev-197 and newer introduces a new method of naming network" + ewarn "interfaces. The new names are a very significant change, so" + ewarn "they are disabled by default on live systems." + ewarn "Please see the contents of ${net_rules} for more" + ewarn "information on this feature." + 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 + + old_net_rules=${ROOT}etc/udev/rules.d/70-persistent-net.rules + if [[ -f ${old_net_rules} ]]; then + ewarn "You still have ${old_net_rules} in place from previous udev release." + ewarn "Upstream has removed the possibility of renaming to existing" + ewarn "network interfaces. For example, it's not possible to assign based" + ewarn "on MAC address to existing interface eth0." + ewarn "See http://bugs.gentoo.org/453494 for more information." + ewarn "Rename your file to something else starting with 70- to silence" + ewarn "this warning." + 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." + ewarn + + preserve_old_lib_notify /{,usr/}$(get_libdir)/libudev$(get_libname 0) + + 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" + + use hwdb && udevadm hwdb --update --root="${ROOT%/}" +} |