patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH 1/2] chromiumOSPackages: improve update.py repo compat
@ 2020-05-30 19:00 Alyssa Ross
  2020-05-30 19:00 ` [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Alyssa Ross @ 2020-05-30 19:00 UTC (permalink / raw)
  To: devel; +Cc: Cole Helbling, Alyssa Ross

These changes make chromiumOSPackages.updateScript better understand
the Repo manifest format[1].

It now properly distinguishes between paths in the Chromium OS source
tree and paths on the git servers, which are usually not the same.
For example, chromiumos-overlay is located in the source tree at
src/third_party/chromiumos-overlay, but on chromium.googlesource.com
it's located at chromiumos/overlays/chromiumos-overlays.  Components
are now keyed by their location in the Chromium OS source tree (and
packages have all been updated for this change.)

Additionally, it now understands Repo remotes.  This means that it is
now possible to use a Chromium OS component like Minijail, which is
hosted on android.googlesource.com rather than
chromiumos.googlesource.com.  This was not previously possible.

[1]: https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
---
 .../linux/chromium-os/common-mk/default.nix   |  2 +-
 .../linux/chromium-os/crosvm/default.nix      |  4 +-
 .../os-specific/linux/chromium-os/default.nix |  2 +-
 .../linux/chromium-os/libqmi/default.nix      |  2 +-
 .../linux/chromium-os/minigbm/default.nix     |  2 +-
 .../linux/chromium-os/modem-manager/next.nix  |  2 +-
 .../linux/chromium-os/modp_b64/default.nix    |  2 +-
 pkgs/os-specific/linux/chromium-os/update.py  | 56 ++++++++++++-------
 .../linux/chromium-os/upstream-info.json      | 40 ++++++-------
 pkgs/os-specific/linux/kernel/linux-cros.nix  |  2 +-
 10 files changed, 64 insertions(+), 50 deletions(-)

diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
index f07e418b56f..73862bcaa97 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
@@ -24,7 +24,7 @@
 , ... } @ args:
 
 let
-  platform2 = fetchFromGitiles upstreamInfo.components."chromiumos/platform2";
+  platform2 = fetchFromGitiles upstreamInfo.components."src/platform2";
 
   attrsToGnList = lib.mapAttrsToList (name: value: "${name}=${toGn value}");
 
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
index 3813e3eb75a..8698ef67a83 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
@@ -9,10 +9,10 @@ let
     else throw "no seccomp policy files available for host platform";
 
   crosvmSrc = fetchFromGitiles
-    upstreamInfo.components."chromiumos/platform/crosvm";
+    upstreamInfo.components."src/platform/crosvm";
 
   adhdSrc = fetchFromGitiles
-    upstreamInfo.components."chromiumos/third_party/adhd";
+    upstreamInfo.components."src/third_party/adhd";
 in
 
   rustPlatform.buildRustPackage rec {
diff --git a/pkgs/os-specific/linux/chromium-os/default.nix b/pkgs/os-specific/linux/chromium-os/default.nix
index f9c6c88d072..db719e8b0f1 100644
--- a/pkgs/os-specific/linux/chromium-os/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/default.nix
@@ -9,7 +9,7 @@ let
     upstreamInfo = lib.importJSON ./upstream-info.json;
 
     chromiumos-overlay = (fetchFromGitiles
-      upstreamInfo.components."chromiumos/overlays/chromiumos-overlay") // {
+      upstreamInfo.components."src/third_party/chromiumos-overlay") // {
         passthru.updateScript = ./update.py;
       };
 
diff --git a/pkgs/os-specific/linux/chromium-os/libqmi/default.nix b/pkgs/os-specific/linux/chromium-os/libqmi/default.nix
index ac444848b81..ec4f44c7047 100644
--- a/pkgs/os-specific/linux/chromium-os/libqmi/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/libqmi/default.nix
@@ -8,7 +8,7 @@ libqmi.overrideAttrs (
     pname = "libqmi-unstable";
     version = "2019-12-16";
 
-    src = fetchFromGitiles upstreamInfo.components."chromiumos/third_party/libqmi";
+    src = fetchFromGitiles upstreamInfo.components."src/third_party/libqmi";
 
     nativeBuildInputs = nativeBuildInputs ++
       [ autoreconfHook autoconf-archive gtk-doc docbook-xsl-nons ];
diff --git a/pkgs/os-specific/linux/chromium-os/minigbm/default.nix b/pkgs/os-specific/linux/chromium-os/minigbm/default.nix
index 0a3cbf15997..6c532a4deb2 100644
--- a/pkgs/os-specific/linux/chromium-os/minigbm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/minigbm/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation {
   name = "minigbm";
   inherit (upstreamInfo) version;
 
-  src = fetchFromGitiles upstreamInfo.components."chromiumos/platform/minigbm";
+  src = fetchFromGitiles upstreamInfo.components."src/platform/minigbm";
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ libdrm ];
diff --git a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
index a074e82ff4b..91aa18b3846 100644
--- a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
+++ b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
@@ -9,7 +9,7 @@ modemmanager.overrideAttrs (
     version = "2019-10-17";
 
     src = fetchFromGitiles
-      upstreamInfo.components."chromiumos/third_party/modemmanager-next";
+      upstreamInfo.components."src/third_party/modemmanager-next";
 
     nativeBuildInputs = nativeBuildInputs ++ [ autoreconfHook libqmi libxslt ];
 
diff --git a/pkgs/os-specific/linux/chromium-os/modp_b64/default.nix b/pkgs/os-specific/linux/chromium-os/modp_b64/default.nix
index 50d91479193..557769336ce 100644
--- a/pkgs/os-specific/linux/chromium-os/modp_b64/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/modp_b64/default.nix
@@ -3,7 +3,7 @@
 common-mk {
   platformSubdir = "modp_b64";
 
-  src = fetchFromGitiles upstreamInfo.components."aosp/platform/external/modp_b64";
+  src = fetchFromGitiles upstreamInfo.components."src/third_party/modp_b64";
 
   installPhase = ''
     mkdir -p $out/lib
diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py
index 1405c534d8b..58a15dbb8e8 100755
--- a/pkgs/os-specific/linux/chromium-os/update.py
+++ b/pkgs/os-specific/linux/chromium-os/update.py
@@ -13,16 +13,16 @@ from re import MULTILINE, fullmatch, match, search
 from urllib.request import urlopen
 
 # ChromiumOS components used in Nixpkgs
-components = [
-    'aosp/platform/external/modp_b64',
-    'chromiumos/overlays/chromiumos-overlay',
-    'chromiumos/platform/crosvm',
-    'chromiumos/platform/minigbm',
-    'chromiumos/platform2',
-    'chromiumos/third_party/adhd',
-    'chromiumos/third_party/kernel',
-    'chromiumos/third_party/libqmi',
-    'chromiumos/third_party/modemmanager-next',
+component_paths = [
+    'src/platform/crosvm',
+    'src/platform/minigbm',
+    'src/platform2',
+    'src/third_party/adhd',
+    'src/third_party/chromiumos-overlay',
+    'src/third_party/kernel/v5.4',
+    'src/third_party/libqmi',
+    'src/third_party/modemmanager-next',
+    'src/third_party/modp_b64',
 ]
 
 git_root = 'https://chromium.googlesource.com/'
@@ -65,14 +65,28 @@ with urlopen(f'{buildspecs_url}{chrome_major_version}/?format=TEXT') as resp:
     buildspecs.sort(reverse=True)
     buildspec = splitext(buildspecs[0])[0]
 
-revisions = {}
+components = {}
 
 # 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())
     root = etree.fromstring(xml)
+
+    default_remote = root.find('default').get('remote')
+    remotes = {}
+    for remote in root.findall('remote'):
+        remotes[remote.get('name')] = remote.get('fetch')
+
     for project in root.findall('project'):
-        revisions[project.get('name')] = project.get('revision')
+        name = project.get('name')
+        path = project.get('path')
+        remote_name = project.get('remote') or default_remote
+        remote = remotes[remote_name]
+
+        components[path] = {
+            'revision': project.get('revision'),
+            'url': f'{remote}/{name}',
+        }
 
 # Initialize the data that will be output from this script.  Leave the
 # rc number in buildspec so nobody else is subject to the same level
@@ -84,15 +98,15 @@ paths = {}
 # Fill in the 'components' dictionary with the output from
 # nix-prefetch-git, which can be passed straight to fetchGit when
 # imported by Nix.
-for component in components:
-    name = component.split('/')[-1]
-    url = f'{git_root}{component}'
-    rev = revisions[component]
+for path in component_paths:
+    name = path.split('/')[-1]
+    url = components[path]['url']
+    rev = components[path]['revision']
     tarball = f'{url}/+archive/{rev}.tar.gz'
     output = subprocess.check_output(['nix-prefetch-url', '--print-path', '--unpack', '--name', name, tarball])
-    (sha256, path) = output.decode('utf-8').splitlines()
-    paths[component] = path
-    data['components'][component] = {
+    (sha256, store_path) = output.decode('utf-8').splitlines()
+    paths[path] = store_path
+    data['components'][path] = {
         'name': name,
         'url': url,
         'rev': rev,
@@ -100,14 +114,14 @@ for component in components:
     }
 
 # Get the version number of the kernel.
-kernel = paths['chromiumos/third_party/kernel']
+kernel = paths['src/third_party/kernel/v5.4']
 makefile = open(f'{kernel}/Makefile').read()
 version = search(r'^VERSION = (.+)$', makefile, MULTILINE)[1]
 patchlevel = search(r'^PATCHLEVEL = (.*?)$', makefile, MULTILINE)[1]
 sublevel = search(r'^SUBLEVEL = (.*?)$', makefile, MULTILINE)[1]
 extra = search(r'^EXTRAVERSION =[ \t]*(.*?)$', makefile, MULTILINE)[1]
 full_ver = '.'.join(filter(None, [version, patchlevel, sublevel])) + extra
-data['components']['chromiumos/third_party/kernel']['version'] = full_ver
+data['components']['src/third_party/kernel/v5.4']['version'] = full_ver
 
 # Finally, write the output.
 with open(dirname(__file__) + '/upstream-info.json', 'w') as out:
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index 5264a72a6c9..842912800bc 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -1,60 +1,60 @@
 {
   "version": "81.12871.0.0-rc1",
   "components": {
-    "aosp/platform/external/modp_b64": {
-      "name": "modp_b64",
-      "url": "https://chromium.googlesource.com/aosp/platform/external/modp_b64",
-      "rev": "ae26ad8516036774fd3b6e84a98a89955dcf5f61",
-      "sha256": "03ja5fkq3wk0qcnfnqcj09lciky6n6zdj544xs1jfssjhz9yj8hi"
-    },
-    "chromiumos/overlays/chromiumos-overlay": {
-      "name": "chromiumos-overlay",
-      "url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
-      "rev": "be285b729ef2af700cc248f741af20c387b5a1bc",
-      "sha256": "18y2icdb3hxqxxaaz8sylw21q2qwcpjyns75ig7ahc4vc1k5hg7s"
-    },
-    "chromiumos/platform/crosvm": {
+    "src/platform/crosvm": {
       "name": "crosvm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
       "rev": "8b8c01e1ad31718932491e4aee63f56109a138e2",
       "sha256": "1qmf1k06pwynh15c3nr9m6v90z2pkk930xniwvlvbvnazrk4rllg"
     },
-    "chromiumos/platform/minigbm": {
+    "src/platform/minigbm": {
       "name": "minigbm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/minigbm",
       "rev": "fbfb338e7db246f05ae68da97141fbd49481584b",
       "sha256": "11p6v4nmqivyqyc8lmypbwqv9q819lhx6v3igfsv3455mmq02kcb"
     },
-    "chromiumos/platform2": {
+    "src/platform2": {
       "name": "platform2",
       "url": "https://chromium.googlesource.com/chromiumos/platform2",
       "rev": "6e0d88d0bea8e7cb28a310298cc8c77ed742f60a",
       "sha256": "13vrbnl3ck8cxiyifc58cs9i0yby92vp5si27ihrx33v6bdlir4s"
     },
-    "chromiumos/third_party/adhd": {
+    "src/third_party/adhd": {
       "name": "adhd",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
       "rev": "f361d5b02623274723bff251dafa1e2a2887b013",
       "sha256": "1p8iwjwgmcgmzri03ik2jaid8l0ch0bzn6z9z64dix1hlrvrlliw"
     },
-    "chromiumos/third_party/kernel": {
-      "name": "kernel",
+    "src/third_party/chromiumos-overlay": {
+      "name": "chromiumos-overlay",
+      "url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
+      "rev": "be285b729ef2af700cc248f741af20c387b5a1bc",
+      "sha256": "18y2icdb3hxqxxaaz8sylw21q2qwcpjyns75ig7ahc4vc1k5hg7s"
+    },
+    "src/third_party/kernel/v5.4": {
+      "name": "v5.4",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/kernel",
       "rev": "17611b6e636c8ccae25e873e659d69c20b215815",
       "sha256": "0an8w3660v2zf2crb68ambg7vzw2rajpjmcby1am08qy37lqsfkd",
       "version": "5.4.16"
     },
-    "chromiumos/third_party/libqmi": {
+    "src/third_party/libqmi": {
       "name": "libqmi",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/libqmi",
       "rev": "6267c12fef0be9a95d687bf4b476593eeffbaaf1",
       "sha256": "00yjjcngjkbgxmmf79ciddk9yq393a94230ahq8vszyfygzhs3rz"
     },
-    "chromiumos/third_party/modemmanager-next": {
+    "src/third_party/modemmanager-next": {
       "name": "modemmanager-next",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/modemmanager-next",
       "rev": "a4d3a4de1fdab7c282f1a188d2d3d0aaa24f0698",
       "sha256": "1b1l1jfiyl7fnm29pp9npi0gdlqcw1jmmbigf0qlndqdh0ly2izg"
+    },
+    "src/third_party/modp_b64": {
+      "name": "modp_b64",
+      "url": "https://chromium.googlesource.com/aosp/platform/external/modp_b64",
+      "rev": "ae26ad8516036774fd3b6e84a98a89955dcf5f61",
+      "sha256": "03ja5fkq3wk0qcnfnqcj09lciky6n6zdj544xs1jfssjhz9yj8hi"
     }
   }
 }
diff --git a/pkgs/os-specific/linux/kernel/linux-cros.nix b/pkgs/os-specific/linux/kernel/linux-cros.nix
index 6a4a5771b38..789a9fb6fd2 100644
--- a/pkgs/os-specific/linux/kernel/linux-cros.nix
+++ b/pkgs/os-specific/linux/kernel/linux-cros.nix
@@ -3,7 +3,7 @@
 , ... } @ args:
 
 let
-  versionData = upstreamInfo.components."chromiumos/third_party/kernel";
+  versionData = upstreamInfo.components."src/third_party/kernel/v5.4";
 in
 
 with lib;
-- 
2.26.2

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-05-30 19:00 [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Alyssa Ross
@ 2020-05-30 19:00 ` Alyssa Ross
  2020-05-31  3:01   ` [PATCH v2 " Alyssa Ross
  2020-06-02  0:56   ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
  2020-05-30 23:47 ` [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Cole Helbling
  2020-06-02  3:30 ` Alyssa Ross
  2 siblings, 2 replies; 16+ messages in thread
From: Alyssa Ross @ 2020-05-30 19:00 UTC (permalink / raw)
  To: devel; +Cc: Cole Helbling, Alyssa Ross

crosvm now needs the Minijail sources.  However, it'll notice that a
Minijail package is provided via pkg-config, and then not actually use
those sources or build its own Minijail.  It would be nice if the
Minijail we provide could be the same version as in Chromium OS, which
means bringing Minijail under chromiumOSPackages.

A couple of backports are no longer required; one to common-mk and one
to Linux.
---
Tested with nix-build -A chromiumOSPackages -A spectrumPackages, and by
checking spectrum-vm works.

 ...-mk-don-t-leak-source-absolute-paths.patch |   4 +-
 ...ommon-mk-.gn-don-t-hardcode-env-path.patch |   4 +-
 ...-Suppress-Wrange-loop-analysis-warni.patch |  72 -----
 .../linux/chromium-os/common-mk/default.nix   |   1 -
 .../linux/chromium-os/crosvm/default.nix      |  36 ++-
 .../os-specific/linux/chromium-os/default.nix |   4 +-
 .../linux/chromium-os/modem-manager/next.nix  |   5 +-
 ...er-don-t-leak-source-absolute-paths.patch} |   4 +-
 ...elier-use-stable-xdg-shell-protocol.patch} |  54 ++--
 ...melier-make-building-demos-optional.patch} |   4 +-
 ...er-Log-the-value-of-strerror-when-as.patch | 245 ------------------
 .../linux/chromium-os/sommelier/default.nix   |   7 +-
 pkgs/os-specific/linux/chromium-os/update.py  |   1 +
 .../linux/chromium-os/upstream-info.json      |  42 +--
 ...virtwl-Support-multiple-host-sockets.patch | 126 ---------
 pkgs/os-specific/linux/kernel/patches.nix     |   5 -
 16 files changed, 84 insertions(+), 530 deletions(-)
 delete mode 100644 pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
 rename pkgs/os-specific/linux/chromium-os/sommelier/{0004-sommelier-don-t-leak-source-absolute-paths.patch => 0003-sommelier-don-t-leak-source-absolute-paths.patch} (82%)
 rename pkgs/os-specific/linux/chromium-os/sommelier/{0005-sommelier-use-stable-xdg-shell-protocol.patch => 0004-sommelier-use-stable-xdg-shell-protocol.patch} (97%)
 rename pkgs/os-specific/linux/chromium-os/sommelier/{0006-sommelier-make-building-demos-optional.patch => 0005-sommelier-make-building-demos-optional.patch} (94%)
 delete mode 100644 pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
 delete mode 100644 pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch

diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
index eb79e1ae8fa..347faecacf5 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 56d3fe9520c1ef2a6400939f4deae06d9b5cdfc2 Mon Sep 17 00:00:00 2001
+From 22f33cfdfacc8c4536a8bf883b4c8b54e30599a3 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 16:56:11 +0000
-Subject: [PATCH 1/7] common-mk: don't leak source-absolute paths
+Subject: [PATCH 1/5] common-mk: don't leak source-absolute paths

 Source-absolute paths like //vm_tools/whatever were being leaked to
 subprocesses, which of course didn't know how to understand them.
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
index 9d4843064d2..ba9e053dd72 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
@@ -1,7 +1,7 @@
-From ec1afec90fd8e391b93f53f0abd8bc11cdba0a32 Mon Sep 17 00:00:00 2001
+From 51ed7b957069bd3765222a466473c696755caa5e Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 17:20:46 +0000
-Subject: [PATCH 2/7] common-mk: .gn: don't hardcode env path
+Subject: [PATCH 2/5] common-mk: .gn: don't hardcode env path

 This is needlessly non-portable.
 ---
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
deleted file mode 100644
index f64969fc811..00000000000
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b3add805d98e01488d71cbad51206f3a4949bb1c Mon Sep 17 00:00:00 2001
-From: Denis Nikitin <denik@chromium.org>
-Date: Wed, 5 Feb 2020 18:43:38 +0000
-Subject: [PATCH 3/7] Revert "common-mk: Suppress -Wrange-loop-analysis
- warning"
-
-This reverts commit 09298dce8d31b5744a83784d027a3fd1e312eb6d.
-
-Reason for revert: <The warning is fixed in the upstream starting from r382025>
-
-Original change's description:
-> common-mk: Suppress -Wrange-loop-analysis warning
->
-> Disable range-loop-analysis warning in platform2 to unblock llvm-next
-> builds failing with the following warning in libbrillo which can't be
-> easily fixed:
->
-> data_serialization.h:471:20: error: loop variable 'element' is always a
-> copy because the range of type 'const std::vector<bool, allocator<bool>
-> >' does not return a reference [-Werror,-Wrange-loop-analysis]
->   for (const auto& element : value) {
->                                 ^
-> use non-reference type
-> 'std::__1::__bit_const_reference<std::__1::vector<bool,
-> std::__1::allocator<bool> > >'
->
-> BUG=chromium:1042979
-> TEST=emerge-kevin libbrillo
->
-> Change-Id: If5b70cb1a836df325d3683217be4c841fc7a5516
-> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2008102
-> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-> Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-> Tested-by: Manoj Gupta <manojgupta@chromium.org>
-
-Bug: chromium:1042979
-Change-Id: Ib86d9f0d61b703d391f60824d8d2ef47eb60f345
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2039651
-Reviewed-by: Mike Frysinger <vapier@chromium.org>
-Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-Commit-Queue: Denis Nikitin <denik@chromium.org>
-Tested-by: Denis Nikitin <denik@chromium.org>
-(cherry picked from commit f53a0117ded343295015e81db68bbe878fae5fac)
----
- common-mk/BUILD.gn | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/common-mk/BUILD.gn b/common-mk/BUILD.gn
-index 7c0601b18..dc02a6979 100644
---- a/common-mk/BUILD.gn
-+++ b/common-mk/BUILD.gn
-@@ -53,7 +53,6 @@ config("compiler_defaults") {
-   cflags = [
-     "-Wall",
-     "-Wunused",
--
-     # We use C99 array designators in C++ code.  Our compilers support this
-     # extension since C++ has no equivalent yet (as of C++20).
-     "-Wno-c99-designator",
-@@ -65,9 +64,6 @@ config("compiler_defaults") {
-     "-fvisibility=internal",
-     "-Wa,--noexecstack",
-     "-Wimplicit-fallthrough",
--
--    # TODO(crbug.com/1042979): Verify the warning when the issue gets fixed.
--    "-Wno-range-loop-analysis",
-   ]
-   cflags_c = [ "-std=gnu11" ] + external_cppflags + external_cxxflags
-   cflags_cc = [ "-std=gnu++14" ] + external_cppflags + external_cxxflags
---
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
index 73862bcaa97..cc72aab5d15 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
@@ -59,7 +59,6 @@ stdenv.mkDerivation ({
     '') ([
       ./0001-common-mk-don-t-leak-source-absolute-paths.patch
       ./0002-common-mk-.gn-don-t-hardcode-env-path.patch
-      ./0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
     ] ++ platform2Patches)}

     patchShebangs common-mk
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
index 8698ef67a83..80bbdc8560d 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
@@ -8,11 +8,11 @@ let
     else if isx86_64 then "x86_64"
     else throw "no seccomp policy files available for host platform";

-  crosvmSrc = fetchFromGitiles
-    upstreamInfo.components."src/platform/crosvm";
-
-  adhdSrc = fetchFromGitiles
-    upstreamInfo.components."src/third_party/adhd";
+  srcRepos = [
+    "src/platform/crosvm"
+    "src/third_party/adhd"
+    "src/aosp/external/minijail"
+  ];
 in

   rustPlatform.buildRustPackage rec {
@@ -22,28 +22,25 @@ in
     unpackPhase = ''
       runHook preUnpack

-      mkdir -p chromiumos/platform chromiumos/third_party
-
-      pushd chromiumos/platform
-      unpackFile ${crosvmSrc}
-      popd
-
-      pushd chromiumos/third_party
-      unpackFile ${adhdSrc}
-      popd
+      ${lib.concatMapStringsSep "\n" (repo: ''
+        mkdir -p ${dirOf repo}
+        pushd ${dirOf repo}
+        unpackFile ${fetchFromGitiles upstreamInfo.components.${repo}}
+        popd
+      '') srcRepos}

       chmod -R u+w -- "$sourceRoot"

       runHook postUnpack
     '';

-    sourceRoot = "chromiumos/platform/crosvm";
+    sourceRoot = "src/platform/crosvm";

     patches = [
       ./default-seccomp-policy-dir.diff
     ];

-    cargoSha256 = "0lhivwvdihslwp81i3sa5q88p5hr83bzkvklrcgf6x73arwk8kdz";
+    cargoSha256 = "0wzqn2n4vyv3bk39079yg1zbnriagi5xns928bzdqmq9djdcj21i";

     nativeBuildInputs = [ pkgconfig ];

@@ -67,9 +64,10 @@ in
       lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform)
         "${linux}/${stdenv.hostPlatform.platform.kernelTarget}";

-    passthru = {
-      inherit adhdSrc;
-      src = crosvmSrc;
+    passthru = rec {
+      srcs = lib.mapListToAttrs (n: lib.nameValuePair n
+        (fetchFromGitiles upstreamInfo.components.${n})) srcRepos;
+      src = srcs.${sourceRoot};
       updateScript = ../update.py;
     };

diff --git a/pkgs/os-specific/linux/chromium-os/default.nix b/pkgs/os-specific/linux/chromium-os/default.nix
index db719e8b0f1..6eb9f335ff3 100644
--- a/pkgs/os-specific/linux/chromium-os/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/default.nix
@@ -30,9 +30,7 @@ let
     };

     linux_5_4 = callPackage ../kernel/linux-cros.nix {
-      kernelPatches = linux_5_4.kernelPatches ++ (with kernelPatches; [
-        virtwl_multiple_sockets
-      ]);
+      inherit (linux_5_4) kernelPatches;
     };

     linux = self.linux_5_4;
diff --git a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
index 91aa18b3846..d40b2c9292e 100644
--- a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
+++ b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
@@ -1,5 +1,5 @@
 { modemmanager, lib, fetchFromGitiles, upstreamInfo, autoreconfHook
-, libqmi, libxslt
+, autoconf-archive, libqmi, libxslt
 }:

 modemmanager.overrideAttrs (
@@ -11,7 +11,8 @@ modemmanager.overrideAttrs (
     src = fetchFromGitiles
       upstreamInfo.components."src/third_party/modemmanager-next";

-    nativeBuildInputs = nativeBuildInputs ++ [ autoreconfHook libqmi libxslt ];
+    nativeBuildInputs = nativeBuildInputs ++
+      [ autoreconfHook autoconf-archive libqmi libxslt ];

     passthru = passthru // {
       updateScript = ../update.py;
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
similarity index 82%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
index 5d3ec4effe8..f5c5b8f3667 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 1fa4de5b2228c40b25fd6333a74ae7535d73bcce Mon Sep 17 00:00:00 2001
+From 27381a5b01d14d3aca173cf66d3f13c8ea8f475c Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 1 Dec 2019 17:04:04 +0000
-Subject: [PATCH 4/7] sommelier: don't leak source-absolute paths
+Subject: [PATCH 3/5] sommelier: don't leak source-absolute paths

 ---
  vm_tools/sommelier/wayland_protocol.gni | 2 +-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
similarity index 97%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
index 5a6e57375a3..e107ab0f7e7 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
@@ -1,7 +1,7 @@
-From 5068e64b2fdedca0a4a9f1894335af8587c4c55a Mon Sep 17 00:00:00 2001
+From 119676ba72d8da73636978aa342e2e58c092384e Mon Sep 17 00:00:00 2001
 From: Puck Meerburg <puck@puckipedia.com>
 Date: Tue, 3 Dec 2019 18:06:14 +0000
-Subject: [PATCH 5/7] sommelier: use stable xdg-shell protocol
+Subject: [PATCH 4/5] sommelier: use stable xdg-shell protocol

 From https://github.com/wayland-project/weston/commit/d8d9f5e6e16c8f6a3c06763d5f56c27dc9a6e52e:

@@ -1200,7 +1200,7 @@ index ecd0fc647..a3ba0d6e1 100644
 +                          sl_bind_host_xdg_wm_base);
  }
 diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index d87bced03..5e03d8978 100644
+index 98e101135..9a56f350d 100644
 --- a/vm_tools/sommelier/sommelier.c
 +++ b/vm_tools/sommelier/sommelier.c
 @@ -35,7 +35,7 @@
@@ -1210,9 +1210,9 @@ index d87bced03..5e03d8978 100644
 -#include "xdg-shell-unstable-v6-client-protocol.h"
 +#include "xdg-shell-client-protocol.h"

- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
-@@ -272,14 +272,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
+ #define errno_assert(rv)                                          \
+   {                                                               \
+@@ -281,14 +281,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
    free(sync_point);
  }

@@ -1232,7 +1232,7 @@ index d87bced03..5e03d8978 100644

  static void sl_send_configure_notify(struct sl_window* window) {
    xcb_configure_notify_event_t event = {
-@@ -442,8 +442,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -451,8 +451,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
    }

    if (window->xdg_surface) {
@@ -1243,7 +1243,7 @@ index d87bced03..5e03d8978 100644
    }
    window->pending_config.serial = 0;

-@@ -454,8 +454,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -463,8 +463,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
  }

  static void sl_internal_xdg_surface_configure(
@@ -1254,7 +1254,7 @@ index d87bced03..5e03d8978 100644

    window->next_config.serial = serial;
    if (!window->pending_config.serial) {
-@@ -476,16 +476,16 @@ static void sl_internal_xdg_surface_configure(
+@@ -485,16 +485,16 @@ static void sl_internal_xdg_surface_configure(
    }
  }

@@ -1274,7 +1274,7 @@ index d87bced03..5e03d8978 100644
    int activated = 0;
    uint32_t* state;
    int i = 0;
-@@ -515,21 +515,21 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -524,21 +524,21 @@ static void sl_internal_xdg_toplevel_configure(

    window->allow_resize = 1;
    wl_array_for_each(state, states) {
@@ -1300,7 +1300,7 @@ index d87bced03..5e03d8978 100644
        window->allow_resize = 0;
    }

-@@ -545,8 +545,8 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -554,8 +554,8 @@ static void sl_internal_xdg_toplevel_configure(
  }

  static void sl_internal_xdg_toplevel_close(
@@ -1311,7 +1311,7 @@ index d87bced03..5e03d8978 100644
    xcb_client_message_event_t event = {
        .response_type = XCB_CLIENT_MESSAGE,
        .format = 32,
-@@ -563,21 +563,21 @@ static void sl_internal_xdg_toplevel_close(
+@@ -572,21 +572,21 @@ static void sl_internal_xdg_toplevel_close(
                   XCB_EVENT_MASK_NO_EVENT, (const char*)&event);
  }

@@ -1337,7 +1337,7 @@ index d87bced03..5e03d8978 100644
      sl_internal_xdg_popup_configure, sl_internal_xdg_popup_done};

  static void sl_window_set_wm_state(struct sl_window* window, int state) {
-@@ -645,15 +645,15 @@ void sl_window_update(struct sl_window* window) {
+@@ -654,15 +654,15 @@ void sl_window_update(struct sl_window* window) {
        window->aura_surface = NULL;
      }
      if (window->xdg_toplevel) {
@@ -1356,7 +1356,7 @@ index d87bced03..5e03d8978 100644
        window->xdg_surface = NULL;
      }
      window->realized = 0;
-@@ -664,8 +664,8 @@ void sl_window_update(struct sl_window* window) {
+@@ -673,8 +673,8 @@ void sl_window_update(struct sl_window* window) {
    assert(host_surface);
    assert(!host_surface->has_role);

@@ -1367,7 +1367,7 @@ index d87bced03..5e03d8978 100644

    if (window->managed) {
      if (window->transient_for != XCB_WINDOW_NONE) {
-@@ -727,11 +727,11 @@ void sl_window_update(struct sl_window* window) {
+@@ -736,11 +736,11 @@ void sl_window_update(struct sl_window* window) {
    }

    if (!window->xdg_surface) {
@@ -1384,7 +1384,7 @@ index d87bced03..5e03d8978 100644
    }

    if (ctx->aura_shell) {
-@@ -761,50 +761,50 @@ void sl_window_update(struct sl_window* window) {
+@@ -770,50 +770,50 @@ void sl_window_update(struct sl_window* window) {
    // window is closed.
    if (ctx->xwayland || !parent) {
      if (!window->xdg_toplevel) {
@@ -1454,7 +1454,7 @@ index d87bced03..5e03d8978 100644
    }

    if ((window->size_flags & (US_POSITION | P_POSITION)) && parent &&
-@@ -1168,22 +1168,23 @@ static void sl_registry_handler(void* data,
+@@ -1177,22 +1177,23 @@ static void sl_registry_handler(void* data,
        data_device_manager->host_global =
            sl_data_device_manager_global_create(ctx);
      }
@@ -1492,7 +1492,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (strcmp(interface, "zaura_shell") == 0) {
      if (version >= MIN_AURA_SHELL_VERSION) {
-@@ -1290,13 +1291,13 @@ static void sl_registry_remover(void* data,
+@@ -1299,13 +1300,13 @@ static void sl_registry_remover(void* data,
      ctx->data_device_manager = NULL;
      return;
    }
@@ -1513,7 +1513,7 @@ index d87bced03..5e03d8978 100644
      return;
    }
    if (ctx->aura_shell && ctx->aura_shell->id == id) {
-@@ -1458,11 +1459,11 @@ static void sl_destroy_window(struct sl_window* window) {
+@@ -1467,11 +1468,11 @@ static void sl_destroy_window(struct sl_window* window) {
    }

    if (window->xdg_popup)
@@ -1528,7 +1528,7 @@ index d87bced03..5e03d8978 100644
    if (window->aura_surface)
      zaura_surface_destroy(window->aura_surface);

-@@ -1906,15 +1907,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
+@@ -1915,15 +1916,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
    // that matching contents will arrive.
    if (window->xdg_toplevel) {
      if (window->pending_config.serial) {
@@ -1548,7 +1548,7 @@ index d87bced03..5e03d8978 100644
        window->next_config.serial = 0;
        window->next_config.mask = 0;
        window->next_config.states_length = 0;
-@@ -2035,23 +2036,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
+@@ -2044,23 +2045,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
  static uint32_t sl_resize_edge(int net_wm_moveresize_size) {
    switch (net_wm_moveresize_size) {
      case NET_WM_MOVERESIZE_SIZE_TOPLEFT:
@@ -1581,7 +1581,7 @@ index d87bced03..5e03d8978 100644
    }
  }

-@@ -2098,15 +2099,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2107,15 +2108,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
          return;

        if (event->data.data32[2] == NET_WM_MOVERESIZE_MOVE) {
@@ -1600,7 +1600,7 @@ index d87bced03..5e03d8978 100644
                                  seat->seat->last_serial, edge);
        }
      }
-@@ -2125,24 +2126,24 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2134,24 +2135,24 @@ static void sl_handle_client_message(struct sl_context* ctx,

        if (changed[ATOM_NET_WM_STATE_FULLSCREEN]) {
          if (action == NET_WM_STATE_ADD)
@@ -1630,7 +1630,7 @@ index d87bced03..5e03d8978 100644
      }
    }
  }
-@@ -2155,7 +2156,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
+@@ -2164,7 +2165,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
      // window was realized.
      struct sl_window* parent = sl_lookup_window(ctx, window->transient_for);
      if (parent && parent->xdg_toplevel && window->xdg_toplevel)
@@ -1639,7 +1639,7 @@ index d87bced03..5e03d8978 100644
    }
  }

-@@ -2373,9 +2374,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2381,9 +2382,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
        return;

      if (window->name) {
@@ -1651,7 +1651,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (event->atom == XCB_ATOM_WM_CLASS) {
      struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -2427,19 +2428,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2435,19 +2436,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
        return;

      if (window->size_flags & P_MIN_SIZE) {
@@ -1675,7 +1675,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (event->atom == XCB_ATOM_WM_HINTS) {
      struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -3536,7 +3537,7 @@ int main(int argc, char** argv) {
+@@ -3535,7 +3536,7 @@ int main(int argc, char** argv) {
        .shm = NULL,
        .shell = NULL,
        .data_device_manager = NULL,
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
similarity index 94%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
index 3538932d804..283e765d9d4 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
@@ -1,7 +1,7 @@
-From 8774d76f1b57092df9004d654fd075d7691b9f12 Mon Sep 17 00:00:00 2001
+From c0c705cb90026eef892be8e3e717429ccf26b018 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Wed, 15 Jan 2020 21:36:43 +0000
-Subject: [PATCH 6/7] sommelier: make building demos optional
+Subject: [PATCH 5/5] sommelier: make building demos optional
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
deleted file mode 100644
index 778c481d598..00000000000
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From 64afc7e7271e0bad332a8a246a4fb4151b3d296f Mon Sep 17 00:00:00 2001
-From: Fergus Dall <sidereal@google.com>
-Date: Fri, 27 Mar 2020 18:34:04 +1100
-Subject: [PATCH 7/7] vm_tools: sommelier: Log the value of strerror when
- asserting
-
-There's some reports of sommelier crashing with assert failures, and
-right now we don't even have a way to tell what the error was from the
-logs.
-
-BUG=chromium:1053843
-TEST=emerge-tatl vm_guest_tools
-
-Change-Id: Iac9e0470600f7c7a8d8328049a79305251d7ef7f
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2124131
-Commit-Queue: Fergus Dall <sidereal@google.com>
-Tested-by: Fergus Dall <sidereal@google.com>
-Reviewed-by: Nic Hollingum <hollingum@google.com>
----
- vm_tools/sommelier/sommelier.c | 65 +++++++++++++++++-----------------
- 1 file changed, 32 insertions(+), 33 deletions(-)
-
-diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index 5e03d8978..ffe6f645c 100644
---- a/vm_tools/sommelier/sommelier.c
-+++ b/vm_tools/sommelier/sommelier.c
-@@ -37,6 +37,15 @@
- #include "viewporter-client-protocol.h"
- #include "xdg-shell-client-protocol.h"
-
-+#define errno_assert(rv)                                          \
-+  {                                                               \
-+    int macro_private_assert_value = (rv);                        \
-+    if (!macro_private_assert_value) {                            \
-+      fprintf(stderr, "Unexpected error: %s\n", strerror(errno)); \
-+      assert(false);                                              \
-+    }                                                             \
-+  }
-+
- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
- #error XWAYLAND_PATH must be defined
-@@ -239,7 +248,7 @@ struct sl_mmap* sl_mmap_create(int fd,
-   map->buffer_resource = NULL;
-   map->addr =
-       mmap(NULL, size + offset0, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
--  assert(map->addr != MAP_FAILED);
-+  errno_assert(map->addr != MAP_FAILED);
-
-   return map;
- }
-@@ -2183,8 +2192,7 @@ int sl_begin_data_source_send(struct sl_context* ctx,
-
-   flags = fcntl(fd, F_GETFL, 0);
-   rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
--  assert(!rv);
--  UNUSED(rv);
-+  errno_assert(!rv);
-
-   ctx->selection_data_source_send_fd = fd;
-   free(reply);
-@@ -2810,7 +2818,7 @@ static void sl_send_data(struct sl_context* ctx, xcb_atom_t data_type) {
-       int p[2];
-
-       rv = pipe2(p, O_CLOEXEC | O_NONBLOCK);
--      assert(!rv);
-+      errno_assert(!rv);
-
-       fd_to_receive = p[0];
-       fd_to_wayland = p[1];
-@@ -3153,7 +3161,7 @@ static void sl_sd_notify(const char* state) {
-   assert(socket_name);
-
-   fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
--  assert(fd >= 0);
-+  errno_assert(fd >= 0);
-
-   memset(&addr, 0, sizeof(addr));
-   addr.sun_family = AF_UNIX;
-@@ -3171,8 +3179,7 @@ static void sl_sd_notify(const char* state) {
-   msghdr.msg_iovlen = 1;
-
-   rv = sendmsg(fd, &msghdr, MSG_NOSIGNAL);
--  assert(rv != -1);
--  UNUSED(rv);
-+  errno_assert(rv != -1);
- }
-
- static int sl_handle_sigchld(int signal_number, void* data) {
-@@ -3304,7 +3311,7 @@ static int sl_handle_display_ready_event(int fd, uint32_t mask, void* data) {
-                       (int)(XCURSOR_SIZE_BASE * ctx->scale + 0.5)));
-
-   pid = fork();
--  assert(pid >= 0);
-+  errno_assert(pid >= 0);
-   if (pid == 0) {
-     sl_execvp(ctx->runprog[0], ctx->runprog, -1);
-     _exit(EXIT_FAILURE);
-@@ -3373,8 +3380,7 @@ static int sl_handle_virtwl_ctx_event(int fd, uint32_t mask, void* data) {
-   }
-
-   bytes = sendmsg(ctx->virtwl_socket_fd, &msg, MSG_NOSIGNAL);
--  assert(bytes == ioctl_recv->len);
--  UNUSED(bytes);
-+  errno_assert(bytes == ioctl_recv->len);
-
-   while (fd_count--)
-     close(ioctl_recv->fds[fd_count]);
-@@ -3406,10 +3412,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
-   msg.msg_controllen = sizeof(fd_buffer);
-
-   bytes = recvmsg(ctx->virtwl_socket_fd, &msg, 0);
--  if (bytes < 0) {
--    fprintf(stderr, "Failed to get message from virtwl: %s\n", strerror(errno));
--  }
--  assert(bytes > 0);
-+  errno_assert(bytes > 0);
-
-   // If there were any FDs recv'd by recvmsg, there will be some data in the
-   // msg_control buffer. To get the FDs out we iterate all cmsghdr's within and
-@@ -3437,11 +3440,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
-   // structure which we now pass along to the kernel.
-   ioctl_send->len = bytes;
-   rv = ioctl(ctx->virtwl_ctx_fd, VIRTWL_IOCTL_SEND, ioctl_send);
--  if (!rv) {
--    fprintf(stderr, "Failed to send message to virtwl: %s\n", strerror(errno));
--  }
--  assert(!rv);
--  UNUSED(rv);
-+  errno_assert(!rv);
-
-   while (fd_count--)
-     close(ioctl_send->fds[fd_count]);
-@@ -3765,7 +3764,7 @@ int main(int argc, char** argv) {
-
-     lock_fd = open(lock_addr, O_CREAT | O_CLOEXEC,
-                    (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
--    assert(lock_fd >= 0);
-+    errno_assert(lock_fd >= 0);
-
-     rv = flock(lock_fd, LOCK_EX | LOCK_NB);
-     if (rv < 0) {
-@@ -3781,25 +3780,25 @@ int main(int argc, char** argv) {
-       if (sock_stat.st_mode & (S_IWUSR | S_IWGRP))
-         unlink(addr.sun_path);
-     } else {
--      assert(errno == ENOENT);
-+      errno_assert(errno == ENOENT);
-     }
-
-     sock_fd = socket(PF_LOCAL, SOCK_STREAM, 0);
--    assert(sock_fd >= 0);
-+    errno_assert(sock_fd >= 0);
-
-     rv = bind(sock_fd, (struct sockaddr*)&addr,
-               offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path));
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
-
-     rv = listen(sock_fd, 128);
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
-
-     // Spawn optional child process before we notify systemd that we're ready
-     // to accept connections. WAYLAND_DISPLAY will be set but any attempt to
-     // connect to this socket at this time will fail.
-     if (ctx.runprog && ctx.runprog[0]) {
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         setenv("WAYLAND_DISPLAY", socket_name, 1);
-         sl_execvp(ctx.runprog[0], ctx.runprog, -1);
-@@ -3816,7 +3815,7 @@ int main(int argc, char** argv) {
-     sigemptyset(&sa.sa_mask);
-     sa.sa_flags = SA_RESTART;
-     rv = sigaction(SIGCHLD, &sa, NULL);
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
-
-     do {
-       struct ucred ucred;
-@@ -3833,7 +3832,7 @@ int main(int argc, char** argv) {
-       rv = getsockopt(client_fd, SOL_SOCKET, SO_PEERCRED, &ucred, &length);
-
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         char* client_fd_str;
-         char* peer_pid_str;
-@@ -3963,7 +3962,7 @@ int main(int argc, char** argv) {
-
-       // Connection to virtwl channel.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, vws);
--      assert(!rv);
-+      errno_assert(!rv);
-
-       ctx.virtwl_socket_fd = vws[0];
-       virtwl_display_fd = vws[1];
-@@ -4083,7 +4082,7 @@ int main(int argc, char** argv) {
-   if (ctx.runprog || ctx.xwayland) {
-     // Wayland connection from client.
-     rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv);
--    assert(!rv);
-+    errno_assert(!rv);
-
-     client_fd = sv[0];
-   }
-@@ -4199,7 +4198,7 @@ int main(int argc, char** argv) {
-
-       // Xwayland display ready socket.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, ds);
--      assert(!rv);
-+      errno_assert(!rv);
-
-       ctx.display_ready_event_source =
-           wl_event_loop_add_fd(event_loop, ds[0], WL_EVENT_READABLE,
-@@ -4207,12 +4206,12 @@ int main(int argc, char** argv) {
-
-       // X connection to Xwayland.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wm);
--      assert(!rv);
-+      errno_assert(!rv);
-
-       ctx.wm_fd = wm[0];
-
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         char* display_fd_str;
-         char* wm_fd_str;
-@@ -4280,7 +4279,7 @@ int main(int argc, char** argv) {
-       ctx.xwayland_pid = pid;
-     } else {
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         sl_execvp(ctx.runprog[0], ctx.runprog, sv[1]);
-         _exit(EXIT_FAILURE);
---
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
index da2a554837b..e0ce28205f2 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
@@ -7,10 +7,9 @@ common-mk {
   platformSubdir = "vm_tools/sommelier";

   platform2Patches = [
-    ./0004-sommelier-don-t-leak-source-absolute-paths.patch
-    ./0005-sommelier-use-stable-xdg-shell-protocol.patch
-    ./0006-sommelier-make-building-demos-optional.patch
-    ./0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+    ./0003-sommelier-don-t-leak-source-absolute-paths.patch
+    ./0004-sommelier-use-stable-xdg-shell-protocol.patch
+    ./0005-sommelier-make-building-demos-optional.patch
   ];

   buildInputs = [
diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py
index 58a15dbb8e8..a2e093c2e9e 100755
--- a/pkgs/os-specific/linux/chromium-os/update.py
+++ b/pkgs/os-specific/linux/chromium-os/update.py
@@ -14,6 +14,7 @@ from urllib.request import urlopen

 # ChromiumOS components used in Nixpkgs
 component_paths = [
+    'src/aosp/external/minijail',
     'src/platform/crosvm',
     'src/platform/minigbm',
     'src/platform2',
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index 842912800bc..7755c48239c 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -1,54 +1,60 @@
 {
-  "version": "81.12871.0.0-rc1",
+  "version": "83.13020.0.0-rc1",
   "components": {
+    "src/aosp/external/minijail": {
+      "name": "minijail",
+      "url": "https://android.googlesource.com/platform/external/minijail",
+      "rev": "84ffabcf488bf0935f00930a9a23bbce1f34d79f",
+      "sha256": "0yhbklwmgqws4cb098hpaky4w8if5snpkdabridcc5hk5d7vgild"
+    },
     "src/platform/crosvm": {
       "name": "crosvm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
-      "rev": "8b8c01e1ad31718932491e4aee63f56109a138e2",
-      "sha256": "1qmf1k06pwynh15c3nr9m6v90z2pkk930xniwvlvbvnazrk4rllg"
+      "rev": "664cc3ca49cb58d5bf7d936686fd211d6dd728bf",
+      "sha256": "0rms1hkb3r4w6j3l71gavky6ylc7gi9sfr2rq4dr82v6vc8zxbjx"
     },
     "src/platform/minigbm": {
       "name": "minigbm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/minigbm",
-      "rev": "fbfb338e7db246f05ae68da97141fbd49481584b",
-      "sha256": "11p6v4nmqivyqyc8lmypbwqv9q819lhx6v3igfsv3455mmq02kcb"
+      "rev": "bc4f023bfcc51cf9dcfcfec5bf4177b2e607dd68",
+      "sha256": "08ag207199xj5cw686386rmvr7sx2mzihdckm2pnvw743w03gipr"
     },
     "src/platform2": {
       "name": "platform2",
       "url": "https://chromium.googlesource.com/chromiumos/platform2",
-      "rev": "6e0d88d0bea8e7cb28a310298cc8c77ed742f60a",
-      "sha256": "13vrbnl3ck8cxiyifc58cs9i0yby92vp5si27ihrx33v6bdlir4s"
+      "rev": "e45d54bedee94e0121e12cc86fded46be8b3fa4e",
+      "sha256": "0ag01p8ch0wn7ds9ywasrdxkbibg19qzf5rldf8nr8irk1n851n7"
     },
     "src/third_party/adhd": {
       "name": "adhd",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
-      "rev": "f361d5b02623274723bff251dafa1e2a2887b013",
-      "sha256": "1p8iwjwgmcgmzri03ik2jaid8l0ch0bzn6z9z64dix1hlrvrlliw"
+      "rev": "d3af897db5540cadc439463a0ffdde07f2b8898a",
+      "sha256": "1h0xxf338d7fwmfwjlpsjiml8d3v426a95x3ka7qfikdapgmav3d"
     },
     "src/third_party/chromiumos-overlay": {
       "name": "chromiumos-overlay",
       "url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
-      "rev": "be285b729ef2af700cc248f741af20c387b5a1bc",
-      "sha256": "18y2icdb3hxqxxaaz8sylw21q2qwcpjyns75ig7ahc4vc1k5hg7s"
+      "rev": "270f5c2cfb7eadc374638076c8fdee72360a6d66",
+      "sha256": "1d88xvnf0qc3v5hp9b2pafxhi83rph84y2sbk1nc46rhj63m8bwi"
     },
     "src/third_party/kernel/v5.4": {
       "name": "v5.4",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/kernel",
-      "rev": "17611b6e636c8ccae25e873e659d69c20b215815",
-      "sha256": "0an8w3660v2zf2crb68ambg7vzw2rajpjmcby1am08qy37lqsfkd",
-      "version": "5.4.16"
+      "rev": "36270ae817fb576debb80bce752addb3a4cc9886",
+      "sha256": "0h7fj3w9vwmq8a6cx96vjcyw29v7wfamxykh1nx3lmhxxkn120f4",
+      "version": "5.4.28"
     },
     "src/third_party/libqmi": {
       "name": "libqmi",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/libqmi",
-      "rev": "6267c12fef0be9a95d687bf4b476593eeffbaaf1",
-      "sha256": "00yjjcngjkbgxmmf79ciddk9yq393a94230ahq8vszyfygzhs3rz"
+      "rev": "20726755e60d48c70f0189a1cfe9665a87a5e6c6",
+      "sha256": "0w04lyd459jgcag70kx6nq1i952fbhy32nmkh6r255xjf2wrliwr"
     },
     "src/third_party/modemmanager-next": {
       "name": "modemmanager-next",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/modemmanager-next",
-      "rev": "a4d3a4de1fdab7c282f1a188d2d3d0aaa24f0698",
-      "sha256": "1b1l1jfiyl7fnm29pp9npi0gdlqcw1jmmbigf0qlndqdh0ly2izg"
+      "rev": "988f572cc882a74209fba0f5c49cf0b01b9163a6",
+      "sha256": "1hiqz7wn1w461sd94v179q81yahisffnw033yix3dwfwagm9ndf8"
     },
     "src/third_party/modp_b64": {
       "name": "modp_b64",
diff --git a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch b/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
deleted file mode 100644
index 3e4e504978c..00000000000
--- a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 7f7629cc680bf3c22d547fb5333e521af58c6c9e Mon Sep 17 00:00:00 2001
-From: Ryo Hashimoto <hashimoto@google.com>
-Date: Wed, 11 Dec 2019 18:32:03 +0900
-Subject: [PATCH] CHROMIUM: virtwl: Support multiple host sockets
-
-Add a new argument to VIRTWL_IOCTL_NEW_CTX.
-This CL doesn't change the size of structs.
-
-Guest can use this parameter to create a context connected to a host
-process other than the compositor.
-
-BUG=b:146100044, b:140202859
-TEST=Camera works
-
-Change-Id: I1c6b1a256002a336774a36caf0fe8d18f08c0f56
-Signed-off-by: Ryo Hashimoto <hashimoto@chromium.org>
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1962108
-Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
-Reviewed-by: Zach Reizner <zachr@chromium.org>
-(cherry picked from commit 5d641a7b7b64664230d2fd2aa1e74dd792b8b7bf)
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2035921
-Tested-by: Chirantan Ekbote <chirantan@chromium.org>
-Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
-Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
-Signed-off-by: Alyssa Ross <hi@alyssa.is>
----
- drivers/virtio/virtio_wl.c     |  6 ++++++
- include/uapi/linux/virtio_wl.h | 29 +++++++++++++++++------------
- include/uapi/linux/virtwl.h    |  3 +++
- 3 files changed, 26 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/virtio/virtio_wl.c b/drivers/virtio/virtio_wl.c
-index 1b3f8926519a7..80cf799bed464 100644
---- a/drivers/virtio/virtio_wl.c
-+++ b/drivers/virtio/virtio_wl.c
-@@ -1024,6 +1024,7 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- 	int ret = 0;
-
- 	if (ioctl_new->type != VIRTWL_IOCTL_NEW_CTX &&
-+		ioctl_new->type != VIRTWL_IOCTL_NEW_CTX_NAMED &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_ALLOC &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_READ &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_WRITE &&
-@@ -1060,6 +1061,11 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- 		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX;
- 		ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
- 		break;
-+	case VIRTWL_IOCTL_NEW_CTX_NAMED:
-+		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED;
-+		ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
-+		memcpy(ctrl_new->name, ioctl_new->name, sizeof(ctrl_new->name));
-+		break;
- 	case VIRTWL_IOCTL_NEW_ALLOC:
- 		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW;
- 		ctrl_new->size = PAGE_ALIGN(ioctl_new->size);
-diff --git a/include/uapi/linux/virtio_wl.h b/include/uapi/linux/virtio_wl.h
-index 1d3ec6b31d4d3..ad9b6dfcd3263 100644
---- a/include/uapi/linux/virtio_wl.h
-+++ b/include/uapi/linux/virtio_wl.h
-@@ -37,6 +37,7 @@ enum virtio_wl_ctrl_type {
- 	VIRTIO_WL_CMD_VFD_NEW_DMABUF, /* virtio_wl_ctrl_vfd_new */
- 	VIRTIO_WL_CMD_VFD_DMABUF_SYNC, /* virtio_wl_ctrl_vfd_dmabuf_sync */
- 	VIRTIO_WL_CMD_VFD_SEND_FOREIGN_ID, /* virtio_wl_ctrl_vfd_send + data */
-+	VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED, /* virtio_wl_ctrl_vfd_new */
-
- 	VIRTIO_WL_RESP_OK = 0x1000,
- 	VIRTIO_WL_RESP_VFD_NEW = 0x1001, /* virtio_wl_ctrl_vfd_new */
-@@ -78,18 +79,22 @@ struct virtio_wl_ctrl_vfd_new {
- 	__le32 flags; /* virtio_wl_vfd_flags */
- 	__le64 pfn; /* first guest physical page frame number if VFD_MAP */
- 	__le32 size; /* size in bytes if VIRTIO_WL_CMD_VFD_NEW* */
--	/* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
--	struct {
--		__le32 width; /* width in pixels */
--		__le32 height; /* height in pixels */
--		__le32 format; /* fourcc format */
--		__le32 stride0; /* return stride0 */
--		__le32 stride1; /* return stride1 */
--		__le32 stride2; /* return stride2 */
--		__le32 offset0; /* return offset0 */
--		__le32 offset1; /* return offset1 */
--		__le32 offset2; /* return offset2 */
--	} dmabuf;
-+	union {
-+		/* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
-+		struct {
-+			__le32 width; /* width in pixels */
-+			__le32 height; /* height in pixels */
-+			__le32 format; /* fourcc format */
-+			__le32 stride0; /* return stride0 */
-+			__le32 stride1; /* return stride1 */
-+			__le32 stride2; /* return stride2 */
-+			__le32 offset0; /* return offset0 */
-+			__le32 offset1; /* return offset1 */
-+			__le32 offset2; /* return offset2 */
-+		} dmabuf;
-+		/* name of socket if VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+		char name[32];
-+	};
- };
-
-
-diff --git a/include/uapi/linux/virtwl.h b/include/uapi/linux/virtwl.h
-index 939041389b403..baa9b341377a5 100644
---- a/include/uapi/linux/virtwl.h
-+++ b/include/uapi/linux/virtwl.h
-@@ -21,6 +21,7 @@ enum virtwl_ioctl_new_type {
- 	VIRTWL_IOCTL_NEW_PIPE_WRITE,
- 	/* create a new virtwl dmabuf that is writable via the returned fd */
- 	VIRTWL_IOCTL_NEW_DMABUF,
-+	VIRTWL_IOCTL_NEW_CTX_NAMED, /* open a new named connection context */
- };
-
- struct virtwl_ioctl_new {
-@@ -42,6 +43,8 @@ struct virtwl_ioctl_new {
- 			__u32 offset1; /* return offset1 */
- 			__u32 offset2; /* return offset2 */
- 		} dmabuf;
-+		/* name of socket if type == VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+		char name[32];
- 	};
- };
-
---
-2.26.2
-
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 66cbdbb36fa..8ce1ac2b587 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -92,9 +92,4 @@
     name = "mac_nvme_t2";
     patch = ./mac-nvme-t2.patch;
   };
-
-  virtwl_multiple_sockets = {
-    name = "virtwl_multiple_sockets";
-    patch = ./0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch;
-  };
 }
--
2.26.2

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] chromiumOSPackages: improve update.py repo compat
  2020-05-30 19:00 [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Alyssa Ross
  2020-05-30 19:00 ` [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
@ 2020-05-30 23:47 ` Cole Helbling
  2020-06-02  3:30 ` Alyssa Ross
  2 siblings, 0 replies; 16+ messages in thread
From: Cole Helbling @ 2020-05-30 23:47 UTC (permalink / raw)
  To: Alyssa Ross, devel; +Cc: Cole Helbling, Alyssa Ross

On Sat May 30, 2020 at 7:00 PM, Alyssa Ross wrote:
> These changes make chromiumOSPackages.updateScript better understand
> the Repo manifest format[1].
>
> It now properly distinguishes between paths in the Chromium OS source
> tree and paths on the git servers, which are usually not the same.
> For example, chromiumos-overlay is located in the source tree at
> src/third_party/chromiumos-overlay, but on chromium.googlesource.com
> it's located at chromiumos/overlays/chromiumos-overlays. Components
> are now keyed by their location in the Chromium OS source tree (and
> packages have all been updated for this change.)
>
> Additionally, it now understands Repo remotes. This means that it is
> now possible to use a Chromium OS component like Minijail, which is
> hosted on android.googlesource.com rather than
> chromiumos.googlesource.com. This was not previously possible.
>
> [1]:
> https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
> ---
> .../linux/chromium-os/common-mk/default.nix | 2 +-
> .../linux/chromium-os/crosvm/default.nix | 4 +-
> .../os-specific/linux/chromium-os/default.nix | 2 +-
> .../linux/chromium-os/libqmi/default.nix | 2 +-
> .../linux/chromium-os/minigbm/default.nix | 2 +-
> .../linux/chromium-os/modem-manager/next.nix | 2 +-
> .../linux/chromium-os/modp_b64/default.nix | 2 +-
> pkgs/os-specific/linux/chromium-os/update.py | 56 ++++++++++++-------
> .../linux/chromium-os/upstream-info.json | 40 ++++++-------
> pkgs/os-specific/linux/kernel/linux-cros.nix | 2 +-
> 10 files changed, 64 insertions(+), 50 deletions(-)

Hopefully this means next time I can fulfill my promise of helping
out... Fingers crossed Google doesn't change/break anything between now
and then.

Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-05-30 19:00 ` [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
@ 2020-05-31  3:01   ` Alyssa Ross
  2020-05-31 23:49     ` Cole Helbling
  2020-06-02  0:56   ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
  1 sibling, 1 reply; 16+ messages in thread
From: Alyssa Ross @ 2020-05-31  3:01 UTC (permalink / raw)
  To: devel; +Cc: Cole Helbling, Alyssa Ross

crosvm now needs the Minijail sources.  However, it'll notice that a
Minijail package is provided via pkg-config, and then not actually use
those sources or build its own Minijail.  It would be nice if the
Minijail we provide could be the same version as in Chromium OS, which
means bringing Minijail under chromiumOSPackages.

A couple of backports are no longer required; one to common-mk and one
to Linux.
---
v1 of this patch was corrupt, due to an editor misconfiguration that 
made it strip trailing whitespace when I saved the patch after 
annotating it.

Additionally, I've now DRYed the fetchFromGitiles calls in crosvm.

 ...ommon-mk-.gn-don-t-hardcode-env-path.patch |   4 +-
 ...-Suppress-Wrange-loop-analysis-warni.patch |  72 -----
 .../linux/chromium-os/common-mk/default.nix   |   1 -
 .../linux/chromium-os/crosvm/default.nix      |  34 ++-
 .../os-specific/linux/chromium-os/default.nix |   4 +-
 .../linux/chromium-os/modem-manager/next.nix  |   5 +-
 ...er-don-t-leak-source-absolute-paths.patch} |   4 +-
 ...elier-use-stable-xdg-shell-protocol.patch} |  54 ++--
 ...melier-make-building-demos-optional.patch} |   4 +-
 ...er-Log-the-value-of-strerror-when-as.patch | 245 ------------------
 .../linux/chromium-os/sommelier/default.nix   |   7 +-
 pkgs/os-specific/linux/chromium-os/update.py  |   1 +
 .../linux/chromium-os/upstream-info.json      |  42 +--
 ...virtwl-Support-multiple-host-sockets.patch | 126 ---------
 pkgs/os-specific/linux/kernel/patches.nix     |   5 -
 16 files changed, 83 insertions(+), 529 deletions(-)
 delete mode 100644 pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
 rename pkgs/os-specific/linux/chromium-os/sommelier/{0004-sommelier-don-t-leak-source-absolute-paths.patch => 0003-sommelier-don-t-leak-source-absolute-paths.patch} (82%)
 rename pkgs/os-specific/linux/chromium-os/sommelier/{0005-sommelier-use-stable-xdg-shell-protocol.patch => 0004-sommelier-use-stable-xdg-shell-protocol.patch} (97%)
 rename pkgs/os-specific/linux/chromium-os/sommelier/{0006-sommelier-make-building-demos-optional.patch => 0005-sommelier-make-building-demos-optional.patch} (94%)
 delete mode 100644 pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
 delete mode 100644 pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch

diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
index eb79e1ae8fa..347faecacf5 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 56d3fe9520c1ef2a6400939f4deae06d9b5cdfc2 Mon Sep 17 00:00:00 2001
+From 22f33cfdfacc8c4536a8bf883b4c8b54e30599a3 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 16:56:11 +0000
-Subject: [PATCH 1/7] common-mk: don't leak source-absolute paths
+Subject: [PATCH 1/5] common-mk: don't leak source-absolute paths
 
 Source-absolute paths like //vm_tools/whatever were being leaked to
 subprocesses, which of course didn't know how to understand them.
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
index 9d4843064d2..ba9e053dd72 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
@@ -1,7 +1,7 @@
-From ec1afec90fd8e391b93f53f0abd8bc11cdba0a32 Mon Sep 17 00:00:00 2001
+From 51ed7b957069bd3765222a466473c696755caa5e Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 17:20:46 +0000
-Subject: [PATCH 2/7] common-mk: .gn: don't hardcode env path
+Subject: [PATCH 2/5] common-mk: .gn: don't hardcode env path
 
 This is needlessly non-portable.
 ---
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
deleted file mode 100644
index f64969fc811..00000000000
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b3add805d98e01488d71cbad51206f3a4949bb1c Mon Sep 17 00:00:00 2001
-From: Denis Nikitin <denik@chromium.org>
-Date: Wed, 5 Feb 2020 18:43:38 +0000
-Subject: [PATCH 3/7] Revert "common-mk: Suppress -Wrange-loop-analysis
- warning"
-
-This reverts commit 09298dce8d31b5744a83784d027a3fd1e312eb6d.
-
-Reason for revert: <The warning is fixed in the upstream starting from r382025>
-
-Original change's description:
-> common-mk: Suppress -Wrange-loop-analysis warning
->
-> Disable range-loop-analysis warning in platform2 to unblock llvm-next
-> builds failing with the following warning in libbrillo which can't be
-> easily fixed:
->
-> data_serialization.h:471:20: error: loop variable 'element' is always a
-> copy because the range of type 'const std::vector<bool, allocator<bool>
-> >' does not return a reference [-Werror,-Wrange-loop-analysis]
->   for (const auto& element : value) {
->                                 ^
-> use non-reference type
-> 'std::__1::__bit_const_reference<std::__1::vector<bool,
-> std::__1::allocator<bool> > >'
->
-> BUG=chromium:1042979
-> TEST=emerge-kevin libbrillo
->
-> Change-Id: If5b70cb1a836df325d3683217be4c841fc7a5516
-> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2008102
-> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-> Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-> Tested-by: Manoj Gupta <manojgupta@chromium.org>
-
-Bug: chromium:1042979
-Change-Id: Ib86d9f0d61b703d391f60824d8d2ef47eb60f345
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2039651
-Reviewed-by: Mike Frysinger <vapier@chromium.org>
-Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-Commit-Queue: Denis Nikitin <denik@chromium.org>
-Tested-by: Denis Nikitin <denik@chromium.org>
-(cherry picked from commit f53a0117ded343295015e81db68bbe878fae5fac)
----
- common-mk/BUILD.gn | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/common-mk/BUILD.gn b/common-mk/BUILD.gn
-index 7c0601b18..dc02a6979 100644
---- a/common-mk/BUILD.gn
-+++ b/common-mk/BUILD.gn
-@@ -53,7 +53,6 @@ config("compiler_defaults") {
-   cflags = [
-     "-Wall",
-     "-Wunused",
--
-     # We use C99 array designators in C++ code.  Our compilers support this
-     # extension since C++ has no equivalent yet (as of C++20).
-     "-Wno-c99-designator",
-@@ -65,9 +64,6 @@ config("compiler_defaults") {
-     "-fvisibility=internal",
-     "-Wa,--noexecstack",
-     "-Wimplicit-fallthrough",
--
--    # TODO(crbug.com/1042979): Verify the warning when the issue gets fixed.
--    "-Wno-range-loop-analysis",
-   ]
-   cflags_c = [ "-std=gnu11" ] + external_cppflags + external_cxxflags
-   cflags_cc = [ "-std=gnu++14" ] + external_cppflags + external_cxxflags
--- 
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
index 73862bcaa97..cc72aab5d15 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
@@ -59,7 +59,6 @@ stdenv.mkDerivation ({
     '') ([
       ./0001-common-mk-don-t-leak-source-absolute-paths.patch
       ./0002-common-mk-.gn-don-t-hardcode-env-path.patch
-      ./0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
     ] ++ platform2Patches)}
 
     patchShebangs common-mk
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
index 8698ef67a83..d64dc316772 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
@@ -8,11 +8,12 @@ let
     else if isx86_64 then "x86_64"
     else throw "no seccomp policy files available for host platform";
 
-  crosvmSrc = fetchFromGitiles
-    upstreamInfo.components."src/platform/crosvm";
-
-  adhdSrc = fetchFromGitiles
-    upstreamInfo.components."src/third_party/adhd";
+  getSrc = path: fetchFromGitiles upstreamInfo.components.${path};
+  srcs = lib.genAttrs [
+    "src/platform/crosvm"
+    "src/third_party/adhd"
+    "src/aosp/external/minijail"
+  ] getSrc;
 in
 
   rustPlatform.buildRustPackage rec {
@@ -22,28 +23,25 @@ in
     unpackPhase = ''
       runHook preUnpack
 
-      mkdir -p chromiumos/platform chromiumos/third_party
-
-      pushd chromiumos/platform
-      unpackFile ${crosvmSrc}
-      popd
-
-      pushd chromiumos/third_party
-      unpackFile ${adhdSrc}
-      popd
+      ${lib.concatStringsSep "\n" (lib.mapAttrsToList (path: src: ''
+        mkdir -p ${dirOf path}
+        pushd ${dirOf path}
+        unpackFile ${src}
+        popd
+      '') srcs)}
 
       chmod -R u+w -- "$sourceRoot"
 
       runHook postUnpack
     '';
 
-    sourceRoot = "chromiumos/platform/crosvm";
+    sourceRoot = "src/platform/crosvm";
 
     patches = [
       ./default-seccomp-policy-dir.diff
     ];
 
-    cargoSha256 = "0lhivwvdihslwp81i3sa5q88p5hr83bzkvklrcgf6x73arwk8kdz";
+    cargoSha256 = "0wzqn2n4vyv3bk39079yg1zbnriagi5xns928bzdqmq9djdcj21i";
 
     nativeBuildInputs = [ pkgconfig ];
 
@@ -68,8 +66,8 @@ in
         "${linux}/${stdenv.hostPlatform.platform.kernelTarget}";
 
     passthru = {
-      inherit adhdSrc;
-      src = crosvmSrc;
+      inherit srcs;
+      src = srcs.${sourceRoot};
       updateScript = ../update.py;
     };
 
diff --git a/pkgs/os-specific/linux/chromium-os/default.nix b/pkgs/os-specific/linux/chromium-os/default.nix
index db719e8b0f1..6eb9f335ff3 100644
--- a/pkgs/os-specific/linux/chromium-os/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/default.nix
@@ -30,9 +30,7 @@ let
     };
 
     linux_5_4 = callPackage ../kernel/linux-cros.nix {
-      kernelPatches = linux_5_4.kernelPatches ++ (with kernelPatches; [
-        virtwl_multiple_sockets
-      ]);
+      inherit (linux_5_4) kernelPatches;
     };
 
     linux = self.linux_5_4;
diff --git a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
index 91aa18b3846..d40b2c9292e 100644
--- a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
+++ b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
@@ -1,5 +1,5 @@
 { modemmanager, lib, fetchFromGitiles, upstreamInfo, autoreconfHook
-, libqmi, libxslt
+, autoconf-archive, libqmi, libxslt
 }:
 
 modemmanager.overrideAttrs (
@@ -11,7 +11,8 @@ modemmanager.overrideAttrs (
     src = fetchFromGitiles
       upstreamInfo.components."src/third_party/modemmanager-next";
 
-    nativeBuildInputs = nativeBuildInputs ++ [ autoreconfHook libqmi libxslt ];
+    nativeBuildInputs = nativeBuildInputs ++
+      [ autoreconfHook autoconf-archive libqmi libxslt ];
 
     passthru = passthru // {
       updateScript = ../update.py;
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
similarity index 82%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
index 5d3ec4effe8..f5c5b8f3667 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 1fa4de5b2228c40b25fd6333a74ae7535d73bcce Mon Sep 17 00:00:00 2001
+From 27381a5b01d14d3aca173cf66d3f13c8ea8f475c Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 1 Dec 2019 17:04:04 +0000
-Subject: [PATCH 4/7] sommelier: don't leak source-absolute paths
+Subject: [PATCH 3/5] sommelier: don't leak source-absolute paths
 
 ---
  vm_tools/sommelier/wayland_protocol.gni | 2 +-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
similarity index 97%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
index 5a6e57375a3..e107ab0f7e7 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
@@ -1,7 +1,7 @@
-From 5068e64b2fdedca0a4a9f1894335af8587c4c55a Mon Sep 17 00:00:00 2001
+From 119676ba72d8da73636978aa342e2e58c092384e Mon Sep 17 00:00:00 2001
 From: Puck Meerburg <puck@puckipedia.com>
 Date: Tue, 3 Dec 2019 18:06:14 +0000
-Subject: [PATCH 5/7] sommelier: use stable xdg-shell protocol
+Subject: [PATCH 4/5] sommelier: use stable xdg-shell protocol
 
 From https://github.com/wayland-project/weston/commit/d8d9f5e6e16c8f6a3c06763d5f56c27dc9a6e52e:
 
@@ -1200,7 +1200,7 @@ index ecd0fc647..a3ba0d6e1 100644
 +                          sl_bind_host_xdg_wm_base);
  }
 diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index d87bced03..5e03d8978 100644
+index 98e101135..9a56f350d 100644
 --- a/vm_tools/sommelier/sommelier.c
 +++ b/vm_tools/sommelier/sommelier.c
 @@ -35,7 +35,7 @@
@@ -1210,9 +1210,9 @@ index d87bced03..5e03d8978 100644
 -#include "xdg-shell-unstable-v6-client-protocol.h"
 +#include "xdg-shell-client-protocol.h"
  
- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
-@@ -272,14 +272,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
+ #define errno_assert(rv)                                          \
+   {                                                               \
+@@ -281,14 +281,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
    free(sync_point);
  }
  
@@ -1232,7 +1232,7 @@ index d87bced03..5e03d8978 100644
  
  static void sl_send_configure_notify(struct sl_window* window) {
    xcb_configure_notify_event_t event = {
-@@ -442,8 +442,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -451,8 +451,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
    }
  
    if (window->xdg_surface) {
@@ -1243,7 +1243,7 @@ index d87bced03..5e03d8978 100644
    }
    window->pending_config.serial = 0;
  
-@@ -454,8 +454,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -463,8 +463,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
  }
  
  static void sl_internal_xdg_surface_configure(
@@ -1254,7 +1254,7 @@ index d87bced03..5e03d8978 100644
  
    window->next_config.serial = serial;
    if (!window->pending_config.serial) {
-@@ -476,16 +476,16 @@ static void sl_internal_xdg_surface_configure(
+@@ -485,16 +485,16 @@ static void sl_internal_xdg_surface_configure(
    }
  }
  
@@ -1274,7 +1274,7 @@ index d87bced03..5e03d8978 100644
    int activated = 0;
    uint32_t* state;
    int i = 0;
-@@ -515,21 +515,21 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -524,21 +524,21 @@ static void sl_internal_xdg_toplevel_configure(
  
    window->allow_resize = 1;
    wl_array_for_each(state, states) {
@@ -1300,7 +1300,7 @@ index d87bced03..5e03d8978 100644
        window->allow_resize = 0;
    }
  
-@@ -545,8 +545,8 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -554,8 +554,8 @@ static void sl_internal_xdg_toplevel_configure(
  }
  
  static void sl_internal_xdg_toplevel_close(
@@ -1311,7 +1311,7 @@ index d87bced03..5e03d8978 100644
    xcb_client_message_event_t event = {
        .response_type = XCB_CLIENT_MESSAGE,
        .format = 32,
-@@ -563,21 +563,21 @@ static void sl_internal_xdg_toplevel_close(
+@@ -572,21 +572,21 @@ static void sl_internal_xdg_toplevel_close(
                   XCB_EVENT_MASK_NO_EVENT, (const char*)&event);
  }
  
@@ -1337,7 +1337,7 @@ index d87bced03..5e03d8978 100644
      sl_internal_xdg_popup_configure, sl_internal_xdg_popup_done};
  
  static void sl_window_set_wm_state(struct sl_window* window, int state) {
-@@ -645,15 +645,15 @@ void sl_window_update(struct sl_window* window) {
+@@ -654,15 +654,15 @@ void sl_window_update(struct sl_window* window) {
        window->aura_surface = NULL;
      }
      if (window->xdg_toplevel) {
@@ -1356,7 +1356,7 @@ index d87bced03..5e03d8978 100644
        window->xdg_surface = NULL;
      }
      window->realized = 0;
-@@ -664,8 +664,8 @@ void sl_window_update(struct sl_window* window) {
+@@ -673,8 +673,8 @@ void sl_window_update(struct sl_window* window) {
    assert(host_surface);
    assert(!host_surface->has_role);
  
@@ -1367,7 +1367,7 @@ index d87bced03..5e03d8978 100644
  
    if (window->managed) {
      if (window->transient_for != XCB_WINDOW_NONE) {
-@@ -727,11 +727,11 @@ void sl_window_update(struct sl_window* window) {
+@@ -736,11 +736,11 @@ void sl_window_update(struct sl_window* window) {
    }
  
    if (!window->xdg_surface) {
@@ -1384,7 +1384,7 @@ index d87bced03..5e03d8978 100644
    }
  
    if (ctx->aura_shell) {
-@@ -761,50 +761,50 @@ void sl_window_update(struct sl_window* window) {
+@@ -770,50 +770,50 @@ void sl_window_update(struct sl_window* window) {
    // window is closed.
    if (ctx->xwayland || !parent) {
      if (!window->xdg_toplevel) {
@@ -1454,7 +1454,7 @@ index d87bced03..5e03d8978 100644
    }
  
    if ((window->size_flags & (US_POSITION | P_POSITION)) && parent &&
-@@ -1168,22 +1168,23 @@ static void sl_registry_handler(void* data,
+@@ -1177,22 +1177,23 @@ static void sl_registry_handler(void* data,
        data_device_manager->host_global =
            sl_data_device_manager_global_create(ctx);
      }
@@ -1492,7 +1492,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (strcmp(interface, "zaura_shell") == 0) {
      if (version >= MIN_AURA_SHELL_VERSION) {
-@@ -1290,13 +1291,13 @@ static void sl_registry_remover(void* data,
+@@ -1299,13 +1300,13 @@ static void sl_registry_remover(void* data,
      ctx->data_device_manager = NULL;
      return;
    }
@@ -1513,7 +1513,7 @@ index d87bced03..5e03d8978 100644
      return;
    }
    if (ctx->aura_shell && ctx->aura_shell->id == id) {
-@@ -1458,11 +1459,11 @@ static void sl_destroy_window(struct sl_window* window) {
+@@ -1467,11 +1468,11 @@ static void sl_destroy_window(struct sl_window* window) {
    }
  
    if (window->xdg_popup)
@@ -1528,7 +1528,7 @@ index d87bced03..5e03d8978 100644
    if (window->aura_surface)
      zaura_surface_destroy(window->aura_surface);
  
-@@ -1906,15 +1907,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
+@@ -1915,15 +1916,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
    // that matching contents will arrive.
    if (window->xdg_toplevel) {
      if (window->pending_config.serial) {
@@ -1548,7 +1548,7 @@ index d87bced03..5e03d8978 100644
        window->next_config.serial = 0;
        window->next_config.mask = 0;
        window->next_config.states_length = 0;
-@@ -2035,23 +2036,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
+@@ -2044,23 +2045,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
  static uint32_t sl_resize_edge(int net_wm_moveresize_size) {
    switch (net_wm_moveresize_size) {
      case NET_WM_MOVERESIZE_SIZE_TOPLEFT:
@@ -1581,7 +1581,7 @@ index d87bced03..5e03d8978 100644
    }
  }
  
-@@ -2098,15 +2099,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2107,15 +2108,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
          return;
  
        if (event->data.data32[2] == NET_WM_MOVERESIZE_MOVE) {
@@ -1600,7 +1600,7 @@ index d87bced03..5e03d8978 100644
                                  seat->seat->last_serial, edge);
        }
      }
-@@ -2125,24 +2126,24 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2134,24 +2135,24 @@ static void sl_handle_client_message(struct sl_context* ctx,
  
        if (changed[ATOM_NET_WM_STATE_FULLSCREEN]) {
          if (action == NET_WM_STATE_ADD)
@@ -1630,7 +1630,7 @@ index d87bced03..5e03d8978 100644
      }
    }
  }
-@@ -2155,7 +2156,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
+@@ -2164,7 +2165,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
      // window was realized.
      struct sl_window* parent = sl_lookup_window(ctx, window->transient_for);
      if (parent && parent->xdg_toplevel && window->xdg_toplevel)
@@ -1639,7 +1639,7 @@ index d87bced03..5e03d8978 100644
    }
  }
  
-@@ -2373,9 +2374,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2381,9 +2382,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
        return;
  
      if (window->name) {
@@ -1651,7 +1651,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (event->atom == XCB_ATOM_WM_CLASS) {
      struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -2427,19 +2428,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2435,19 +2436,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
        return;
  
      if (window->size_flags & P_MIN_SIZE) {
@@ -1675,7 +1675,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (event->atom == XCB_ATOM_WM_HINTS) {
      struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -3536,7 +3537,7 @@ int main(int argc, char** argv) {
+@@ -3535,7 +3536,7 @@ int main(int argc, char** argv) {
        .shm = NULL,
        .shell = NULL,
        .data_device_manager = NULL,
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
similarity index 94%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
index 3538932d804..283e765d9d4 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
@@ -1,7 +1,7 @@
-From 8774d76f1b57092df9004d654fd075d7691b9f12 Mon Sep 17 00:00:00 2001
+From c0c705cb90026eef892be8e3e717429ccf26b018 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Wed, 15 Jan 2020 21:36:43 +0000
-Subject: [PATCH 6/7] sommelier: make building demos optional
+Subject: [PATCH 5/5] sommelier: make building demos optional
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
deleted file mode 100644
index 778c481d598..00000000000
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From 64afc7e7271e0bad332a8a246a4fb4151b3d296f Mon Sep 17 00:00:00 2001
-From: Fergus Dall <sidereal@google.com>
-Date: Fri, 27 Mar 2020 18:34:04 +1100
-Subject: [PATCH 7/7] vm_tools: sommelier: Log the value of strerror when
- asserting
-
-There's some reports of sommelier crashing with assert failures, and
-right now we don't even have a way to tell what the error was from the
-logs.
-
-BUG=chromium:1053843
-TEST=emerge-tatl vm_guest_tools
-
-Change-Id: Iac9e0470600f7c7a8d8328049a79305251d7ef7f
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2124131
-Commit-Queue: Fergus Dall <sidereal@google.com>
-Tested-by: Fergus Dall <sidereal@google.com>
-Reviewed-by: Nic Hollingum <hollingum@google.com>
----
- vm_tools/sommelier/sommelier.c | 65 +++++++++++++++++-----------------
- 1 file changed, 32 insertions(+), 33 deletions(-)
-
-diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index 5e03d8978..ffe6f645c 100644
---- a/vm_tools/sommelier/sommelier.c
-+++ b/vm_tools/sommelier/sommelier.c
-@@ -37,6 +37,15 @@
- #include "viewporter-client-protocol.h"
- #include "xdg-shell-client-protocol.h"
- 
-+#define errno_assert(rv)                                          \
-+  {                                                               \
-+    int macro_private_assert_value = (rv);                        \
-+    if (!macro_private_assert_value) {                            \
-+      fprintf(stderr, "Unexpected error: %s\n", strerror(errno)); \
-+      assert(false);                                              \
-+    }                                                             \
-+  }
-+
- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
- #error XWAYLAND_PATH must be defined
-@@ -239,7 +248,7 @@ struct sl_mmap* sl_mmap_create(int fd,
-   map->buffer_resource = NULL;
-   map->addr =
-       mmap(NULL, size + offset0, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
--  assert(map->addr != MAP_FAILED);
-+  errno_assert(map->addr != MAP_FAILED);
- 
-   return map;
- }
-@@ -2183,8 +2192,7 @@ int sl_begin_data_source_send(struct sl_context* ctx,
- 
-   flags = fcntl(fd, F_GETFL, 0);
-   rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
--  assert(!rv);
--  UNUSED(rv);
-+  errno_assert(!rv);
- 
-   ctx->selection_data_source_send_fd = fd;
-   free(reply);
-@@ -2810,7 +2818,7 @@ static void sl_send_data(struct sl_context* ctx, xcb_atom_t data_type) {
-       int p[2];
- 
-       rv = pipe2(p, O_CLOEXEC | O_NONBLOCK);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       fd_to_receive = p[0];
-       fd_to_wayland = p[1];
-@@ -3153,7 +3161,7 @@ static void sl_sd_notify(const char* state) {
-   assert(socket_name);
- 
-   fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
--  assert(fd >= 0);
-+  errno_assert(fd >= 0);
- 
-   memset(&addr, 0, sizeof(addr));
-   addr.sun_family = AF_UNIX;
-@@ -3171,8 +3179,7 @@ static void sl_sd_notify(const char* state) {
-   msghdr.msg_iovlen = 1;
- 
-   rv = sendmsg(fd, &msghdr, MSG_NOSIGNAL);
--  assert(rv != -1);
--  UNUSED(rv);
-+  errno_assert(rv != -1);
- }
- 
- static int sl_handle_sigchld(int signal_number, void* data) {
-@@ -3304,7 +3311,7 @@ static int sl_handle_display_ready_event(int fd, uint32_t mask, void* data) {
-                       (int)(XCURSOR_SIZE_BASE * ctx->scale + 0.5)));
- 
-   pid = fork();
--  assert(pid >= 0);
-+  errno_assert(pid >= 0);
-   if (pid == 0) {
-     sl_execvp(ctx->runprog[0], ctx->runprog, -1);
-     _exit(EXIT_FAILURE);
-@@ -3373,8 +3380,7 @@ static int sl_handle_virtwl_ctx_event(int fd, uint32_t mask, void* data) {
-   }
- 
-   bytes = sendmsg(ctx->virtwl_socket_fd, &msg, MSG_NOSIGNAL);
--  assert(bytes == ioctl_recv->len);
--  UNUSED(bytes);
-+  errno_assert(bytes == ioctl_recv->len);
- 
-   while (fd_count--)
-     close(ioctl_recv->fds[fd_count]);
-@@ -3406,10 +3412,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
-   msg.msg_controllen = sizeof(fd_buffer);
- 
-   bytes = recvmsg(ctx->virtwl_socket_fd, &msg, 0);
--  if (bytes < 0) {
--    fprintf(stderr, "Failed to get message from virtwl: %s\n", strerror(errno));
--  }
--  assert(bytes > 0);
-+  errno_assert(bytes > 0);
- 
-   // If there were any FDs recv'd by recvmsg, there will be some data in the
-   // msg_control buffer. To get the FDs out we iterate all cmsghdr's within and
-@@ -3437,11 +3440,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
-   // structure which we now pass along to the kernel.
-   ioctl_send->len = bytes;
-   rv = ioctl(ctx->virtwl_ctx_fd, VIRTWL_IOCTL_SEND, ioctl_send);
--  if (!rv) {
--    fprintf(stderr, "Failed to send message to virtwl: %s\n", strerror(errno));
--  }
--  assert(!rv);
--  UNUSED(rv);
-+  errno_assert(!rv);
- 
-   while (fd_count--)
-     close(ioctl_send->fds[fd_count]);
-@@ -3765,7 +3764,7 @@ int main(int argc, char** argv) {
- 
-     lock_fd = open(lock_addr, O_CREAT | O_CLOEXEC,
-                    (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
--    assert(lock_fd >= 0);
-+    errno_assert(lock_fd >= 0);
- 
-     rv = flock(lock_fd, LOCK_EX | LOCK_NB);
-     if (rv < 0) {
-@@ -3781,25 +3780,25 @@ int main(int argc, char** argv) {
-       if (sock_stat.st_mode & (S_IWUSR | S_IWGRP))
-         unlink(addr.sun_path);
-     } else {
--      assert(errno == ENOENT);
-+      errno_assert(errno == ENOENT);
-     }
- 
-     sock_fd = socket(PF_LOCAL, SOCK_STREAM, 0);
--    assert(sock_fd >= 0);
-+    errno_assert(sock_fd >= 0);
- 
-     rv = bind(sock_fd, (struct sockaddr*)&addr,
-               offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path));
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
- 
-     rv = listen(sock_fd, 128);
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
- 
-     // Spawn optional child process before we notify systemd that we're ready
-     // to accept connections. WAYLAND_DISPLAY will be set but any attempt to
-     // connect to this socket at this time will fail.
-     if (ctx.runprog && ctx.runprog[0]) {
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         setenv("WAYLAND_DISPLAY", socket_name, 1);
-         sl_execvp(ctx.runprog[0], ctx.runprog, -1);
-@@ -3816,7 +3815,7 @@ int main(int argc, char** argv) {
-     sigemptyset(&sa.sa_mask);
-     sa.sa_flags = SA_RESTART;
-     rv = sigaction(SIGCHLD, &sa, NULL);
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
- 
-     do {
-       struct ucred ucred;
-@@ -3833,7 +3832,7 @@ int main(int argc, char** argv) {
-       rv = getsockopt(client_fd, SOL_SOCKET, SO_PEERCRED, &ucred, &length);
- 
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         char* client_fd_str;
-         char* peer_pid_str;
-@@ -3963,7 +3962,7 @@ int main(int argc, char** argv) {
- 
-       // Connection to virtwl channel.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, vws);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       ctx.virtwl_socket_fd = vws[0];
-       virtwl_display_fd = vws[1];
-@@ -4083,7 +4082,7 @@ int main(int argc, char** argv) {
-   if (ctx.runprog || ctx.xwayland) {
-     // Wayland connection from client.
-     rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv);
--    assert(!rv);
-+    errno_assert(!rv);
- 
-     client_fd = sv[0];
-   }
-@@ -4199,7 +4198,7 @@ int main(int argc, char** argv) {
- 
-       // Xwayland display ready socket.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, ds);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       ctx.display_ready_event_source =
-           wl_event_loop_add_fd(event_loop, ds[0], WL_EVENT_READABLE,
-@@ -4207,12 +4206,12 @@ int main(int argc, char** argv) {
- 
-       // X connection to Xwayland.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wm);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       ctx.wm_fd = wm[0];
- 
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         char* display_fd_str;
-         char* wm_fd_str;
-@@ -4280,7 +4279,7 @@ int main(int argc, char** argv) {
-       ctx.xwayland_pid = pid;
-     } else {
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         sl_execvp(ctx.runprog[0], ctx.runprog, sv[1]);
-         _exit(EXIT_FAILURE);
--- 
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
index da2a554837b..e0ce28205f2 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
@@ -7,10 +7,9 @@ common-mk {
   platformSubdir = "vm_tools/sommelier";
 
   platform2Patches = [
-    ./0004-sommelier-don-t-leak-source-absolute-paths.patch
-    ./0005-sommelier-use-stable-xdg-shell-protocol.patch
-    ./0006-sommelier-make-building-demos-optional.patch
-    ./0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+    ./0003-sommelier-don-t-leak-source-absolute-paths.patch
+    ./0004-sommelier-use-stable-xdg-shell-protocol.patch
+    ./0005-sommelier-make-building-demos-optional.patch
   ];
 
   buildInputs = [
diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py
index 58a15dbb8e8..a2e093c2e9e 100755
--- a/pkgs/os-specific/linux/chromium-os/update.py
+++ b/pkgs/os-specific/linux/chromium-os/update.py
@@ -14,6 +14,7 @@ from urllib.request import urlopen
 
 # ChromiumOS components used in Nixpkgs
 component_paths = [
+    'src/aosp/external/minijail',
     'src/platform/crosvm',
     'src/platform/minigbm',
     'src/platform2',
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index 842912800bc..7755c48239c 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -1,54 +1,60 @@
 {
-  "version": "81.12871.0.0-rc1",
+  "version": "83.13020.0.0-rc1",
   "components": {
+    "src/aosp/external/minijail": {
+      "name": "minijail",
+      "url": "https://android.googlesource.com/platform/external/minijail",
+      "rev": "84ffabcf488bf0935f00930a9a23bbce1f34d79f",
+      "sha256": "0yhbklwmgqws4cb098hpaky4w8if5snpkdabridcc5hk5d7vgild"
+    },
     "src/platform/crosvm": {
       "name": "crosvm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
-      "rev": "8b8c01e1ad31718932491e4aee63f56109a138e2",
-      "sha256": "1qmf1k06pwynh15c3nr9m6v90z2pkk930xniwvlvbvnazrk4rllg"
+      "rev": "664cc3ca49cb58d5bf7d936686fd211d6dd728bf",
+      "sha256": "0rms1hkb3r4w6j3l71gavky6ylc7gi9sfr2rq4dr82v6vc8zxbjx"
     },
     "src/platform/minigbm": {
       "name": "minigbm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/minigbm",
-      "rev": "fbfb338e7db246f05ae68da97141fbd49481584b",
-      "sha256": "11p6v4nmqivyqyc8lmypbwqv9q819lhx6v3igfsv3455mmq02kcb"
+      "rev": "bc4f023bfcc51cf9dcfcfec5bf4177b2e607dd68",
+      "sha256": "08ag207199xj5cw686386rmvr7sx2mzihdckm2pnvw743w03gipr"
     },
     "src/platform2": {
       "name": "platform2",
       "url": "https://chromium.googlesource.com/chromiumos/platform2",
-      "rev": "6e0d88d0bea8e7cb28a310298cc8c77ed742f60a",
-      "sha256": "13vrbnl3ck8cxiyifc58cs9i0yby92vp5si27ihrx33v6bdlir4s"
+      "rev": "e45d54bedee94e0121e12cc86fded46be8b3fa4e",
+      "sha256": "0ag01p8ch0wn7ds9ywasrdxkbibg19qzf5rldf8nr8irk1n851n7"
     },
     "src/third_party/adhd": {
       "name": "adhd",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
-      "rev": "f361d5b02623274723bff251dafa1e2a2887b013",
-      "sha256": "1p8iwjwgmcgmzri03ik2jaid8l0ch0bzn6z9z64dix1hlrvrlliw"
+      "rev": "d3af897db5540cadc439463a0ffdde07f2b8898a",
+      "sha256": "1h0xxf338d7fwmfwjlpsjiml8d3v426a95x3ka7qfikdapgmav3d"
     },
     "src/third_party/chromiumos-overlay": {
       "name": "chromiumos-overlay",
       "url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
-      "rev": "be285b729ef2af700cc248f741af20c387b5a1bc",
-      "sha256": "18y2icdb3hxqxxaaz8sylw21q2qwcpjyns75ig7ahc4vc1k5hg7s"
+      "rev": "270f5c2cfb7eadc374638076c8fdee72360a6d66",
+      "sha256": "1d88xvnf0qc3v5hp9b2pafxhi83rph84y2sbk1nc46rhj63m8bwi"
     },
     "src/third_party/kernel/v5.4": {
       "name": "v5.4",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/kernel",
-      "rev": "17611b6e636c8ccae25e873e659d69c20b215815",
-      "sha256": "0an8w3660v2zf2crb68ambg7vzw2rajpjmcby1am08qy37lqsfkd",
-      "version": "5.4.16"
+      "rev": "36270ae817fb576debb80bce752addb3a4cc9886",
+      "sha256": "0h7fj3w9vwmq8a6cx96vjcyw29v7wfamxykh1nx3lmhxxkn120f4",
+      "version": "5.4.28"
     },
     "src/third_party/libqmi": {
       "name": "libqmi",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/libqmi",
-      "rev": "6267c12fef0be9a95d687bf4b476593eeffbaaf1",
-      "sha256": "00yjjcngjkbgxmmf79ciddk9yq393a94230ahq8vszyfygzhs3rz"
+      "rev": "20726755e60d48c70f0189a1cfe9665a87a5e6c6",
+      "sha256": "0w04lyd459jgcag70kx6nq1i952fbhy32nmkh6r255xjf2wrliwr"
     },
     "src/third_party/modemmanager-next": {
       "name": "modemmanager-next",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/modemmanager-next",
-      "rev": "a4d3a4de1fdab7c282f1a188d2d3d0aaa24f0698",
-      "sha256": "1b1l1jfiyl7fnm29pp9npi0gdlqcw1jmmbigf0qlndqdh0ly2izg"
+      "rev": "988f572cc882a74209fba0f5c49cf0b01b9163a6",
+      "sha256": "1hiqz7wn1w461sd94v179q81yahisffnw033yix3dwfwagm9ndf8"
     },
     "src/third_party/modp_b64": {
       "name": "modp_b64",
diff --git a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch b/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
deleted file mode 100644
index 3e4e504978c..00000000000
--- a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 7f7629cc680bf3c22d547fb5333e521af58c6c9e Mon Sep 17 00:00:00 2001
-From: Ryo Hashimoto <hashimoto@google.com>
-Date: Wed, 11 Dec 2019 18:32:03 +0900
-Subject: [PATCH] CHROMIUM: virtwl: Support multiple host sockets
-
-Add a new argument to VIRTWL_IOCTL_NEW_CTX.
-This CL doesn't change the size of structs.
-
-Guest can use this parameter to create a context connected to a host
-process other than the compositor.
-
-BUG=b:146100044, b:140202859
-TEST=Camera works
-
-Change-Id: I1c6b1a256002a336774a36caf0fe8d18f08c0f56
-Signed-off-by: Ryo Hashimoto <hashimoto@chromium.org>
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1962108
-Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
-Reviewed-by: Zach Reizner <zachr@chromium.org>
-(cherry picked from commit 5d641a7b7b64664230d2fd2aa1e74dd792b8b7bf)
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2035921
-Tested-by: Chirantan Ekbote <chirantan@chromium.org>
-Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
-Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
-Signed-off-by: Alyssa Ross <hi@alyssa.is>
----
- drivers/virtio/virtio_wl.c     |  6 ++++++
- include/uapi/linux/virtio_wl.h | 29 +++++++++++++++++------------
- include/uapi/linux/virtwl.h    |  3 +++
- 3 files changed, 26 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/virtio/virtio_wl.c b/drivers/virtio/virtio_wl.c
-index 1b3f8926519a7..80cf799bed464 100644
---- a/drivers/virtio/virtio_wl.c
-+++ b/drivers/virtio/virtio_wl.c
-@@ -1024,6 +1024,7 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- 	int ret = 0;
- 
- 	if (ioctl_new->type != VIRTWL_IOCTL_NEW_CTX &&
-+		ioctl_new->type != VIRTWL_IOCTL_NEW_CTX_NAMED &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_ALLOC &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_READ &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_WRITE &&
-@@ -1060,6 +1061,11 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- 		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX;
- 		ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
- 		break;
-+	case VIRTWL_IOCTL_NEW_CTX_NAMED:
-+		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED;
-+		ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
-+		memcpy(ctrl_new->name, ioctl_new->name, sizeof(ctrl_new->name));
-+		break;
- 	case VIRTWL_IOCTL_NEW_ALLOC:
- 		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW;
- 		ctrl_new->size = PAGE_ALIGN(ioctl_new->size);
-diff --git a/include/uapi/linux/virtio_wl.h b/include/uapi/linux/virtio_wl.h
-index 1d3ec6b31d4d3..ad9b6dfcd3263 100644
---- a/include/uapi/linux/virtio_wl.h
-+++ b/include/uapi/linux/virtio_wl.h
-@@ -37,6 +37,7 @@ enum virtio_wl_ctrl_type {
- 	VIRTIO_WL_CMD_VFD_NEW_DMABUF, /* virtio_wl_ctrl_vfd_new */
- 	VIRTIO_WL_CMD_VFD_DMABUF_SYNC, /* virtio_wl_ctrl_vfd_dmabuf_sync */
- 	VIRTIO_WL_CMD_VFD_SEND_FOREIGN_ID, /* virtio_wl_ctrl_vfd_send + data */
-+	VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED, /* virtio_wl_ctrl_vfd_new */
- 
- 	VIRTIO_WL_RESP_OK = 0x1000,
- 	VIRTIO_WL_RESP_VFD_NEW = 0x1001, /* virtio_wl_ctrl_vfd_new */
-@@ -78,18 +79,22 @@ struct virtio_wl_ctrl_vfd_new {
- 	__le32 flags; /* virtio_wl_vfd_flags */
- 	__le64 pfn; /* first guest physical page frame number if VFD_MAP */
- 	__le32 size; /* size in bytes if VIRTIO_WL_CMD_VFD_NEW* */
--	/* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
--	struct {
--		__le32 width; /* width in pixels */
--		__le32 height; /* height in pixels */
--		__le32 format; /* fourcc format */
--		__le32 stride0; /* return stride0 */
--		__le32 stride1; /* return stride1 */
--		__le32 stride2; /* return stride2 */
--		__le32 offset0; /* return offset0 */
--		__le32 offset1; /* return offset1 */
--		__le32 offset2; /* return offset2 */
--	} dmabuf;
-+	union {
-+		/* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
-+		struct {
-+			__le32 width; /* width in pixels */
-+			__le32 height; /* height in pixels */
-+			__le32 format; /* fourcc format */
-+			__le32 stride0; /* return stride0 */
-+			__le32 stride1; /* return stride1 */
-+			__le32 stride2; /* return stride2 */
-+			__le32 offset0; /* return offset0 */
-+			__le32 offset1; /* return offset1 */
-+			__le32 offset2; /* return offset2 */
-+		} dmabuf;
-+		/* name of socket if VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+		char name[32];
-+	};
- };
- 
- 
-diff --git a/include/uapi/linux/virtwl.h b/include/uapi/linux/virtwl.h
-index 939041389b403..baa9b341377a5 100644
---- a/include/uapi/linux/virtwl.h
-+++ b/include/uapi/linux/virtwl.h
-@@ -21,6 +21,7 @@ enum virtwl_ioctl_new_type {
- 	VIRTWL_IOCTL_NEW_PIPE_WRITE,
- 	/* create a new virtwl dmabuf that is writable via the returned fd */
- 	VIRTWL_IOCTL_NEW_DMABUF,
-+	VIRTWL_IOCTL_NEW_CTX_NAMED, /* open a new named connection context */
- };
- 
- struct virtwl_ioctl_new {
-@@ -42,6 +43,8 @@ struct virtwl_ioctl_new {
- 			__u32 offset1; /* return offset1 */
- 			__u32 offset2; /* return offset2 */
- 		} dmabuf;
-+		/* name of socket if type == VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+		char name[32];
- 	};
- };
- 
--- 
-2.26.2
-
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 66cbdbb36fa..8ce1ac2b587 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -92,9 +92,4 @@
     name = "mac_nvme_t2";
     patch = ./mac-nvme-t2.patch;
   };
-
-  virtwl_multiple_sockets = {
-    name = "virtwl_multiple_sockets";
-    patch = ./0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch;
-  };
 }
-- 
2.26.2

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-05-31  3:01   ` [PATCH v2 " Alyssa Ross
@ 2020-05-31 23:49     ` Cole Helbling
  2020-06-01 22:44       ` Alyssa Ross
  0 siblings, 1 reply; 16+ messages in thread
From: Cole Helbling @ 2020-05-31 23:49 UTC (permalink / raw)
  To: Alyssa Ross, devel; +Cc: Cole Helbling, Alyssa Ross

On Sun May 31, 2020 at 3:01 AM, Alyssa Ross wrote:
> crosvm now needs the Minijail sources. However, it'll notice that a
> Minijail package is provided via pkg-config, and then not actually use
> those sources or build its own Minijail. It would be nice if the
> Minijail we provide could be the same version as in Chromium OS, which
> means bringing Minijail under chromiumOSPackages.
>
> A couple of backports are no longer required; one to common-mk and one
> to Linux.
> ---
> v1 of this patch was corrupt, due to an editor misconfiguration that
> made it strip trailing whitespace when I saved the patch after
> annotating it.
>
> Additionally, I've now DRYed the fetchFromGitiles calls in crosvm.
>
> ...ommon-mk-.gn-don-t-hardcode-env-path.patch | 4 +-
> ...-Suppress-Wrange-loop-analysis-warni.patch | 72 -----
> .../linux/chromium-os/common-mk/default.nix | 1 -
> .../linux/chromium-os/crosvm/default.nix | 34 ++-
> .../os-specific/linux/chromium-os/default.nix | 4 +-
> .../linux/chromium-os/modem-manager/next.nix | 5 +-
> ...er-don-t-leak-source-absolute-paths.patch} | 4 +-
> ...elier-use-stable-xdg-shell-protocol.patch} | 54 ++--
> ...melier-make-building-demos-optional.patch} | 4 +-
> ...er-Log-the-value-of-strerror-when-as.patch | 245 ------------------
> .../linux/chromium-os/sommelier/default.nix | 7 +-
> pkgs/os-specific/linux/chromium-os/update.py | 1 +
> .../linux/chromium-os/upstream-info.json | 42 +--
> ...virtwl-Support-multiple-host-sockets.patch | 126 ---------
> pkgs/os-specific/linux/kernel/patches.nix | 5 -
> 16 files changed, 83 insertions(+), 529 deletions(-)

