Merge pull request #74260 from B4dM4n/virtualbox-update
virtualbox: 6.0.12 -> 6.0.14
This commit is contained in:
commit
135ebdb7b8
5 changed files with 86 additions and 137 deletions
|
@ -2,7 +2,7 @@
|
|||
, libX11, xorgproto, libXext, libXcursor, libXmu, libIDL, SDL, libcap, libGL
|
||||
, libpng, glib, lvm2, libXrandr, libXinerama, libopus, qtbase, qtx11extras
|
||||
, qttools, qtsvg, qtwayland, pkgconfig, which, docbook_xsl, docbook_xml_dtd_43
|
||||
, alsaLib, curl, libvpx, nettools, dbus, substituteAll
|
||||
, alsaLib, curl, libvpx, nettools, dbus, substituteAll, fetchpatch
|
||||
, makeself, perl
|
||||
, javaBindings ? true, jdk ? null # Almost doesn't affect closure size
|
||||
, pythonBindings ? false, python3 ? null
|
||||
|
@ -21,8 +21,8 @@ let
|
|||
buildType = "release";
|
||||
# Remember to change the extpackRev and version in extpack.nix and
|
||||
# guest-additions/default.nix as well.
|
||||
main = "1hxbvr78b0fddcn7npz72ki89lpmbgqj4b5qvxm1wik7v0d8v1y8";
|
||||
version = "6.0.12";
|
||||
main = "036x2mvkk22lbg72cz6pik9z538j1ag6mmwjjmfikgrq1i7v24jy";
|
||||
version = "6.0.14";
|
||||
in stdenv.mkDerivation {
|
||||
pname = "virtualbox";
|
||||
inherit version;
|
||||
|
@ -92,9 +92,26 @@ in stdenv.mkDerivation {
|
|||
})
|
||||
++ [
|
||||
./qtx11extras.patch
|
||||
# Kernel 5.3 fix, should be fixed with VirtualBox 6.0.14
|
||||
# https://www.virtualbox.org/ticket/18911
|
||||
./kernel-5.3-fix.patch
|
||||
# Kernel 5.4 fix, should be fixed with next upstream release
|
||||
# https://www.virtualbox.org/ticket/18945
|
||||
(fetchpatch {
|
||||
name = "kernel-5.4-fix-1.patch";
|
||||
url = "https://www.virtualbox.org/changeset/81586/vbox?format=diff";
|
||||
sha256 = "0zbkc9v65pkdmjik53x29g39qyf7narkhpwpx5n1n1bfqnhf0k1r";
|
||||
stripLen = 1;
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "kernel-5.4-fix-2.patch";
|
||||
url = "https://www.virtualbox.org/changeset/81587/vbox?format=diff";
|
||||
sha256 = "1j98cqxj8qlqwaqr4mvwwbkmchw8jmygjwgzz82gix7fj76j2y9c";
|
||||
stripLen = 1;
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "kernel-5.4-fix-3.patch";
|
||||
url = "https://www.virtualbox.org/changeset/81649/vbox?format=diff";
|
||||
sha256 = "1d6p5k5dgzmjglqfkbcbvpn1x3wxila30q4gcbb7pxwfgclaw2hk";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let version = "6.0.12";
|
||||
let version = "6.0.14";
|
||||
in
|
||||
fetchurl rec {
|
||||
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack";
|
||||
|
@ -11,7 +11,7 @@ fetchurl rec {
|
|||
# Manually sha256sum the extensionPack file, must be hex!
|
||||
# Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`.
|
||||
# Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS
|
||||
let value = "27a0956940654b0accf4d79692078bd496d9f062e4ed3da69e5421cba8d1e444";
|
||||
let value = "c8a5cc980c9c94cdac3d94e23cf159c2433aae76b416dbfb5b1a918758f21e63";
|
||||
in assert (builtins.stringLength value) == 64; value;
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, fetchurl, lib, patchelf, cdrkit, kernel, which, makeWrapper
|
||||
, zlib, xorg, dbus, virtualbox, dos2unix }:
|
||||
, zlib, xorg, dbus, virtualbox, dos2unix, fetchpatch, findutils, patchutils }:
|
||||
|
||||
let
|
||||
version = virtualbox.version;
|
||||
|
@ -21,12 +21,12 @@ let
|
|||
{ name = "libXfixes.so"; pkg = xorg.libXfixes; }
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "VirtualBox-GuestAdditions-${version}-${kernel.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
|
||||
sha256 = "0hflsbx70dli34mpx94vd33p55ycfs3ahzwcdzqxdiwiiskjpykq";
|
||||
sha256 = "1c9ysx0fhxxginmp607b4fk74dvlr32n6w52gawm06prf4xg90nb";
|
||||
};
|
||||
|
||||
KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
||||
|
@ -43,13 +43,67 @@ in stdenv.mkDerivation {
|
|||
prePatch = ''
|
||||
substituteInPlace src/vboxguest-${version}/vboxvideo/vbox_ttm.c \
|
||||
--replace "<ttm/" "<drm/ttm/"
|
||||
${dos2unix}/bin/dos2unix src/vboxguest-${version}/vboxguest/r0drv/linux/mp-r0drv-linux.c
|
||||
|
||||
echo ${lib.escapeShellArgs patches} | \
|
||||
${findutils}/bin/xargs -n1 ${patchutils}/bin/lsdiff --strip=1 --addprefix=src/vboxguest-${version}/ | \
|
||||
${findutils}/bin/xargs ${dos2unix}/bin/dos2unix
|
||||
'';
|
||||
|
||||
patchFlags = [ "-p1" "-d" "src/vboxguest-${version}" ];
|
||||
# Kernel 5.3 fix, should be fixed with VirtualBox 6.0.14
|
||||
# https://www.virtualbox.org/ticket/18911
|
||||
patches = [ ./kernel-5.3-fix.patch ];
|
||||
# Kernel 5.4 fix, should be fixed with next upstream release
|
||||
# https://www.virtualbox.org/ticket/18945
|
||||
patches = lib.concatLists (lib.mapAttrsToList (changeset: args:
|
||||
map (arg:
|
||||
fetchpatch ({
|
||||
name = "kernel-5.4-fix-${changeset}.patch";
|
||||
url = "https://www.virtualbox.org/changeset/${changeset}/vbox?format=diff";
|
||||
} // arg)) args) {
|
||||
"81586" = [{
|
||||
sha256 = "126z67x6vy65w6jlqbh4z4f1cffxnycwb69vns0154bawbsbxsiw";
|
||||
stripLen = 5;
|
||||
extraPrefix = "vboxguest/";
|
||||
}];
|
||||
"81587" = [
|
||||
{
|
||||
sha256 = "0simzswnl0wvnc2i9gixz99rfc7lxk1nrnskksrlrrl9hqnh0lva";
|
||||
stripLen = 5;
|
||||
extraPrefix = "vboxsf/";
|
||||
includes = [ "*/the-linux-kernel.h" ];
|
||||
}
|
||||
{
|
||||
sha256 = "0a8r9h3x3lcjq2fykgqhdaykp00rnnkbxz8xnxg847zgvca15y02";
|
||||
stripLen = 5;
|
||||
extraPrefix = "vboxguest/";
|
||||
includes = [ "*/the-linux-kernel.h" ];
|
||||
}
|
||||
];
|
||||
"81649" = [
|
||||
{
|
||||
sha256 = "1p1skxlvqigydxr4sk7w51lpk7nxg0d9lppq39sdnfmgi1z0h0sc";
|
||||
stripLen = 2;
|
||||
extraPrefix = "vboxguest/";
|
||||
includes = [ "*/cdefs.h" ];
|
||||
}
|
||||
{
|
||||
sha256 = "1j060ggdnndyjdhkfvs15306gl7g932sim9xjmx2mnx8gjdmg37f";
|
||||
stripLen = 2;
|
||||
extraPrefix = "vboxsf/";
|
||||
includes = [ "*/cdefs.h" ];
|
||||
}
|
||||
{
|
||||
sha256 = "060h3a5k2yklbvlg0hyg4x87xrg37cvv3rjb67xizlwvlyy6ykkg";
|
||||
stripLen = 5;
|
||||
extraPrefix = "vboxguest/";
|
||||
includes = [ "*/thread2-r0drv-linux.c" ];
|
||||
}
|
||||
{
|
||||
sha256 = "0cxlkf7cy751gl8dgzr7vkims1kmx5pgzsrxyk8w18zyp5nk9glw";
|
||||
stripLen = 7;
|
||||
extraPrefix = "vboxvideo/";
|
||||
includes = [ "*/vbox_*.c" ];
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
unpackPhase = ''
|
||||
${if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
--- a/vboxguest/r0drv/linux/mp-r0drv-linux.c
|
||||
+++ a/vboxguest/r0drv/linux/mp-r0drv-linux.c
|
||||
@@ -283,12 +283,15 @@
|
||||
if (RTCpuSetCount(&OnlineSet) > 1)
|
||||
{
|
||||
/* Fire the function on all other CPUs without waiting for completion. */
|
||||
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||
+ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
|
||||
+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
|
||||
+ Assert(!rc); NOREF(rc);
|
||||
# else
|
||||
int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */);
|
||||
-# endif
|
||||
Assert(!rc); NOREF(rc);
|
||||
+# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -326,7 +329,6 @@
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
IPRT_LINUX_SAVE_EFL_AC();
|
||||
- int rc;
|
||||
RTMPARGS Args;
|
||||
|
||||
RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
|
||||
@@ -337,14 +339,17 @@
|
||||
Args.cHits = 0;
|
||||
|
||||
RTThreadPreemptDisable(&PreemptState);
|
||||
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
|
||||
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||
+ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
|
||||
+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
|
||||
+ Assert(rc == 0); NOREF(rc);
|
||||
# else /* older kernels */
|
||||
- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
|
||||
+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
|
||||
+ Assert(rc == 0); NOREF(rc);
|
||||
# endif /* older kernels */
|
||||
RTThreadPreemptRestore(&PreemptState);
|
||||
|
||||
- Assert(rc == 0); NOREF(rc);
|
||||
IPRT_LINUX_RESTORE_EFL_AC();
|
||||
#else
|
||||
RT_NOREF(pfnWorker, pvUser1, pvUser2);
|
|
@ -1,72 +0,0 @@
|
|||
--- a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||
+++ b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||
@@ -2123,7 +2123,9 @@
|
||||
#endif
|
||||
if (in_dev != NULL)
|
||||
{
|
||||
- for_ifa(in_dev) {
|
||||
+ struct in_ifaddr *ifa;
|
||||
+
|
||||
+ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
|
||||
if (VBOX_IPV4_IS_LOOPBACK(ifa->ifa_address))
|
||||
return NOTIFY_OK;
|
||||
|
||||
@@ -2137,7 +2139,7 @@
|
||||
|
||||
pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
|
||||
/* :fAdded */ true, kIntNetAddrType_IPv4, &ifa->ifa_address);
|
||||
- } endfor_ifa(in_dev);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
|
||||
+++ a/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
|
||||
@@ -283,12 +283,15 @@
|
||||
if (RTCpuSetCount(&OnlineSet) > 1)
|
||||
{
|
||||
/* Fire the function on all other CPUs without waiting for completion. */
|
||||
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||
+ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
|
||||
+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
|
||||
+ Assert(!rc); NOREF(rc);
|
||||
# else
|
||||
int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */);
|
||||
-# endif
|
||||
Assert(!rc); NOREF(rc);
|
||||
+# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -326,7 +329,6 @@
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
IPRT_LINUX_SAVE_EFL_AC();
|
||||
- int rc;
|
||||
RTMPARGS Args;
|
||||
|
||||
RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
|
||||
@@ -337,14 +339,17 @@
|
||||
Args.cHits = 0;
|
||||
|
||||
RTThreadPreemptDisable(&PreemptState);
|
||||
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
|
||||
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||
+ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
|
||||
+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
|
||||
+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
|
||||
+ Assert(rc == 0); NOREF(rc);
|
||||
# else /* older kernels */
|
||||
- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
|
||||
+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
|
||||
+ Assert(rc == 0); NOREF(rc);
|
||||
# endif /* older kernels */
|
||||
RTThreadPreemptRestore(&PreemptState);
|
||||
|
||||
- Assert(rc == 0); NOREF(rc);
|
||||
IPRT_LINUX_RESTORE_EFL_AC();
|
||||
#else
|
||||
RT_NOREF(pfnWorker, pvUser1, pvUser2);
|
Loading…
Reference in a new issue