Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430424 - app-emulation/virtualbox-bin should use pkg-config to determine the udev dirrectory to install rules or/and executables
Summary: app-emulation/virtualbox-bin should use pkg-config to determine the udev dirr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: udevdir
  Show dependency tree
 
Reported: 2012-08-08 09:15 UTC by Egor Y. Egorov
Modified: 2012-12-04 09:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Y. Egorov 2012-08-08 09:15:30 UTC
egorov-ey ~ # emerge -pv virtualbox-bin

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] app-emulation/virtualbox-bin-4.1.18  USE="additions chm -debug -headless -python -rdesktop-vrdp -sdk -vboxwebsrv" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
egorov-ey ~ # q^Cle /lib/udev/VBoxCreateUSBNode.sh
egorov-ey ~ # qlist app-emulation/virtualbox-bin | grep udev
/lib/udev/rules.d/10-virtualbox.rules
/lib/udev/VBoxCreateUSBNode.sh
egorov-ey ~ # pkg-config --variable=udevdir udev
/usr/lib/udev


Reproducible: Always
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-08-08 09:19:05 UTC
sys-fs/udev-187-r2 and sys-fs/udev-init-scripts-15 reverted this /usr/lib/udev move and install rules into /lib/udev again. No need to do anything here...
Comment 2 Egor Y. Egorov 2012-08-08 09:21:23 UTC
https://bugs.gentoo.org/show_bug.cgi?id=430412
Comment 3 Egor Y. Egorov 2012-08-08 09:24:47 UTC
Yes udev read rules from /lib/udev, but executables must installed into /usr/lib/udev
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-08-08 09:40:52 UTC
# pkg-config --variable=udevdir udev
/lib/udev
# qlist -CIve udev{,-init-scripts}
sys-fs/udev-187-r2
sys-fs/udev-init-scripts-15

Again no need to fix anything here. udev-187-r2 has fixed udevlibexecdir and thus all should be sane.
Comment 5 Egor Y. Egorov 2012-08-08 09:45:07 UTC
However, if the migration will still be (and, as I understand it, sooner or later it will be done), this problem pops up again. Please, you will make it. Is that so hard?
Comment 6 Egor Y. Egorov 2012-08-08 09:48:27 UTC
egorov-ey ~ # pkg-config --variable=udevdir udev
/usr/lib/udev
egorov-ey ~ # qfile -veC /usr/share/pkgconfig/udev.pc
sys-apps/systemd-187 (/usr/share/pkgconfig/udev.pc)
Comment 7 Egor Y. Egorov 2012-08-08 09:57:27 UTC
# diff -u virtualbox-bin-4.1.18.ebuild_orig virtualbox-bin-4.1.18.ebuild
--- virtualbox-bin-4.1.18.ebuild_orig   2012-08-08 16:55:24.561360589 +0700
+++ virtualbox-bin-4.1.18.ebuild        2012-08-08 16:55:05.967387181 +0700
@@ -305,11 +305,12 @@
        echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
        doenvd "${T}/90virtualbox"
 
-       insinto /lib/udev/rules.d
+       local udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
+       insinto "${udevdir}/rules.d"
        doins "${FILESDIR}"/10-virtualbox.rules
        # move udev scripts into /lib/udev (bug #372491)
-       mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"/lib/udev
-       fperms 0750 /lib/udev/VBoxCreateUSBNode.sh
+       mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}${udevdir}"
+       fperms 0750 "${udevdir}/VBoxCreateUSBNode.sh"
 }
 
 pkg_postinst() {
Comment 8 Egor Y. Egorov 2012-08-09 12:36:48 UTC
udev-187-r3.ebuild again install binaries into /usr/lib/udev
Please fix this bug.
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-12-04 09:43:19 UTC
+  04 Dec 2012; Lars Wendler <polynomial-c@gentoo.org>
+  files/10-virtualbox.rules, virtualbox-bin-4.2.2.ebuild,
+  virtualbox-bin-4.2.4.ebuild:
+  Fixed installation of udev files (bug #430424).
+