[Pkg-rust-maintainers] Bootstrap of rust

Luca Bruno lucab at debian.org
Tue Jan 20 09:46:24 UTC 2015


On Tuesday 20 January 2015 09:25:57 Sylvestre Ledru wrote:

> Hello,
> 
> + Paul who showed some interest in this :)

Just to recap, we had a brief exchange with Paul on Feb 2014, where 
he expressed some concerns with an embedded stage0 blob, and suggested
to ask ftp-master for a shared/official statement on this.
I
 asked them twice by mail (on 07/02/2014 and 02/03/2014) but 
never got any answer. After that real-life took over my free time 
for rust, so the discussion died. 
 
> About the bootstrap, I am not sure that copying the compiler in
> debian/dl/ is the best way.

Me neither. 
At worse (if we keep shipping stage0), we should make use of multiple 
upstream tarball support[0], as it is not a debian delta we are 
shipping here.

[0] https://wiki.debian.org/Projects/DebSrc3.0#How_to_use_multiple_upstream_tarball_in_3.0_.28quilt.29_format.3F

> AFAIK, the "right" way to bootstrap a compiler:
> * Build a local instance of the compiler on your system (whatever the
> method is)
> * Package the newly built compiler
> * Use the package to build compiler
> * Upload this package
> 
> Once the package is in the archive, use the official package to build
> the new version of the compiler.

Been there, tried that. I collected some notes on the wiki[1].

In theory it's all good. In practice:
 * upstream periodically snapshots stage0. This happens multiple times 
   between releases, so I don't expect eg. 1.0.1 to be bootstrappable 
   from 1.0.0 (experienced this somewhere around the 0.8->0.9 release)
 * requirements are pretty tight, and when a language feature change
   rustc cannot bootstrap itself (experienced this when trying to
   self-boostrap from local .deb, somewhere around 0.9-pre)
 * stage0 are in strictly-chained linear series. This means we cannot 
   miss even a single snapshot, otherwise next bootstrap could fail.
   Moreover, also due to first point above, bootstrapping across 
   non-adjacent package releases (ie. Stretch->Buster or similar) won't work
 
[1] https://wiki.debian.org/Teams/RustPackaging/Bootstrap

Please note that those are notes I collected last time I was full-digging into it,
which was circa 1 year ago. Things may have improved in the meanwhile and 1.0 will
come with some sort of language stability. 
I'm still in the process of updating my knowledge on this, but due to past experience 
I won't personally expect to be able to do what suggested above without a lengthy 
blood-bath. But I'll be very happy to see that things are now much better! :)

> After that, we will have to cross compile it for the other archs (ARM in
> priority).

This is currently quite buggy even in upstream field (with dedicated stage0, 
embedded source and frozen toolchains).
Topic is big, but a starting reference could be 
https://github.com/rust-lang/rust/issues/5258
I suggest to keep cross-* for a later stage, when we have stable packaging 
and we could help upstream in getting cross-support.

Cheers, Luca

-- 
 .''`.  ** Debian GNU/Linux **  | Luca Bruno (kaeso)
: :'  :   The Universal O.S.    | lucab (AT) debian.org
`. `'`                          | GPG Key ID: 0x4F3BBEBF
  `-     http://www.debian.org 	| Debian GNU/Linux Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-rust-maintainers/attachments/20150120/010fd268/attachment.sig>


More information about the Pkg-rust-maintainers mailing list