unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
blob c02157076e8c14a8a1a83535dcf6eadb37cb9b1f 2128 bytes (raw)
name: gnu/packages/patches/webkitgtk-share-store.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
 
Tell bubblewrap to share the store, and _not_ to share traditional FHS
directories that are not used in Guix.  Required for programs that use the
sandboxing features such as Epiphany.

See <https://bugs.gnu.org/40837> and <https://bugs.gnu.org/47628>.
Authors: Jack Hill <jackhill@jackhill.us> and Mark H Weaver <mhw@netris.org>.

diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
@@ -749,26 +749,18 @@
         "--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,
-        "--ro-bind-try", "/lib64", "/lib64",
-        "--ro-bind-try", "/usr/lib64", "/usr/lib64",
-        "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64",
+        // Bind mount the store inside the WebKitGTK sandbox.
+        "--ro-bind", "@storedir@", "@storedir@",
 
+        // We only grant access to the libdirs webkit is built with.
+        "--ro-bind-try", LIBDIR, LIBDIR,
         "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR,
     };
 
     if (launchOptions.processType == ProcessLauncher::ProcessType::DBusProxy) {
         sandboxArgs.appendVector(Vector<CString>({
-            "--ro-bind", "/usr/bin", "/usr/bin",
             // This is a lot of access, but xdg-dbus-proxy is trusted so that's OK. It's sandboxed
             // only because we have to mount .flatpak-info in its mount namespace. The user rundir
             // is where we mount our proxy socket.

debug log:

solving c02157076e ...
found c02157076e in https://yhetil.org/guix-bugs/87mtu2rntp.fsf@netris.org/
found 053d86fcf4 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 053d86fcf49fe4257fb3b3093939c5d51e533195	gnu/packages/patches/webkitgtk-share-store.patch

applying [1/1] https://yhetil.org/guix-bugs/87mtu2rntp.fsf@netris.org/
diff --git a/gnu/packages/patches/webkitgtk-share-store.patch b/gnu/packages/patches/webkitgtk-share-store.patch
index 053d86fcf4..c02157076e 100644

1:25: trailing whitespace.
 
1:47: trailing whitespace.
 
1:52: trailing whitespace.
 
Checking patch gnu/packages/patches/webkitgtk-share-store.patch...
Applied patch gnu/packages/patches/webkitgtk-share-store.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 c02157076e8c14a8a1a83535dcf6eadb37cb9b1f	gnu/packages/patches/webkitgtk-share-store.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 public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).