tests: fix root capabilities test-case
Problem reported by Ondřej Dubaj! https://src.fedoraproject.org/rpms/tar/pull-request/8
This commit is contained in:
parent
854081fb66
commit
ac75693777
39
tar-1.33-fix-capabilities-test.patch
Normal file
39
tar-1.33-fix-capabilities-test.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From: Pavel Raiskup <praiskup@redhat.com>
|
||||||
|
Date: Tue, 19 Jan 2021 16:45:23 +0100
|
||||||
|
Subject: [PATCH] xattrs: fix capabilities root test
|
||||||
|
|
||||||
|
Related discussion in the Fedora pull-request:
|
||||||
|
https://src.fedoraproject.org/rpms/tar/pull-request/8
|
||||||
|
|
||||||
|
Upstream report:
|
||||||
|
https://www.mail-archive.com/bug-tar@gnu.org/msg05943.html
|
||||||
|
|
||||||
|
* tests/capabs_raw01.at: Newer systems (currently e.g. Fedora 34)
|
||||||
|
print getcap output in format CAP=VAL, not CAP+VAL.
|
||||||
|
---
|
||||||
|
tests/capabs_raw01.at | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/capabs_raw01.at b/tests/capabs_raw01.at
|
||||||
|
index f9b97736..988251cf 100644
|
||||||
|
--- a/tests/capabs_raw01.at
|
||||||
|
+++ b/tests/capabs_raw01.at
|
||||||
|
@@ -44,10 +44,13 @@ rm -rf dir
|
||||||
|
# restore _all_ xattrs (not just the user.* domain)
|
||||||
|
tar --xattrs --xattrs-include='*' -xf archive.tar
|
||||||
|
|
||||||
|
-getcap dir/file
|
||||||
|
+# Newer systems switched to different format:
|
||||||
|
+# - dir/file = cap_chown+ei
|
||||||
|
+# + dir/file cap_chown=ei
|
||||||
|
+getcap dir/file | sed -e 's/+/=/' -e 's|dir/file = |dir/file |'
|
||||||
|
],
|
||||||
|
[0],
|
||||||
|
-[dir/file = cap_chown+ei
|
||||||
|
+[dir/file cap_chown=ei
|
||||||
|
])
|
||||||
|
|
||||||
|
AT_CLEANUP
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
1
tar.spec
1
tar.spec
@ -18,6 +18,7 @@ Patch2: tar-1.28-vfatTruncate.patch
|
|||||||
Patch3: tar-1.29-wildcards.patch
|
Patch3: tar-1.29-wildcards.patch
|
||||||
Patch4: tar-1.28-atime-rofs.patch
|
Patch4: tar-1.28-atime-rofs.patch
|
||||||
Patch9: tar-1.28-document-exclude-mistakes.patch
|
Patch9: tar-1.28-document-exclude-mistakes.patch
|
||||||
|
Patch10: tar-1.33-fix-capabilities-test.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
Loading…
Reference in New Issue
Block a user