From f926ea588dfb0e358f78460ae2af521ad00cc547 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Wed, 17 Jul 2024 16:17:47 +0100
Subject: [PATCH] pv-runtime: Don't try to mask /etc/vulkan/*.d

Since updating our Flatpak-derived code, every time we start a container
we log messages like:

    N: Not replacing "/etc/vulkan/implicit_layer.d" with tmpfs: Path "/etc" is reserved by the container framework

We only import selected directories from /etc into the container's /etc,
and none of the directories below /etc/vulkan are among them, so there
is actually no need to mask these directories. Silence the warning by
not attempting to mask them.

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

diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c
index aa05c9e24..bd119e12c 100644
--- a/pressure-vessel/runtime.c
+++ b/pressure-vessel/runtime.c
@@ -7858,9 +7858,10 @@ pv_runtime_bind (PvRuntime *self,
             {
               const char *dir = search_path[j];
 
-              /* We are mounting our own runtime over /usr anyway, so
-               * ignore those */
-              if (flatpak_has_path_prefix (dir, "/usr"))
+              /* We are mounting our own runtime over /etc and /usr anyway,
+               * so ignore those */
+              if (flatpak_has_path_prefix (dir, "/usr")
+                  || flatpak_has_path_prefix (dir, "/etc"))
                 continue;
 
               /* Otherwise, if the directory exists, mask it */
-- 
GitLab