coreutils-8.31-root-tests.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From 57324f74fb8855d4888b1e6b6dbaaec781bb6db9 Mon Sep 17 00:00:00 2001
  2. From: Kamil Dudka <kdudka@redhat.com>
  3. Date: Fri, 7 Feb 2020 17:05:06 +0100
  4. Subject: [PATCH] tests: ensure tests/cp/preserve-gid.sh works with single
  5. binary
  6. * tests/cp/preserve-gid.sh: If configured with --enable-single-binary
  7. copy the coreutils single binary, instead of the cp one-line launcher.
  8. Discussed at https://bugzilla.redhat.com/1800597
  9. Fixes https://bugs.gnu.org/39485
  10. Upstream-commit: b96b1a47286632fd1cb738cf5a9893cf72a70d30
  11. Signed-off-by: Kamil Dudka <kdudka@redhat.com>
  12. ---
  13. tests/cp/preserve-gid.sh | 9 ++++++++-
  14. 1 file changed, 8 insertions(+), 1 deletion(-)
  15. diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh
  16. index e48584c1e..bba09df09 100755
  17. --- a/tests/cp/preserve-gid.sh
  18. +++ b/tests/cp/preserve-gid.sh
  19. @@ -110,7 +110,14 @@ cleanup_() { rm -rf "$tmp_path"; }
  20. # is not readable by our nameless IDs.
  21. test -d /tmp && TMPDIR=/tmp
  22. tmp_path=$(mktemp -d) || fail_ "failed to create temporary directory"
  23. -cp "$abs_path_dir_/cp" "$tmp_path"
  24. +if test -x "$abs_path_dir_/coreutils" &&
  25. + { test -l "$abs_path_dir_/cp" ||
  26. + test $(wc -l < "$abs_path_dir_/cp") = 1; } then
  27. + # if configured with --enable-single-binary we need to use the single binary
  28. + cp "$abs_path_dir_/coreutils" "$tmp_path/cp" || framework_failure_
  29. +else
  30. + cp "$abs_path_dir_/cp" "$tmp_path"
  31. +fi
  32. chmod -R a+rx "$tmp_path"
  33. t1() {
  34. --
  35. 2.21.1
  36. From 94a47b51e64c21fef4ad8faca1599099c459b2ad Mon Sep 17 00:00:00 2001
  37. From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
  38. Date: Mon, 10 Feb 2020 15:05:43 +0000
  39. Subject: [PATCH] tests: fix test for symlink
  40. * tests/cp/preserve-gid.sh: s/-l/-L/.
  41. Reported by Kamil Dudka
  42. Upstream-commit: 3150f4a82ef6542c4a8f0bf413815e78766f044f
  43. Signed-off-by: Kamil Dudka <kdudka@redhat.com>
  44. ---
  45. tests/cp/preserve-gid.sh | 2 +-
  46. 1 file changed, 1 insertion(+), 1 deletion(-)
  47. diff --git a/tests/cp/preserve-gid.sh b/tests/cp/preserve-gid.sh
  48. index bba09df09..547bf66bc 100755
  49. --- a/tests/cp/preserve-gid.sh
  50. +++ b/tests/cp/preserve-gid.sh
  51. @@ -111,7 +111,7 @@ cleanup_() { rm -rf "$tmp_path"; }
  52. test -d /tmp && TMPDIR=/tmp
  53. tmp_path=$(mktemp -d) || fail_ "failed to create temporary directory"
  54. if test -x "$abs_path_dir_/coreutils" &&
  55. - { test -l "$abs_path_dir_/cp" ||
  56. + { test -L "$abs_path_dir_/cp" ||
  57. test $(wc -l < "$abs_path_dir_/cp") = 1; } then
  58. # if configured with --enable-single-binary we need to use the single binary
  59. cp "$abs_path_dir_/coreutils" "$tmp_path/cp" || framework_failure_
  60. --
  61. 2.21.1