From 6336748dba33cc4b1a335c209feeb92ca8ebd4ad Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Thu, 21 May 2020 14:43:42 +0100
Subject: [PATCH] runtime: When entering runtime, always bind-mount /run/host

We're about to start editing the mutable runtime in-place to replace
files we don't want with symlinks to /run/host, but if /run/host isn't
mounted then that can't work.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 src/runtime.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/runtime.c b/src/runtime.c
index 0b53fc6e4..50eebe892 100644
--- a/src/runtime.c
+++ b/src/runtime.c
@@ -1736,6 +1736,9 @@ pv_runtime_use_host_graphics_stack (PvRuntime *self,
                                   error))
             return FALSE;
 
+          if (!pv_bwrap_bind_usr (temp_bwrap, "/", "/run/host", error))
+            return FALSE;
+
           flatpak_bwrap_add_args (temp_bwrap,
                                   "env", "PATH=/usr/bin:/bin",
                                   "readlink", "-e", arch->ld_so,
-- 
GitLab