From 0881bd4cf6370f33524a401c0c6bf23cb208127d0f59a0f8f3fdfbf7b8375fe6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 9 Feb 2024 12:01:22 +0000 Subject: [PATCH] Allow also abstract X11 socket OBS-URL: https://build.opensuse.org/package/show/Printing/gswrap?expand=0&rev=23 --- gswrap | 17 ++++++++++++++++- gswrap.changes | 5 +++++ gswrap.spec | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gswrap b/gswrap index e2f90fd..38df4a8 100644 --- a/gswrap +++ b/gswrap @@ -275,6 +275,18 @@ then else opts[o++]=--unshare-all fi + for so in /tmp/.X11-unix/* + do + test -s $so && continue + # Abstract sockets only + opts[o++]=--share-net + done + if test -n "${WAYLAND_DISPLAY}" + then + opts[o++]=--ro-bind + opts[o++]="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" + opts[o++]="/run/user/$uid/$WAYLAND_DISPLAY" + fi if test -n "${GHOSTVIEW}" then opts[o++]=--setenv @@ -330,15 +342,18 @@ set -euo pipefail --proc /proc \ --tmpfs /run \ --tmpfs /tmp \ + --dir /var \ --ro-bind /bin/false /bin/false \ --ro-bind $ghostscript /usr/bin/gs \ --ro-bind /usr/share/ghostscript /usr/share/ghostscript \ + --ro-bind /usr/share/xml/fontconfig /usr/share/xml/fontconfig \ + --ro-bind /usr/share/fontconfig /usr/share/fontconfig \ --ro-bind /usr/share/fonts /usr/share/fonts \ + --ro-bind /var/cache/fontconfig /var/cache/fontconfig \ --ro-bind /etc/fonts /etc/fonts \ --ro-bind "$lock" /tmp/.lock \ --lock-file /tmp/.lock \ --dir "/run/user/$uid" \ - --dir /var \ --symlink ../run var/run \ --symlink ../tmp var/tmp \ --dir "$home" \ diff --git a/gswrap.changes b/gswrap.changes index 137e981..7f71bd0 100644 --- a/gswrap.changes +++ b/gswrap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 9 12:00:28 UTC 2024 - Dr. Werner Fink + +- Allow also abstract X11 socket + ------------------------------------------------------------------- Thu Sep 14 11:56:38 UTC 2023 - Dr. Werner Fink diff --git a/gswrap.spec b/gswrap.spec index 3c3f275..991eb1d 100644 --- a/gswrap.spec +++ b/gswrap.spec @@ -1,7 +1,7 @@ # # spec file for package gswrap # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed