Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 926a525876fc
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7495a761cce4
Choose a head ref
  • 7 commits
  • 18 files changed
  • 6 contributors

Commits on May 7, 2019

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    rycee Robert Helgesson
    Copy the full SHA
    e2f6e36 View commit details

Commits on May 9, 2019

  1. virtualbox: 5.2.28 -> 6.0.6

    Quite some fixing was needed to get this to work.
    
    Changes in VirtualBox and additions:
    
    - VirtualBox is no longer officially supported on 32-bit hosts so i686-linux is removed from platforms
      for VirtualBox and the extension pack. 32-bit additions still work.
    
    - There was a refactoring of kernel module makefiles and two resulting bugs affected us which had to be patched.
      These bugs were reported to the bug tracker (see comments near patches).
    
    - The Qt5X11Extras makefile patch broke. Fixed it to apply again, making the libraries logic simpler
      and more correct (it just uses a different base path instead of always linking to Qt5X11Extras).
    
    - Added a patch to remove "test1" and "test2" kernel messages due to forgotten debugging code.
    
    - virtualbox-host NixOS module: the VirtualBoxVM executable should be setuid not VirtualBox.
      This matches how the official installer sets it up.
    
    - Additions: replaced a for loop for installing kernel modules with just a "make install",
      which seems to work without any of the things done in the previous code.
    
    - Additions: The package defined buildCommand which resulted in phases not running, including RUNPATH
      stripping in fixupPhase, and installPhase was defined which was not even run. Fixed this by
      refactoring using phases. Had to set dontStrip otherwise binaries were broken by stripping.
      The libdbus path had to be added later in fixupPhase because it is used via dlopen not directly linked.
    
    - Additions: Added zlib and libc to patchelf, otherwise runtime library errors result from some binaries.
      For some reason the missing libc only manifested itself for mount.vboxsf when included in the initrd.
    
    Changes in nixos/tests/virtualbox:
    
    - Update the simple-gui test to send the right keys to start the VM. With VirtualBox 5
      it was enough to just send "return", but with 6 the Tools thing may be selected by
      default. Send "home" to reliably select Tools, "down" to move to the VM and "return"
      to start it.
    
    - Disable the VirtualBox UART by default because it causes a crash due to a regression
      in VirtualBox (specific to software virtualization and serial port usage). It can
      still be enabled using an option but there is an assert that KVM nested virtualization
      is enabled, which works around the problem (see below).
    
    - Add an option to enable nested KVM virtualization, allowing VirtualBox to use hardware
      virtualization. This works around the UART problem and also allows using 64-bit
      guests, but requires a kernel module parameter.
    
    - Add an option to run 64-bit guests. Tested that the tests pass with that. As mentioned
      this requires KVM nested virtualization.
    ambrop72 committed May 9, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    rycee Robert Helgesson
    Copy the full SHA
    5bec9dc View commit details

Commits on May 10, 2019

  1. vimPlugins: update (#61226)

    timokau authored May 10, 2019
    Copy the full SHA
    df47f8b View commit details
  2. digikam: 6.0.0 -> 6.1.0 (#60042)

    * digikam: 6.0.0 -> 6.1.0
    
    * digikam: add dep, use ffmpeg_4
    
    * digikam: set DK_PLUGIN_PATH to help find plugins
    dtzWill authored and c0bw3b committed May 10, 2019
    Copy the full SHA
    bc94dcf View commit details
  3. virtualbox: 5.2.28 -> 6.0.6 (#60943)

    virtualbox: 5.2.28 -> 6.0.6
    flokli authored May 10, 2019
    Copy the full SHA
    b93d347 View commit details
  4. Copy the full SHA
    5d14340 View commit details
  5. virtualbox: python2 -> python3 (#61100)

    virtualbox: python2 -> python3
    flokli authored May 10, 2019
    Copy the full SHA
    7495a76 View commit details
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/virtualbox-host.nix
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ in
"VBoxNetNAT"
"VBoxSDL"
"VBoxVolInfo"
"VirtualBox"
"VirtualBoxVM"
]));

users.groups.vboxusers.gid = config.ids.gids.vboxusers;
42 changes: 34 additions & 8 deletions nixos/tests/virtualbox.nix
Original file line number Diff line number Diff line change
@@ -2,9 +2,26 @@
config ? {},
pkgs ? import ../.. { inherit system config; },
debug ? false,
enableUnfree ? false
enableUnfree ? false,
# Nested KVM virtualization (https://www.linux-kvm.org/page/Nested_Guests)
# requires a modprobe flag on the build machine: (kvm-amd for AMD CPUs)
# boot.extraModprobeConfig = "options kvm-intel nested=Y";
# Without this VirtualBox will use SW virtualization and will only be able
# to run 32-bit guests.
useKvmNestedVirt ? false,
# Whether to run 64-bit guests instead of 32-bit. Requires nested KVM.
use64bitGuest ? false,
# Whether to enable the virtual UART in VirtualBox guests, allowing to see
# the guest console. There is currently a bug in VirtualBox where this will
# cause a crash if running with SW virtualization
# (https://www.virtualbox.org/ticket/18632). If you need to debug the tests
# then enable this and nested KVM to work around the crash (see above).
enableVBoxUART ? false
}:

