Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Francois Perrad <francois.perrad.86@gmail.com>
Subject: [Buildroot] [PATCH] package/hare: define XDG_CACHE_HOME to avoid writing to $(HOME)
Date: Tue, 20 Oct 2026 12:18:09 +0200	[thread overview]
Message-ID: <20261020101809.1246135-1-thomas.petazzoni@bootlin.com> (raw)

The build process of host-hare attempts to write to the user $HOME
directory, which we try to avoid as it causes build failures such as:

Error creating /home/br-user/.cache/hare: Permission denied
make[2]: *** [Makefile:57: .bin/hare-configured] Error 255
make[2]: *** Waiting for unfinished jobs....
Error creating /home/br-user/.cache/hare: Permission denied
make[2]: *** [Makefile:63: .bin/haredoc] Error 255

when the user home directory is read-only. This is going to be the
case in all builds using our Docker container since commit
https://gitlab.com/buildroot.org/buildroot/-/commit/fac6d92a27925192b3cb8107449e7abfe01e2cf3.

We therefore ask host-hare to generate its cache, used during the
build, in $(@D)/.cache, using the XDG_CACHE_HOME environment variable.

Fixes: 72ff2ad88d6fd937da12abd4ed59a5fc10d021a0 ("package/hare: new host package")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
François, please review carefully, as I'm not familiar with hare nor
with the impact of this cache's location.
---
 package/hare/hare.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/hare/hare.mk b/package/hare/hare.mk
index 88662d3c20..4acff091a5 100644
--- a/package/hare/hare.mk
+++ b/package/hare/hare.mk
@@ -27,6 +27,7 @@ HOST_HARE_CONF_OPTS = \
 	QBE="$(HOST_DIR)/bin/qbe" \
 	SCDOC="$(HOST_DIR)/bin/scdoc" \
 	HAREPATH="$(HOST_DIR)/src/hare/stdlib" \
+	XDG_CACHE_HOME="$(@D)/.cache" \
 	$(HOST_HARE_TARGET_ARCH)_AS=$(TARGET_AS) \
 	$(HOST_HARE_TARGET_ARCH)_CC=$(TARGET_CC) \
 	$(HOST_HARE_TARGET_ARCH)_LD=$(TARGET_LD)
-- 
2.56.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

                 reply	other threads:[~2026-10-20 10:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261020101809.1246135-1-thomas.petazzoni@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=francois.perrad.86@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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