summary refs log tree commit diff
path: root/pkgs/os-specific/linux/chromium-os/sommelier
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-05-30 18:48:02 +0000
committerAlyssa Ross <hi@alyssa.is>2020-06-02 03:25:34 +0000
commita1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece (patch)
tree0c88f4d30121baa7234432ad9c91649b845e326c /pkgs/os-specific/linux/chromium-os/sommelier
parente72c23ff066a947473ef18973bed07ce192ec3b2 (diff)
downloadnixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.tar
nixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.tar.gz
nixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.tar.bz2
nixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.tar.lz
nixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.tar.xz
nixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.tar.zst
nixpkgs-a1f01bb6ca7c14bb2aa14d1930525dd20e0d0ece.zip
chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1
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.

Message-Id: <20200602005619.31128-1-hi@alyssa.is>
Thanks-to: Michael Raskin <7c6f434c@mail.ru>
Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Tested-by: Cole Helbling <cole.e.helbling@outlook.com>
Diffstat (limited to 'pkgs/os-specific/linux/chromium-os/sommelier')
-rw-r--r--pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch4
-rw-r--r--pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch54
-rw-r--r--pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch4
-rw-r--r--pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch245
-rw-r--r--pkgs/os-specific/linux/chromium-os/sommelier/default.nix1
5 files changed, 31 insertions, 277 deletions
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 = [