assert use64bitGuest -> useKvmNestedVirt;
assert enableVBoxUART -> useKvmNestedVirt; # VirtualBox bug, see above

with import ../lib/testing.nix { inherit system pkgs; };
with pkgs.lib;

@@ -94,7 +111,7 @@ let

testVM = vmName: vmScript: let
cfg = (import ../lib/eval-config.nix {
system = "i686-linux";
system = if use64bitGuest then "x86_64-linux" else "i686-linux";
modules = [
../modules/profiles/minimal.nix
(testVMConfig vmName vmScript)
@@ -141,13 +158,15 @@ let
sharePath = "/home/alice/vboxshare-${name}";

createFlags = mkFlags [
"--ostype Linux26"
"--ostype ${if use64bitGuest then "Linux26_64" else "Linux26"}"
"--register"
];

vmFlags = mkFlags ([
"--uart1 0x3F8 4"
"--uartmode1 client /run/virtualbox-log-${name}.sock"
vmFlags = mkFlags (
(optionals enableVBoxUART [
"--uart1 0x3F8 4"
"--uartmode1 client /run/virtualbox-log-${name}.sock"
]) ++ [
"--memory 768"
"--audio none"
] ++ (attrs.vmFlags or []));
@@ -180,15 +199,15 @@ let
];
in {
machine = {
systemd.sockets."vboxtestlog-${name}" = {
systemd.sockets."vboxtestlog-${name}" = mkIf enableVBoxUART {
description = "VirtualBox Test Machine Log Socket For ${name}";
wantedBy = [ "sockets.target" ];
before = [ "multi-user.target" ];
socketConfig.ListenStream = "/run/virtualbox-log-${name}.sock";
socketConfig.Accept = true;
};

systemd.services."vboxtestlog-${name}@" = {
systemd.services."vboxtestlog-${name}@" = mkIf enableVBoxUART {
description = "VirtualBox Test Machine Log For ${name}";
serviceConfig.StandardInput = "socket";
serviceConfig.StandardOutput = "syslog";
@@ -346,6 +365,8 @@ let
vmConfigs = mapAttrsToList mkVMConf vms;
in [ ./common/user-account.nix ./common/x11.nix ] ++ vmConfigs;
virtualisation.memorySize = 2048;
virtualisation.qemu.options =
if useKvmNestedVirt then ["-cpu" "kvm64,vmx=on"] else [];
virtualisation.virtualbox.host.enable = true;
services.xserver.displayManager.auto.user = "alice";
users.users.alice.extraGroups = let
@@ -412,9 +433,14 @@ in mapAttrs (mkVBoxTest false vboxVMs) {
);
$machine->sleep(5);
$machine->screenshot("gui_manager_started");
# Home to select Tools, down to move to the VM, enter to start it.
$machine->sendKeys("home");
$machine->sendKeys("down");
$machine->sendKeys("ret");
$machine->screenshot("gui_manager_sent_startup");
waitForStartup_simple (sub {
$machine->sendKeys("home");
$machine->sendKeys("down");
$machine->sendKeys("ret");
});
$machine->screenshot("gui_started");
9 changes: 6 additions & 3 deletions pkgs/applications/graphics/digikam/default.nix
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
, qtsvg
, qtwebengine

, akonadi-contacts
, kcalcore
, kconfigwidgets
, kcoreaddons
@@ -50,14 +51,14 @@
}:

mkDerivation rec {
name = "digikam-${version}";
version = "6.0.0";
pname = "digikam";
version = "6.1.0";

src = fetchFromGitHub {
owner = "KDE";
repo = "digikam";
rev = "v${version}";
sha256 = "1ifvrn0bm7fp07d059rl4dy146qzdxafl36ipxg1fg00dkv95hh4";
sha256 = "0h0jqfgpanhxfi3r7cgip58ppypqx79z6c5jj7i7f19hp2zziip8";
};

nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ];
@@ -88,6 +89,7 @@ mkDerivation rec {
qtsvg
qtwebengine

akonadi-contacts
kcalcore
kconfigwidgets
kcoreaddons
@@ -112,6 +114,7 @@ mkDerivation rec {

preFixup = ''
gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ gnumake hugin enblend-enfuse ]})
gappsWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${qtbase.qtPluginPrefix}/${pname})
substituteInPlace $out/bin/digitaglinktree \
--replace "/usr/bin/perl" "${perl}/bin/perl" \
--replace "/usr/bin/sqlite3" "${sqlite}/bin/sqlite3"
23 changes: 12 additions & 11 deletions pkgs/applications/virtualization/virtualbox/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ config, stdenv, fetchurl, lib, fetchpatch, iasl, dev86, pam, libxslt, libxml2
{ config, stdenv, fetchurl, lib, iasl, dev86, pam, libxslt, libxml2
, libX11, xorgproto, libXext, libXcursor, libXmu, qt5, libIDL, SDL, libcap
, libpng, glib, lvm2, libXrandr, libXinerama, libopus
, pkgconfig, which, docbook_xsl, docbook_xml_dtd_43
, alsaLib, curl, libvpx, nettools, dbus
, makeself, perl
, javaBindings ? false, jdk ? null
, pythonBindings ? false, python2 ? null
, pythonBindings ? false, python3 ? null
, extensionPack ? null, fakeroot ? null
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
, enableHardening ? false
@@ -17,12 +17,12 @@
with stdenv.lib;

let
python = python2;
python = python3;
buildType = "release";
# Remember to change the extpackRev and version in extpack.nix and
# guest-additions/default.nix as well.
main = "0jmrbyhs92lyarpvylxqn2ajxdg9b290w5nd4g0i4h83d28bwbw0";
version = "5.2.28";
main = "0lp584a350ya1zn03lhgmdbi91yp8yfja9hlg2jz1xyfj2dc869l";
version = "6.0.6";
in stdenv.mkDerivation {
name = "virtualbox-${version}";

@@ -76,11 +76,12 @@ in stdenv.mkDerivation {
optional enableHardening ./hardened.patch
++ [
./qtx11extras.patch
(fetchpatch {
name = "010-qt-5.11.patch";
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/010-qt-5.11.patch?h=packages/virtualbox";
sha256 = "0hjx99pg40wqyggnrpylrp5zngva4xrnk7r90i0ynrqc7n84g9pn";
})
# https://www.virtualbox.org/ticket/18620
./fix_kbuild.patch
# https://www.virtualbox.org/ticket/18621
./fix_module_makefile_sed.patch
# https://forums.virtualbox.org/viewtopic.php?f=7&t=92815
./fix_printk_test.patch
];

postPatch = ''
@@ -192,6 +193,6 @@ in stdenv.mkDerivation {
license = licenses.gpl2;
homepage = https://www.virtualbox.org/;
maintainers = with maintainers; [ flokli sander ];
platforms = [ "x86_64-linux" "i686-linux" ];
platforms = [ "x86_64-linux" ];
};
}
6 changes: 3 additions & 3 deletions pkgs/applications/virtualization/virtualbox/extpack.nix
Original file line number Diff line number Diff line change
@@ -2,22 +2,22 @@

with lib;

let version = "5.2.28";
let version = "6.0.6";
in
fetchurl rec {
name = "Oracle_VM_VirtualBox_Extension_Pack-${version}.vbox-extpack";
url = "https://download.virtualbox.org/virtualbox/${version}/${name}";
sha256 =
# Manually sha256sum the extensionPack file, must be hex!
# Thus do not use `nix-prefetch-url` but instead plain old `sha256sum`.
let value = "376e07cbf2ff2844c95c800346c8e4697d7bc671ae0e21e46153b2e7b4ccc1d6";
let value = "794f023a186bd217c29c3d30bd1434b6e9de3b242c7bf740d06d10f2d3d981c6";
in assert (builtins.stringLength value) == 64; value;

meta = {
description = "Oracle Extension pack for VirtualBox";
license = licenses.virtualbox-puel;
homepage = https://www.virtualbox.org/;
maintainers = with maintainers; [ flokli sander cdepillabout ];
platforms = [ "x86_64-linux" "i686-linux" ];
platforms = [ "x86_64-linux" ];
};
}
12 changes: 12 additions & 0 deletions pkgs/applications/virtualization/virtualbox/fix_kbuild.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -urN a/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile b/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile
--- a/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile
+++ b/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile
@@ -58,7 +58,7 @@
RT_WITH_VBOX \
VBOX_WITH_HARDENING \
VBOX_WITH_64_BITS_GUESTS # <-- must be consistent with Config.kmk!
-VBOXMOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie -Wno-declaration-after-statement
+VBOXMOD_CFLAGS = -include $(VBOXNETADPT_DIR)include/VBox/SUPDrvMangling.h -fno-pie -Wno-declaration-after-statement

include $(obj)/Makefile-footer.gmk

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff -urN VirtualBox-6.0.6/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk VirtualBox-6.0.6.new/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
--- VirtualBox-6.0.6/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk 2019-04-16 12:16:38.000000000 +0200
+++ VirtualBox-6.0.6.new/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk 2019-05-04 15:19:14.545497602 +0200
@@ -175,7 +175,7 @@
| $$(dir $$@)
$(QUIET)$(RM) -f -- $@
ifndef VBOX_WITH_HARDENING
- $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
+ $(QUIET)$(SED) -e "s;VBOX_WITH_HARDENING;;g" --output $@ $<
else
$(QUIET)$(CP) -f $< $@
endif
diff -urN VirtualBox-6.0.6/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk VirtualBox-6.0.6.new/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
--- VirtualBox-6.0.6/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk 2019-04-16 12:16:39.000000000 +0200
+++ VirtualBox-6.0.6.new/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk 2019-05-04 15:19:13.809493324 +0200
@@ -525,7 +525,7 @@
| $$(dir $$@)
$(QUIET)$(RM) -f -- $@
ifndef VBOX_WITH_HARDENING
- $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
+ $(QUIET)$(SED) -e "s;VBOX_WITH_HARDENING;;g" --output $@ $<
else
$(QUIET)$(CP) -f $< $@
endif
diff -urN VirtualBox-6.0.6/src/VBox/HostDrivers/VBoxPci/Makefile.kmk VirtualBox-6.0.6.new/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
--- VirtualBox-6.0.6/src/VBox/HostDrivers/VBoxPci/Makefile.kmk 2019-04-16 12:16:40.000000000 +0200
+++ VirtualBox-6.0.6.new/src/VBox/HostDrivers/VBoxPci/Makefile.kmk 2019-05-04 15:42:12.029664987 +0200
@@ -67,7 +67,7 @@
| $$(dir $$@)
$(QUIET)$(RM) -f -- $@
ifndef VBOX_WITH_HARDENING
- $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
+ $(QUIET)$(SED) -e "s;VBOX_WITH_HARDENING;;g" --output $@ $<
else
$(QUIET)$(CP) -f $< $@
endif
14 changes: 14 additions & 0 deletions pkgs/applications/virtualization/virtualbox/fix_printk_test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -urN VirtualBox-6.0.6/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c VirtualBox-6.0.6.new/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
--- VirtualBox-6.0.6/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c 2019-04-16 12:16:37.000000000 +0200
+++ VirtualBox-6.0.6.new/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c 2019-05-04 15:59:44.439905223 +0200
@@ -426,10 +426,8 @@
int rc;
PSUPDRVSESSION pSession;
Log(("VBoxDrvLinuxCreate: pFilp=%p pid=%d/%d %s\n", pFilp, RTProcSelf(), current->pid, current->comm));
- printk("test1\n");

#ifdef VBOX_WITH_HARDENING
- printk("test2\n");
/*
* Only root is allowed to access the unrestricted device, enforce it!
*/
Loading