package/hare: define XDG_CACHE_HOME to avoid writing to $(HOME)
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.
---
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
@@ -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