From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] scripts: genenv: make the temporary directory writable
Date: Mon, 21 Sep 2026 11:36:41 +0200 [thread overview]
Message-ID: <20260921093646.882466-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2026-09-21 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 9:36 Ahmad Fatoum [this message]
2026-09-23 6:26 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921093646.882466-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox