Skip to content

Commit

Permalink
tests: Avoid musl failure with cp -a
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
akiernan committed Nov 1, 2019
1 parent 3d48021 commit abf1a73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/libtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/test-admin-gpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit abf1a73

Please sign in to comment.