Skip to contentSkip to conversation

package/hare: define XDG_CACHE_HOME to avoid writing to $(HOME)

PATCH New Thomas Petazzoni via buildroot 1 participant 1 message Oct 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/hare: define XDG_CACHE_HOME to avoid writing to $(HOME)

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")

---
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(+)
package/hare/hare.mk +1 -0
index 88662d3c20..4acff091a5 100644
@@ -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)
Signature · 6 lines
2.56.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot