| Message ID | 20250627212423.3315152-2-richard.purdie@linuxfoundation.org |
|---|---|
| State | New |
| Headers | show |
| Series | [1/2] bitbake.conf/sstate: Introduce DEFAULT_SHARED_UMASK to standarise shared area umask | expand |
On Fri, Jun 27 2025, "Richard Purdie via lists.openembedded.org" <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote: > The intent has always been to share DL_DIR, so set the umask accordingly > to the new DEFAULT_SHARED_UMASK variable and match expectations. > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > --- > meta/classes-global/base.bbclass | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass > index b86f50e2839..77bdbd03dcb 100644 > --- a/meta/classes-global/base.bbclass > +++ b/meta/classes-global/base.bbclass > @@ -154,6 +154,7 @@ do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" > do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}" > do_fetch[prefuncs] += "fetcher_hashes_dummyfunc" > do_fetch[network] = "1" > +do_fetch[umask] = "${DEFAULT_SHARED_UMASK}" So this changes metadata hash of everything. Perhaps that's the right thing to do, but it does mean that changing that shared umask variable comes with a rather high cost. I was looking at doing the var lookup inside the download method instead to hide this dependency. But, I suppose, both the old and new umask variable are really more "named constants" than things that are meant to be tweaked at all, as they (especially BB_DEFAULT_UMASK) have wide-ranging effects that are not really easy to predict. Rasmus
On Mon, 2025-06-30 at 11:18 +0200, Rasmus Villemoes wrote: > On Fri, Jun 27 2025, "Richard Purdie via lists.openembedded.org" > <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote: > > > The intent has always been to share DL_DIR, so set the umask > > accordingly > > to the new DEFAULT_SHARED_UMASK variable and match expectations. > > > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > > --- > > meta/classes-global/base.bbclass | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meta/classes-global/base.bbclass b/meta/classes- > > global/base.bbclass > > index b86f50e2839..77bdbd03dcb 100644 > > --- a/meta/classes-global/base.bbclass > > +++ b/meta/classes-global/base.bbclass > > @@ -154,6 +154,7 @@ do_fetch[file-checksums] = > > "${@bb.fetch.get_checksum_file_list(d)}" > > do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}" > > do_fetch[prefuncs] += "fetcher_hashes_dummyfunc" > > do_fetch[network] = "1" > > +do_fetch[umask] = "${DEFAULT_SHARED_UMASK}" > > So this changes metadata hash of everything. Perhaps that's the right > thing to do, but it does mean that changing that shared umask > variable comes with a rather high cost. Since this value doesn't change the output, other than the mode of files in SSTATE_DIR and DL_DIR, which have their own ABI of sorts, I'd be ok with excluding OE_SHARED_UMASK from task hashes. > I was looking at doing the var lookup inside the download method > instead to hide this dependency. > > But, I suppose, both the old and new umask variable are really more > "named constants" than things that are meant to be tweaked at all, as > they (especially BB_DEFAULT_UMASK) have wide-ranging effects that are > not really easy to predict. BB_DEFAULT_UMASK isn't meant to be changed. OE_SHARED_UMASK, could be by users for security policies locally so I'm ok with making that work. Cheers, Richard
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index b86f50e2839..77bdbd03dcb 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -154,6 +154,7 @@ do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}" do_fetch[prefuncs] += "fetcher_hashes_dummyfunc" do_fetch[network] = "1" +do_fetch[umask] = "${DEFAULT_SHARED_UMASK}" python base_do_fetch() { src_uri = (d.getVar('SRC_URI') or "").split()
The intent has always been to share DL_DIR, so set the umask accordingly to the new DEFAULT_SHARED_UMASK variable and match expectations. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/classes-global/base.bbclass | 1 + 1 file changed, 1 insertion(+)