sstate: Preserve permissions when extracting tar archive
PATCH 1/1 sstate: Preserve permissions when extracting tar archive
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.
--- meta/classes/sstate.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/sstate.bbclass +1 -1
@@ -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
Although this is now fixed in master, I was wondering why this doesn't seem to be a problem in dunfell.
In dunfell, sstate packages are unpacked with "tar -xvzf", no -p flag, but still my buildhistory doesn't show any noise when doing:
bitbake -c cleansstate shadow-native && bitbake shadow-native && bitbake -c clean shadow-native && bitbake shadow-native
After dunfell was the switch to tar+zstd, but I don't understand why that would change the extracted permissions.
If anyone has got a clue, i'd be interested to know why.
Jacob
(testing the message reply function from the archived mailing list)
Quoted 6 lines · Jacob Kroon
Although this is now fixed in master, I was wondering why this doesn't seem to be a problem in dunfell.
In dunfell, sstate packages are unpacked with "tar -xvzf", no -p flag, but still
my buildhistory doesn't show any noise when doing:
Quoted 8 lines
bitbake -c cleansstate shadow-native && bitbake shadow-native && bitbake -c clean shadow-native && bitbake shadow-native
After dunfell was the switch to tar+zstd, but I don't understand why that would
change the extracted permissions.If anyone has got a clue, i'd be interested to know why.
I think dunfell doesn't have the umask changes I linked to earlier in the discussion? That means it will behave differently but there are probably other permissions issues e.g. a host with your current umask compared to a host with a different one, particularly around the group bits.
Cheers,
Richard
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Jacob Kroon
Although this is now fixed in master, I was wondering why this doesn't seem to be a problem in dunfell.
In dunfell, sstate packages are unpacked with "tar -xvzf", no -p flag, but still
my buildhistory doesn't show any noise when doing:bitbake -c cleansstate shadow-native && bitbake shadow-native && bitbake -c clean shadow-native && bitbake shadow-native
After dunfell was the switch to tar+zstd, but I don't understand why that would
change the extracted permissions.
Quoted 7 lines
Quoted 1 line
If anyone has got a clue, i'd be interested to know why.
I think dunfell doesn't have the umask changes I linked to earlier in the discussion? That means it will behave differently but there are probably other permissions issues e.g. a host with your current umask compared to a host with a different one, particularly around the group bits.
Yes, that is true. I'll just leave it at that, thanks for clarifying.
Jacob