When running `nix-build . -A spectrumPackages.spectrum-vm` with these
two patches applied, vm_protos fails to build:

    [23/52] ACTION //vm_tools/proto:fuzzer-protos_gen(//common-mk/toolchain:toolchain)
    /usr/share/proto: warning: directory does not exist.
    [26/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
    FAILED: obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
    c++ -MMD -MF obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Igen/include -I../../common-mk -I/usr/include -Igen -Igen -Igen -Igen -Wall -Wunused -Wno-unused-parameter -Wunreachable-code -ggdb3 -fstack-protector-strong -Wformat=2 -fvisibility=internal -Wa,--noexecstack -Wimplicit-fallthrough -Werror --sysroot= -fPIE -fvisibility=default -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -Wno-unreachable-code -std=gnu++14 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-psabi -c gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc -o obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
    In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
    gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
       38 | #include "vm_crash.pb.h"
          |          ^~~~~~~~~~~~~~~
    compilation terminated.
    ninja: build stopped: subcommand failed.
    builder for '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv' failed with exit code 1

Cole

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-05-31 23:49     ` Cole Helbling
@ 2020-06-01 22:44       ` Alyssa Ross
  2020-06-01 23:00         ` Alyssa Ross
  2020-06-01 23:38         ` Michael Raskin
  0 siblings, 2 replies; 16+ messages in thread
From: Alyssa Ross @ 2020-06-01 22:44 UTC (permalink / raw)
  To: Cole Helbling; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 3678 bytes --]

