1 |
commit: 630cbe9315843b64226503bff34ba80f6e2208b6 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Aug 29 08:57:31 2017 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 2 14:27:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=630cbe93 |
7 |
|
8 |
app-emulation/virtualbox: remove unused patch/files |
9 |
|
10 |
.../virtualbox/files/virtualbox-4-localconfig | 45 ------ |
11 |
.../virtualbox-5.1.22-opengl_dlopen_fix.patch | 167 --------------------- |
12 |
.../virtualbox/files/virtualbox-ose-3-wrapper | 104 ------------- |
13 |
3 files changed, 316 deletions(-) |
14 |
|
15 |
diff --git a/app-emulation/virtualbox/files/virtualbox-4-localconfig b/app-emulation/virtualbox/files/virtualbox-4-localconfig |
16 |
deleted file mode 100644 |
17 |
index 5138d925269..00000000000 |
18 |
--- a/app-emulation/virtualbox/files/virtualbox-4-localconfig |
19 |
+++ /dev/null |
20 |
@@ -1,45 +0,0 @@ |
21 |
-# -*- Makefile -*- |
22 |
-# |
23 |
-# Overwrite some default kBuild settings |
24 |
-# |
25 |
- |
26 |
-# |
27 |
-# Copyright (C) 2006-2008 Sun Microsystems, Inc. |
28 |
-# |
29 |
-# This file is part of VirtualBox Open Source Edition (OSE), as |
30 |
-# available from http://www.virtualbox.org. This file is free software; |
31 |
-# you can redistribute it and/or modify it under the terms of the GNU |
32 |
-# General Public License as published by the Free Software Foundation, |
33 |
-# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE |
34 |
-# distribution. VirtualBox OSE is distributed in the hope that it will |
35 |
-# be useful, but WITHOUT ANY WARRANTY of any kind. |
36 |
-# |
37 |
- |
38 |
-# shut up wine complaining about unknown locale |
39 |
-EXEC_X86_WIN32 := wine |
40 |
- |
41 |
-# don't build testcases to save time, they are not needed for the package |
42 |
-VBOX_WITH_TESTCASES := |
43 |
-VBOX_WITH_TESTSUITE := |
44 |
-VBOX_DOCBOOK_WITH_LATEX := 1 |
45 |
- |
46 |
-KBUILD_MSG_STYLE := brief |
47 |
- |
48 |
-## paths, origin, hardening |
49 |
-VBOX_WITH_HARDENING := 1 |
50 |
-VBOX_WITH_ORIGIN := |
51 |
-VBOX_PATH_APP_PRIVATE_ARCH := /usr/MY_LIBDIR/virtualbox |
52 |
-VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) |
53 |
-VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) |
54 |
-VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox |
55 |
-VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS) |
56 |
- |
57 |
-## don't build unwanted/splitted stuff |
58 |
-VBOX_WITHOUT_ADDITIONS := 1 |
59 |
-VBOX_WITH_VBOXDRV := |
60 |
-VBOX_WITH_VBOXBFE := |
61 |
-VBOX_WITH_KCHMVIEWER := |
62 |
- |
63 |
-## don't build with -Werror |
64 |
-VBOX_WITH_WARNINGS_AS_ERRORS := |
65 |
- |
66 |
|
67 |
diff --git a/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch b/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch |
68 |
deleted file mode 100644 |
69 |
index 71fa978ca6e..00000000000 |
70 |
--- a/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch |
71 |
+++ /dev/null |
72 |
@@ -1,167 +0,0 @@ |
73 |
-Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp |
74 |
-=================================================================== |
75 |
---- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115126) |
76 |
-+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115307) |
77 |
-@@ -341,6 +341,7 @@ |
78 |
- * Patch 64-bit hosts. |
79 |
- */ |
80 |
- uint32_t cRipRelMovs = 0; |
81 |
-+ uint32_t cRelCalls = 0; |
82 |
- |
83 |
- /* Just use the disassembler to skip 12 bytes or more, we might need to |
84 |
- rewrite mov instructions using RIP relative addressing. */ |
85 |
-@@ -349,7 +350,8 @@ |
86 |
- cbInstr = 1; |
87 |
- int rc = DISInstr(pbTarget + offJmpBack, DISCPUMODE_64BIT, &Dis, &cbInstr); |
88 |
- if ( RT_FAILURE(rc) |
89 |
-- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW) |
90 |
-+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW |
91 |
-+ && Dis.pCurInstr->uOpcode != OP_CALL) |
92 |
- || ( Dis.ModRM.Bits.Mod == 0 |
93 |
- && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */ |
94 |
- && Dis.pCurInstr->uOpcode != OP_MOV)) |
95 |
-@@ -357,15 +359,23 @@ |
96 |
- |
97 |
- if (Dis.ModRM.Bits.Mod == 0 && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */) |
98 |
- cRipRelMovs++; |
99 |
-+ if ( Dis.pCurInstr->uOpcode == OP_CALL |
100 |
-+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW)) |
101 |
-+ cRelCalls++; |
102 |
- |
103 |
- offJmpBack += cbInstr; |
104 |
- cbPatchMem += cbInstr; |
105 |
- } |
106 |
- |
107 |
-+ /* |
108 |
-+ * Each relative call requires extra bytes as it is converted to a pushq imm32 |
109 |
-+ * + mov [RSP+4], imm32 + a jmp qword [$+8 wrt RIP] to avoid clobbering registers. |
110 |
-+ */ |
111 |
-+ cbPatchMem += cRelCalls * RT_ALIGN_32(13 + 6 + 8, 8); |
112 |
- cbPatchMem += 14; /* jmp qword [$+8 wrt RIP] + 8 byte address to jump to. */ |
113 |
- cbPatchMem = RT_ALIGN_32(cbPatchMem, 8); |
114 |
- |
115 |
-- /* Allocate suitable exectuable memory available. */ |
116 |
-+ /* Allocate suitable executable memory available. */ |
117 |
- bool fConvRipRelMovs = false; |
118 |
- uint8_t *pbPatchMem = supR3HardenedMainPosixExecMemAlloc(cbPatchMem, pbTarget, cRipRelMovs > 0); |
119 |
- if (!pbPatchMem) |
120 |
-@@ -396,7 +406,8 @@ |
121 |
- cbInstr = 1; |
122 |
- int rc = DISInstr(pbTarget + offInsn, DISCPUMODE_64BIT, &Dis, &cbInstr); |
123 |
- if ( RT_FAILURE(rc) |
124 |
-- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW)) |
125 |
-+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW |
126 |
-+ && Dis.pCurInstr->uOpcode != OP_CALL)) |
127 |
- return VERR_SUPLIB_UNEXPECTED_INSTRUCTION; |
128 |
- |
129 |
- if ( Dis.ModRM.Bits.Mod == 0 |
130 |
-@@ -439,6 +450,34 @@ |
131 |
- pbPatchMem += sizeof(int32_t); |
132 |
- } |
133 |
- } |
134 |
-+ else if ( Dis.pCurInstr->uOpcode == OP_CALL |
135 |
-+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW)) |
136 |
-+ { |
137 |
-+ /* Convert to absolute jump. */ |
138 |
-+ uintptr_t uAddr = (uintptr_t)&pbTarget[offInsn + cbInstr] + (intptr_t)Dis.Param1.uValue; |
139 |
-+ |
140 |
-+ /* Skip the push instructions till the return address is known. */ |
141 |
-+ uint8_t *pbPatchMemPush = pbPatchMem; |
142 |
-+ pbPatchMem += 13; |
143 |
-+ |
144 |
-+ *pbPatchMem++ = 0xff; /* jmp qword [$+8 wrt RIP] */ |
145 |
-+ *pbPatchMem++ = 0x25; |
146 |
-+ *(uint32_t *)pbPatchMem = (uint32_t)(RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *) - (pbPatchMem + 4)); |
147 |
-+ pbPatchMem = RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *); |
148 |
-+ *(uint64_t *)pbPatchMem = uAddr; |
149 |
-+ pbPatchMem += sizeof(uint64_t); |
150 |
-+ |
151 |
-+ /* Push the return address onto stack. Difficult on amd64 without clobbering registers... */ |
152 |
-+ uintptr_t uAddrReturn = (uintptr_t)pbPatchMem; |
153 |
-+ *pbPatchMemPush++ = 0x68; /* push imm32 sign-extended as 64-bit*/ |
154 |
-+ *(uint32_t *)pbPatchMemPush = RT_LO_U32(uAddrReturn); |
155 |
-+ pbPatchMemPush += sizeof(uint32_t); |
156 |
-+ *pbPatchMemPush++ = 0xc7; |
157 |
-+ *pbPatchMemPush++ = 0x44; |
158 |
-+ *pbPatchMemPush++ = 0x24; |
159 |
-+ *pbPatchMemPush++ = 0x04; /* movl [RSP+4], imm32 */ |
160 |
-+ *(uint32_t *)pbPatchMemPush = RT_HI_U32(uAddrReturn); |
161 |
-+ } |
162 |
- else |
163 |
- { |
164 |
- memcpy(pbPatchMem, pbTarget + offInsn, cbInstr); |
165 |
-Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp |
166 |
-=================================================================== |
167 |
---- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115126) |
168 |
-+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115307) |
169 |
-@@ -86,6 +86,9 @@ |
170 |
- /** The max path length acceptable for a trusted path. */ |
171 |
- #define SUPR3HARDENED_MAX_PATH 260U |
172 |
- |
173 |
-+/** Enable to resolve symlinks using realpath() instead of cooking our own stuff. */ |
174 |
-+#define SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH 1 |
175 |
-+ |
176 |
- #ifdef RT_OS_SOLARIS |
177 |
- # define dirfd(d) ((d)->d_fd) |
178 |
- #endif |
179 |
-@@ -1091,7 +1094,8 @@ |
180 |
- #endif |
181 |
- |
182 |
- |
183 |
--#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) |
184 |
-+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH |
185 |
-+# if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) |
186 |
- /** |
187 |
- * Copies the error message to the error buffer and returns @a rc. |
188 |
- * |
189 |
-@@ -1104,6 +1108,7 @@ |
190 |
- { |
191 |
- return supR3HardenedSetErrorN(rc, pErrInfo, 1, pszMsg); |
192 |
- } |
193 |
-+# endif |
194 |
- #endif |
195 |
- |
196 |
- |
197 |
-@@ -1893,7 +1898,9 @@ |
198 |
- /* |
199 |
- * Verify each component from the root up. |
200 |
- */ |
201 |
-+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH |
202 |
- uint32_t iLoops = 0; |
203 |
-+#endif |
204 |
- SUPR3HARDENEDFSOBJSTATE FsObjState; |
205 |
- uint32_t iComponent = 0; |
206 |
- while (iComponent < Info.cComponents) |
207 |
-@@ -1915,6 +1922,24 @@ |
208 |
- if ( RT_SUCCESS(rc) |
209 |
- && S_ISLNK(FsObjState.Stat.st_mode)) |
210 |
- { |
211 |
-+#if SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH /* Another approach using realpath() and verifying the result when encountering a symlink. */ |
212 |
-+ char *pszFilenameResolved = realpath(pszFilename, NULL); |
213 |
-+ if (pszFilenameResolved) |
214 |
-+ { |
215 |
-+ rc = supR3HardenedVerifyFile(pszFilenameResolved, hNativeFile, fMaybe3rdParty, pErrInfo); |
216 |
-+ free(pszFilenameResolved); |
217 |
-+ return rc; |
218 |
-+ } |
219 |
-+ else |
220 |
-+ { |
221 |
-+ int iErr = errno; |
222 |
-+ supR3HardenedError(VERR_ACCESS_DENIED, false /*fFatal*/, |
223 |
-+ "supR3HardenedVerifyFileFollowSymlinks: Failed to resolve the real path '%s': %s (%d)\n", |
224 |
-+ pszFilename, strerror(iErr), iErr); |
225 |
-+ return supR3HardenedSetError4(VERR_ACCESS_DENIED, pErrInfo, |
226 |
-+ "realpath failed for '", pszFilename, "': ", strerror(iErr)); |
227 |
-+ } |
228 |
-+#else |
229 |
- /* Don't loop forever. */ |
230 |
- iLoops++; |
231 |
- if (iLoops < 8) |
232 |
-@@ -1989,6 +2014,7 @@ |
233 |
- else |
234 |
- return supR3HardenedSetError3(VERR_TOO_MANY_SYMLINKS, pErrInfo, |
235 |
- "Too many symbolic links: '", pszFilename, "'"); |
236 |
-+#endif |
237 |
- } |
238 |
- } |
239 |
- if (RT_FAILURE(rc)) |
240 |
|
241 |
diff --git a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper |
242 |
deleted file mode 100644 |
243 |
index 6f2da490065..00000000000 |
244 |
--- a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper |
245 |
+++ /dev/null |
246 |
@@ -1,104 +0,0 @@ |
247 |
-#!/bin/sh |
248 |
-# |
249 |
-# Sun VirtualBox |
250 |
-# |
251 |
-# Copyright (C) 2006-2009 Sun Microsystems, Inc. |
252 |
-# |
253 |
-# This file is part of VirtualBox Open Source Edition (OSE), as |
254 |
-# available from http://www.virtualbox.org. This file is free software; |
255 |
-# you can redistribute it and/or modify it under the terms of the GNU |
256 |
-# General Public License (GPL) as published by the Free Software |
257 |
-# Foundation, in version 2 as it comes in the "COPYING" file of the |
258 |
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the |
259 |
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. |
260 |
-# |
261 |
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa |
262 |
-# Clara, CA 95054 USA or visit http://www.sun.com if you need |
263 |
-# additional information or have any questions. |
264 |
-# |
265 |
- |
266 |
-PATH="/usr/bin:/bin:/usr/sbin:/sbin" |
267 |
-CONFIG="/etc/vbox/vbox.cfg" |
268 |
- |
269 |
-if [ ! -r "$CONFIG" ]; then |
270 |
- echo "Could not find VirtualBox installation. Please reinstall." |
271 |
- exit 1 |
272 |
-fi |
273 |
- |
274 |
-. "$CONFIG" |
275 |
- |
276 |
-# Note: This script must not fail if the module was not successfully installed |
277 |
-# because the user might not want to run a VM but only change VM params! |
278 |
- |
279 |
-if [ "$1" = "shutdown" ]; then |
280 |
- SHUTDOWN="true" |
281 |
-elif ! lsmod|grep -q vboxdrv; then |
282 |
- cat << EOF |
283 |
-WARNING: The VirtualBox kernel modules are not loaded. |
284 |
- Please load all the needed kernel modules by: |
285 |
- |
286 |
- for m in vbox{drv,netadp,netflt}; do modprobe \$m; done |
287 |
- |
288 |
- You will not be able to start VMs until this problem is fixed. |
289 |
-EOF |
290 |
-elif [ ! -c /dev/vboxdrv ]; then |
291 |
- cat << EOF |
292 |
-WARNING: The character device /dev/vboxdrv does not exist. |
293 |
- Please try to reload all the needed kernel modules by: |
294 |
- |
295 |
- for m in vbox{netflt,netadp,drv}; do rmmod \$m; done |
296 |
- for m in vbox{drv,netadp,netflt}; do modprobe \$m; done |
297 |
- |
298 |
- and if that is not successful, try to re-install the package by: |
299 |
- |
300 |
- emerge -1av app-emulation/virtualbox-modules |
301 |
- |
302 |
- You will not be able to start VMs until this problem is fixed. |
303 |
-EOF |
304 |
-fi |
305 |
- |
306 |
-SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` |
307 |
-if [ -z "$SERVER_PID" ]; then |
308 |
- # Server not running yet/anymore, cleanup socket path. |
309 |
- # See IPC_GetDefaultSocketPath()! |
310 |
- if [ -n "$LOGNAME" ]; then |
311 |
- rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 |
312 |
- else |
313 |
- rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 |
314 |
- fi |
315 |
-fi |
316 |
- |
317 |
-if [ "$SHUTDOWN" = "true" ]; then |
318 |
- if [ -n "$SERVER_PID" ]; then |
319 |
- kill -TERM $SERVER_PID |
320 |
- sleep 2 |
321 |
- fi |
322 |
- exit 0 |
323 |
-fi |
324 |
- |
325 |
-APP=`which $0` |
326 |
-APP=`basename $APP` |
327 |
-APP=${APP##/*/} |
328 |
-case "$APP" in |
329 |
- VirtualBox) |
330 |
- exec "$INSTALL_DIR/VirtualBox" "$@" |
331 |
- ;; |
332 |
- VBoxManage) |
333 |
- exec "$INSTALL_DIR/VBoxManage" "$@" |
334 |
- ;; |
335 |
- VBoxSDL) |
336 |
- exec "$INSTALL_DIR/VBoxSDL" "$@" |
337 |
- ;; |
338 |
- VBoxVRDP) |
339 |
- exec "$INSTALL_DIR/VBoxHeadless" "$@" |
340 |
- ;; |
341 |
- VBoxHeadless) |
342 |
- exec "$INSTALL_DIR/VBoxHeadless" "$@" |
343 |
- ;; |
344 |
- vboxwebsrv) |
345 |
- exec "$INSTALL_DIR/vboxwebsrv" "$@" |
346 |
- ;; |
347 |
- *) |
348 |
- echo "Unknown application - $APP" |
349 |
- ;; |
350 |
-esac |