diff mbox series

[meta-oe] mozjs-128: keep persistent state directory in WORKDIR

Message ID 20250210154514.2755031-1-skandigraun@gmail.com
State Accepted
Headers show
Series [meta-oe] mozjs-128: keep persistent state directory in WORKDIR | expand

Commit Message

Gyorgy Sarvari Feb. 10, 2025, 3:45 p.m. UTC
Mozilla projects (built from Firefox tarball) keep some
content around for the build process, for example Python
virtual environments, which is reused between the tasks.
This folder is by default in $HOME, unless it is overriden
by the MOZBUILD_STATE_PATH environment variable.

Having this content in the $HOME folder can be problematic,
as it can contaminate the build machine. As different
example, when using kas, it creates a new temporary $HOME
with each invokation, which is deleted upon exiting the
kas process. This can fail the build if for example do_compile
and do_install were called in different kas sessions, as the
tools and data stored in this folder are deleted between the
runs.

To solve this, set the MOZBUILD_STATE_PATH environment variable
to a folder inside the $TMPDIR, so this semi-persistent data
can be contained in a known path.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb
index 0edfbe73f..4b56a17f8 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs-128_128.5.2.bb
@@ -57,6 +57,7 @@  export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
 
 export AS = "${CC}"
 
+export MOZBUILD_STATE_PATH = "${WORKDIR}/mozbuild_state"
 export RUSTFLAGS
 
 JIT ?= ""