Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rust: use cargo environment during installation
@ 2026-10-06 19:59 James Hilliard
  2026-10-07  7:53 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: James Hilliard @ 2026-10-06 19:59 UTC (permalink / raw)
  To: buildroot; +Cc: Eric Le Bihan, James Hilliard

Pass HOST_PKG_CARGO_ENV to x.py dist, as is already done for x.py build.
This ensures Cargo uses Buildroot's configured CARGO_HOME instead of
falling back to the user's default cache, and keeps the host RUSTFLAGS
consistent between the build and installation steps.

Fixes:
 - https://autobuild.buildroot.net/results/02b/02b2fc6ba7329852d7bf6ae4935c120c4de47b3e

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/rust/rust.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/rust/rust.mk b/package/rust/rust.mk
index ca68de589c..7546ad39fe 100644
--- a/package/rust/rust.mk
+++ b/package/rust/rust.mk
@@ -79,7 +79,8 @@ endef
 endif
 
 define HOST_RUST_INSTALL_CMDS
-	cd $(@D); $(HOST_MAKE_ENV) $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) x.py dist
+	cd $(@D); $(HOST_MAKE_ENV) $(HOST_PKG_CARGO_ENV) \
+		$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) x.py dist
 	$(HOST_RUST_INSTALL_RUSTC)
 	$(HOST_RUST_INSTALL_LIBSTD_TARGET)
 endef
-- 
2.53.0

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rust: use cargo environment during installation
  2026-10-06 19:59 [Buildroot] [PATCH 1/1] package/rust: use cargo environment during installation James Hilliard
@ 2026-10-07  7:53 ` Thomas Petazzoni via buildroot
  2026-10-07  9:45   ` James Hilliard
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-07  7:53 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot, Eric Le Bihan

On Tue, Oct 06, 2026 at 01:59:33PM -0600, James Hilliard wrote:
> Pass HOST_PKG_CARGO_ENV to x.py dist, as is already done for x.py build.
> This ensures Cargo uses Buildroot's configured CARGO_HOME instead of
> falling back to the user's default cache, and keeps the host RUSTFLAGS
> consistent between the build and installation steps.
> 
> Fixes:
>  - https://autobuild.buildroot.net/results/02b/02b2fc6ba7329852d7bf6ae4935c120c4de47b3e
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Thanks for the patch. Since when does this problem exist? Of course it
exists since x.py support was introduced, but did it become visible
because of a new package, or package update?

As it's a fix, we need to have sufficient information in the commit
message about which commit introduced the issue, so that our LTS
branch maintainers can understand whether it needs to be backported or
not.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rust: use cargo environment during installation
  2026-10-07  7:53 ` Thomas Petazzoni via buildroot
@ 2026-10-07  9:45   ` James Hilliard
  0 siblings, 0 replies; 3+ messages in thread
From: James Hilliard @ 2026-10-07  9:45 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Eric Le Bihan

On Wed, Oct 7, 2026 at 2:09 AM Thomas Petazzoni via buildroot
<buildroot@buildroot.org> wrote:
>
> On Tue, Oct 06, 2026 at 01:59:33PM -0600, James Hilliard wrote:
> > Pass HOST_PKG_CARGO_ENV to x.py dist, as is already done for x.py build.
> > This ensures Cargo uses Buildroot's configured CARGO_HOME instead of
> > falling back to the user's default cache, and keeps the host RUSTFLAGS
> > consistent between the build and installation steps.
> >
> > Fixes:
> >  - https://autobuild.buildroot.net/results/02b/02b2fc6ba7329852d7bf6ae4935c120c4de47b3e
> >
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
>
> Thanks for the patch. Since when does this problem exist? Of course it
> exists since x.py support was introduced, but did it become visible
> because of a new package, or package update?

I think it's caused by this: https://github.com/rust-lang/rust/pull/156196

>
> As it's a fix, we need to have sufficient information in the commit
> message about which commit introduced the issue, so that our LTS
> branch maintainers can understand whether it needs to be backported or

I think that would be this commit:
https://github.com/buildroot/buildroot/commit/e8c8bd9bc56a827db90c3bb2e71e4613a5a2c730

> not.
>
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-07  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 19:59 [Buildroot] [PATCH 1/1] package/rust: use cargo environment during installation James Hilliard
2026-10-07  7:53 ` Thomas Petazzoni via buildroot
2026-10-07  9:45   ` James Hilliard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox