[Buildroot] [git commit] package/dracut: disable dracut-cpio if host-rustc is not available
Julien Olivain via buildroot <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/ff7f973a16036d21da708137875eff6efa8765df branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master Since upstream commit 89a86dcb0a3248606824de50f5c63f61cfe0369c (first release: 106) if cargo exists on PATH the Dracut configure script enables building dracut-cpio by default, and calls "cargo --version" to check if cargo works. This fails on the autobuilders: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured. help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain. dracut couldn't find cargo for dracut-cpio build The affected configs either don't have BR2_PACKAGE_HOST_RUSTC enabled, or build-time.log.gz shows host-rustc was not installed before the host-dracut build, so presumably the "cargo" that produces the rustup error is an external one already installed on the autobuilders. To fix this, enable dracut-cpio only if BR2_PACKAGE_HOST_RUSTC=y, and add a dependency on host-rustc in that case. According to the documentation [1, see "enhanced_cpio"] dracut-cpio is supposed to optimize archive creation for copy-on-write filesystems, so it should not matter much for Buildroot. The --disable-dracut-cpio option was added in upstream commit 4a4ab928a49e81e02104ec5466160664e59c3965 (same release). Fixes: https://autobuild.buildroot.org/results/5f557d708cce997e7f039f17e30640b02ba9180a/ Fixes: https://autobuild.buildroot.org/results/f04ca3c4598f62a7e87d84bc111eb8b161b34a70/ (and more) [1] https://dracut-ng.github.io/dracut/man/dracut.conf.5.html#_configuration_options Signed-off-by: Fiona Klute (Othermo GmbH) <[email protected]> Signed-off-by: Julien Olivain <[email protected]> --- package/dracut/dracut.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/dracut/dracut.mk b/package/dracut/dracut.mk index 0bf755319e..1b356a5092 100644 --- a/package/dracut/dracut.mk +++ b/package/dracut/dracut.mk @@ -13,6 +13,13 @@ DRACUT_CPE_ID_VALID = YES HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-cross-ldd HOST_DRACUT_INSTALL_OPTS = systemdsystemunitdir="" install +ifeq ($(BR2_PACKAGE_HOST_RUSTC),y) +HOST_DRACUT_CONF_OPTS += --enable-dracut-cpio +HOST_DRACUT_DEPENDENCIES += host-rustc +else +HOST_DRACUT_CONF_OPTS += --disable-dracut-cpio +endif + define HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT mv $(HOST_DIR)/bin/dracut $(HOST_DIR)/bin/dracut.real sed -e "s%@@TARGET_CROSS@@%$(TARGET_CROSS)%" \ _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot