From 8c4fd00c505b6480ff7d8412f6475b506859c510 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 30 Jan 2026 00:36:43 +0900 Subject: [PATCH] internal/rosa/ninja: build in $TMPDIR This used to build in /work/system/bin/ and unfortunately leaves its garbage there. This behaviour is from very early stages of this package, and was never fixed. This change updates it to use the "$(mktemp -d)" convention that every other artifact uses. Signed-off-by: Ophestra --- internal/rosa/ninja.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/rosa/ninja.go b/internal/rosa/ninja.go index 5b84f8c..76f0340 100644 --- a/internal/rosa/ninja.go +++ b/internal/rosa/ninja.go @@ -12,12 +12,15 @@ func (t Toolchain) newNinja() pkg.Artifact { t.Load(Python), t.Load(Bash), }, nil, nil, ` -mkdir -p /work/system/bin/ && cd /work/system/bin/ +cd "$(mktemp -d)" python3 /usr/src/ninja/configure.py \ --bootstrap \ --gtest-source-dir=/usr/src/googletest ./ninja all ./ninja_test + +mkdir -p /work/system/bin/ +cp ninja /work/system/bin/ `, pkg.Path(AbsUsrSrc.Append("googletest"), false, pkg.NewHTTPGetTar( nil, "https://github.com/google/googletest/releases/download/"+