From ace5a11ad108479a1e077436b9f8263fc882b08ba946b873098def248dc86db9 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 10 Jan 2020 08:54:00 +0000 Subject: [PATCH 1/2] Allow %stdout as well as %stdout% for -sOutputFile= OBS-URL: https://build.opensuse.org/package/show/Printing/gswrap?expand=0&rev=7 --- gswrap | 4 ++-- gswrap.changes | 5 +++++ gswrap.spec | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gswrap b/gswrap index 0068994..6036aa9 100644 --- a/gswrap +++ b/gswrap @@ -11,7 +11,7 @@ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, @@ -73,7 +73,7 @@ do ;; -sOutputFile=*) case "${arg#-sOutputFile=}" in - %stdout%|%stderr%|-|"") + %stdout%|%stderr%|%stdout|%stderr|-|"") continue ;; %pipe%*) pipecmd=${arg#-sOutputFile=%pipe%} diff --git a/gswrap.changes b/gswrap.changes index 9a25c64..6a9ab32 100644 --- a/gswrap.changes +++ b/gswrap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 10 08:53:48 UTC 2020 - Dr. Werner Fink + +- Allow %stdout as well as %stdout% for -sOutputFile= + ------------------------------------------------------------------- Wed Aug 28 11:17:46 UTC 2019 - Dr. Werner Fink diff --git a/gswrap.spec b/gswrap.spec index 0cea91c..8f8ea13 100644 --- a/gswrap.spec +++ b/gswrap.spec @@ -1,7 +1,7 @@ # # spec file for package gswrap # -# Copyright (c) 2019 SUSE Linux GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 3341fed6404c702b610f9b214a571fe1a4b3581bb13272fe76f763b8b5738ced Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 10 Jan 2020 10:52:24 +0000 Subject: [PATCH 2/2] Handle relative paths more gracefully OBS-URL: https://build.opensuse.org/package/show/Printing/gswrap?expand=0&rev=8 --- gswrap | 4 ++-- gswrap.changes | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gswrap b/gswrap index 6036aa9..8f54a17 100644 --- a/gswrap +++ b/gswrap @@ -104,8 +104,6 @@ do trap "finish '$PWD' '$tmp'" ERR EXIT SIGINT SIGHUP opts[o++]="--bind ${tmp+"$tmp"} $home/out" fi - # change to new working directory in sandbox - opts[o++]="--chdir $home/out" fi argv[argc]="-sOutputFile=$home/out/${file}" continue @@ -129,6 +127,8 @@ do then opts[o++]="--ro-bind $arg $home/$arg" else + arg="$(realpath $arg)" || exit 1 + argv[argc]="$arg" test "$arg" != / || continue test "$arg" != /home || continue test "$arg" != $home || continue diff --git a/gswrap.changes b/gswrap.changes index 6a9ab32..0ca044e 100644 --- a/gswrap.changes +++ b/gswrap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 10 10:51:59 UTC 2020 - Dr. Werner Fink + +- Handle relative paths more gracefully + ------------------------------------------------------------------- Fri Jan 10 08:53:48 UTC 2020 - Dr. Werner Fink