> When running `nix-build . -A spectrumPackages.spectrum-vm` with these
> two patches applied, vm_protos fails to build:
>
>     [23/52] ACTION //vm_tools/proto:fuzzer-protos_gen(//common-mk/toolchain:toolchain)
>     /usr/share/proto: warning: directory does not exist.
>     [26/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
>     FAILED: obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
>     c++ -MMD -MF obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Igen/include -I../../common-mk -I/usr/include -Igen -Igen -Igen -Igen -Wall -Wunused -Wno-unused-parameter -Wunreachable-code -ggdb3 -fstack-protector-strong -Wformat=2 -fvisibility=internal -Wa,--noexecstack -Wimplicit-fallthrough -Werror --sysroot= -fPIE -fvisibility=default -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -Wno-unreachable-code -std=gnu++14 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-psabi -c gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc -o obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
>     In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
>     gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
>        38 | #include "vm_crash.pb.h"
>           |          ^~~~~~~~~~~~~~~
>     compilation terminated.
>     ninja: build stopped: subcommand failed.
>     builder for '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv' failed with exit code 1

That's interesting -- I can't reproduce this:

    $ NIX_PATH= nix-build -A chromiumOSPackages.vm_protos
    /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1

I notice that our outPaths for vm_protos are different.  What commit are
did you apply the patches onto?  (For me cfa1e27fdfb.)  Do you have some
global overlay that could be changing things (try with NIX_PATH= as
above to make sure)?

FWIW:

    $ NIX_PATH= nix-build -A chromiumOSPackages
    /nix/store/rgb6lg8jybz1y4nvxx1am5d1137k49ai-chromiumos-overlay
    /nix/store/y7psz0mh8gnlhjg4ik2pqdf209k9sanr-crosvm-83.13020.0.0-rc1
    /nix/store/xw1zkd4bssmrkii1h7vjwq8hs321rssp-dbus-interfaces
    /nix/store/r11gn34ca9r1ac2cf6bc3qg6nb2k1380-dbus-properties
    /nix/store/81962ah6xqcpklp1cxz051dgy0dbjvsm-libqmi-unstable-2019-12-16
    /nix/store/g346jzm6lamf69ysi4lm4m12gwd2347k-linux-5.4.28
    /nix/store/1bqdkvqncnm5njpf44jnsi4lf5cr2jfp-linux-headers-5.4.28
    /nix/store/fyq3kqc87ic6cby31sn498mp6r8lppyw-minigbm
    /nix/store/a53b0zgzrcfq8vbjbi9f9l1ada15k8my-modem-manager-chromiumos-unstable-2012-04-10
    /nix/store/722sj3qd8wbnf9phgp6l6a3b9cfyxihv-modem-manager-chromiumos-next-unstable-2019-10-17
    /nix/store/0zr8d7ba2gvv8fgzkykk9jkrn70k1r9y-modp_b64-83.13020.0.0-rc1
    /nix/store/7df2bcbd0q5kkqwpjapm1yn9aqd2lyyg-protofiles-0.0.36
    /nix/store/p7vl9kg5cynasqsvpi5j4saqgmsnlszw-sommelier-83.13020.0.0-rc1
    /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1

Are all of those different for you, or just some?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-06-01 22:44       ` Alyssa Ross
@ 2020-06-01 23:00         ` Alyssa Ross
  2020-06-01 23:38         ` Michael Raskin
  1 sibling, 0 replies; 16+ messages in thread
From: Alyssa Ross @ 2020-06-01 23:00 UTC (permalink / raw)
  To: Cole Helbling; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 30380 bytes --]

>> When running `nix-build . -A spectrumPackages.spectrum-vm` with these
>> two patches applied, vm_protos fails to build:
>>
>>     [23/52] ACTION //vm_tools/proto:fuzzer-protos_gen(//common-mk/toolchain:toolchain)
>>     /usr/share/proto: warning: directory does not exist.
>>     [26/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
>>     FAILED: obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
>>     c++ -MMD -MF obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Igen/include -I../../common-mk -I/usr/include -Igen -Igen -Igen -Igen -Wall -Wunused -Wno-unused-parameter -Wunreachable-code -ggdb3 -fstack-protector-strong -Wformat=2 -fvisibility=internal -Wa,--noexecstack -Wimplicit-fallthrough -Werror --sysroot= -fPIE -fvisibility=default -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -Wno-unreachable-code -std=gnu++14 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-psabi -c gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc -o obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
>>     In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
>>     gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
>>        38 | #include "vm_crash.pb.h"
>>           |          ^~~~~~~~~~~~~~~
>>     compilation terminated.
>>     ninja: build stopped: subcommand failed.
>>     builder for '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv' failed with exit code 1
>
> That's interesting -- I can't reproduce this:
>
>     $ NIX_PATH= nix-build -A chromiumOSPackages.vm_protos
>     /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1
>
> I notice that our outPaths for vm_protos are different.  What commit are
> did you apply the patches onto?  (For me cfa1e27fdfb.)  Do you have some
> global overlay that could be changing things (try with NIX_PATH= as
> above to make sure)?

Actually, I now notice that I was comparing my outPath to your drv
path.  So never mind.  We do indeed have the same derivation:

    $ NIX_PATH= nix-instantiate -A chromiumOSPackages.vm_protos
    warning: you did not specify '--add-root'; the result might be removed by the garbage collector
    /nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv

I tried deleting it and rebuilding, and it worked again for me.  I'm not
really sure what could be going on here.  Is it a hardware difference?
What sort of processor do you have?  I've built this once on an AMD EPYC
7401P, and once on an Intel Core i5-2520M.

Any other ideas?


Build log:

$ NIX_PATH= nix-build -A chromiumOSPackages.vm_protos
these derivations will be built:
  /nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv
building '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv'...
unpacking sources
unpacking source archive /nix/store/5mlr9rh8m9br9g5qlc2yr6xms49avvmi-platform2
source root is platform2
setting SOURCE_DATE_EPOCH to timestamp 1576011860 of file platform2/diagnostics/grpc/wilco_dtc.proto
patching sources
/build/platform2/vm_tools/proto /build/platform2
/build/platform2
applying patch /nix/store/xa4s2mxhx1s0ls3gvvcm88h12s67qm14-0001-common-mk-don-t-leak-source-absolute-paths.patch
patching file common-mk/external_dependencies/BUILD.gn
patching file common-mk/pkg_config.gni
patching file common-mk/proto_library.gni
applying patch /nix/store/p4wqm2h8f7qxdrs3609n44432cwv0hi6-0002-common-mk-.gn-don-t-hardcode-env-path.patch
patching file .gn
patching script interpreter paths in common-mk
common-mk/platform2_unittest.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/file_generator_wrapper.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/generate_pc_file.sh: interpreter directive changed from "/bin/bash" to "/nix/store/81wybawvkr95c7j8gj5ab3y740mq1fli-bash-4.4-p23/bin/bash"
common-mk/pkg-config_wrapper.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/platform2.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/mojom_bindings_generator_wrapper.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/gnlint_unittest.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/check-owners.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/check-readme.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/write_args.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/ebuild_function_unittest.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/example/run_tests.sh: interpreter directive changed from "/bin/bash" to "/nix/store/81wybawvkr95c7j8gj5ab3y740mq1fli-bash-4.4-p23/bin/bash"
common-mk/generate-pc.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/args_generator_wrapper.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/ebuild_function.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/arg_prefix_filter_wrapper.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/gnlint.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
common-mk/platform2_test.py: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/2dcsn57cgaxs92ha5swihrab0g3l2h6g-python3-3.7.7/bin/python3"
configuring
gn flags: ar="ar" cc="cc" cxx="c++" libdir="/nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1" pkg_config="pkg-config" platform2_root="." platform_subdir="vm_tools/proto" use={amd64=true arm=false asan=false coverage=false cros_host=false crypto=false dbus=false device_mapper=false fuzzer=false mojo=false profiling=false tcmalloc=false test=false timers=false udev=false}
Done. Made 18 targets from 9 files in 423ms
building
build flags: -j4 -l4
[1/52] ACTION //vm_tools/proto:common-protos_gen(//common-mk/toolchain:toolchain)
/usr/share/proto: warning: directory does not exist.
[3/52] ACTION //vm_tools/proto:tremplin-rpcs_gen(//common-mk/toolchain:toolchain)mon.grpc.pb.o
/usr/share/proto: warning: directory does not exist.
[4/52] ACTION //vm_tools/proto:vm-gorpcs(//common-mk/toolchain:toolchain)otos.common.pb.o
/usr/share/proto: warning: directory does not exist.
[6/52] ACTION //vm_tools/proto:tremplin-gorpcs(//common-mk/toolchain:toolchain)remplin.grpc.pb.o
/usr/share/proto: warning: directory does not exist.
[10/52] ACTION //vm_tools/proto:vsh-protos_gen(//common-mk/toolchain:toolchain)ommon.pb.o[K
/usr/share/proto: warning: directory does not exist.
[15/52] ACTION //vm_tools/proto:container-rpcs_gen(//common-mk/toolchain:toolchain)on.grpc.pb.o
/usr/share/proto: warning: directory does not exist.
[16/52] ACTION //vm_tools/proto:container-rpcs_gen(//common-mk/toolchain:toolchain)
/usr/share/proto: warning: directory does not exist.
[19/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libvsh-protos.vsh.pb.oer_guest.grpc.pb.o
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/vsh.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/vsh.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::vsh::ConnectionStatusMessage::SharedCtor()' at gen/include/vm_protos/proto_bindings/vsh.pb.cc:1225:11,
    inlined from 'vm_tools::vsh::ConnectionStatusMessage::ConnectionStatusMessage()' at gen/include/vm_protos/proto_bindings/vsh.pb.cc:1197:13,
    inlined from 'void InitDefaultsscc_info_ConnectionStatusMessage_vsh_2eproto()' at gen/include/vm_protos/proto_bindings/vsh.pb.cc:66:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [29, 32] from the object at 'vm_tools::vsh::_ConnectionStatusMessage_default_instance_' is out of the bounds of referenced subobject 'vm_tools::vsh::ConnectionStatusMessage::status_' with type 'int' at offset 24 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[20/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libcontainer-rpcs.container_guest.pb.o
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/container_guest.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/container_guest.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::container::LinuxPackageInfoResponse::SharedCtor()' at gen/include/vm_protos/proto_bindings/container_guest.pb.cc:3750:11,
    inlined from 'vm_tools::container::LinuxPackageInfoResponse::LinuxPackageInfoResponse()' at gen/include/vm_protos/proto_bindings/container_guest.pb.cc:3692:13,
    inlined from 'void InitDefaultsscc_info_LinuxPackageInfoResponse_container_5fguest_2eproto()' at gen/include/vm_protos/proto_bindings/container_guest.pb.cc:365:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset 73 from the object at 'vm_tools::container::_LinuxPackageInfoResponse_default_instance_' is out of the bounds of referenced subobject 'vm_tools::container::LinuxPackageInfoResponse::size_' with type 'long unsigned int' at offset 64 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::container::IconRequest::SharedCtor()' at gen/include/vm_protos/proto_bindings/container_guest.pb.cc:1646:11,
    inlined from 'vm_tools::container::IconRequest::IconRequest()' at gen/include/vm_protos/proto_bindings/container_guest.pb.cc:1622:13,
    inlined from 'void InitDefaultsscc_info_IconRequest_container_5fguest_2eproto()' at gen/include/vm_protos/proto_bindings/container_guest.pb.cc:238:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [45, 48] from the object at 'vm_tools::container::_IconRequest_default_instance_' is out of the bounds of referenced subobject 'vm_tools::container::IconRequest::icon_size_' with type 'int' at offset 40 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[21/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libtremplin-rpcs.tremplin.pb.ogrpc.pb.o
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/tremplin.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/tremplin.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::tremplin::ContainerExportProgress::SharedCtor()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:11290:11,
    inlined from 'vm_tools::tremplin::ContainerExportProgress::ContainerExportProgress()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:11256:13,
    inlined from 'void InitDefaultsscc_info_ContainerExportProgress_tremplin_2eproto()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:306:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [37, 80] from the object at 'vm_tools::tremplin::_ContainerExportProgress_default_instance_' is out of the bounds of referenced subobject 'vm_tools::tremplin::ContainerExportProgress::status_' with type 'int' at offset 32 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::tremplin::ContainerImportProgress::SharedCtor()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:13388:11,
    inlined from 'vm_tools::tremplin::ContainerImportProgress::ContainerImportProgress()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:13342:13,
    inlined from 'void InitDefaultsscc_info_ContainerImportProgress_tremplin_2eproto()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:320:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [53, 80] from the object at 'vm_tools::tremplin::_ContainerImportProgress_default_instance_' is out of the bounds of referenced subobject 'vm_tools::tremplin::ContainerImportProgress::status_' with type 'int' at offset 48 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::tremplin::ContainerCreationProgress::SharedCtor()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:7165:11,
    inlined from 'vm_tools::tremplin::ContainerCreationProgress::ContainerCreationProgress()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:7131:13,
    inlined from 'void InitDefaultsscc_info_ContainerCreationProgress_tremplin_2eproto()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:278:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [37, 40] from the object at 'vm_tools::tremplin::_ContainerCreationProgress_default_instance_' is out of the bounds of referenced subobject 'vm_tools::tremplin::ContainerCreationProgress::status_' with type 'int' at offset 32 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::tremplin::UpgradeContainerRequest::SharedCtor()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:15102:11,
    inlined from 'vm_tools::tremplin::UpgradeContainerRequest::UpgradeContainerRequest()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:15074:13,
    inlined from 'void InitDefaultsscc_info_UpgradeContainerRequest_tremplin_2eproto()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:742:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [29, 32] from the object at 'vm_tools::tremplin::_UpgradeContainerRequest_default_instance_' is out of the bounds of referenced subobject 'vm_tools::tremplin::UpgradeContainerRequest::source_version_' with type 'int' at offset 24 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::tremplin::GetContainerInfoResponse::SharedCtor()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:8770:11,
    inlined from 'vm_tools::tremplin::GetContainerInfoResponse::GetContainerInfoResponse()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:8742:13,
    inlined from 'void InitDefaultsscc_info_GetContainerInfoResponse_tremplin_2eproto()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:474:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [29, 32] from the object at 'vm_tools::tremplin::_GetContainerInfoResponse_default_instance_' is out of the bounds of referenced subobject 'vm_tools::tremplin::GetContainerInfoResponse::status_' with type 'int' at offset 24 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::tremplin::StartContainerResponse::SharedCtor()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:4935:11,
    inlined from 'vm_tools::tremplin::StartContainerResponse::StartContainerResponse()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:4904:13,
    inlined from 'void InitDefaultsscc_info_StartContainerResponse_tremplin_2eproto()' at gen/include/vm_protos/proto_bindings/tremplin.pb.cc:699:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [33, 36] from the object at 'vm_tools::tremplin::_StartContainerResponse_default_instance_' is out of the bounds of referenced subobject 'vm_tools::tremplin::StartContainerResponse::os_release_' with type 'vm_tools::tremplin::OsRelease*' at offset 24 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[23/52] ACTION //vm_tools/proto:vm-crash-rpcs_gen(//common-mk/toolchain:toolchain)ntainer_guest.grpc.pb.o
/usr/share/proto: warning: directory does not exist.
[26/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libcontainer-rpcs.container_host.pb.o
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/container_host.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/container_host.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::container::UninstallPackageProgressInfo::SharedCtor()' at gen/include/vm_protos/proto_bindings/container_host.pb.cc:5275:11,
    inlined from 'vm_tools::container::UninstallPackageProgressInfo::UninstallPackageProgressInfo()' at gen/include/vm_protos/proto_bindings/container_host.pb.cc:5241:13,
    inlined from 'void InitDefaultsscc_info_UninstallPackageProgressInfo_container_5fhost_2eproto()' at gen/include/vm_protos/proto_bindings/container_host.pb.cc:269:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [37, 40] from the object at 'vm_tools::container::_UninstallPackageProgressInfo_default_instance_' is out of the bounds of referenced subobject 'vm_tools::container::UninstallPackageProgressInfo::status_' with type 'int' at offset 32 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::container::InstallLinuxPackageProgressInfo::SharedCtor()' at gen/include/vm_protos/proto_bindings/container_host.pb.cc:4751:11,
    inlined from 'vm_tools::container::InstallLinuxPackageProgressInfo::InstallLinuxPackageProgressInfo()' at gen/include/vm_protos/proto_bindings/container_host.pb.cc:4711:13,
    inlined from 'void InitDefaultsscc_info_InstallLinuxPackageProgressInfo_container_5fhost_2eproto()' at gen/include/vm_protos/proto_bindings/container_host.pb.cc:213:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [45, 48] from the object at 'vm_tools::container::_InstallLinuxPackageProgressInfo_default_instance_' is out of the bounds of referenced subobject 'vm_tools::container::InstallLinuxPackageProgressInfo::status_' with type 'int' at offset 40 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30/52] ACTION //vm_tools/proto:vm-rpcs_gen(//common-mk/toolchain:toolchain)pcs.container_host.grpc.pb.o
/usr/share/proto: warning: directory does not exist.
[31/52] ACTION //vm_tools/proto:vm-rpcs_gen(//common-mk/toolchain:toolchain)
/usr/share/proto: warning: directory does not exist.
[39/52] ACTION //vm_tools/proto:fuzzer-protos_gen(//common-mk/toolchain:toolchain)grpc.pb.ob.o
/usr/share/proto: warning: directory does not exist.
[44/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.pb.o.o
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/fuzzer.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/fuzzer.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::container::ContainerListenerFuzzerSingleAction::SharedCtor()' at gen/include/vm_protos/proto_bindings/fuzzer.pb.cc:1600:11,
    inlined from 'vm_tools::container::ContainerListenerFuzzerSingleAction::ContainerListenerFuzzerSingleAction()' at gen/include/vm_protos/proto_bindings/fuzzer.pb.cc:1412:13,
    inlined from 'void InitDefaultsscc_info_ContainerListenerFuzzerSingleAction_fuzzer_2eproto()' at gen/include/vm_protos/proto_bindings/fuzzer.pb.cc:107:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [33, 196] from the object at 'vm_tools::container::_ContainerListenerFuzzerSingleAction_default_instance_' is out of the bounds of referenced subobject 'vm_tools::container::ContainerListenerFuzzerSingleAction::tremplin_create_container_response_' with type 'vm_tools::tremplin::CreateContainerResponse*' at offset 24 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[47/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libvm-rpcs.vm_host.pb.o
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/vm_host.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/vm_host.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::LogRecord::SharedCtor()' at gen/include/vm_protos/proto_bindings/vm_host.pb.cc:1170:11,
    inlined from 'vm_tools::LogRecord::LogRecord()' at gen/include/vm_protos/proto_bindings/vm_host.pb.cc:1139:13,
    inlined from 'void InitDefaultsscc_info_LogRecord_vm_5fhost_2eproto()' at gen/include/vm_protos/proto_bindings/vm_host.pb.cc:76:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [33, 36] from the object at 'vm_tools::_LogRecord_default_instance_' is out of the bounds of referenced subobject 'vm_tools::LogRecord::timestamp_' with type 'vm_tools::Timestamp*' at offset 24 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[49/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libvm-rpcs.vm_guest.pb.oo
In file included from /nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/string.h:494,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/port.h:38,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/stubs/common.h:46,
                 from /nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include/google/protobuf/io/coded_stream.h:135,
                 from gen/include/vm_protos/proto_bindings/vm_guest.pb.h:23,
                 from gen/include/vm_protos/proto_bindings/vm_guest.pb.cc:4:
In function 'void* memset(void*, int, size_t)',
    inlined from 'void vm_tools::NetworkConfigRequest::SharedCtor()' at gen/include/vm_protos/proto_bindings/vm_guest.pb.cc:1523:11,
    inlined from 'vm_tools::NetworkConfigRequest::NetworkConfigRequest()' at gen/include/vm_protos/proto_bindings/vm_guest.pb.cc:1494:13,
    inlined from 'void InitDefaultsscc_info_NetworkConfigRequest_vm_5fguest_2eproto()' at gen/include/vm_protos/proto_bindings/vm_guest.pb.cc:241:5:
/nix/store/796fpc57zsb4x57krgcdspxk0vp2rykq-glibc-2.30-dev/include/bits/string_fortified.h:71:33: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset [25, 32] from the object at 'vm_tools::_NetworkConfigRequest_default_instance_' is out of the bounds of referenced subobject 'vm_tools::NetworkConfigRequest::ipv4_config_' with type 'vm_tools::IPv4Config*' at offset 16 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[52/52] STAMP obj/common-mk/gn_root/root.stamp
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1
strip is /nix/store/a57856fs4m8ir6vlv14h3gq3sv9aq2lb-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1/lib
patching script interpreter paths in /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1
checking for references to /build/ in /nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1...
/nix/store/2dn0l8bb33ww5fcg09n30c3fpag6lc39-vm_protos-83.13020.0.0-rc1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-06-01 22:44       ` Alyssa Ross
  2020-06-01 23:00         ` Alyssa Ross
@ 2020-06-01 23:38         ` Michael Raskin
  2020-06-01 23:55           ` Alyssa Ross
  1 sibling, 1 reply; 16+ messages in thread
From: Michael Raskin @ 2020-06-01 23:38 UTC (permalink / raw)
  To: hi, cole.e.helbling; +Cc: devel

>>>     In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
>>>     gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
>>>        38 | #include "vm_crash.pb.h"
>>>           |          ^~~~~~~~~~~~~~~
>>>     compilation terminated.
>>>     ninja: build stopped: subcommand failed.
>>>     builder for '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv' failed with exit code 1

The first thing I would check if the same derivation builds elsewhere is the job count. Next step is checking the checksums of build inputs???



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-06-01 23:38         ` Michael Raskin
@ 2020-06-01 23:55           ` Alyssa Ross
  2020-06-02  0:37             ` [PATCH platform2] vm_tools: proto: fix parallel build Alyssa Ross
  0 siblings, 1 reply; 16+ messages in thread
From: Alyssa Ross @ 2020-06-01 23:55 UTC (permalink / raw)
  To: 7c6f434c, cole.e.helbling; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

Michael Raskin <7c6f434c@mail.ru> writes:

>>>>     In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
>>>>     gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
>>>>        38 | #include "vm_crash.pb.h"
>>>>           |          ^~~~~~~~~~~~~~~
>>>>     compilation terminated.
>>>>     ninja: build stopped: subcommand failed.
>>>>     builder for '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv' failed with exit code 1
>
> The first thing I would check if the same derivation builds elsewhere
> is the job count. Next step is checking the checksums of build
> inputs???

I job count is unlikely.  On one computer I built with 4 cores, on the
other I built with 48.  But Cole, it might be worth trying with a single
core.

Is there an easy way to get checksums of built inputs, or do I need to
do that manually?

Michael, does it build for you?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH platform2] vm_tools: proto: fix parallel build
  2020-06-01 23:55           ` Alyssa Ross
@ 2020-06-02  0:37             ` Alyssa Ross
  2020-06-02  0:39               ` Cole Helbling
  0 siblings, 1 reply; 16+ messages in thread
From: Alyssa Ross @ 2020-06-02  0:37 UTC (permalink / raw)
  To: 7c6f434c, cole.e.helbling; +Cc: devel

fuzzer-protos depends on vm-crash-rpcs, but this dependency wasn't
declared, causing build failures like the following:

[26/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
FAILED: obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
c++ -MMD -MF obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Igen/include -I../../common-mk -I/usr/include -Igen -Igen -Igen -Igen -Wall -Wunused -Wno-unused-parameter -Wunreachable-code -ggdb3 -fstack-protector-strong -Wformat=2 -fvisibility=internal -Wa,--noexecstack -Wimplicit-fallthrough -Werror --sysroot= -fPIE -fvisibility=default -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -Wno-unreachable-code -std=gnu++14 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-psabi -c gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc -o obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
   38 | #include "vm_crash.pb.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Reported-by: Cole Helbling <cole.e.helbling@outlook.com>
---

> Michael Raskin <7c6f434c@mail.ru> writes:
> 
>>>>>     In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
>>>>>     gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
>>>>>        38 | #include "vm_crash.pb.h"
>>>>>           |          ^~~~~~~~~~~~~~~
>>>>>     compilation terminated.
>>>>>     ninja: build stopped: subcommand failed.
>>>>>     builder for '/nix/store/8asskz117p1nhirxaa4pwa0caayxg6c5-vm_protos-83.13020.0.0-rc1.drv' failed with exit code 1
>>
>> The first thing I would check if the same derivation builds elsewhere
>> is the job count. Next step is checking the checksums of build
>> inputs???
> 
> I job count is unlikely.  On one computer I built with 4 cores, on the
> other I built with 48.  But Cole, it might be worth trying with a single
> core.
> 
> Is there an easy way to get checksums of built inputs, or do I need to
> do that manually?
> 
> Michael, does it build for you?

Looks like it was a parallelism bug after all.  Interesting that Cole 
saw it and I didn't, even with my -j48 build.

Cole, could you please test this patch?

The easiest way is probably to save the email, and then add 
platform2Patches = [ /path/to/email ]; to the vm_protos expression.

 vm_tools/proto/BUILD.gn | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vm_tools/proto/BUILD.gn b/vm_tools/proto/BUILD.gn
index 713b81853..a25265cab 100644
--- a/vm_tools/proto/BUILD.gn
+++ b/vm_tools/proto/BUILD.gn
@@ -70,6 +70,7 @@ proto_library("fuzzer-protos") {
   deps = [
     ":container-rpcs",
     ":tremplin-rpcs",
+    ":vm-crash-rpcs",
   ]
   sources = [
     "${proto_in_dir}/fuzzer.proto",
-- 
2.26.2

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH platform2] vm_tools: proto: fix parallel build
  2020-06-02  0:37             ` [PATCH platform2] vm_tools: proto: fix parallel build Alyssa Ross
