Prevent build dir from becoming annoyingly sticky

With OverlayFS and unshare(1) being used in the test-suite, some of the
directories in the test tree, sandbox and rpmtests.dir/ end up missing
read/write or execute (for directories) permissions which means removing
them requires excessive force in the form of "unshare -r rm -rf".

CMake is clever enough to adjust the permissions behind the scenes on
"make clean" but manual removal should just work too, so fix that with
chmod(1) in the clean_up() trap.
This commit is contained in:
Michal Domonkos 2023-08-17 15:40:06 +02:00
parent 4fa0026430
commit 94ee5c6c23
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ mount_tree()
clean_up()
{
[ -n "$RPMTEST" ] && snapshot umount
chmod -Rf u+rwX $BASE_DIR $SANDBOX_DIR rpmtests.dir
}
# Run CMD in a user namespace (if not root already)