]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Preserve permissions when extracting tar archive
authorJacob Kroon <jacob.kroon@gmail.com>
Fri, 14 Jan 2022 07:41:38 +0000 (08:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 15 Jan 2022 16:22:46 +0000 (16:22 +0000)
This is done by default when tar is run by the superuser, but for native
recipes the corresponding task is not run as root under pseudo, so pass
the flag explicitly.

Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 645377fdd8f49e025dec66de93aceff8c2d84c3c..8ee32dba2d5eba983e5d88fdc3467837d7937b67 100644 (file)
@@ -901,7 +901,7 @@ sstate_unpack_package () {
                ZSTD="pzstd -p ${ZSTD_THREADS}"
        fi
 
-       tar -I "$ZSTD" -xvf ${SSTATE_PKG}
+       tar -I "$ZSTD" -xvpf ${SSTATE_PKG}
        # update .siginfo atime on local/NFS mirror if it is a symbolic link
        [ ! -h ${SSTATE_PKG}.siginfo ] || touch -a ${SSTATE_PKG}.siginfo 2>/dev/null || true
        # update each symbolic link instead of any referenced file