@ 2020-06-02  0:39               ` Cole Helbling
  0 siblings, 0 replies; 16+ messages in thread
From: Cole Helbling @ 2020-06-02  0:39 UTC (permalink / raw)
  To: Alyssa Ross, 7c6f434c; +Cc: devel

On Tue Jun 2, 2020 at 12:37 AM, Alyssa Ross wrote:
> --->8---
>
> Cole, could you please test this patch?

Patch works and chromiumOSPackages.vm_protos builds just fine. Woohoo!

Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-05-30 19:00 ` [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
  2020-05-31  3:01   ` [PATCH v2 " Alyssa Ross
@ 2020-06-02  0:56   ` Alyssa Ross
  2020-06-02  2:27     ` Cole Helbling
  1 sibling, 1 reply; 16+ messages in thread
From: Alyssa Ross @ 2020-06-02  0:56 UTC (permalink / raw)
  To: devel; +Cc: Michael Raskin, Cole Helbling

crosvm now needs the Minijail sources.  However, it'll notice that a
Minijail package is provided via pkg-config, and then not actually use
those sources or build its own Minijail.  It would be nice if the
Minijail we provide could be the same version as in Chromium OS, which
means bringing Minijail under chromiumOSPackages.

A couple of backports are no longer required; one to common-mk and one
to Linux.  A new patch to fix a parallel build failure has been
introduced.
---
This patch is identical to v2 except that it adds a fix for the 
parallel build issue in vm_protos that Cole found.

 ...-mk-don-t-leak-source-absolute-paths.patch |   4 +-
 ...ommon-mk-.gn-don-t-hardcode-env-path.patch |   4 +-
 ...-Suppress-Wrange-loop-analysis-warni.patch |  72 -----
 .../linux/chromium-os/common-mk/default.nix   |   1 -
 .../linux/chromium-os/crosvm/default.nix      |  34 ++-
 .../os-specific/linux/chromium-os/default.nix |   4 +-
 .../linux/chromium-os/modem-manager/next.nix  |   5 +-
 ...ier-don-t-leak-source-absolute-paths.patch |   4 +-
 ...melier-use-stable-xdg-shell-protocol.patch |  54 ++--
 ...mmelier-make-building-demos-optional.patch |   4 +-
 ...er-Log-the-value-of-strerror-when-as.patch | 245 ------------------
 .../linux/chromium-os/sommelier/default.nix   |   1 -
 pkgs/os-specific/linux/chromium-os/update.py  |   1 +
 .../linux/chromium-os/upstream-info.json      |  42 +--
 ...03-vm_tools-proto-fix-parallel-build.patch |  39 +++
 .../linux/chromium-os/vm_protos/default.nix   |   2 +
 ...virtwl-Support-multiple-host-sockets.patch | 126 ---------
 pkgs/os-specific/linux/kernel/patches.nix     |   5 -
 18 files changed, 121 insertions(+), 526 deletions(-)
 delete mode 100644 pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
 delete mode 100644 pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
 create mode 100644 pkgs/os-specific/linux/chromium-os/vm_protos/0003-vm_tools-proto-fix-parallel-build.patch
 delete mode 100644 pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch

diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
index eb79e1ae8fa..4b7a2f34779 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 56d3fe9520c1ef2a6400939f4deae06d9b5cdfc2 Mon Sep 17 00:00:00 2001
+From 22f33cfdfacc8c4536a8bf883b4c8b54e30599a3 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 16:56:11 +0000
-Subject: [PATCH 1/7] common-mk: don't leak source-absolute paths
+Subject: [PATCH 1/6] common-mk: don't leak source-absolute paths
 
 Source-absolute paths like //vm_tools/whatever were being leaked to
 subprocesses, which of course didn't know how to understand them.
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
index 9d4843064d2..592002c406f 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
@@ -1,7 +1,7 @@
-From ec1afec90fd8e391b93f53f0abd8bc11cdba0a32 Mon Sep 17 00:00:00 2001
+From 51ed7b957069bd3765222a466473c696755caa5e Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 17:20:46 +0000
-Subject: [PATCH 2/7] common-mk: .gn: don't hardcode env path
+Subject: [PATCH 2/6] common-mk: .gn: don't hardcode env path
 
 This is needlessly non-portable.
 ---
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
deleted file mode 100644
index f64969fc811..00000000000
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b3add805d98e01488d71cbad51206f3a4949bb1c Mon Sep 17 00:00:00 2001
-From: Denis Nikitin <denik@chromium.org>
-Date: Wed, 5 Feb 2020 18:43:38 +0000
-Subject: [PATCH 3/7] Revert "common-mk: Suppress -Wrange-loop-analysis
- warning"
-
-This reverts commit 09298dce8d31b5744a83784d027a3fd1e312eb6d.
-
-Reason for revert: <The warning is fixed in the upstream starting from r382025>
-
-Original change's description:
-> common-mk: Suppress -Wrange-loop-analysis warning
->
-> Disable range-loop-analysis warning in platform2 to unblock llvm-next
-> builds failing with the following warning in libbrillo which can't be
-> easily fixed:
->
-> data_serialization.h:471:20: error: loop variable 'element' is always a
-> copy because the range of type 'const std::vector<bool, allocator<bool>
-> >' does not return a reference [-Werror,-Wrange-loop-analysis]
->   for (const auto& element : value) {
->                                 ^
-> use non-reference type
-> 'std::__1::__bit_const_reference<std::__1::vector<bool,
-> std::__1::allocator<bool> > >'
->
-> BUG=chromium:1042979
-> TEST=emerge-kevin libbrillo
->
-> Change-Id: If5b70cb1a836df325d3683217be4c841fc7a5516
-> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2008102
-> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-> Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-> Tested-by: Manoj Gupta <manojgupta@chromium.org>
-
-Bug: chromium:1042979
-Change-Id: Ib86d9f0d61b703d391f60824d8d2ef47eb60f345
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2039651
-Reviewed-by: Mike Frysinger <vapier@chromium.org>
-Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-Commit-Queue: Denis Nikitin <denik@chromium.org>
-Tested-by: Denis Nikitin <denik@chromium.org>
-(cherry picked from commit f53a0117ded343295015e81db68bbe878fae5fac)
----
- common-mk/BUILD.gn | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/common-mk/BUILD.gn b/common-mk/BUILD.gn
-index 7c0601b18..dc02a6979 100644
---- a/common-mk/BUILD.gn
-+++ b/common-mk/BUILD.gn
-@@ -53,7 +53,6 @@ config("compiler_defaults") {
-   cflags = [
-     "-Wall",
-     "-Wunused",
--
-     # We use C99 array designators in C++ code.  Our compilers support this
-     # extension since C++ has no equivalent yet (as of C++20).
-     "-Wno-c99-designator",
-@@ -65,9 +64,6 @@ config("compiler_defaults") {
-     "-fvisibility=internal",
-     "-Wa,--noexecstack",
-     "-Wimplicit-fallthrough",
--
--    # TODO(crbug.com/1042979): Verify the warning when the issue gets fixed.
--    "-Wno-range-loop-analysis",
-   ]
-   cflags_c = [ "-std=gnu11" ] + external_cppflags + external_cxxflags
-   cflags_cc = [ "-std=gnu++14" ] + external_cppflags + external_cxxflags
--- 
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
index 73862bcaa97..cc72aab5d15 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
@@ -59,7 +59,6 @@ stdenv.mkDerivation ({
     '') ([
       ./0001-common-mk-don-t-leak-source-absolute-paths.patch
       ./0002-common-mk-.gn-don-t-hardcode-env-path.patch
-      ./0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
     ] ++ platform2Patches)}
 
     patchShebangs common-mk
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
index 8698ef67a83..d64dc316772 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
@@ -8,11 +8,12 @@ let
     else if isx86_64 then "x86_64"
     else throw "no seccomp policy files available for host platform";
 
-  crosvmSrc = fetchFromGitiles
-    upstreamInfo.components."src/platform/crosvm";
-
-  adhdSrc = fetchFromGitiles
-    upstreamInfo.components."src/third_party/adhd";
+  getSrc = path: fetchFromGitiles upstreamInfo.components.${path};
+  srcs = lib.genAttrs [
+    "src/platform/crosvm"
+    "src/third_party/adhd"
+    "src/aosp/external/minijail"
+  ] getSrc;
 in
 
   rustPlatform.buildRustPackage rec {
@@ -22,28 +23,25 @@ in
     unpackPhase = ''
       runHook preUnpack
 
-      mkdir -p chromiumos/platform chromiumos/third_party
-
-      pushd chromiumos/platform
-      unpackFile ${crosvmSrc}
-      popd
-
-      pushd chromiumos/third_party
-      unpackFile ${adhdSrc}
-      popd
+      ${lib.concatStringsSep "\n" (lib.mapAttrsToList (path: src: ''
+        mkdir -p ${dirOf path}
+        pushd ${dirOf path}
+        unpackFile ${src}
+        popd
+      '') srcs)}
 
       chmod -R u+w -- "$sourceRoot"
 
       runHook postUnpack
     '';
 
-    sourceRoot = "chromiumos/platform/crosvm";
+    sourceRoot = "src/platform/crosvm";
 
     patches = [
       ./default-seccomp-policy-dir.diff
     ];
 
-    cargoSha256 = "0lhivwvdihslwp81i3sa5q88p5hr83bzkvklrcgf6x73arwk8kdz";
+    cargoSha256 = "0wzqn2n4vyv3bk39079yg1zbnriagi5xns928bzdqmq9djdcj21i";
 
     nativeBuildInputs = [ pkgconfig ];
 
@@ -68,8 +66,8 @@ in
         "${linux}/${stdenv.hostPlatform.platform.kernelTarget}";
 
     passthru = {
-      inherit adhdSrc;
-      src = crosvmSrc;
+      inherit srcs;
+      src = srcs.${sourceRoot};
       updateScript = ../update.py;
     };
 
diff --git a/pkgs/os-specific/linux/chromium-os/default.nix b/pkgs/os-specific/linux/chromium-os/default.nix
index db719e8b0f1..6eb9f335ff3 100644
--- a/pkgs/os-specific/linux/chromium-os/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/default.nix
@@ -30,9 +30,7 @@ let
     };
 
     linux_5_4 = callPackage ../kernel/linux-cros.nix {
-      kernelPatches = linux_5_4.kernelPatches ++ (with kernelPatches; [
-        virtwl_multiple_sockets
-      ]);
+      inherit (linux_5_4) kernelPatches;
     };
 
     linux = self.linux_5_4;
diff --git a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
index 91aa18b3846..d40b2c9292e 100644
--- a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
+++ b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
@@ -1,5 +1,5 @@
 { modemmanager, lib, fetchFromGitiles, upstreamInfo, autoreconfHook
-, libqmi, libxslt
+, autoconf-archive, libqmi, libxslt
 }:
 
 modemmanager.overrideAttrs (
@@ -11,7 +11,8 @@ modemmanager.overrideAttrs (
     src = fetchFromGitiles
       upstreamInfo.components."src/third_party/modemmanager-next";
 
-    nativeBuildInputs = nativeBuildInputs ++ [ autoreconfHook libqmi libxslt ];
+    nativeBuildInputs = nativeBuildInputs ++
+      [ autoreconfHook autoconf-archive libqmi libxslt ];
 
     passthru = passthru // {
       updateScript = ../update.py;
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
index 5d3ec4effe8..309165c8a05 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 1fa4de5b2228c40b25fd6333a74ae7535d73bcce Mon Sep 17 00:00:00 2001
+From 7fd2b67e7b265f7c2014ce7183c483f34e1a8ec9 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 1 Dec 2019 17:04:04 +0000
-Subject: [PATCH 4/7] sommelier: don't leak source-absolute paths
+Subject: [PATCH 4/6] sommelier: don't leak source-absolute paths
 
 ---
  vm_tools/sommelier/wayland_protocol.gni | 2 +-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
index 5a6e57375a3..41a42df74fd 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
@@ -1,7 +1,7 @@
-From 5068e64b2fdedca0a4a9f1894335af8587c4c55a Mon Sep 17 00:00:00 2001
+From d3a8f6b49e35744e71271cab1eb9ea9a5c87854d Mon Sep 17 00:00:00 2001
 From: Puck Meerburg <puck@puckipedia.com>
 Date: Tue, 3 Dec 2019 18:06:14 +0000
-Subject: [PATCH 5/7] sommelier: use stable xdg-shell protocol
+Subject: [PATCH 5/6] sommelier: use stable xdg-shell protocol
 
 From https://github.com/wayland-project/weston/commit/d8d9f5e6e16c8f6a3c06763d5f56c27dc9a6e52e:
 
@@ -1200,7 +1200,7 @@ index ecd0fc647..a3ba0d6e1 100644
 +                          sl_bind_host_xdg_wm_base);
  }
 diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index d87bced03..5e03d8978 100644
+index 98e101135..9a56f350d 100644
 --- a/vm_tools/sommelier/sommelier.c
 +++ b/vm_tools/sommelier/sommelier.c
 @@ -35,7 +35,7 @@
@@ -1210,9 +1210,9 @@ index d87bced03..5e03d8978 100644
 -#include "xdg-shell-unstable-v6-client-protocol.h"
 +#include "xdg-shell-client-protocol.h"
  
- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
-@@ -272,14 +272,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
+ #define errno_assert(rv)                                          \
+   {                                                               \
+@@ -281,14 +281,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
    free(sync_point);
  }
  
@@ -1232,7 +1232,7 @@ index d87bced03..5e03d8978 100644
  
  static void sl_send_configure_notify(struct sl_window* window) {
    xcb_configure_notify_event_t event = {
-@@ -442,8 +442,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -451,8 +451,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
    }
  
    if (window->xdg_surface) {
@@ -1243,7 +1243,7 @@ index d87bced03..5e03d8978 100644
    }
    window->pending_config.serial = 0;
  
-@@ -454,8 +454,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -463,8 +463,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
  }
  
  static void sl_internal_xdg_surface_configure(
@@ -1254,7 +1254,7 @@ index d87bced03..5e03d8978 100644
  
    window->next_config.serial = serial;
    if (!window->pending_config.serial) {
-@@ -476,16 +476,16 @@ static void sl_internal_xdg_surface_configure(
+@@ -485,16 +485,16 @@ static void sl_internal_xdg_surface_configure(
    }
  }
  
@@ -1274,7 +1274,7 @@ index d87bced03..5e03d8978 100644
    int activated = 0;
    uint32_t* state;
    int i = 0;
-@@ -515,21 +515,21 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -524,21 +524,21 @@ static void sl_internal_xdg_toplevel_configure(
  
    window->allow_resize = 1;
    wl_array_for_each(state, states) {
@@ -1300,7 +1300,7 @@ index d87bced03..5e03d8978 100644
        window->allow_resize = 0;
    }
  
-@@ -545,8 +545,8 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -554,8 +554,8 @@ static void sl_internal_xdg_toplevel_configure(
  }
  
  static void sl_internal_xdg_toplevel_close(
@@ -1311,7 +1311,7 @@ index d87bced03..5e03d8978 100644
    xcb_client_message_event_t event = {
        .response_type = XCB_CLIENT_MESSAGE,
        .format = 32,
-@@ -563,21 +563,21 @@ static void sl_internal_xdg_toplevel_close(
+@@ -572,21 +572,21 @@ static void sl_internal_xdg_toplevel_close(
                   XCB_EVENT_MASK_NO_EVENT, (const char*)&event);
  }
  
@@ -1337,7 +1337,7 @@ index d87bced03..5e03d8978 100644
      sl_internal_xdg_popup_configure, sl_internal_xdg_popup_done};
  
  static void sl_window_set_wm_state(struct sl_window* window, int state) {
-@@ -645,15 +645,15 @@ void sl_window_update(struct sl_window* window) {
+@@ -654,15 +654,15 @@ void sl_window_update(struct sl_window* window) {
        window->aura_surface = NULL;
      }
      if (window->xdg_toplevel) {
@@ -1356,7 +1356,7 @@ index d87bced03..5e03d8978 100644
        window->xdg_surface = NULL;
      }
      window->realized = 0;
-@@ -664,8 +664,8 @@ void sl_window_update(struct sl_window* window) {
+@@ -673,8 +673,8 @@ void sl_window_update(struct sl_window* window) {
    assert(host_surface);
    assert(!host_surface->has_role);
  
@@ -1367,7 +1367,7 @@ index d87bced03..5e03d8978 100644
  
    if (window->managed) {
      if (window->transient_for != XCB_WINDOW_NONE) {
-@@ -727,11 +727,11 @@ void sl_window_update(struct sl_window* window) {
+@@ -736,11 +736,11 @@ void sl_window_update(struct sl_window* window) {
    }
  
    if (!window->xdg_surface) {
@@ -1384,7 +1384,7 @@ index d87bced03..5e03d8978 100644
    }
  
    if (ctx->aura_shell) {
-@@ -761,50 +761,50 @@ void sl_window_update(struct sl_window* window) {
+@@ -770,50 +770,50 @@ void sl_window_update(struct sl_window* window) {
    // window is closed.
    if (ctx->xwayland || !parent) {
      if (!window->xdg_toplevel) {
@@ -1454,7 +1454,7 @@ index d87bced03..5e03d8978 100644
    }
  
    if ((window->size_flags & (US_POSITION | P_POSITION)) && parent &&
-@@ -1168,22 +1168,23 @@ static void sl_registry_handler(void* data,
+@@ -1177,22 +1177,23 @@ static void sl_registry_handler(void* data,
        data_device_manager->host_global =
            sl_data_device_manager_global_create(ctx);
      }
@@ -1492,7 +1492,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (strcmp(interface, "zaura_shell") == 0) {
      if (version >= MIN_AURA_SHELL_VERSION) {
-@@ -1290,13 +1291,13 @@ static void sl_registry_remover(void* data,
+@@ -1299,13 +1300,13 @@ static void sl_registry_remover(void* data,
      ctx->data_device_manager = NULL;
      return;
    }
@@ -1513,7 +1513,7 @@ index d87bced03..5e03d8978 100644
      return;
    }
    if (ctx->aura_shell && ctx->aura_shell->id == id) {
-@@ -1458,11 +1459,11 @@ static void sl_destroy_window(struct sl_window* window) {
+@@ -1467,11 +1468,11 @@ static void sl_destroy_window(struct sl_window* window) {
    }
  
    if (window->xdg_popup)
@@ -1528,7 +1528,7 @@ index d87bced03..5e03d8978 100644
    if (window->aura_surface)
      zaura_surface_destroy(window->aura_surface);
  
-@@ -1906,15 +1907,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
+@@ -1915,15 +1916,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
    // that matching contents will arrive.
    if (window->xdg_toplevel) {
      if (window->pending_config.serial) {
@@ -1548,7 +1548,7 @@ index d87bced03..5e03d8978 100644
        window->next_config.serial = 0;
        window->next_config.mask = 0;
        window->next_config.states_length = 0;
-@@ -2035,23 +2036,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
+@@ -2044,23 +2045,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
  static uint32_t sl_resize_edge(int net_wm_moveresize_size) {
    switch (net_wm_moveresize_size) {
      case NET_WM_MOVERESIZE_SIZE_TOPLEFT:
@@ -1581,7 +1581,7 @@ index d87bced03..5e03d8978 100644
    }
  }
  
-@@ -2098,15 +2099,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2107,15 +2108,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
          return;
  
        if (event->data.data32[2] == NET_WM_MOVERESIZE_MOVE) {
@@ -1600,7 +1600,7 @@ index d87bced03..5e03d8978 100644
                                  seat->seat->last_serial, edge);
        }
      }
-@@ -2125,24 +2126,24 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2134,24 +2135,24 @@ static void sl_handle_client_message(struct sl_context* ctx,
  
        if (changed[ATOM_NET_WM_STATE_FULLSCREEN]) {
          if (action == NET_WM_STATE_ADD)
@@ -1630,7 +1630,7 @@ index d87bced03..5e03d8978 100644
      }
    }
  }
-@@ -2155,7 +2156,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
+@@ -2164,7 +2165,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
      // window was realized.
      struct sl_window* parent = sl_lookup_window(ctx, window->transient_for);
      if (parent && parent->xdg_toplevel && window->xdg_toplevel)
@@ -1639,7 +1639,7 @@ index d87bced03..5e03d8978 100644
    }
  }
  
-@@ -2373,9 +2374,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2381,9 +2382,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
        return;
  
      if (window->name) {
@@ -1651,7 +1651,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (event->atom == XCB_ATOM_WM_CLASS) {
      struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -2427,19 +2428,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2435,19 +2436,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
        return;
  
      if (window->size_flags & P_MIN_SIZE) {
@@ -1675,7 +1675,7 @@ index d87bced03..5e03d8978 100644
      }
    } else if (event->atom == XCB_ATOM_WM_HINTS) {
      struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -3536,7 +3537,7 @@ int main(int argc, char** argv) {
+@@ -3535,7 +3536,7 @@ int main(int argc, char** argv) {
        .shm = NULL,
        .shell = NULL,
        .data_device_manager = NULL,
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
index 3538932d804..ecc876e4bfb 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
@@ -1,7 +1,7 @@
-From 8774d76f1b57092df9004d654fd075d7691b9f12 Mon Sep 17 00:00:00 2001
+From 6a4ccbcded19df9ec42b865218ac744e6b35d505 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Wed, 15 Jan 2020 21:36:43 +0000
-Subject: [PATCH 6/7] sommelier: make building demos optional
+Subject: [PATCH 6/6] sommelier: make building demos optional
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
deleted file mode 100644
index 778c481d598..00000000000
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From 64afc7e7271e0bad332a8a246a4fb4151b3d296f Mon Sep 17 00:00:00 2001
-From: Fergus Dall <sidereal@google.com>
-Date: Fri, 27 Mar 2020 18:34:04 +1100
-Subject: [PATCH 7/7] vm_tools: sommelier: Log the value of strerror when
- asserting
-
-There's some reports of sommelier crashing with assert failures, and
-right now we don't even have a way to tell what the error was from the
-logs.
-
-BUG=chromium:1053843
-TEST=emerge-tatl vm_guest_tools
-
-Change-Id: Iac9e0470600f7c7a8d8328049a79305251d7ef7f
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2124131
-Commit-Queue: Fergus Dall <sidereal@google.com>
-Tested-by: Fergus Dall <sidereal@google.com>
-Reviewed-by: Nic Hollingum <hollingum@google.com>
----
- vm_tools/sommelier/sommelier.c | 65 +++++++++++++++++-----------------
- 1 file changed, 32 insertions(+), 33 deletions(-)
-
-diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index 5e03d8978..ffe6f645c 100644
---- a/vm_tools/sommelier/sommelier.c
-+++ b/vm_tools/sommelier/sommelier.c
-@@ -37,6 +37,15 @@
- #include "viewporter-client-protocol.h"
- #include "xdg-shell-client-protocol.h"
- 
-+#define errno_assert(rv)                                          \
-+  {                                                               \
-+    int macro_private_assert_value = (rv);                        \
-+    if (!macro_private_assert_value) {                            \
-+      fprintf(stderr, "Unexpected error: %s\n", strerror(errno)); \
-+      assert(false);                                              \
-+    }                                                             \
-+  }
-+
- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
- #error XWAYLAND_PATH must be defined
-@@ -239,7 +248,7 @@ struct sl_mmap* sl_mmap_create(int fd,
-   map->buffer_resource = NULL;
-   map->addr =
-       mmap(NULL, size + offset0, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
--  assert(map->addr != MAP_FAILED);
-+  errno_assert(map->addr != MAP_FAILED);
- 
-   return map;
- }
-@@ -2183,8 +2192,7 @@ int sl_begin_data_source_send(struct sl_context* ctx,
- 
-   flags = fcntl(fd, F_GETFL, 0);
-   rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
--  assert(!rv);
--  UNUSED(rv);
-+  errno_assert(!rv);
- 
-   ctx->selection_data_source_send_fd = fd;
-   free(reply);
-@@ -2810,7 +2818,7 @@ static void sl_send_data(struct sl_context* ctx, xcb_atom_t data_type) {
-       int p[2];
- 
-       rv = pipe2(p, O_CLOEXEC | O_NONBLOCK);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       fd_to_receive = p[0];
-       fd_to_wayland = p[1];
-@@ -3153,7 +3161,7 @@ static void sl_sd_notify(const char* state) {
-   assert(socket_name);
- 
-   fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
--  assert(fd >= 0);
-+  errno_assert(fd >= 0);
- 
-   memset(&addr, 0, sizeof(addr));
-   addr.sun_family = AF_UNIX;
-@@ -3171,8 +3179,7 @@ static void sl_sd_notify(const char* state) {
-   msghdr.msg_iovlen = 1;
- 
-   rv = sendmsg(fd, &msghdr, MSG_NOSIGNAL);
--  assert(rv != -1);
--  UNUSED(rv);
-+  errno_assert(rv != -1);
- }
- 
- static int sl_handle_sigchld(int signal_number, void* data) {
-@@ -3304,7 +3311,7 @@ static int sl_handle_display_ready_event(int fd, uint32_t mask, void* data) {
-                       (int)(XCURSOR_SIZE_BASE * ctx->scale + 0.5)));
- 
-   pid = fork();
--  assert(pid >= 0);
-+  errno_assert(pid >= 0);
-   if (pid == 0) {
-     sl_execvp(ctx->runprog[0], ctx->runprog, -1);
-     _exit(EXIT_FAILURE);
-@@ -3373,8 +3380,7 @@ static int sl_handle_virtwl_ctx_event(int fd, uint32_t mask, void* data) {
-   }
- 
-   bytes = sendmsg(ctx->virtwl_socket_fd, &msg, MSG_NOSIGNAL);
--  assert(bytes == ioctl_recv->len);
--  UNUSED(bytes);
-+  errno_assert(bytes == ioctl_recv->len);
- 
-   while (fd_count--)
-     close(ioctl_recv->fds[fd_count]);
-@@ -3406,10 +3412,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
-   msg.msg_controllen = sizeof(fd_buffer);
- 
-   bytes = recvmsg(ctx->virtwl_socket_fd, &msg, 0);
--  if (bytes < 0) {
--    fprintf(stderr, "Failed to get message from virtwl: %s\n", strerror(errno));
--  }
--  assert(bytes > 0);
-+  errno_assert(bytes > 0);
- 
-   // If there were any FDs recv'd by recvmsg, there will be some data in the
-   // msg_control buffer. To get the FDs out we iterate all cmsghdr's within and
-@@ -3437,11 +3440,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
-   // structure which we now pass along to the kernel.
-   ioctl_send->len = bytes;
-   rv = ioctl(ctx->virtwl_ctx_fd, VIRTWL_IOCTL_SEND, ioctl_send);
--  if (!rv) {
--    fprintf(stderr, "Failed to send message to virtwl: %s\n", strerror(errno));
--  }
--  assert(!rv);
--  UNUSED(rv);
-+  errno_assert(!rv);
- 
-   while (fd_count--)
-     close(ioctl_send->fds[fd_count]);
-@@ -3765,7 +3764,7 @@ int main(int argc, char** argv) {
- 
-     lock_fd = open(lock_addr, O_CREAT | O_CLOEXEC,
-                    (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
--    assert(lock_fd >= 0);
-+    errno_assert(lock_fd >= 0);
- 
-     rv = flock(lock_fd, LOCK_EX | LOCK_NB);
-     if (rv < 0) {
-@@ -3781,25 +3780,25 @@ int main(int argc, char** argv) {
-       if (sock_stat.st_mode & (S_IWUSR | S_IWGRP))
-         unlink(addr.sun_path);
-     } else {
--      assert(errno == ENOENT);
-+      errno_assert(errno == ENOENT);
-     }
- 
-     sock_fd = socket(PF_LOCAL, SOCK_STREAM, 0);
--    assert(sock_fd >= 0);
-+    errno_assert(sock_fd >= 0);
- 
-     rv = bind(sock_fd, (struct sockaddr*)&addr,
-               offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path));
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
- 
-     rv = listen(sock_fd, 128);
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
- 
-     // Spawn optional child process before we notify systemd that we're ready
-     // to accept connections. WAYLAND_DISPLAY will be set but any attempt to
-     // connect to this socket at this time will fail.
-     if (ctx.runprog && ctx.runprog[0]) {
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         setenv("WAYLAND_DISPLAY", socket_name, 1);
-         sl_execvp(ctx.runprog[0], ctx.runprog, -1);
-@@ -3816,7 +3815,7 @@ int main(int argc, char** argv) {
-     sigemptyset(&sa.sa_mask);
-     sa.sa_flags = SA_RESTART;
-     rv = sigaction(SIGCHLD, &sa, NULL);
--    assert(rv >= 0);
-+    errno_assert(rv >= 0);
- 
-     do {
-       struct ucred ucred;
-@@ -3833,7 +3832,7 @@ int main(int argc, char** argv) {
-       rv = getsockopt(client_fd, SOL_SOCKET, SO_PEERCRED, &ucred, &length);
- 
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         char* client_fd_str;
-         char* peer_pid_str;
-@@ -3963,7 +3962,7 @@ int main(int argc, char** argv) {
- 
-       // Connection to virtwl channel.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, vws);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       ctx.virtwl_socket_fd = vws[0];
-       virtwl_display_fd = vws[1];
-@@ -4083,7 +4082,7 @@ int main(int argc, char** argv) {
-   if (ctx.runprog || ctx.xwayland) {
-     // Wayland connection from client.
-     rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv);
--    assert(!rv);
-+    errno_assert(!rv);
- 
-     client_fd = sv[0];
-   }
-@@ -4199,7 +4198,7 @@ int main(int argc, char** argv) {
- 
-       // Xwayland display ready socket.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, ds);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       ctx.display_ready_event_source =
-           wl_event_loop_add_fd(event_loop, ds[0], WL_EVENT_READABLE,
-@@ -4207,12 +4206,12 @@ int main(int argc, char** argv) {
- 
-       // X connection to Xwayland.
-       rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wm);
--      assert(!rv);
-+      errno_assert(!rv);
- 
-       ctx.wm_fd = wm[0];
- 
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         char* display_fd_str;
-         char* wm_fd_str;
-@@ -4280,7 +4279,7 @@ int main(int argc, char** argv) {
-       ctx.xwayland_pid = pid;
-     } else {
-       pid = fork();
--      assert(pid != -1);
-+      errno_assert(pid != -1);
-       if (pid == 0) {
-         sl_execvp(ctx.runprog[0], ctx.runprog, sv[1]);
-         _exit(EXIT_FAILURE);
--- 
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
index da2a554837b..669bac81628 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
@@ -10,7 +10,6 @@ common-mk {
     ./0004-sommelier-don-t-leak-source-absolute-paths.patch
     ./0005-sommelier-use-stable-xdg-shell-protocol.patch
     ./0006-sommelier-make-building-demos-optional.patch
-    ./0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
   ];
 
   buildInputs = [
diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py
index 58a15dbb8e8..a2e093c2e9e 100755
--- a/pkgs/os-specific/linux/chromium-os/update.py
+++ b/pkgs/os-specific/linux/chromium-os/update.py
@@ -14,6 +14,7 @@ from urllib.request import urlopen
 
 # ChromiumOS components used in Nixpkgs
 component_paths = [
+    'src/aosp/external/minijail',
     'src/platform/crosvm',
     'src/platform/minigbm',
     'src/platform2',
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index 842912800bc..7755c48239c 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -1,54 +1,60 @@
 {
-  "version": "81.12871.0.0-rc1",
+  "version": "83.13020.0.0-rc1",
   "components": {
+    "src/aosp/external/minijail": {
+      "name": "minijail",
+      "url": "https://android.googlesource.com/platform/external/minijail",
+      "rev": "84ffabcf488bf0935f00930a9a23bbce1f34d79f",
+      "sha256": "0yhbklwmgqws4cb098hpaky4w8if5snpkdabridcc5hk5d7vgild"
+    },
     "src/platform/crosvm": {
       "name": "crosvm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
-      "rev": "8b8c01e1ad31718932491e4aee63f56109a138e2",
-      "sha256": "1qmf1k06pwynh15c3nr9m6v90z2pkk930xniwvlvbvnazrk4rllg"
+      "rev": "664cc3ca49cb58d5bf7d936686fd211d6dd728bf",
+      "sha256": "0rms1hkb3r4w6j3l71gavky6ylc7gi9sfr2rq4dr82v6vc8zxbjx"
     },
     "src/platform/minigbm": {
       "name": "minigbm",
       "url": "https://chromium.googlesource.com/chromiumos/platform/minigbm",
-      "rev": "fbfb338e7db246f05ae68da97141fbd49481584b",
-      "sha256": "11p6v4nmqivyqyc8lmypbwqv9q819lhx6v3igfsv3455mmq02kcb"
+      "rev": "bc4f023bfcc51cf9dcfcfec5bf4177b2e607dd68",
+      "sha256": "08ag207199xj5cw686386rmvr7sx2mzihdckm2pnvw743w03gipr"
     },
     "src/platform2": {
       "name": "platform2",
       "url": "https://chromium.googlesource.com/chromiumos/platform2",
-      "rev": "6e0d88d0bea8e7cb28a310298cc8c77ed742f60a",
-      "sha256": "13vrbnl3ck8cxiyifc58cs9i0yby92vp5si27ihrx33v6bdlir4s"
+      "rev": "e45d54bedee94e0121e12cc86fded46be8b3fa4e",
+      "sha256": "0ag01p8ch0wn7ds9ywasrdxkbibg19qzf5rldf8nr8irk1n851n7"
     },
     "src/third_party/adhd": {
       "name": "adhd",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
-      "rev": "f361d5b02623274723bff251dafa1e2a2887b013",
-      "sha256": "1p8iwjwgmcgmzri03ik2jaid8l0ch0bzn6z9z64dix1hlrvrlliw"
+      "rev": "d3af897db5540cadc439463a0ffdde07f2b8898a",
+      "sha256": "1h0xxf338d7fwmfwjlpsjiml8d3v426a95x3ka7qfikdapgmav3d"
     },
     "src/third_party/chromiumos-overlay": {
       "name": "chromiumos-overlay",
       "url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
-      "rev": "be285b729ef2af700cc248f741af20c387b5a1bc",
-      "sha256": "18y2icdb3hxqxxaaz8sylw21q2qwcpjyns75ig7ahc4vc1k5hg7s"
+      "rev": "270f5c2cfb7eadc374638076c8fdee72360a6d66",
+      "sha256": "1d88xvnf0qc3v5hp9b2pafxhi83rph84y2sbk1nc46rhj63m8bwi"
     },
     "src/third_party/kernel/v5.4": {
       "name": "v5.4",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/kernel",
-      "rev": "17611b6e636c8ccae25e873e659d69c20b215815",
-      "sha256": "0an8w3660v2zf2crb68ambg7vzw2rajpjmcby1am08qy37lqsfkd",
-      "version": "5.4.16"
+      "rev": "36270ae817fb576debb80bce752addb3a4cc9886",
+      "sha256": "0h7fj3w9vwmq8a6cx96vjcyw29v7wfamxykh1nx3lmhxxkn120f4",
+      "version": "5.4.28"
     },
     "src/third_party/libqmi": {
       "name": "libqmi",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/libqmi",
-      "rev": "6267c12fef0be9a95d687bf4b476593eeffbaaf1",
-      "sha256": "00yjjcngjkbgxmmf79ciddk9yq393a94230ahq8vszyfygzhs3rz"
+      "rev": "20726755e60d48c70f0189a1cfe9665a87a5e6c6",
+      "sha256": "0w04lyd459jgcag70kx6nq1i952fbhy32nmkh6r255xjf2wrliwr"
     },
     "src/third_party/modemmanager-next": {
       "name": "modemmanager-next",
       "url": "https://chromium.googlesource.com/chromiumos/third_party/modemmanager-next",
-      "rev": "a4d3a4de1fdab7c282f1a188d2d3d0aaa24f0698",
-      "sha256": "1b1l1jfiyl7fnm29pp9npi0gdlqcw1jmmbigf0qlndqdh0ly2izg"
+      "rev": "988f572cc882a74209fba0f5c49cf0b01b9163a6",
+      "sha256": "1hiqz7wn1w461sd94v179q81yahisffnw033yix3dwfwagm9ndf8"
     },
     "src/third_party/modp_b64": {
       "name": "modp_b64",
diff --git a/pkgs/os-specific/linux/chromium-os/vm_protos/0003-vm_tools-proto-fix-parallel-build.patch b/pkgs/os-specific/linux/chromium-os/vm_protos/0003-vm_tools-proto-fix-parallel-build.patch
new file mode 100644
index 00000000000..93fa535ac7e
--- /dev/null
+++ b/pkgs/os-specific/linux/chromium-os/vm_protos/0003-vm_tools-proto-fix-parallel-build.patch
@@ -0,0 +1,39 @@
+From dfed9458bf7abc1dc8f33a3e16ee179cde88e4e2 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Tue, 2 Jun 2020 00:21:08 +0000
+Subject: [PATCH 3/6] vm_tools: proto: fix parallel build
+
+fuzzer-protos depends on vm-crash-rpcs, but this dependency wasn't
+declared, causing build failures like the following:
+
+[26/52] CXX obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
+FAILED: obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
+c++ -MMD -MF obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Igen/include -I../../common-mk -I/usr/include -Igen -Igen -Igen -Igen -Wall -Wunused -Wno-unused-parameter -Wunreachable-code -ggdb3 -fstack-protector-strong -Wformat=2 -fvisibility=internal -Wa,--noexecstack -Wimplicit-fallthrough -Werror --sysroot= -fPIE -fvisibility=default -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -pthread -I/nix/store/pjl2q3lny3c18ypqjcv0q3akyq89hg2i-grpc-1.28.1/include -I/nix/store/hya0y6slws66h99njc2yiz02irfv4n62-openssl-1.1.1g-dev/include -I/nix/store/mfpg3sk5vk9rm99hbpmd3dgvxqybd391-protobuf-3.8.0/include -Wno-unreachable-code -std=gnu++14 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-psabi -c gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc -o obj/out/Release/gen/include/vm_protos/proto_bindings/libfuzzer-protos.fuzzer.grpc.pb.o
+In file included from gen/include/vm_protos/proto_bindings/fuzzer.grpc.pb.cc:5:
+gen/include/vm_protos/proto_bindings/fuzzer.pb.h:38:10: fatal error: vm_crash.pb.h: No such file or directory
+   38 | #include "vm_crash.pb.h"
+      |          ^~~~~~~~~~~~~~~
+compilation terminated.
+ninja: build stopped: subcommand failed.
+
+Reported-by: Cole Helbling <cole.e.helbling@outlook.com>
+Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
+---
+ vm_tools/proto/BUILD.gn | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vm_tools/proto/BUILD.gn b/vm_tools/proto/BUILD.gn
+index 713b81853..a25265cab 100644
+--- a/vm_tools/proto/BUILD.gn
++++ b/vm_tools/proto/BUILD.gn
+@@ -70,6 +70,7 @@ proto_library("fuzzer-protos") {
+   deps = [
+     ":container-rpcs",
+     ":tremplin-rpcs",
++    ":vm-crash-rpcs",
+   ]
+   sources = [
+     "${proto_in_dir}/fuzzer.proto",
+-- 
+2.26.2
+
diff --git a/pkgs/os-specific/linux/chromium-os/vm_protos/default.nix b/pkgs/os-specific/linux/chromium-os/vm_protos/default.nix
index 9b56745e909..9620acb9a3e 100644
--- a/pkgs/os-specific/linux/chromium-os/vm_protos/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/vm_protos/default.nix
@@ -9,6 +9,8 @@ common-mk {
 
   NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ];
 
+  platform2Patches = [ ./0003-vm_tools-proto-fix-parallel-build.patch ];
+
   postPatch = ''
     substituteInPlace common-mk/proto_library.gni \
         --replace /usr/bin/grpc_cpp_plugin ${grpc}/bin/grpc_cpp_plugin
diff --git a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch b/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
deleted file mode 100644
index 3e4e504978c..00000000000
--- a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 7f7629cc680bf3c22d547fb5333e521af58c6c9e Mon Sep 17 00:00:00 2001
-From: Ryo Hashimoto <hashimoto@google.com>
-Date: Wed, 11 Dec 2019 18:32:03 +0900
-Subject: [PATCH] CHROMIUM: virtwl: Support multiple host sockets
-
-Add a new argument to VIRTWL_IOCTL_NEW_CTX.
-This CL doesn't change the size of structs.
-
-Guest can use this parameter to create a context connected to a host
-process other than the compositor.
-
-BUG=b:146100044, b:140202859
-TEST=Camera works
-
-Change-Id: I1c6b1a256002a336774a36caf0fe8d18f08c0f56
-Signed-off-by: Ryo Hashimoto <hashimoto@chromium.org>
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1962108
-Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
-Reviewed-by: Zach Reizner <zachr@chromium.org>
-(cherry picked from commit 5d641a7b7b64664230d2fd2aa1e74dd792b8b7bf)
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2035921
-Tested-by: Chirantan Ekbote <chirantan@chromium.org>
-Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
-Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
-Signed-off-by: Alyssa Ross <hi@alyssa.is>
----
- drivers/virtio/virtio_wl.c     |  6 ++++++
- include/uapi/linux/virtio_wl.h | 29 +++++++++++++++++------------
- include/uapi/linux/virtwl.h    |  3 +++
- 3 files changed, 26 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/virtio/virtio_wl.c b/drivers/virtio/virtio_wl.c
-index 1b3f8926519a7..80cf799bed464 100644
---- a/drivers/virtio/virtio_wl.c
-+++ b/drivers/virtio/virtio_wl.c
-@@ -1024,6 +1024,7 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- 	int ret = 0;
- 
- 	if (ioctl_new->type != VIRTWL_IOCTL_NEW_CTX &&
-+		ioctl_new->type != VIRTWL_IOCTL_NEW_CTX_NAMED &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_ALLOC &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_READ &&
- 		ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_WRITE &&
-@@ -1060,6 +1061,11 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- 		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX;
- 		ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
- 		break;
-+	case VIRTWL_IOCTL_NEW_CTX_NAMED:
-+		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED;
-+		ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
-+		memcpy(ctrl_new->name, ioctl_new->name, sizeof(ctrl_new->name));
-+		break;
- 	case VIRTWL_IOCTL_NEW_ALLOC:
- 		ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW;
- 		ctrl_new->size = PAGE_ALIGN(ioctl_new->size);
-diff --git a/include/uapi/linux/virtio_wl.h b/include/uapi/linux/virtio_wl.h
-index 1d3ec6b31d4d3..ad9b6dfcd3263 100644
---- a/include/uapi/linux/virtio_wl.h
-+++ b/include/uapi/linux/virtio_wl.h
-@@ -37,6 +37,7 @@ enum virtio_wl_ctrl_type {
- 	VIRTIO_WL_CMD_VFD_NEW_DMABUF, /* virtio_wl_ctrl_vfd_new */
- 	VIRTIO_WL_CMD_VFD_DMABUF_SYNC, /* virtio_wl_ctrl_vfd_dmabuf_sync */
- 	VIRTIO_WL_CMD_VFD_SEND_FOREIGN_ID, /* virtio_wl_ctrl_vfd_send + data */
-+	VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED, /* virtio_wl_ctrl_vfd_new */
- 
- 	VIRTIO_WL_RESP_OK = 0x1000,
- 	VIRTIO_WL_RESP_VFD_NEW = 0x1001, /* virtio_wl_ctrl_vfd_new */
-@@ -78,18 +79,22 @@ struct virtio_wl_ctrl_vfd_new {
- 	__le32 flags; /* virtio_wl_vfd_flags */
- 	__le64 pfn; /* first guest physical page frame number if VFD_MAP */
- 	__le32 size; /* size in bytes if VIRTIO_WL_CMD_VFD_NEW* */
--	/* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
--	struct {
--		__le32 width; /* width in pixels */
--		__le32 height; /* height in pixels */
--		__le32 format; /* fourcc format */
--		__le32 stride0; /* return stride0 */
--		__le32 stride1; /* return stride1 */
--		__le32 stride2; /* return stride2 */
--		__le32 offset0; /* return offset0 */
--		__le32 offset1; /* return offset1 */
--		__le32 offset2; /* return offset2 */
--	} dmabuf;
-+	union {
-+		/* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
-+		struct {
-+			__le32 width; /* width in pixels */
-+			__le32 height; /* height in pixels */
-+			__le32 format; /* fourcc format */
-+			__le32 stride0; /* return stride0 */
-+			__le32 stride1; /* return stride1 */
-+			__le32 stride2; /* return stride2 */
-+			__le32 offset0; /* return offset0 */
-+			__le32 offset1; /* return offset1 */
-+			__le32 offset2; /* return offset2 */
-+		} dmabuf;
-+		/* name of socket if VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+		char name[32];
-+	};
- };
- 
- 
-diff --git a/include/uapi/linux/virtwl.h b/include/uapi/linux/virtwl.h
-index 939041389b403..baa9b341377a5 100644
---- a/include/uapi/linux/virtwl.h
-+++ b/include/uapi/linux/virtwl.h
-@@ -21,6 +21,7 @@ enum virtwl_ioctl_new_type {
- 	VIRTWL_IOCTL_NEW_PIPE_WRITE,
- 	/* create a new virtwl dmabuf that is writable via the returned fd */
- 	VIRTWL_IOCTL_NEW_DMABUF,
-+	VIRTWL_IOCTL_NEW_CTX_NAMED, /* open a new named connection context */
- };
- 
- struct virtwl_ioctl_new {
-@@ -42,6 +43,8 @@ struct virtwl_ioctl_new {
- 			__u32 offset1; /* return offset1 */
- 			__u32 offset2; /* return offset2 */
- 		} dmabuf;
-+		/* name of socket if type == VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+		char name[32];
- 	};
- };
- 
--- 
-2.26.2
-
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 66cbdbb36fa..8ce1ac2b587 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -92,9 +92,4 @@
     name = "mac_nvme_t2";
     patch = ./mac-nvme-t2.patch;
   };
-
-  virtwl_multiple_sockets = {
-    name = "virtwl_multiple_sockets";
-    patch = ./0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch;
-  };
 }
-- 
2.26.2

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-06-02  0:56   ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
@ 2020-06-02  2:27     ` Cole Helbling
  2020-06-02  3:19       ` Alyssa Ross
  2020-06-02  8:39       ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 ->83.13020.0.0-rc1 Michael Raskin
  0 siblings, 2 replies; 16+ messages in thread
From: Cole Helbling @ 2020-06-02  2:27 UTC (permalink / raw)
  To: Alyssa Ross, devel; +Cc: Michael Raskin, Cole Helbling

On Tue Jun 2, 2020 at 12:56 AM, Alyssa Ross wrote:
> crosvm now needs the Minijail sources. However, it'll notice that a
> Minijail package is provided via pkg-config, and then not actually use
> those sources or build its own Minijail. It would be nice if the
> Minijail we provide could be the same version as in Chromium OS, which
> means bringing Minijail under chromiumOSPackages.
>
> A couple of backports are no longer required; one to common-mk and one
> to Linux. A new patch to fix a parallel build failure has been
> introduced.
> ---
> This patch is identical to v2 except that it adds a fix for the
> parallel build issue in vm_protos that Cole found.
>
> ...-mk-don-t-leak-source-absolute-paths.patch | 4 +-
> ...ommon-mk-.gn-don-t-hardcode-env-path.patch | 4 +-
> ...-Suppress-Wrange-loop-analysis-warni.patch | 72 -----
> .../linux/chromium-os/common-mk/default.nix | 1 -
> .../linux/chromium-os/crosvm/default.nix | 34 ++-
> .../os-specific/linux/chromium-os/default.nix | 4 +-
> .../linux/chromium-os/modem-manager/next.nix | 5 +-
> ...ier-don-t-leak-source-absolute-paths.patch | 4 +-
> ...melier-use-stable-xdg-shell-protocol.patch | 54 ++--
> ...mmelier-make-building-demos-optional.patch | 4 +-
> ...er-Log-the-value-of-strerror-when-as.patch | 245 ------------------
> .../linux/chromium-os/sommelier/default.nix | 1 -
> pkgs/os-specific/linux/chromium-os/update.py | 1 +
> .../linux/chromium-os/upstream-info.json | 42 +--
> ...03-vm_tools-proto-fix-parallel-build.patch | 39 +++
> .../linux/chromium-os/vm_protos/default.nix | 2 +
> ...virtwl-Support-multiple-host-sockets.patch | 126 ---------
> pkgs/os-specific/linux/kernel/patches.nix | 5 -
> 18 files changed, 121 insertions(+), 526 deletions(-)

Works for me now! I ran 

    $ nix-shell -p spectrumPackages.spectrum-vm --run spectrum-vm

and Wayfire appeared. I spun around some workspaces, figured out the `d`
key so I could C-d and close the terminal window, and played around for
a couple minutes. Then, I ended it by hitting enter and typed `reboot`
(not `poweroff`, which will hang for an amount of time I was too
impatient to wait for) in the serial console in the terminal I ran the
above command with.

(This little play-by-play intended as a sort of "intro to spectrum-vm"
before I actually write one up. Note that the default keymap is Dvorak
-- to change it, you'll need to change the xkb_variant in Wayfire's
config located inside pkgs/os-specific/linux/spectrum/rootfs/default.nix).

Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Tested-by: Cole Helbling <cole.e.helbling@outlook.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
  2020-06-02  2:27     ` Cole Helbling
@ 2020-06-02  3:19       ` Alyssa Ross
  2020-06-02  8:39       ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 ->83.13020.0.0-rc1 Michael Raskin
  1 sibling, 0 replies; 16+ messages in thread
From: Alyssa Ross @ 2020-06-02  3:19 UTC (permalink / raw)
  To: Cole Helbling; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

> Works for me now! I ran 
>
>     $ nix-shell -p spectrumPackages.spectrum-vm --run spectrum-vm
>
> and Wayfire appeared. I spun around some workspaces, figured out the `d`
> key so I could C-d and close the terminal window, and played around for
> a couple minutes. Then, I ended it by hitting enter and typed `reboot`
> (not `poweroff`, which will hang for an amount of time I was too
> impatient to wait for) in the serial console in the terminal I ran the
> above command with.

Yay!

> (This little play-by-play intended as a sort of "intro to spectrum-vm"
> before I actually write one up. Note that the default keymap is Dvorak
> -- to change it, you'll need to change the xkb_variant in Wayfire's
> config located inside pkgs/os-specific/linux/spectrum/rootfs/default.nix).

Awesome!  I'm looking forward to this. :D

> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
> Tested-by: Cole Helbling <cole.e.helbling@outlook.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/2] chromiumOSPackages: improve update.py repo compat
  2020-05-30 19:00 [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Alyssa Ross
  2020-05-30 19:00 ` [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
  2020-05-30 23:47 ` [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Cole Helbling
@ 2020-06-02  3:30 ` Alyssa Ross
  2 siblings, 0 replies; 16+ messages in thread
From: Alyssa Ross @ 2020-06-02  3:30 UTC (permalink / raw)
  To: devel; +Cc: Cole Helbling, Michael Raskin

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

To ssh://spectrum-os.org/home/spectrum/git/nixpkgs.git
   cfa1e27fdfb..a1f01bb6ca7  master -> master

Thanks so much for all the testing and suggestions!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 ->83.13020.0.0-rc1
  2020-06-02  2:27     ` Cole Helbling
  2020-06-02  3:19       ` Alyssa Ross
@ 2020-06-02  8:39       ` Michael Raskin
  1 sibling, 0 replies; 16+ messages in thread
From: Michael Raskin @ 2020-06-02  8:39 UTC (permalink / raw)
  To: cole.e.helbling, hi, devel

>and Wayfire appeared. I spun around some workspaces, figured out the `d`
>key so I could C-d and close the terminal window, and played around for
>a couple minutes. Then, I ended it by hitting enter and typed `reboot`
>(not `poweroff`, which will hang for an amount of time I was too
>impatient to wait for) in the serial console in the terminal I ran the
>above command with.

Poweroff obviously hangs forever, as on x86 reboot is something 
relatively well-defined with some level of consistency since the 8086
days, and poweroff is a relatively recent (ACPI was released in 1996)
addition and a horrible mess. So CrosVM supports the former (and uses it
to exit) but not the latter.

(Some people might remember the https://i.stack.imgur.com/pY00J.jpg 
image, Linux version is just a line of text:
https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/a71ea8d3fd1f4134bab2b57c271f95cad1c85e2e.jpg 
so it is less memetic)



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-06-02  8:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 19:00 [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Alyssa Ross
2020-05-30 19:00 ` [PATCH 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
2020-05-31  3:01   ` [PATCH v2 " Alyssa Ross
2020-05-31 23:49     ` Cole Helbling
2020-06-01 22:44       ` Alyssa Ross
2020-06-01 23:00         ` Alyssa Ross
2020-06-01 23:38         ` Michael Raskin
2020-06-01 23:55           ` Alyssa Ross
2020-06-02  0:37             ` [PATCH platform2] vm_tools: proto: fix parallel build Alyssa Ross
2020-06-02  0:39               ` Cole Helbling
2020-06-02  0:56   ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1 Alyssa Ross
2020-06-02  2:27     ` Cole Helbling
2020-06-02  3:19       ` Alyssa Ross
2020-06-02  8:39       ` [PATCH v3 2/2] chromiumOSPackages: 81.12871.0.0-rc1 ->83.13020.0.0-rc1 Michael Raskin
2020-05-30 23:47 ` [PATCH 1/2] chromiumOSPackages: improve update.py repo compat Cole Helbling
2020-06-02  3:30 ` Alyssa Ross

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).