* [PATCH] scripts: genenv: make the temporary directory writable
@ 2026-09-21 9:36 Ahmad Fatoum
2026-09-23 6:26 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-09-21 9:36 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
genenv copies the environment directories it is given into a temporary
directory next to its output and removes that directory again when it is
done. The copy is made with cp, which preserves the mode of what it copied,
so building from a read-only source tree, e.g. a Nix store path leaves a
temporary directory nothing can be deleted from:
rm: cannot remove '.../defaultenv-qemu_fw_cfg.bbenv.genenv.tmp/boot/qemu_fw_cfg': Permission denied
make[7]: *** [scripts/Makefile.env:41: common/boards/qemu/defaultenv-qemu_fw_cfg.bbenv] Error 1
and the build fails. The same modes also stop the find that prunes stray
editor backups a few lines further down from doing anything.
Make the copies writable before either runs. Their modes are of no interest
to anything: bareboxenv packs the files into an environment image that
carries its own.
Assisted-by: Claude:opus-5
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/genenv | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/genenv b/scripts/genenv
index b630e995cb9b..668f681ab9c3 100755
--- a/scripts/genenv
+++ b/scripts/genenv
@@ -42,6 +42,8 @@ for i in $*; do
fi
done
+chmod -R u+w "$tempdir"
+
find $tempdir -name '.svn' -o -name '*~' -delete
scripts/bareboxenv -s $tempdir ${tmpfile}
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] scripts: genenv: make the temporary directory writable
2026-09-21 9:36 [PATCH] scripts: genenv: make the temporary directory writable Ahmad Fatoum
@ 2026-09-23 6:26 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-09-23 6:26 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Mon, 21 Sep 2026 11:36:41 +0200, Ahmad Fatoum wrote:
> genenv copies the environment directories it is given into a temporary
> directory next to its output and removes that directory again when it is
> done. The copy is made with cp, which preserves the mode of what it copied,
> so building from a read-only source tree, e.g. a Nix store path leaves a
> temporary directory nothing can be deleted from:
>
> rm: cannot remove '.../defaultenv-qemu_fw_cfg.bbenv.genenv.tmp/boot/qemu_fw_cfg': Permission denied
> make[7]: *** [scripts/Makefile.env:41: common/boards/qemu/defaultenv-qemu_fw_cfg.bbenv] Error 1
>
> [...]
Applied, thanks!
[1/1] scripts: genenv: make the temporary directory writable
https://git.pengutronix.de/cgit/barebox/commit/?id=859a88435455 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-23 6:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 9:36 [PATCH] scripts: genenv: make the temporary directory writable Ahmad Fatoum
2026-09-23 6:26 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox