summary refs log tree commit diff
path: root/pkgs/applications/virtualization
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/virtualization')
-rw-r--r--pkgs/applications/virtualization/bochs/bochs-2.6.10-glibc-2.26.patch13
-rw-r--r--pkgs/applications/virtualization/bochs/bochs-2.6.9-glibc-2.26.patch14
-rw-r--r--pkgs/applications/virtualization/bochs/default.nix12
-rw-r--r--pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.diff (renamed from pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.patch)12
-rw-r--r--pkgs/applications/virtualization/crosvm/default.nix68
-rwxr-xr-xpkgs/applications/virtualization/crosvm/update.py30
-rw-r--r--pkgs/applications/virtualization/crosvm/upstream-info.json14
-rw-r--r--pkgs/applications/virtualization/podman/default.nix6
-rw-r--r--pkgs/applications/virtualization/remotebox/default.nix4
-rw-r--r--pkgs/applications/virtualization/runc/default.nix4
-rw-r--r--pkgs/applications/virtualization/x11docker/default.nix4
11 files changed, 97 insertions, 84 deletions
diff --git a/pkgs/applications/virtualization/bochs/bochs-2.6.10-glibc-2.26.patch b/pkgs/applications/virtualization/bochs/bochs-2.6.10-glibc-2.26.patch
new file mode 100644
index 00000000000..e662913574d
--- /dev/null
+++ b/pkgs/applications/virtualization/bochs/bochs-2.6.10-glibc-2.26.patch
@@ -0,0 +1,13 @@
+diff -Naur bochs-2.6.10.orig/iodev/network/slirp/slirp.h bochs-2.6.10.mod/iodev/network/slirp/slirp.h
+--- bochs-2.6.10.orig/iodev/network/slirp/slirp.h	2019-11-02 16:30:39.843938000 -0300
++++ bochs-2.6.10.mod/iodev/network/slirp/slirp.h	2019-12-29 12:55:49.541630697 -0300
+@@ -44,8 +44,8 @@
+ #endif
+ 
+ #include <sys/types.h>
+-#if defined(__OpenBSD__) || defined(__linux__)
+ #include <stdint.h>
++#if defined(__OpenBSD__) || defined(__linux__)
+ #include <sys/wait.h>
+ #endif
+ #ifdef HAVE_SYS_BITYPES_H
diff --git a/pkgs/applications/virtualization/bochs/bochs-2.6.9-glibc-2.26.patch b/pkgs/applications/virtualization/bochs/bochs-2.6.9-glibc-2.26.patch
deleted file mode 100644
index a13b42ee35a..00000000000
--- a/pkgs/applications/virtualization/bochs/bochs-2.6.9-glibc-2.26.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/iodev/network/slirp/slirp.h b/iodev/network/slirp/slirp.h
-index 7c16aa3..202a1b7 100644
---- a/iodev/network/slirp/slirp.h
-+++ b/iodev/network/slirp/slirp.h
-@@ -33,8 +33,8 @@ typedef char *caddr_t;
- #endif
- 
- #include <sys/types.h>
--#if defined(__OpenBSD__)
- #include <stdint.h>
-+#if defined(__OpenBSD__)
- #include <sys/wait.h>
- #endif
- #ifdef HAVE_SYS_BITYPES_H
diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix
index 770154f1918..f6e202ac499 100644
--- a/pkgs/applications/virtualization/bochs/default.nix
+++ b/pkgs/applications/virtualization/bochs/default.nix
@@ -19,16 +19,16 @@ with stdenv.lib;
 stdenv.mkDerivation rec {
 
   pname = "bochs";
-  version = "2.6.9";
+  version = "2.6.10";
 
   src = fetchurl {
     url = "mirror://sourceforge/project/bochs/bochs/${version}/${pname}-${version}.tar.gz";
-    sha256 = "1379cq4cnfprhw8mgh60i0q9j8fz8d7n3d5fnn2g9fdiv5znfnzf";
+    sha256 = "1c3mw4b8wrjf8z44fvhycs95j1wd1c0b4khcv63giiia5j5q0gvj";
   };
 
-  patches = [ ./bochs-2.6.9-glibc-2.26.patch ];
+  patches = [ ./bochs-2.6.10-glibc-2.26.patch ];
 
-  buildInputs = with stdenv.lib;
+  buildInputs =
   [ pkgconfig libtool gtk2 libGLU libGL readline libX11 libXpm docbook_xml_dtd_45 docbook_xsl ]
   ++ optionals termSupport [ ncurses ]
   ++ optionals sdlSupport [ SDL2 ]
@@ -118,9 +118,9 @@ stdenv.mkDerivation rec {
       in C++, that runs on most popular platforms. It includes emulation of the
       Intel x86 CPU, common I/O devices, and a custom BIOS.
     '';
-    homepage = http://bochs.sourceforge.net/;
+    homepage = "http://bochs.sourceforge.net/";
     license = licenses.lgpl2Plus;
-    maintainers = [ maintainers.AndersonTorres ];
+    maintainers = with maintainers; [ AndersonTorres ];
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.patch b/pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.diff
index 46b091b3a35..f1aa50ee102 100644
--- a/pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.patch
+++ b/pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.diff
@@ -1,9 +1,9 @@
-diff --git a/src/main.rs b/src/main.rs
-index 81f20a7..481ebd7 100644
---- a/src/main.rs
-+++ b/src/main.rs
-@@ -158,7 +158,9 @@ impl Default for Config {
-             wayland_dmabuf: false,
+diff --git a/src/crosvm.rs b/src/crosvm.rs
+index b7055df..5989c87 100644
+--- a/src/crosvm.rs
++++ b/src/crosvm.rs
+@@ -141,7 +141,9 @@ impl Default for Config {
+             x_display: None,
              shared_dirs: Vec::new(),
              sandbox: !cfg!(feature = "default-no-sandbox"),
 -            seccomp_policy_dir: PathBuf::from(SECCOMP_POLICY_DIR),
diff --git a/pkgs/applications/virtualization/crosvm/default.nix b/pkgs/applications/virtualization/crosvm/default.nix
index 106b39b0336..5035b65f981 100644
--- a/pkgs/applications/virtualization/crosvm/default.nix
+++ b/pkgs/applications/virtualization/crosvm/default.nix
@@ -11,32 +11,15 @@ let
     else if isx86_64 then "x86_64"
     else throw "no seccomp policy files available for host platform";
 
-  # used to turn symlinks into real files because write permissions are necessary for the vendoring process
-  delink = src: runCommand "${src.name}-delinked" {
-    preferLocalBuild = true;
-    allowSubstitutes = false;
-  } ''
-    cp -prL --reflink=auto ${src} $out
-  '';
-
-  # used to place subtrees into the location they have in the Chromium monorepo
-  move = src: target: runCommand "moved-${src.name}" {
-    preferLocalBuild = true;
-    allowSubstitutes = false;
-  } ''
-    mkdir -p $(dirname $out/${target})
-    ln -s ${src} $out/${target}
-  '';
-
-  # used to check out subtrees from the Chromium monorepo
-  chromiumSource = name: subtrees: delink (symlinkJoin {
-    inherit name;
-    paths = stdenv.lib.mapAttrsToList (
-      location: { url, rev, sha256, fetchSubmodules, ... }:
-      move (fetchgit {
-        inherit url rev sha256 fetchSubmodules;
-      }) location) subtrees;
-  });
+  crosvmSrc = fetchgit {
+    inherit (upstreamInfo.components."chromiumos/platform/crosvm")
+      url rev sha256 fetchSubmodules;
+  };
+
+  adhdSrc = fetchgit {
+    inherit (upstreamInfo.components."chromiumos/third_party/adhd")
+      url rev sha256 fetchSubmodules;
+  };
 
 in
 
@@ -44,15 +27,33 @@ in
     pname = "crosvm";
     inherit (upstreamInfo) version;
 
-    src = chromiumSource "${pname}-sources" upstreamInfo.components;
+    unpackPhase = ''
+      runHook preUnpack
+
+      mkdir -p chromiumos/platform chromiumos/third_party
+
+      pushd chromiumos/platform
+      unpackFile ${crosvmSrc}
+      mv ${crosvmSrc.name} crosvm
+      popd
+
+      pushd chromiumos/third_party
+      unpackFile ${adhdSrc}
+      mv ${adhdSrc.name} adhd
+      popd
 
-    sourceRoot = "${src.name}/chromiumos/platform/crosvm";
+      chmod -R u+w -- "$sourceRoot"
+
+      runHook postUnpack
+    '';
+
+    sourceRoot = "chromiumos/platform/crosvm";
 
     patches = [
-      ./default-seccomp-policy-dir.patch
+      ./default-seccomp-policy-dir.diff
     ];
 
-    cargoSha256 = "16cfp79c13ng5jjcrvz00h3cg7cc9ywhjiq02vsm757knn9jgr1v";
+    cargoSha256 = "1d7y07wkliy5qnlyx5zj6ni39avhs3s48sqgvwxm5g5zrahg2a85";
 
     nativeBuildInputs = [ pkgconfig ];
 
@@ -72,11 +73,16 @@ in
       cp seccomp/${arch}/* $out/share/policy/
     '';
 
-    passthru.updateScript = ./update.py;
+    passthru = {
+      inherit adhdSrc;
+      src = crosvmSrc;
+      updateScript = ./update.py;
+    };
 
     meta = with stdenv.lib; {
       description = "A secure virtual machine monitor for KVM";
       homepage = "https://chromium.googlesource.com/chromiumos/platform/crosvm/";
+      maintainers = with maintainers; [ qyliss ];
       license = licenses.bsd3;
       platforms = [ "aarch64-linux" "x86_64-linux" ];
     };
diff --git a/pkgs/applications/virtualization/crosvm/update.py b/pkgs/applications/virtualization/crosvm/update.py
index d00bffce3b8..280d6ec1811 100755
--- a/pkgs/applications/virtualization/crosvm/update.py
+++ b/pkgs/applications/virtualization/crosvm/update.py
@@ -1,15 +1,15 @@
 #! /usr/bin/env nix-shell
-#! nix-shell -p python3 -p nix-prefetch-git -i python
+#! nix-shell -p nix-prefetch-git "python3.withPackages (ps: with ps; [ lxml ])"
+#! nix-shell -i python
 
 import base64
-import csv
 import json
 import re
 import subprocess
-import xml.etree.ElementTree as ElementTree
 from codecs import iterdecode
-from operator import itemgetter
 from os.path import dirname, splitext
+from lxml import etree
+from lxml.etree import HTMLParser
 from urllib.request import urlopen
 
 # ChromiumOS components required to build crosvm.
@@ -27,13 +27,19 @@ buildspecs_url = f'{manifest_versions}/+/refs/heads/master/paladin/buildspecs/'
 # branch branches are used for fixes for specific devices.  So for
 # Chromium OS they will always be 0.  This is a best guess, and is not
 # documented.
-with urlopen('https://cros-omahaproxy.appspot.com/all') as resp:
-    versions = csv.DictReader(iterdecode(resp, 'utf-8'))
-    stables = filter(lambda v: v['track'] == 'stable-channel', versions)
-    stable = sorted(stables, key=itemgetter('chrome_version'), reverse=True)[0]
+with urlopen('https://cros-updates-serving.appspot.com/') as resp:
+    document = etree.parse(resp, HTMLParser())
+    # bgcolor="lightgreen" is set on the most up-to-date version for
+    # each channel, so find a lightgreen cell in the "Stable" column.
+    (platform_version, chrome_version) = document.xpath("""
+        (//table[@id="cros-updates"]/tr/td[1 + count(
+            //table[@id="cros-updates"]/thead/tr[1]/th[text() = "Stable"]
+            /preceding-sibling::*)
+        ][@bgcolor="lightgreen"])[1]/text()
+    """)
 
-chrome_major_version = re.match(r'\d+', stable['chrome_version'])[0]
-chromeos_tip_build = re.match(r'\d+', stable['chromeos_version'])[0]
+chrome_major_version = re.match(r'\d+', chrome_version)[0]
+chromeos_tip_build = re.match(r'\d+', platform_version)[0]
 
 # Find the most recent buildspec for the stable Chrome version and
 # Chromium OS build number.  Its branch build and branch branch build
@@ -52,8 +58,8 @@ revisions = {}
 
 # Read the buildspec, and extract the git revisions for each component.
 with urlopen(f'{buildspecs_url}{chrome_major_version}/{buildspec}.xml?format=TEXT') as resp:
-    xml = base64.decodebytes(resp.read()).decode('utf-8')
-    root = ElementTree.fromstring(xml)
+    xml = base64.decodebytes(resp.read())
+    root = etree.fromstring(xml)
     for project in root.findall('project'):
         revisions[project.get('name')] = project.get('revision')
 
diff --git a/pkgs/applications/virtualization/crosvm/upstream-info.json b/pkgs/applications/virtualization/crosvm/upstream-info.json
index 01921f9460a..690eca38bff 100644
--- a/pkgs/applications/virtualization/crosvm/upstream-info.json
+++ b/pkgs/applications/virtualization/crosvm/upstream-info.json
@@ -1,18 +1,18 @@
 {
-  "version": "77.12371.0.0-rc1",
+  "version": "79.12607.0.0-rc4",
   "components": {
     "chromiumos/platform/crosvm": {
       "url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
-      "rev": "f5285c647acacb4f25ef8cf9334254b976e71686",
-      "date": "2019-07-25T22:15:48+00:00",
-      "sha256": "1ccjd540xmpad082w9ri13q78wkg95xxmq38b8ybcrj4f7lsxm6w",
+      "rev": "cfb7db44eb9e5a0bca9a22bfb985252ef74ab251",
+      "date": "2019-10-17T23:22:08+00:00",
+      "sha256": "0gm1ggyzh9qfizm36jmh71c3anygxj1840cm94h71kzg9kiw0330",
       "fetchSubmodules": false
     },
     "chromiumos/third_party/adhd": {
       "url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
-      "rev": "a1c0d93d991daffb042b979ac807bbe9c1f9a3ee",
-      "date": "2019-07-25T20:38:50-07:00",
-      "sha256": "11bijqd876adarq96syywn6znfbiflqssgb2j4w032iw2vfnnsyy",
+      "rev": "a8df1c52bde3bfd2aebc1d7adcd6f195eb212cb1",
+      "date": "2019-10-17T18:53:18+00:00",
+      "sha256": "1hyvnvwr5ka9zw4h7hhl6fpsfl2acp3zy4wr5qrw8s1cn8ljr9vy",
       "fetchSubmodules": false
     }
   }
diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix
index 9d94ced0bf2..fe7640be1c8 100644
--- a/pkgs/applications/virtualization/podman/default.nix
+++ b/pkgs/applications/virtualization/podman/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig
+{ stdenv, fetchFromGitHub, pkgconfig, installShellFiles
 , buildGoPackage, gpgme, lvm2, btrfs-progs, libseccomp, systemd
 , go-md2man
 }:
@@ -18,7 +18,7 @@ buildGoPackage rec {
 
   outputs = [ "bin" "out" "man" ];
 
-  nativeBuildInputs = [ pkgconfig go-md2man ];
+  nativeBuildInputs = [ pkgconfig go-md2man installShellFiles ];
 
   buildInputs = [ btrfs-progs libseccomp gpgme lvm2 systemd ];
 
@@ -30,6 +30,8 @@ buildGoPackage rec {
 
   installPhase = ''
     install -Dm555 bin/podman $bin/bin/podman
+    installShellCompletion --bash completions/bash/podman
+    installShellCompletion --zsh completions/zsh/_podman
     MANDIR=$man/share/man make install.man
   '';
 
diff --git a/pkgs/applications/virtualization/remotebox/default.nix b/pkgs/applications/virtualization/remotebox/default.nix
index d8a2878e3f7..58710365b6e 100644
--- a/pkgs/applications/virtualization/remotebox/default.nix
+++ b/pkgs/applications/virtualization/remotebox/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "remotebox";
-  version = "2.6";
+  version = "2.7";
 
   src = fetchurl {
     url = "http://remotebox.knobgoblin.org.uk/downloads/RemoteBox-${version}.tar.bz2";
-    sha256 = "1bbdnf13vp35ddfmk4pn167vfxgmdw0fd8bqg51wd8dd4cj8y3wp";
+    sha256 = "0csf6gd7pqq4abia4z0zpzlq865ri1z0821kjy7p3iawqlfn75pb";
   };
 
   buildInputs = with perlPackages; [ perl Glib Gtk2 Pango SOAPLite ];
diff --git a/pkgs/applications/virtualization/runc/default.nix b/pkgs/applications/virtualization/runc/default.nix
index c850a18c867..48bd81f383a 100644
--- a/pkgs/applications/virtualization/runc/default.nix
+++ b/pkgs/applications/virtualization/runc/default.nix
@@ -22,14 +22,14 @@ buildGoPackage rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ go-md2man libseccomp libapparmor apparmor-parser which ];
 
-  makeFlags = ''BUILDTAGS+=seccomp BUILDTAGS+=apparmor'';
+  makeFlags = [ "BUILDTAGS+=seccomp" "BUILDTAGS+=apparmor" ];
 
   buildPhase = ''
     cd go/src/${goPackagePath}
     patchShebangs .
     substituteInPlace libcontainer/apparmor/apparmor.go \
       --replace /sbin/apparmor_parser ${apparmor-parser}/bin/apparmor_parser
-    make ${makeFlags} runc
+    make ${toString makeFlags} runc
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/virtualization/x11docker/default.nix b/pkgs/applications/virtualization/x11docker/default.nix
index af136f7e545..0d6b3632bc7 100644
--- a/pkgs/applications/virtualization/x11docker/default.nix
+++ b/pkgs/applications/virtualization/x11docker/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg, getopt, gnugrep, gawk, ps, mount, iproute }:
 stdenv.mkDerivation rec {
   pname = "x11docker";
-  version = "6.4.0";
+  version = "6.5.0";
   src = fetchFromGitHub {
     owner = "mviereck";
     repo = "x11docker";
     rev = "v${version}";
-    sha256 = "0s8gk2kqxkfwx1x44g19ckm7rqgrcax59y8brgmigajqizik7sql";
+    sha256 = "1lh45cxzpdwvhahlcayzqwq1q5hra25mszs13j0dswklcjvjqw8b";
   };
   nativeBuildInputs = [ makeWrapper ];