[Pkg-rust-maintainers] Bug#1126584: Bug#1126584: rustc: build stage0 orig tarball from Debian builds
Fabian Grünbichler
debian at fabian.gruenbichler.email
Fri Feb 6 16:30:52 GMT 2026
On Thu, Jan 29, 2026, at 9:32 AM, Emilio Pozuelo Monfort wrote:
> Package: rustc
> Version: 1.91.1+dfsg1-1
> Severity: normal
>
> Hi,
>
> rustc includes a script, debian/make_orig-stage0_tarball.sh, to create a
> stage0.orig.tar.xz that can be used to bootstrap rustc. I don't think that's
> used much, since new updates in Debian sid will use X-1 from sid to build.
> However, when uploading a (much newer) version to (old)stable, we don't have
> X-1, so we need to create and use a -stage0 tarball.
It is mainly used for rebootstrapping when ports/archs get out of sync. But I
guess that might also have fallen out of favor with cross builds mostly working
nowadays.
> The issue I find is that upstream doesn't support some of our release
> architectures, so when doing these backports, we lack a way to bootstrap the
> new version on those architectures. See for example [1].
Yes.
> One possibility would be to create the -stage0 tarballs using Debian
> sid packages
> for X-1. I haven't looked in detail, but perhaps we would need
> statically linked
> binaries, which could be done in an extra build and placed in a
> rust-static .deb.
> Then make_orig-stage0_tarball could look for those .debs from
> snapshot.debian.org.
>
> Thoughts?
I think for builds using those stage0 tarballs targeting stable we have three
options:
- build a static variant on every unstable upload
- provide a script that cross-builds the missing stage0 targets (either using upstream build, or using an arch that has an upstream stage0 as starting point by doing a cross package build?)
- use backports packages as stage0 input
I think I'd favor the latter, since I already do the work for those ;)
In recent history I think libgit2 was the only library pulled in that I had
to backport as well (that was for Bookworm and for unofficial backports).
It maybe would have been possible to avoid that by patching more aggressively.
Of course, that would *only* help for Trixie, not Bookworm or older. If you
need to support those, only the static or cross build variants would work at
at the moment.
Fabian
More information about the Pkg-rust-maintainers
mailing list