git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #74260 from B4dM4n/virtualbox-update

virtualbox: 6.0.12 -> 6.0.14

commit135ebdb7b864075bc3bc3cc81f653c5c4f417a5e authorFlorian Klink <flokli@flokli.de> dateThu 12 Dec 2019, 03:52 (7 years ago) parentaa3fcec837dbc8
5 files changed+86−137
pkgs/applications/virtualization/virtualbox/default.nix+23−6 pkgs/applications/virtualization/virtualbox/extpack.nix+2−2 pkgs/applications/virtualization/virtualbox/guest-additions/default.nix+61−7 pkgs/applications/virtualization/virtualbox/guest-additions/kernel-5.3-fix.patch−50 pkgs/applications/virtualization/virtualbox/kernel-5.3-fix.patch−72
pkgs/applications/virtualization/virtualbox/default.nix+23−6
@@ -2,7 +2,7 @@
22, libX11, xorgproto, libXext, libXcursor, libXmu, libIDL, SDL, libcap, libGL
33, libpng, glib, lvm2, libXrandr, libXinerama, libopus, qtbase, qtx11extras
44, qttools, qtsvg, qtwayland, pkgconfig, which, docbook_xsl, docbook_xml_dtd_43
5−, alsaLib, curl, libvpx, nettools, dbus, substituteAll
5+, alsaLib, curl, libvpx, nettools, dbus, substituteAll, fetchpatch
66, makeself, perl
77, javaBindings ? true, jdk ? null # Almost doesn't affect closure size
88, pythonBindings ? false, python3 ? null
@@ -21,8 +21,8 @@ let
2121 buildType = "release";
2222 # Remember to change the extpackRev and version in extpack.nix and
2323 # guest-additions/default.nix as well.
24− main = "1hxbvr78b0fddcn7npz72ki89lpmbgqj4b5qvxm1wik7v0d8v1y8";
25− version = "6.0.12";
24+ main = "036x2mvkk22lbg72cz6pik9z538j1ag6mmwjjmfikgrq1i7v24jy";
25+ version = "6.0.14";
2626in stdenv.mkDerivation {
2727 pname = "virtualbox";
2828 inherit version;
@@ -92,9 +92,26 @@ in stdenv.mkDerivation {
9292 })
9393 ++ [
9494 ./qtx11extras.patch
95− # Kernel 5.3 fix, should be fixed with VirtualBox 6.0.14
96− # https://www.virtualbox.org/ticket/18911
97− ./kernel-5.3-fix.patch
95+ # Kernel 5.4 fix, should be fixed with next upstream release
96+ # https://www.virtualbox.org/ticket/18945
97+ (fetchpatch {
98+ name = "kernel-5.4-fix-1.patch";
99+ url = "https://www.virtualbox.org/changeset/81586/vbox?format=diff";
100+ sha256 = "0zbkc9v65pkdmjik53x29g39qyf7narkhpwpx5n1n1bfqnhf0k1r";
101+ stripLen = 1;
102+ })
103+ (fetchpatch {
104+ name = "kernel-5.4-fix-2.patch";
105+ url = "https://www.virtualbox.org/changeset/81587/vbox?format=diff";
106+ sha256 = "1j98cqxj8qlqwaqr4mvwwbkmchw8jmygjwgzz82gix7fj76j2y9c";
107+ stripLen = 1;
108+ })
109+ (fetchpatch {
110+ name = "kernel-5.4-fix-3.patch";
111+ url = "https://www.virtualbox.org/changeset/81649/vbox?format=diff";
112+ sha256 = "1d6p5k5dgzmjglqfkbcbvpn1x3wxila30q4gcbb7pxwfgclaw2hk";
113+ stripLen = 1;
114+ })
98115 ];
99116
100117 postPatch = ''
pkgs/applications/virtualization/virtualbox/extpack.nix+2−2
@@ -2,7 +2,7 @@
22
33with lib;
44
5−let version = "6.0.12";
5+let version = "6.0.14";
66in
77fetchurl rec {
88 name = "Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack";
@@ -11,7 +11,7 @@ fetchurl rec {
1111 # Manually sha256sum the extensionPack file, must be hex!
1212 # Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`.
1313 # Checksums can also be found at https://www.virtualbox.org/download/hashes/${version}/SHA256SUMS
14− let value = "27a0956940654b0accf4d79692078bd496d9f062e4ed3da69e5421cba8d1e444";
14+ let value = "c8a5cc980c9c94cdac3d94e23cf159c2433aae76b416dbfb5b1a918758f21e63";
1515 in assert (builtins.stringLength value) == 64; value;
1616
1717 meta = {
pkgs/applications/virtualization/virtualbox/guest-additions/default.nix+61−7
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, lib, patchelf, cdrkit, kernel, which, makeWrapper
2−, zlib, xorg, dbus, virtualbox, dos2unix }:
2+, zlib, xorg, dbus, virtualbox, dos2unix, fetchpatch, findutils, patchutils }:
33
44let
55 version = virtualbox.version;
@@ -21,12 +21,12 @@ let
2121 { name = "libXfixes.so"; pkg = xorg.libXfixes; }
2222 ];
2323
24−in stdenv.mkDerivation {
24+in stdenv.mkDerivation rec {
2525 name = "VirtualBox-GuestAdditions-${version}-${kernel.version}";
2626
2727 src = fetchurl {
2828 url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
29− sha256 = "0hflsbx70dli34mpx94vd33p55ycfs3ahzwcdzqxdiwiiskjpykq";
29+ sha256 = "1c9ysx0fhxxginmp607b4fk74dvlr32n6w52gawm06prf4xg90nb";
3030 };
3131
3232 KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
@@ -43,13 +43,67 @@ in stdenv.mkDerivation {
4343 prePatch = ''
4444 substituteInPlace src/vboxguest-${version}/vboxvideo/vbox_ttm.c \
4545 --replace "<ttm/" "<drm/ttm/"
46− ${dos2unix}/bin/dos2unix src/vboxguest-${version}/vboxguest/r0drv/linux/mp-r0drv-linux.c
46+
47+ echo ${lib.escapeShellArgs patches} | \
48+ ${findutils}/bin/xargs -n1 ${patchutils}/bin/lsdiff --strip=1 --addprefix=src/vboxguest-${version}/ | \
49+ ${findutils}/bin/xargs ${dos2unix}/bin/dos2unix
4750 '';
4851
4952 patchFlags = [ "-p1" "-d" "src/vboxguest-${version}" ];
50− # Kernel 5.3 fix, should be fixed with VirtualBox 6.0.14
51− # https://www.virtualbox.org/ticket/18911
52− patches = [ ./kernel-5.3-fix.patch ];
53+ # Kernel 5.4 fix, should be fixed with next upstream release
54+ # https://www.virtualbox.org/ticket/18945
55+ patches = lib.concatLists (lib.mapAttrsToList (changeset: args:
56+ map (arg:
57+ fetchpatch ({
58+ name = "kernel-5.4-fix-${changeset}.patch";
59+ url = "https://www.virtualbox.org/changeset/${changeset}/vbox?format=diff";
60+ } // arg)) args) {
61+ "81586" = [{
62+ sha256 = "126z67x6vy65w6jlqbh4z4f1cffxnycwb69vns0154bawbsbxsiw";
63+ stripLen = 5;
64+ extraPrefix = "vboxguest/";
65+ }];
66+ "81587" = [
67+ {
68+ sha256 = "0simzswnl0wvnc2i9gixz99rfc7lxk1nrnskksrlrrl9hqnh0lva";
69+ stripLen = 5;
70+ extraPrefix = "vboxsf/";
71+ includes = [ "*/the-linux-kernel.h" ];
72+ }
73+ {
74+ sha256 = "0a8r9h3x3lcjq2fykgqhdaykp00rnnkbxz8xnxg847zgvca15y02";
75+ stripLen = 5;
76+ extraPrefix = "vboxguest/";
77+ includes = [ "*/the-linux-kernel.h" ];
78+ }
79+ ];
80+ "81649" = [
81+ {
82+ sha256 = "1p1skxlvqigydxr4sk7w51lpk7nxg0d9lppq39sdnfmgi1z0h0sc";
83+ stripLen = 2;
84+ extraPrefix = "vboxguest/";
85+ includes = [ "*/cdefs.h" ];
86+ }
87+ {
88+ sha256 = "1j060ggdnndyjdhkfvs15306gl7g932sim9xjmx2mnx8gjdmg37f";
89+ stripLen = 2;
90+ extraPrefix = "vboxsf/";
91+ includes = [ "*/cdefs.h" ];
92+ }
93+ {
94+ sha256 = "060h3a5k2yklbvlg0hyg4x87xrg37cvv3rjb67xizlwvlyy6ykkg";
95+ stripLen = 5;
96+ extraPrefix = "vboxguest/";
97+ includes = [ "*/thread2-r0drv-linux.c" ];
98+ }
99+ {
100+ sha256 = "0cxlkf7cy751gl8dgzr7vkims1kmx5pgzsrxyk8w18zyp5nk9glw";
101+ stripLen = 7;
102+ extraPrefix = "vboxvideo/";
103+ includes = [ "*/vbox_*.c" ];
104+ }
105+ ];
106+ });
53107
54108 unpackPhase = ''
55109 ${if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
pkgs/applications/virtualization/virtualbox/guest-additions/kernel-5.3-fix.patchdeleted−50
@@ -1,50 +0,0 @@
1−--- a/vboxguest/r0drv/linux/mp-r0drv-linux.c
2−+++ a/vboxguest/r0drv/linux/mp-r0drv-linux.c
3−@@ -283,12 +283,15 @@
4− if (RTCpuSetCount(&OnlineSet) > 1)
5− {
6− /* Fire the function on all other CPUs without waiting for completion. */
7−-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
8−+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
9−+ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
10−+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
11− int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
12−+ Assert(!rc); NOREF(rc);
13− # else
14− int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */);
15−-# endif
16− Assert(!rc); NOREF(rc);
17−+# endif
18− }
19− #endif
20−
21−@@ -326,7 +329,6 @@
22− {
23− #ifdef CONFIG_SMP
24− IPRT_LINUX_SAVE_EFL_AC();
25−- int rc;
26− RTMPARGS Args;
27−
28− RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
29−@@ -337,14 +339,17 @@
30− Args.cHits = 0;
31−
32− RTThreadPreemptDisable(&PreemptState);
33−-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
34−- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
35−+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
36−+ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
37−+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
38−+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
39−+ Assert(rc == 0); NOREF(rc);
40− # else /* older kernels */
41−- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
42−+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
43−+ Assert(rc == 0); NOREF(rc);
44− # endif /* older kernels */
45− RTThreadPreemptRestore(&PreemptState);
46−
47−- Assert(rc == 0); NOREF(rc);
48− IPRT_LINUX_RESTORE_EFL_AC();
49− #else
50− RT_NOREF(pfnWorker, pvUser1, pvUser2);
pkgs/applications/virtualization/virtualbox/kernel-5.3-fix.patchdeleted−72
@@ -1,72 +0,0 @@
1−--- a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
2−+++ b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
3−@@ -2123,7 +2123,9 @@
4− #endif
5− if (in_dev != NULL)
6− {
7−- for_ifa(in_dev) {
8−+ struct in_ifaddr *ifa;
9−+
10−+ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
11− if (VBOX_IPV4_IS_LOOPBACK(ifa->ifa_address))
12− return NOTIFY_OK;
13−
14−@@ -2137,7 +2139,7 @@
15−
16− pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
17− /* :fAdded */ true, kIntNetAddrType_IPv4, &ifa->ifa_address);
18−- } endfor_ifa(in_dev);
19−+ }
20− }
21−
22− /*
23−--- a/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
24−+++ a/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c
25−@@ -283,12 +283,15 @@
26− if (RTCpuSetCount(&OnlineSet) > 1)
27− {
28− /* Fire the function on all other CPUs without waiting for completion. */
29−-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
30−+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
31−+ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
32−+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
33− int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
34−+ Assert(!rc); NOREF(rc);
35− # else
36− int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */);
37−-# endif
38− Assert(!rc); NOREF(rc);
39−+# endif
40− }
41− #endif
42−
43−@@ -326,7 +329,6 @@
44− {
45− #ifdef CONFIG_SMP
46− IPRT_LINUX_SAVE_EFL_AC();
47−- int rc;
48− RTMPARGS Args;
49−
50− RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
51−@@ -337,14 +339,17 @@
52− Args.cHits = 0;
53−
54− RTThreadPreemptDisable(&PreemptState);
55−-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
56−- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
57−+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
58−+ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
59−+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
60−+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
61−+ Assert(rc == 0); NOREF(rc);
62− # else /* older kernels */
63−- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
64−+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
65−+ Assert(rc == 0); NOREF(rc);
66− # endif /* older kernels */
67− RTThreadPreemptRestore(&PreemptState);
68−
69−- Assert(rc == 0); NOREF(rc);
70− IPRT_LINUX_RESTORE_EFL_AC();
71− #else
72− RT_NOREF(pfnWorker, pvUser1, pvUser2);