On Wed, 29 Aug 2018 at 21:13, Ken Moffat <zarniwh...@ntlworld.com> wrote:
>
> On Tue, Aug 28, 2018 at 09:53:53PM +0300, Ruslan Kabatsayev wrote:
> > Hello all,
> >
> > I was trying to find a way to compile rustc-1.25.0 on an offline
> > machine. It finally appeared to be possible, and I'd like BLFS to
> > present this way of compilation (maybe as optional preparation
> > steps before the current ones).
> >
> > The changes are as follows.
> > 1. In addition to the rustc-1.25.0-src.tar.gz, we need these tarballs:
> >
> > https://static.rust-lang.org/dist/2018-02-15/rust-std-1.24.0-i686-unknown-linux-gnu.tar.gz
> > https://static.rust-lang.org/dist/2018-02-15/rustc-1.24.0-i686-unknown-linux-gnu.tar.gz
> > https://static.rust-lang.org/dist/2018-02-15/cargo-0.25.0-i686-unknown-linux-gnu.tar.gz
> >
>
> When we first introduced rustc to BLFS, we downloaded some tarballs
> for previous versions.  Nowadays we do not have to refer to them,
> and therefore we do not need to reference x86_64 or, in your case,
> i686.
> > 2. Cargo package registry must be fetched into appropriate location.
> > This can be done with the following commands (requires git):
> >
>
> <sarcasm>Oh goody, adding another git command.</sarcasm>  And the
> hash will need to be updated for a newer version of rust.

Of course, the actual git command may be replaced in the BLFS
instructions by a snapshot of the registry at the time of updating to
newer rustc version. BLFS has a similar thing done with e.g.
gimp-help-2018-08-21.tar.xz (see the Gimp-2.10.6 page).

>
> > ### BEGIN
> > mkdir -pv "$HOME/.cargo/registry/index/github.com-1ecc6299db9ec823"
> > pushd "$HOME/.cargo/registry/index/github.com-1ecc6299db9ec823"
> > git init .
> > git fetch --tags https://github.com/rust-lang/crates.io-index 
> > refs/heads/master:refs/remotes/origin/master
> > touch .cargo-index-lock
> > popd
> > ### END
> >
> > 3. We need to download the dependencies – Rust packages AKA crates,
> > and place them into appropriate location. This can be done using the
> > following bash commands:
> >
> > ### BEGIN
> > mkdir -pv "$HOME/.cargo/registry/cache/github.com-1ecc6299db9ec823/"
> > pushd "$HOME/.cargo/registry/cache/github.com-1ecc6299db9ec823/"
> > crates=(
> >   filetime-0.1.15.crate
> >   textwrap-0.9.0.crate
> [...]
>
> Unmaintainable.

Do you mean the list of crates is unmaintainable? How come? I suppose,
when updating to a new version, BLFS maintainer does build the package
at least once (at least to update estimated build time) and does this
in the "usual"—online—way. If so, then after build the
~/.cargo/registry/cache/*/ directory will contain the necessary
crates, so the list can easily be updated from this. And the hash
following "github.com-" can be found too.

> >
> > 5. After all these steps you no longer need Internet connection, so
> > you can simply continue as you would following current BLFS
> > instructions. I've actually built rustc on an offline machine using
> > these preparations before going offline, and it worked nicely.
> >
> But - you still had to be online to get them.

Of course I do have to be online to download anything, including the
saner packages like Xorg, which don't try to go online when actually
building themselves. But once I download everything I need, it should
be possible to go on a vacation offline with a USB stick, and play
with (B)LFS without surprises.

>
> This just seems to add pain.

Well, if all the maintainers here feel the same, I won't pursue this
further. I just wanted the book to be useful for a bit wider range of
users.

>
> ĸen
> --
>                      Also Spuke Zerothruster
>                                      (Finnegans Wake)
> --
> http://lists.linuxfromscratch.org/listinfo/blfs-dev
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to