blob: 834617c12d964c79297aa9bbe89b39d2aeb5ff80 [file] [log] [blame]
From abf1a7392b2fa1945286a39a35190d74fe141e52 Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Thu, 31 Oct 2019 17:09:36 +0000
Subject: [PATCH 3/3] tests: Avoid musl failure with `cp -a`
When copying the tree, using musl and GNU coreutils, something gets confused
when setting the ownership of symlinks and the copy fails with:
cp: failed to preserve ownership for osdata-devel/bin: Not supported
Rework using tar to avoid the problem.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Upstream-Status: Accepted [v2019.6]
---
tests/libtest.sh | 4 +++-
tests/test-admin-gpg.sh | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/libtest.sh b/tests/libtest.sh
index ba00073a10a7..3f5fd931bc1e 100755
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -440,7 +440,9 @@ EOF
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build"
cd ${test_tmpdir}
- cp -a osdata osdata-devel
+ rm -rf osdata-devel
+ mkdir osdata-devel
+ tar -C osdata -cf - . | tar -C osdata-devel -xf -
cd osdata-devel
mkdir -p usr/include
echo "a development header" > usr/include/foo.h
diff --git a/tests/test-admin-gpg.sh b/tests/test-admin-gpg.sh
index 1f50c8a9a508..dc776743776c 100755
--- a/tests/test-admin-gpg.sh
+++ b/tests/test-admin-gpg.sh
@@ -90,7 +90,9 @@ EOF
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string version=1.0.10 -b testos/buildmaster/x86_64-runtime -s "Build" --gpg-sign=$keyid --gpg-homedir=${test_tmpdir}/gpghome
cd ${test_tmpdir}
- cp -a osdata osdata-devel
+ rm -rf osdata-devel
+ mkdir osdata-devel
+ tar -C osdata -cf - . | tar -C osdata-devel -xf -
cd osdata-devel
mkdir -p usr/include
echo "a development header" > usr/include/foo.h
--
2.17.1