From 65b634b7de0bfbb5c2658ba98556efea55d7a63e Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 7 Jan 2025 12:56:14 -0500 Subject: [PATCH] copy-preserving-extended-attributes: use a different base image The Fedora 39-based image this test is using is having trouble finding mirrors from CI. Use a different one that can still provide the setcap and setfattr commands. Signed-off-by: Nalin Dahyabhai --- tests/copy.bats | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/copy.bats b/tests/copy.bats index 4314edcd07f..55dea2c2c9d 100644 --- a/tests/copy.bats +++ b/tests/copy.bats @@ -472,7 +472,7 @@ stuff/mystuff" @test "copy-preserving-extended-attributes" { createrandom ${TEST_SCRATCH_DIR}/randomfile # if we need to change which image we use, any image that can provide a working setattr/setcap/getfattr will do - image="quay.io/libpod/systemd-image:20240124" + image="quay.io/libpod/ubuntu" if ! which setfattr > /dev/null 2> /dev/null; then skip "setfattr not available, unable to check if it'll work in filesystem at ${TEST_SCRATCH_DIR}" fi @@ -486,7 +486,8 @@ stuff/mystuff" _prefetch $image run_buildah from --quiet $WITH_POLICY_JSON $image first="$output" - run_buildah run $first microdnf -y install /usr/bin/setfattr /usr/sbin/setcap + run_buildah run $first apt-get -y update + run_buildah run $first apt-get -y install attr libcap2-bin run_buildah copy $first ${TEST_SCRATCH_DIR}/randomfile / # set security.capability run_buildah run $first setcap cap_setuid=ep /randomfile @@ -495,7 +496,8 @@ stuff/mystuff" # copy the file to a second container run_buildah from --quiet $WITH_POLICY_JSON $image second="$output" - run_buildah run $second microdnf -y install /usr/bin/getfattr + run_buildah run $second apt-get -y update + run_buildah run $second apt-get -y install attr run_buildah copy --from $first $second /randomfile / # compare what the extended attributes look like. if we're on a system with SELinux, there's a label in here, too run_buildah run $first sh -c "getfattr -d -m . --absolute-names /randomfile | grep -v ^security.selinux | sort"