[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39485: [PATCH] make tests/cp/preserve-gid work with single binary
From: |
Kamil Dudka |
Subject: |
bug#39485: [PATCH] make tests/cp/preserve-gid work with single binary |
Date: |
Fri, 7 Feb 2020 17:05:06 +0100 |
* tests/cp/preserve-gid.sh: If configured with --enable-single-binary
copy the coreutils single binary, instead of the cp one-line launcher.
Bug: https://bugzilla.redhat.com/1800597
---
tests/cp/preserve-gid.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh
index e48584c1e..41cdbc6ca 100755
--- a/tests/cp/preserve-gid.sh
+++ b/tests/cp/preserve-gid.sh
@@ -110,7 +110,13 @@ cleanup_() { rm -rf "$tmp_path"; }
# is not readable by our nameless IDs.
test -d /tmp && TMPDIR=/tmp
tmp_path=$(mktemp -d) || fail_ "failed to create temporary directory"
-cp "$abs_path_dir_/cp" "$tmp_path"
+if test -x "$abs_path_dir_/coreutils"; then
+ # if configured with --enable-single-binary we need to use the single binary
+ cp "$abs_path_dir_/coreutils" "$tmp_path"
+ echo "#!$tmp_path/coreutils --coreutils-prog-shebang=cp" > "$tmp_path/cp"
+else
+ cp "$abs_path_dir_/cp" "$tmp_path"
+fi
chmod -R a+rx "$tmp_path"
t1() {
--
2.21.1
- bug#39485: [PATCH] make tests/cp/preserve-gid work with single binary,
Kamil Dudka <=