Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
Date: Fri, 07 Dec 2018 20:17:11
Message-Id: 1544213821.2cb1734e09768ba2ac4f814fcfe14ed803f3b8ff.polynomial-c@gentoo
1 commit: 2cb1734e09768ba2ac4f814fcfe14ed803f3b8ff
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 7 20:16:44 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 7 20:17:01 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cb1734e
7
8 app-emulation/virtualbox: Install some more tools for vbox-6
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 .../virtualbox/files/virtualbox-ose-6-wrapper | 116 +++++++++++++++++++++
14 .../virtualbox/virtualbox-6.0.0_beta3.ebuild | 14 +--
15 2 files changed, 124 insertions(+), 6 deletions(-)
16
17 diff --git a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
18 new file mode 100644
19 index 00000000000..43e9c9ed448
20 --- /dev/null
21 +++ b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
22 @@ -0,0 +1,116 @@
23 +#!/bin/sh
24 +## @file
25 +# Oracle VM VirtualBox startup script, Linux hosts.
26 +#
27 +
28 +#
29 +# Copyright (C) 2006-2017 Oracle Corporation
30 +#
31 +# This file is part of VirtualBox Open Source Edition (OSE), as
32 +# available from http://www.virtualbox.org. This file is free software;
33 +# you can redistribute it and/or modify it under the terms of the GNU
34 +# General Public License (GPL) as published by the Free Software
35 +# Foundation, in version 2 as it comes in the "COPYING" file of the
36 +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
37 +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
38 +#
39 +
40 +PATH="/usr/bin:/bin:/usr/sbin:/sbin"
41 +CONFIG="/etc/vbox/vbox.cfg"
42 +
43 +test -r "${CONFIG}" &&
44 + . "${CONFIG}"
45 +test -z "${INSTALL_DIR}" &&
46 + if test -f /usr/lib/virtualbox/VirtualBox &&
47 + test -x /usr/lib/virtualbox/VirtualBox; then
48 + INSTALL_DIR=/usr/lib/virtualbox
49 + else
50 + echo "Could not find VirtualBox installation. Please reinstall."
51 + exit 1
52 + fi
53 +
54 +# Note: This script must not fail if the module was not successfully installed
55 +# because the user might not want to run a VM but only change VM params!
56 +
57 +if [ "$1" = "shutdown" ]; then
58 + SHUTDOWN="true"
59 +elif ! lsmod|grep -q vboxdrv; then
60 + cat << EOF
61 +WARNING: The vboxdrv kernel module is not loaded. Either there is no module
62 + available for the current kernel (`uname -r`) or it failed to
63 + load. Please recompile the kernel module and install it by
64 +
65 + for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
66 +
67 + You will not be able to start VMs until this problem is fixed.
68 +EOF
69 +elif [ ! -c /dev/vboxdrv ]; then
70 + cat << EOF
71 +WARNING: The character device /dev/vboxdrv does not exist.
72 + Please try to reload all the needed kernel modules by:
73 +
74 + for m in vbox{netflt,netadp,drv}; do rmmod \$m; done
75 + for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
76 +
77 + and if that is not successful, try to re-install the package by:
78 +
79 + emerge -1av app-emulation/virtualbox-modules
80 +
81 + You will not be able to start VMs until this problem is fixed.
82 +EOF
83 +fi
84 +
85 +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
86 +if [ -z "$SERVER_PID" ]; then
87 + # Server not running yet/anymore, cleanup socket path.
88 + # See IPC_GetDefaultSocketPath()!
89 + if [ -n "$LOGNAME" ]; then
90 + rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1
91 + else
92 + rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1
93 + fi
94 +fi
95 +
96 +if [ "$SHUTDOWN" = "true" ]; then
97 + if [ -n "$SERVER_PID" ]; then
98 + kill -TERM $SERVER_PID
99 + sleep 2
100 + fi
101 + exit 0
102 +fi
103 +
104 +APP=`basename $0`
105 +case "$APP" in
106 + VirtualBox|virtualbox)
107 + exec "$INSTALL_DIR/VirtualBox" "$@"
108 + ;;
109 + VBoxManage|vboxmanage)
110 + exec "$INSTALL_DIR/VBoxManage" "$@"
111 + ;;
112 + VBoxSDL|vboxsdl)
113 + exec "$INSTALL_DIR/VBoxSDL" "$@"
114 + ;;
115 + VBoxVRDP|VBoxHeadless|vboxheadless)
116 + exec "$INSTALL_DIR/VBoxHeadless" "$@"
117 + ;;
118 + VBoxAutostart|vboxautostart)
119 + exec "$INSTALL_DIR/VBoxAutostart" "$@"
120 + ;;
121 + VBoxBalloonCtrl|vboxballoonctrl)
122 + exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@"
123 + ;;
124 + VBoxBugReport|vboxbugreport)
125 + exec "$INSTALL_DIR/VBoxBugReport" "$@"
126 + ;;
127 + VBoxDTrace|vboxdtrace)
128 + exec "$INSTALL_DIR/VBoxDTrace" "$@"
129 + ;;
130 + vboxwebsrv)
131 + exec "$INSTALL_DIR/vboxwebsrv" "$@"
132 + ;;
133 + *)
134 + echo "Unknown application - $APP"
135 + exit 1
136 + ;;
137 +esac
138 +exit 0
139
140 diff --git a/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild b/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild
141 index 8aa9d0a6b2f..edda2a369a4 100644
142 --- a/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild
143 +++ b/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild
144 @@ -289,7 +289,7 @@ src_install() {
145
146 # Install the wrapper script
147 exeinto ${vbox_inst_path}
148 - newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
149 + newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
150 fowners root:vboxusers ${vbox_inst_path}/VBox
151 fperms 0750 ${vbox_inst_path}/VBox
152
153 @@ -302,7 +302,7 @@ src_install() {
154 if use amd64 && ! has_multilib_profile ; then
155 rcfiles=""
156 fi
157 - for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
158 + for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} *so *r0 ${rcfiles} iPxeBaseBin rdesktop-vrdp ; do
159 vbox_inst ${each}
160 done
161
162 @@ -325,7 +325,7 @@ src_install() {
163 done
164
165 # Symlink binaries to the shipped wrapper
166 - for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
167 + for each in vbox{headless,manage} VBox{BugReport,Headless,Manage,VRDP} ; do
168 dosym ${vbox_inst_path}/VBox /usr/bin/${each}
169 done
170 dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
171 @@ -348,8 +348,10 @@ src_install() {
172 done
173
174 if use qt5 ; then
175 - vbox_inst VirtualBox
176 - pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
177 + for each in VirtualBox{,VM} ; do
178 + vbox_inst ${each}
179 + pax-mark -m "${ED%/}"${vbox_inst_path}/${each}
180 + done
181
182 if use opengl ; then
183 vbox_inst VBoxTestOGL
184 @@ -364,7 +366,7 @@ src_install() {
185 doins -r nls
186 doins -r UnattendedTemplates
187
188 - newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
189 + domenu ${PN}.desktop
190 fi
191
192 pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die