Skip to content

Commit

Permalink
Merge pull request #74260 from B4dM4n/virtualbox-update
Browse files Browse the repository at this point in the history
virtualbox: 6.0.12 -> 6.0.14
  • Loading branch information
flokli committed Dec 12, 2019
2 parents aa3fcec + 837dbc8 commit 135ebdb
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 137 deletions.
29 changes: 23 additions & 6 deletions pkgs/applications/virtualization/virtualbox/default.nix
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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 = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/virtualization/virtualbox/extpack.nix
Expand Up @@ -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";
Expand All @@ -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 = {
Expand Down
@@ -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;
Expand All @@ -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";
Expand All @@ -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 ''
Expand Down

This file was deleted.

72 changes: 0 additions & 72 deletions pkgs/applications/virtualization/virtualbox/kernel-5.3-fix.patch

This file was deleted.

0 comments on commit 135ebdb

Please sign in to comment.