diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2018-02-19 15:16:14 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2018-02-19 15:16:29 +0100 |
commit | 019f1401fa2e7da1baed6f6e07601e028c0a7006 (patch) | |
tree | f2b6ff4df6dc5725114bef9c96cbfcd972914575 /app-emulation/virtualbox | |
parent | dev-php/PEAR-HTML_Common2: Drop old (diff) | |
download | gentoo-019f1401fa2e7da1baed6f6e07601e028c0a7006.tar.gz gentoo-019f1401fa2e7da1baed6f6e07601e028c0a7006.tar.bz2 gentoo-019f1401fa2e7da1baed6f6e07601e028c0a7006.zip |
app-emulation/virtualbox: Use tmpfiles.d file to create /dev/vboxusb
This replaces the previous approach which patched the script that
creates the device nodes in /dev/vboxusb/
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'app-emulation/virtualbox')
4 files changed, 11 insertions, 28 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch b/app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch deleted file mode 100644 index bbb28943c129..000000000000 --- a/app-emulation/virtualbox/files/virtualbox-detect-usb-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Patch by Maciej S. Szmigiero to make the script work even if no USB device was -plugged in before virtualbox got started. - -https://bugs.gentoo.org/639352 - ---- a/src/VBox/Installer/linux/VBoxCreateUSBNode.sh -+++ b/src/VBox/Installer/linux/VBoxCreateUSBNode.sh -@@ -32,13 +32,13 @@ - devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`" - case "$do_remove" in - 0) -+ case "$group" in "") group="vboxusers";; esac -+ mkdir /dev/vboxusb -m 0750 2>/dev/null -+ chown root:$group /dev/vboxusb 2>/dev/null - if test -n "$class" -a "$class" -eq "$usb_class_hub" - then - exit 0 - fi -- case "$group" in "") group="vboxusers";; esac -- mkdir /dev/vboxusb -m 0750 2>/dev/null -- chown root:$group /dev/vboxusb 2>/dev/null - mkdir "$devdir" -m 0750 2>/dev/null - chown root:$group "$devdir" 2>/dev/null - mknod "$devpath" c $1 $2 -m 0660 2>/dev/null diff --git a/app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd b/app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd new file mode 100644 index 000000000000..39378536a8b2 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-vboxusb_tmpfilesd @@ -0,0 +1 @@ +d /dev/vboxusb 0750 root vboxusers diff --git a/app-emulation/virtualbox/virtualbox-5.1.32.ebuild b/app-emulation/virtualbox/virtualbox-5.1.32.ebuild index 08304b19cae9..744c42640cff 100644 --- a/app-emulation/virtualbox/virtualbox-5.1.32.ebuild +++ b/app-emulation/virtualbox/virtualbox-5.1.32.ebuild @@ -4,7 +4,7 @@ EAPI=6 PYTHON_COMPAT=( python2_7 ) -inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev xdg-utils +inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils MY_PV="${PV/beta/BETA}" MY_PV="${MY_PV/rc/RC}" @@ -193,7 +193,6 @@ src_prepare() { fi eapply "${WORKDIR}/patches" - eapply "${FILESDIR}/${PN}-detect-usb-fix.patch" eapply_user } @@ -416,6 +415,8 @@ src_install() { if use doc ; then dodoc UserManual.pdf fi + + newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf } pkg_postinst() { @@ -426,6 +427,8 @@ pkg_postinst() { && udevadm trigger --subsystem-match=usb fi + tmpfiles_process + if ! use headless && use qt5 ; then elog "To launch VirtualBox just type: \"virtualbox\"." fi diff --git a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild b/app-emulation/virtualbox/virtualbox-5.2.6.ebuild index 7133045118bf..efbaed976994 100644 --- a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild +++ b/app-emulation/virtualbox/virtualbox-5.2.6.ebuild @@ -4,7 +4,7 @@ EAPI=6 PYTHON_COMPAT=( python2_7 ) -inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev xdg-utils +inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils MY_PV="${PV/beta/BETA}" MY_PV="${MY_PV/rc/RC}" @@ -193,7 +193,6 @@ src_prepare() { fi eapply "${WORKDIR}/patches" - eapply "${FILESDIR}/${PN}-detect-usb-fix.patch" eapply_user } @@ -416,6 +415,8 @@ src_install() { if use doc ; then dodoc UserManual.pdf fi + + newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf } pkg_postinst() { @@ -426,6 +427,8 @@ pkg_postinst() { && udevadm trigger --subsystem-match=usb fi + tmpfiles_process + if ! use headless && use qt5 ; then elog "To launch VirtualBox just type: \"virtualbox\"." fi |