mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
virtualbox fix with kernel >4.16
Introduced condition on virtualbox-guest-dkms.conf file to prevent building module for kernel >= 4.16 since are included in the kernel itself fix #83 [testing]
This commit is contained in:
parent
461b283064
commit
4620c36c1e
@ -1,9 +0,0 @@
|
||||
# 2013 © Sébastien Luttringer
|
||||
--- a/src/VBox/Frontends/VBoxShell/vboxshell.py 2014-01-03 01:38:41.831615590 +0100
|
||||
+++ b/src/VBox/Frontends/VBoxShell/vboxshell.py 2014-01-04 04:23:33.884544420 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python2
|
||||
# -*- coding: utf-8 -*-
|
||||
# $Id: vboxshell.py 49841 2013-12-09 13:32:33Z vboxsync $
|
||||
"""
|
26
virtualbox/011-python-3-7.patch
Normal file
26
virtualbox/011-python-3-7.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/configure b/configure
|
||||
index 128da55c..c4bb08c4 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1969,7 +1969,7 @@ extern "C" int main(void)
|
||||
}
|
||||
EOF
|
||||
found=
|
||||
- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m"
|
||||
+ SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m"
|
||||
for p in $PYTHONDIR; do
|
||||
for d in $SUPPYTHONLIBS; do
|
||||
for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
|
||||
diff --git a/src/libs/xpcom18a4/python/src/ErrorUtils.cpp b/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
index f211c7a9..fd6811c0 100644
|
||||
--- a/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
+++ b/src/libs/xpcom18a4/python/src/ErrorUtils.cpp
|
||||
@@ -440,7 +440,7 @@ char *PyTraceback_AsString(PyObject *exc_tb)
|
||||
#if PY_MAJOR_VERSION <= 2
|
||||
char *tempResult = PyString_AsString(obResult);
|
||||
#else
|
||||
- char *tempResult = PyUnicode_AsUTF8(obResult);
|
||||
+ const char *tempResult = PyUnicode_AsUTF8(obResult);
|
||||
#endif
|
||||
result = (char *)PyMem_Malloc(strlen(tempResult)+1);
|
||||
if (result==NULL)
|
20
virtualbox/012-vboxsf-automount.patch
Normal file
20
virtualbox/012-vboxsf-automount.patch
Normal file
@ -0,0 +1,20 @@
|
||||
This ghetto patch attempts to fix shared folder automounting for guests running
|
||||
Linux 4.16, and also suggests an alternative to mount.vboxsf.
|
||||
|
||||
diff -uprb VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
|
||||
--- VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-02-26 17:57:30.000000000 +0200
|
||||
+++ VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-04-07 21:00:05.785735622 +0300
|
||||
@@ -346,6 +346,13 @@ static int vbsvcAutoMountSharedFolder(co
|
||||
"vboxsf",
|
||||
fFlags,
|
||||
&mntinf);
|
||||
+ if (r == -1 && errno == EINVAL)
|
||||
+ {
|
||||
+ /* Mainline vboxsf accepts regular mount opts. */
|
||||
+ char mount_opts[1024];
|
||||
+ snprintf(mount_opts, 1024, "gid=%d,dmode=0770,fmode=0770", mntinf.gid);
|
||||
+ r = mount(pszShareName, pszMountPoint, "vboxsf", fFlags, mount_opts);
|
||||
+ }
|
||||
if (r == 0)
|
||||
{
|
||||
VGSvcVerbose(0, "vbsvcAutoMountWorker: Shared folder '%s' was mounted to '%s'\n", pszShareName, pszMountPoint);
|
@ -11,7 +11,7 @@ pkgname=('virtualbox'
|
||||
'virtualbox-ext-vnc'
|
||||
'virtualbox-ext-oracle')
|
||||
pkgver=5.2.18
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('x86_64')
|
||||
url='https://www.virtualbox.org'
|
||||
license=('GPL')
|
||||
@ -41,7 +41,6 @@ makedepends=('alsa-lib'
|
||||
'libxtst'
|
||||
'linux-headers'
|
||||
'mesa'
|
||||
'python2'
|
||||
'python3'
|
||||
'qt5-base'
|
||||
'qt5-x11extras'
|
||||
@ -72,10 +71,14 @@ source=("http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.ta
|
||||
'002-dri-driver-path.patch'
|
||||
'005-gsoap-build.patch'
|
||||
'006-rdesktop-vrdp-keymap-path.patch'
|
||||
'007-python2-path.patch'
|
||||
'008-no-vboxvideo.patch'
|
||||
'009-include-path.patch'
|
||||
'010-qt-5.11.patch'
|
||||
'011-python-3-7.patch'
|
||||
# The following patch and mount.vboxsf wrapper should be removed
|
||||
# once support for mainline-style options string gets upstreamed
|
||||
'012-vboxsf-automount.patch'
|
||||
'mount.vboxsf'
|
||||
'PUEL')
|
||||
noextract=(VBoxGuestAdditions_$pkgver.iso
|
||||
"Oracle_VM_VirtualBox_Extension_Pack-$pkgver.vbox-extpack")
|
||||
@ -83,7 +86,7 @@ sha256sums=('ed0a7efd56c7f39fae79c7ec3321473da412ef0d7914457b66f42679d513efcf'
|
||||
'f98b6ad7093ee0b27d26dea565b197a5f33fdac93c4b67e73824ce889d6c964c'
|
||||
'3ecb43c71502741f4eb790576c608eb65cd424bcf3dfdb56471e4a2cac806f68'
|
||||
'deb03efa7ad0376aa55a087f2e882afe00935f10b0e7aa853ba9147090d341ec'
|
||||
'113f9b92141b85df01f1e74d22f01d1f1aa81650eb79b89ceefc3cae20afe2e2'
|
||||
'c328376b05183d269f98319ec660f54c55e298f77d229977606862b064651a7c'
|
||||
'2101ebb58233bbfadf3aa74381f22f7e7e508559d2b46387114bc2d8e308554c'
|
||||
'da4c49f6ca94e047e196cdbcba2c321199f4760056ea66e0fbc659353e128c9e'
|
||||
'9c5238183019f9ebc7d92a8582cad232f471eab9d3278786225abc1a1c7bf66e'
|
||||
@ -96,10 +99,12 @@ sha256sums=('ed0a7efd56c7f39fae79c7ec3321473da412ef0d7914457b66f42679d513efcf'
|
||||
'f67674931c30187f867233e3a4ae662f93c9110fbd0bfce50dd9f391f4533bc0'
|
||||
'7d2da8fe10a90f76bbfc80ad1f55df4414f118cd10e10abfb76070326abebd46'
|
||||
'5d5af2de5b1f1c61ec793503350f2440661cf8fd640f11b8a86f10bce499c0dc'
|
||||
'6bdb017459532537199c399eefd3d84d8dc7f1786e79997caebd3b6eb5c75d9f'
|
||||
'8b7f241107863f82a5b0ae336aead0b3366a40103ff72dbebf33f54b512a0cbc'
|
||||
'1acc7014bcb3d9ca6da29eed813c3d6e91a688c43f9d93802fd4e3814f67ace4'
|
||||
'c6ef35e6893d557c7c2269ff79bc299fe9058cfb2c933a7efdc7a8a7b6d9c5da'
|
||||
'9535774f1858c0ad92f0edee99875dcf683e41a4c7c95494c8aeb81591426e5a'
|
||||
'a784f3cc24652a16385cc63abac6c5178932ca5f3861be7650631b7dafa753a4'
|
||||
'f3ed6741f8977f40900c8aa372fa082df1f8723d497d4fff445153c543bc8947'
|
||||
'715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e')
|
||||
|
||||
prepare() {
|
||||
@ -162,7 +167,7 @@ build() {
|
||||
|
||||
package_virtualbox() {
|
||||
pkgdesc='Powerful x86 virtualization for enterprise as well as home use'
|
||||
depends=('glibc' 'openssl' 'curl' 'gcc-libs' 'libpng' 'python2' 'sdl'
|
||||
depends=('glibc' 'openssl' 'curl' 'gcc-libs' 'libpng' 'python3' 'sdl'
|
||||
'libvpx' 'libxml2' 'procps-ng' 'shared-mime-info' 'zlib'
|
||||
'libxcursor' 'libxinerama' 'libx11' 'libxext' 'libxmu' 'libxt'
|
||||
'VIRTUALBOX-HOST-MODULES')
|
||||
@ -257,7 +262,7 @@ package_virtualbox() {
|
||||
|
||||
package_virtualbox-sdk() {
|
||||
pkgdesc='VirtualBox Software Developer Kit (SDK)'
|
||||
depends=('python2')
|
||||
depends=('python3')
|
||||
|
||||
install -dm755 "$pkgdir/usr/lib/virtualbox"
|
||||
|
||||
@ -267,7 +272,7 @@ package_virtualbox-sdk() {
|
||||
install -Dm755 vboxshell.py "$pkgdir/usr/lib/virtualbox/vboxshell.py"
|
||||
# python sdk
|
||||
pushd sdk/installer
|
||||
VBOX_INSTALL_PATH="/usr/lib/virtualbox" python2 vboxapisetup.py install --root "$pkgdir"
|
||||
VBOX_INSTALL_PATH="/usr/lib/virtualbox" python3 vboxapisetup.py install --root "$pkgdir"
|
||||
popd
|
||||
rm -rf sdk/installer
|
||||
cp -r sdk "$pkgdir/usr/lib/virtualbox"
|
||||
|
17
virtualbox/mount.vboxsf
Normal file
17
virtualbox/mount.vboxsf
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Hopefully this works as intented, supporting both pre-4.16 and newer kernels
|
||||
# https://bugs.archlinux.org/task/58272#comment168687
|
||||
|
||||
kver_major=$(uname -r | cut -d. -f1)
|
||||
kver_minor=$(uname -r | cut -d. -f2)
|
||||
|
||||
if ((kver_major * 100 + kver_minor < 416)); then
|
||||
exec /usr/lib/virtualbox/mount.vboxsf "$@"
|
||||
fi
|
||||
|
||||
# mount(1) annoyingly prepends the current directory to the source
|
||||
name=${1#$PWD/}; shift
|
||||
|
||||
# Mainline vboxsf accepts regular mount opts
|
||||
exec /usr/bin/mount -cit vboxsf "$name" "$@"
|
@ -18,6 +18,9 @@ PACKAGE_NAME="vboxguest"
|
||||
PACKAGE_VERSION=@VERSION@_OSE
|
||||
AUTOINSTALL=yes
|
||||
|
||||
# Build only for kernels before Linux 4.16
|
||||
BUILD_EXCLUSIVE_KERNEL="^(4\.[0-9]\..*|4\.1[0-5]\..*|3\..*)"
|
||||
|
||||
BUILT_MODULE_NAME[0]="vboxguest"
|
||||
BUILT_MODULE_LOCATION[0]="vboxguest"
|
||||
DEST_MODULE_LOCATION[0]="/kernel/misc"
|
||||
|
Loading…
Reference in New Issue
Block a user