Resolves: #1800597 - make upstream test-suite work with root privileges
This commit is contained in:
parent
3957dee9a4
commit
3dbfd57eac
71
coreutils-8.31-root-tests.patch
Normal file
71
coreutils-8.31-root-tests.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 57324f74fb8855d4888b1e6b6dbaaec781bb6db9 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Fri, 7 Feb 2020 17:05:06 +0100
|
||||
Subject: [PATCH] tests: ensure tests/cp/preserve-gid.sh works with single
|
||||
binary
|
||||
|
||||
* tests/cp/preserve-gid.sh: If configured with --enable-single-binary
|
||||
copy the coreutils single binary, instead of the cp one-line launcher.
|
||||
|
||||
Discussed at https://bugzilla.redhat.com/1800597
|
||||
Fixes https://bugs.gnu.org/39485
|
||||
|
||||
Upstream-commit: b96b1a47286632fd1cb738cf5a9893cf72a70d30
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
tests/cp/preserve-gid.sh | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh
|
||||
index e48584c1e..bba09df09 100755
|
||||
--- a/tests/cp/preserve-gid.sh
|
||||
+++ b/tests/cp/preserve-gid.sh
|
||||
@@ -110,7 +110,14 @@ 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" &&
|
||||
+ { test -l "$abs_path_dir_/cp" ||
|
||||
+ test $(wc -l < "$abs_path_dir_/cp") = 1; } then
|
||||
+ # if configured with --enable-single-binary we need to use the single binary
|
||||
+ cp "$abs_path_dir_/coreutils" "$tmp_path/cp" || framework_failure_
|
||||
+else
|
||||
+ cp "$abs_path_dir_/cp" "$tmp_path"
|
||||
+fi
|
||||
chmod -R a+rx "$tmp_path"
|
||||
|
||||
t1() {
|
||||
--
|
||||
2.21.1
|
||||
|
||||
From 94a47b51e64c21fef4ad8faca1599099c459b2ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Mon, 10 Feb 2020 15:05:43 +0000
|
||||
Subject: [PATCH] tests: fix test for symlink
|
||||
|
||||
* tests/cp/preserve-gid.sh: s/-l/-L/.
|
||||
Reported by Kamil Dudka
|
||||
|
||||
Upstream-commit: 3150f4a82ef6542c4a8f0bf413815e78766f044f
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
tests/cp/preserve-gid.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh
|
||||
index bba09df09..547bf66bc 100755
|
||||
--- a/tests/cp/preserve-gid.sh
|
||||
+++ b/tests/cp/preserve-gid.sh
|
||||
@@ -111,7 +111,7 @@ cleanup_() { rm -rf "$tmp_path"; }
|
||||
test -d /tmp && TMPDIR=/tmp
|
||||
tmp_path=$(mktemp -d) || fail_ "failed to create temporary directory"
|
||||
if test -x "$abs_path_dir_/coreutils" &&
|
||||
- { test -l "$abs_path_dir_/cp" ||
|
||||
+ { test -L "$abs_path_dir_/cp" ||
|
||||
test $(wc -l < "$abs_path_dir_/cp") = 1; } then
|
||||
# if configured with --enable-single-binary we need to use the single binary
|
||||
cp "$abs_path_dir_/coreutils" "$tmp_path/cp" || framework_failure_
|
||||
--
|
||||
2.21.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 8.31
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
License: GPLv3+
|
||||
Url: https://www.gnu.org/software/coreutils/
|
||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||
@ -19,6 +19,9 @@ Patch1: coreutils-8.31-sums-man-pages.patch
|
||||
# improve an upstream test that relied on /proc/kallsyms being immutable
|
||||
Patch2: coreutils-8.31-improve-test-cp-proc-short-read.patch
|
||||
|
||||
# make upstream test-suite work with root privileges (#1800597)
|
||||
Patch3: coreutils-8.31-root-tests.patch
|
||||
|
||||
# disable the test-lock gnulib test prone to deadlock
|
||||
Patch100: coreutils-8.26-test-lock.patch
|
||||
|
||||
@ -238,6 +241,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
* Tue Feb 11 2020 Kamil Dudka <kdudka@redhat.com> - 8.31-10
|
||||
- make upstream test-suite work with root privileges (#1800597)
|
||||
|
||||
* Wed Feb 05 2020 Kamil Dudka <kdudka@redhat.com> - 8.31-9
|
||||
- use upstream fix the cp/proc-short-read test
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user