All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures
@ 2020-02-24 12:59 André Draszik
  2020-02-24 13:40 ` Adrian Bunk
  0 siblings, 1 reply; 16+ messages in thread
From: André Draszik @ 2020-02-24 12:59 UTC (permalink / raw)
  To: openembedded-core

The number of threads used, and the amount of memory allowed
to be used, should not affect sstate signatures, as they
don't affect the result.

Otherwise, it becomes impossible to re-use sstate from
automated builders on developer's machines (as the former
might execute bitbake with certain constraints different
compared to developer's machines).

This is in particular a problem with the opkg package writing
backend, as the OPKGBUILDCMD depends on XZ_DEFAULTS. Without
the vardepexclude, there is no re-use possible of the
package_write_ipk sstate.

The reason XZ_DEFAULTS as a whole isn't being whitelisted as
such here is that some arguments can affect the outcome of
the xz operation, so the approach taken is to only
whitelist the safe flags memlimit and # of threads.

Signed-off-by: André Draszik <git@andred.net>

---
v2: remove Gerrit Change-Id line
---
 meta/conf/bitbake.conf | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 954c06b313..d5a1a2471d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -794,7 +794,10 @@ BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
 PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
 
 # Default parallelism and resource usage for xz
-XZ_DEFAULTS ?= "--memlimit=50% --threads=${@oe.utils.cpu_count()}"
+XZ_MEMLIMIT ?= "50%"
+XZ_THREADS ?= "${@oe.utils.cpu_count()}"
+XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}"
+XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS"
 
 ##################################################################
 # Magic Cookie for SANITY CHECK
-- 
2.23.0.rc1



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

end of thread, other threads:[~2020-02-26 15:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 12:59 [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures André Draszik
2020-02-24 13:40 ` Adrian Bunk
2020-02-24 14:21   ` André Draszik
2020-02-24 14:31     ` Adrian Bunk
2020-02-24 14:58       ` André Draszik
2020-02-24 15:10         ` Adrian Bunk
2020-02-25 11:16           ` reproducible builds involving xz (was: Re: [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures) André Draszik
2020-02-25 11:23             ` Richard Purdie
2020-02-24 16:44   ` [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures Richard Purdie
2020-02-24 17:12     ` Adrian Bunk
2020-02-24 17:14     ` André Draszik
2020-02-24 17:32       ` Richard Purdie
2020-02-24 22:00         ` Adrian Bunk
2020-02-25  9:16           ` André Draszik
2020-02-25  9:54             ` Adrian Bunk
2020-02-26 15:26     ` xz threads / memlimit behaviour (was: Re: [PATCH v2] bitbake.conf: omit XZ threads and RAM from sstate signatures) André Draszik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.