openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sstate: Preserve permissions when extracting tar archive
@ 2022-01-14  7:41 Jacob Kroon
  2022-01-17  7:28 ` Jacob Kroon
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Kroon @ 2022-01-14  7:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Richard Purdie

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>
---
 meta/classes/sstate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 645377fdd8..8ee32dba2d 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sstate: Preserve permissions when extracting tar archive
  2022-01-14  7:41 [PATCH] sstate: Preserve permissions when extracting tar archive Jacob Kroon
@ 2022-01-17  7:28 ` Jacob Kroon
  2022-01-17  8:40   ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Kroon @ 2022-01-17  7:28 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

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)

[-- Attachment #2: Type: text/html, Size: 681 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] sstate: Preserve permissions when extracting tar archive
  2022-01-17  7:28 ` Jacob Kroon
@ 2022-01-17  8:40   ` Richard Purdie
  2022-01-17  8:51     ` Jacob Kroon
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2022-01-17  8:40 UTC (permalink / raw)
  To: Jacob Kroon, openembedded-core

On Sun, 2022-01-16 at 23:28 -0800, Jacob Kroon wrote:
> 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.

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] sstate: Preserve permissions when extracting tar archive
  2022-01-17  8:40   ` [OE-core] " Richard Purdie
@ 2022-01-17  8:51     ` Jacob Kroon
  0 siblings, 0 replies; 4+ messages in thread
From: Jacob Kroon @ 2022-01-17  8:51 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On 1/17/22 09:40, Richard Purdie wrote:
> On Sun, 2022-01-16 at 23:28 -0800, Jacob Kroon wrote:
>> 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.
> 
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-17  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14  7:41 [PATCH] sstate: Preserve permissions when extracting tar archive Jacob Kroon
2022-01-17  7:28 ` Jacob Kroon
2022-01-17  8:40   ` [OE-core] " Richard Purdie
2022-01-17  8:51     ` Jacob Kroon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).