diff --git a/gswrap b/gswrap index f900815..e2f90fd 100644 --- a/gswrap +++ b/gswrap @@ -1,8 +1,9 @@ #!/bin/bash # -# Copyright (c) 2019 SuSE GmbH Nuernberg, Germany. -# Copyright (c) 2021 SuSE SUSE Software Solutions Germany GmbH. -# Copyright (c) 2019,2021 Werner Fink +# Copyright (c) 2019 SUSE GmbH Nuernberg, Germany. +# Copyright (c) 2021 SUSE Software Solutions Germany GmbH. +# Copyright (c) 2023 SUSE Software Solutions Germany GmbH. +# Copyright (c) 2019,2021,2023 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 @@ -80,7 +81,8 @@ do opts[o++]="$lib" opts[o++]="$lib" done -for dir in /lib/tls /lib64/tls /lib64/x86_64 /usr/lib/ghostscript /usr/lib64/ghostscript /etc/ghostscript +arch=$(uname -i) +for dir in /lib/tls /lib64/tls /lib64/${arch} /usr/lib/ghostscript /usr/lib64/ghostscript /etc/ghostscript /lib64/glibc-hwcaps/${arch/_/[_-]}-v* do test -d "$dir" || continue opts[o++]=--ro-bind @@ -304,7 +306,7 @@ fi # Clearly the `false´ should then changed to `true´ if false then - for bin in /usr/bin/strace + for bin in /usr/bin/strace /bin/ls do opts[o++]=--ro-bind opts[o++]="$bin" @@ -343,8 +345,6 @@ set -euo pipefail --chdir "$home" \ "${opts[@]}" \ --new-session \ - --sync-fd 0 \ - --sync-fd 1 \ --sync-fd 2 \ --setenv XDG_RUNTIME_DIR "/run/user/$uid" \ --setenv USER "$user" \ diff --git a/gswrap.changes b/gswrap.changes index 77dd148..137e981 100644 --- a/gswrap.changes +++ b/gswrap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 14 11:56:38 UTC 2023 - Dr. Werner Fink + +- Make it work even with different hwcaps versions + ------------------------------------------------------------------- Wed Dec 8 07:00:33 UTC 2021 - Dr. Werner Fink diff --git a/gswrap.spec b/gswrap.spec index 4315bef..3c3f275 100644 --- a/gswrap.spec +++ b/gswrap.spec @@ -1,7 +1,7 @@ # # spec file for package gswrap # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed