all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 2b6f54c912fd44eb7c00de3488f5c11844a397b6 2658 bytes (raw)
name: gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 
Share /gnu/store in the BubbleWrap container and remove FHS mounts.
Also share user profile directory.

This is a Guix-specific patch not meant to be upstreamed.
diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
index 99395d6..3604730 100644
--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
@@ -765,1 +765,1 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
         return adoptGRef(g_subprocess_launcher_spawnv(launcher, argv, error));

     const char* runDir = g_get_user_runtime_dir();
+    const char* homeDir = g_get_home_dir();
+    char* profileDir = g_strconcat(homeDir, "/.guix-profile", NULL);
     Vector<CString> sandboxArgs = {
         "--die-with-parent",
         "--unshare-uts",
@@ -786,28 +788,24 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
         "--ro-bind", "/sys/dev", "/sys/dev",
         "--ro-bind", "/sys/devices", "/sys/devices",
 
-        "--ro-bind-try", "/usr/share", "/usr/share",
-        "--ro-bind-try", "/usr/local/share", "/usr/local/share",
         "--ro-bind-try", DATADIR, DATADIR,
-
-        // We only grant access to the libdirs webkit is built with and
-        // guess system libdirs. This will always have some edge cases.
-        "--ro-bind-try", "/lib", "/lib",
-        "--ro-bind-try", "/usr/lib", "/usr/lib",
-        "--ro-bind-try", "/usr/local/lib", "/usr/local/lib",
         "--ro-bind-try", LIBDIR, LIBDIR,
-#if CPU(ADDRESS64)
-        "--ro-bind-try", "/lib64", "/lib64",
-        "--ro-bind-try", "/usr/lib64", "/usr/lib64",
-        "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64",
-#else
-        "--ro-bind-try", "/lib32", "/lib32",
-        "--ro-bind-try", "/usr/lib32", "/usr/lib32",
-        "--ro-bind-try", "/usr/local/lib32", "/usr/local/lib32",
-#endif
-
         "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR,
+
+        // Bind mount the store inside the WebKitGTK sandbox.
+        "--ro-bind", "@storedir@", "@storedir@",
+
+        // Bind mount the guix profile directory
+        "--ro-bind", profileDir, profileDir,
+
+        // This is needed for locales if not in profile
+        "--ro-bind-try", "@localedir@", "@localedir@",
+
+        // This is needed for video hardware acceleration (va-api)
+        // via /lib/dri if not in profile
+        "--ro-bind-try", "@dridir@", "@dridir@",
     };
+    free(profileDir);
 
     if (enableDebugPermissions()) {
         const char* dataDir = g_get_user_data_dir();

debug log:

solving 2b6f54c912 ...
found 2b6f54c912 in https://yhetil.org/guix/34830675a6123b15bd652b2aae0922ff95d15f54.1713408724.git.abhi@quic.us/
found 18ddb645ad in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 18ddb645ad6d780f07a271753d1f1a65081b9568	gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch

applying [1/1] https://yhetil.org/guix/34830675a6123b15bd652b2aae0922ff95d15f54.1713408724.git.abhi@quic.us/
diff --git a/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch b/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch
index 18ddb645ad..2b6f54c912 100644

Checking patch gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch...
Applied patch gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch cleanly.

index at:
100644 2b6f54c912fd44eb7c00de3488f5c11844a397b6	gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.