Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gswrap for openSUSE:Factory checked 
in at 2021-10-12 21:49:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gswrap (Old)
 and      /work/SRC/openSUSE:Factory/.gswrap.new.2443 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gswrap"

Tue Oct 12 21:49:52 2021 rev:6 rq:924872 version:0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/gswrap/gswrap.changes    2021-09-20 
23:36:09.655396525 +0200
+++ /work/SRC/openSUSE:Factory/.gswrap.new.2443/gswrap.changes  2021-10-12 
21:51:15.240034976 +0200
@@ -1,0 +2,6 @@
+Tue Oct 12 13:26:59 UTC 2021 - Dr. Werner Fink <wer...@suse.de>
+
+- Use TERM instead of KILL to let bwrap do its work
+- Enable bwrap to execute its option --die-with-parent
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gswrap ++++++
--- /var/tmp/diff_new_pack.Gq7E2o/_old  2021-10-12 21:51:15.672035594 +0200
+++ /var/tmp/diff_new_pack.Gq7E2o/_new  2021-10-12 21:51:15.672035594 +0200
@@ -1,7 +1,8 @@
 #!/bin/bash
 #
 # Copyright (c) 2019 SuSE GmbH Nuernberg, Germany.
-# Copyright (c) 2019 Werner Fink
+# Copyright (c) 2021 SuSE SUSE Software Solutions Germany GmbH.
+# Copyright (c) 2019,2021 Werner Fink
 #
 # Wrapper script for ghostscript based on bwrap, the container setup
 # utility, which does use e.g. unshare(2) system call to create a
@@ -30,6 +31,14 @@
 home=/home/$user
 uid=$(id -u $user)
 gid=$(id -g $user)
+lock=$(mktemp "${TMPDIR:-/tmp}/.gswrap-XXXXXXXXXX") || exit 1
+
+unlock ()
+{
+    test -e $lock || return
+    fuser -TERM $lock
+    rm -f $lock
+}
 
 finish ()
 {
@@ -37,17 +46,22 @@
     # to be able to hide the original cwd or directory from ghostscript process
     local dir="$1"
     local tmp="$2"
-    test -d "$dir" || return
-    test -d "$tmp" || return
-    for ps in "$tmp/"*
-    do
-       test -e "$ps" || continue
-       test -p "$ps" && continue
-       mv -f "$ps" "$dir"
-    done
-    rm -rf "$tmp"
+    if test -d "$tmp"
+    then
+       for ps in "$tmp/"*
+       do
+           test -e "$ps"  || continue
+           test -p "$ps"  && continue
+           test -d "$dir" || continue
+           mv -f "$ps" "$dir"
+       done
+       rm -rf "$tmp"
+    fi
+    unlock
 }
 
+trap 'unlock' EXIT SIGINT SIGHUP
+
 typeset -i safer=0
 typeset    pipecmd=""
 typeset -i pipepos
@@ -255,16 +269,17 @@
 set -- "${argv[@]}"
 set -euo pipefail
 (exec -c -a gs /usr/bin/bwrap \
-      --as-pid-1 \
+      --dev /dev \
+      --proc /proc \
+      --tmpfs /run \
+      --tmpfs /tmp \
       --ro-bind /bin/false /bin/false \
       --ro-bind $ghostscript /usr/bin/gs \
       --ro-bind /usr/share/ghostscript /usr/share/ghostscript \
       --ro-bind /usr/share/fonts /usr/share/fonts \
       --ro-bind /etc/fonts /etc/fonts \
-      --dev /dev \
-      --proc /proc \
-      --tmpfs /run \
-      --tmpfs /tmp \
+      --ro-bind $lock /tmp/.lock \
+      --lock-file /tmp/.lock \
       --dir /run/user/$uid \
       --dir /var \
       --symlink ../run var/run \
@@ -276,7 +291,6 @@
       --sync-fd 0 \
       --sync-fd 1 \
       --sync-fd 2 \
-      --die-with-parent \
       --setenv XDG_RUNTIME_DIR "/run/user/$uid" \
       --setenv USER $user \
       --setenv LOGNAME $user \
@@ -284,4 +298,6 @@
       --setenv HOME $home \
       --setenv PATH /bin:/usr/bin \
       --setenv MAIL /dev/null \
+      --die-with-parent \
       /usr/bin/gs ${1+"$@"})
+rm -f $lock

Reply via email to