1 From f53bd3da0414ca27f90addf34bd1136f1c4e7d8f Mon Sep 17 00:00:00 2001
2 From: Boiao Ch <doubiliao@gmail.com>
3 Date: Tue, 5 Nov 2024 19:35:29 +0800
4 Subject: [PATCH] feat: patch file system bind for gentoo
7 wechat-universal.sh | 21 ++++++++++++---------
8 1 file changed, 12 insertions(+), 9 deletions(-)
10 diff --git a/wechat-universal.sh b/wechat-universal.sh
11 index a16e538..1c75856 100644
12 --- a/wechat-universal.sh
13 +++ b/wechat-universal.sh
14 @@ -161,11 +161,11 @@ try_start() {
18 - --symlink usr/lib /lib
19 - --symlink usr/lib /lib64
20 - --symlink usr/bin /bin
21 - --symlink usr/bin /sbin
22 - --bind /usr/bin/{true,lsblk}
27 + --ro-bind /usr/bin/{true,lsblk}
30 --ro-bind /{usr/lib/flatpak-xdg-utils,sandbox}/xdg-open
31 @@ -180,12 +180,15 @@ try_start() {
35 - --ro-bind /etc/machine-id{,}
36 + --ro-bind-try /etc/machine-id{,}
37 --ro-bind /etc/passwd{,}
38 --ro-bind /etc/nsswitch.conf{,}
39 --ro-bind /etc/resolv.conf{,}
40 --ro-bind /etc/localtime{,}
41 --ro-bind-try /etc/fonts{,}
42 + --ro-bind /etc/ld.so.cache{,}
43 + --ro-bind /etc/ld.so.conf{,}
44 + --ro-bind-try /etc/ld.so.conf.d{,}
47 --dir /sys/dev # hack for Intel / AMD graphics, mesa calling virtual nodes needs /sys/dev being 0755
48 @@ -211,11 +214,11 @@ try_start() {
49 --ro-bind-try "${HOME}/.local/share/icons"{,}
52 - --dev-bind /run/dbus{,}
53 + --dev-bind-try /run/dbus{,}
54 --ro-bind-try /run/systemd/userdb{,}
55 --ro-bind-try "${XAUTHORITY}"{,}
56 - --ro-bind "${DBUS_SESSION_BUS_PATH}"{,}
57 - --ro-bind "${XDG_RUNTIME_DIR}/pulse"{,}
58 + --ro-bind-try "${DBUS_SESSION_BUS_PATH}"{,}
59 + --ro-bind-try "${XDG_RUNTIME_DIR}/pulse"{,}
62 exec bwrap "${BWRAP_ARGS[@]}" "${BWRAP_CUSTOM_BINDS[@]}" "${BWRAP_DEV_BINDS[@]}" /opt/wechat-universal/wechat "$@"