mbox series

[v3,00/10] Merge rust and cargo

Message ID 20200207180829.165689-1-arnout@mind.be
Headers show
Series Merge rust and cargo | expand

Message

Arnout Vandecappelle Feb. 7, 2020, 6:08 p.m. UTC
The source code for Cargo, the build and package manager for Rust, is now
shipped along with the compiler and standard library.

So there can not be a standalone package for Cargo anymore.

This series does the following:
- move the installation of cargo config to toolchain post-install hook.
- update host-rust to build and install Cargo.
- install host-cargo-bin if host-rust-bin is selected instead of host-rust.
- update dependencies for package(s) using Cargo.
- remove cargo packaging.
- update the packaging documentation.
- bump rust (+cargo) to 1.40.
- remove cargo-bin as well (now bundled with rust binaries).

It was previously posted by Eric Le Bihan [1] and by Patrick Havelange
[2]. I wanted to merge it, but I made some invasive changes (the first
patch) so I'm reposting just to be sure.

Regards,
Arnout

[1] http://patchwork.ozlabs.org/project/buildroot/list/?series=140900
[2] http://patchwork.ozlabs.org/project/buildroot/list/?series=153317

Arnout Vandecappelle (Essensium/Mind) (1):
  package/rustc: install cargo config as toolchain post-install hook

Eric Le Bihan (7):
  package/rust: build and install cargo
  package/cargo-bin: install if rust-bin selected
  package/rust-bin: host variant depends on host-cargo-bin
  package/rust: drop dependency on host-cargo-bin
  package/ripgrep: depends on host-rustc
  package/cargo: drop package
  docs/manual: cargo packages depend on host-rustc

Patrick Havelange (2):
  package/rust: bump to 1.40
  package/cargo-bin: remove and use cargo-bin from rust-bin package

 DEVELOPERS                                    |   2 -
 docs/manual/adding-packages-cargo.txt         |   4 +-
 package/Config.in.host                        |   1 -
 package/cargo-bin/cargo-bin.hash              |  13 -
 package/cargo-bin/cargo-bin.mk                |  13 -
 package/cargo/Config.in.host                  |   9 -
 package/cargo/cargo.hash                      |   8 -
 package/cargo/cargo.mk                        |  91 ------
 package/ripgrep/Config.in                     |   2 +-
 package/ripgrep/ripgrep.mk                    |   2 +-
 package/rust-bin/rust-bin.hash                |  93 +++---
 package/rust-bin/rust-bin.mk                  |  29 +-
 ...esence-of-LLVM-library-in-stage0-lib.patch | 264 ------------------
 package/rust/rust.hash                        |   6 +-
 package/rust/rust.mk                          |   8 +-
 .../config.in => rustc/cargo-config.in}       |   0
 package/rustc/rustc.mk                        |  12 +
 support/testing/tests/package/test_rust.py    |   2 -
 18 files changed, 85 insertions(+), 474 deletions(-)
 delete mode 100644 package/cargo-bin/cargo-bin.hash
 delete mode 100644 package/cargo-bin/cargo-bin.mk
 delete mode 100644 package/cargo/Config.in.host
 delete mode 100644 package/cargo/cargo.hash
 delete mode 100644 package/cargo/cargo.mk
 delete mode 100644 package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch
 rename package/{cargo/config.in => rustc/cargo-config.in} (100%)

Comments

Matthew Weber Feb. 7, 2020, 9:19 p.m. UTC | #1
All,


On Fri, Feb 7, 2020 at 12:09 PM Arnout Vandecappelle (Essensium/Mind)
<arnout@mind.be> wrote:
>
> The source code for Cargo, the build and package manager for Rust, is now
> shipped along with the compiler and standard library.
>
> So there can not be a standalone package for Cargo anymore.
>
> This series does the following:
> - move the installation of cargo config to toolchain post-install hook.
> - update host-rust to build and install Cargo.
> - install host-cargo-bin if host-rust-bin is selected instead of host-rust.
> - update dependencies for package(s) using Cargo.
> - remove cargo packaging.
> - update the packaging documentation.
> - bump rust (+cargo) to 1.40.
> - remove cargo-bin as well (now bundled with rust binaries).
>

Build and runtime tested (x86 32bit )

Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com>

> It was previously posted by Eric Le Bihan [1] and by Patrick Havelange
> [2]. I wanted to merge it, but I made some invasive changes (the first
> patch) so I'm reposting just to be sure.
>
> Regards,
> Arnout
>
> [1] http://patchwork.ozlabs.org/project/buildroot/list/?series=140900
> [2] http://patchwork.ozlabs.org/project/buildroot/list/?series=153317
>
> Arnout Vandecappelle (Essensium/Mind) (1):
>   package/rustc: install cargo config as toolchain post-install hook
>
> Eric Le Bihan (7):
>   package/rust: build and install cargo
>   package/cargo-bin: install if rust-bin selected
>   package/rust-bin: host variant depends on host-cargo-bin
>   package/rust: drop dependency on host-cargo-bin
>   package/ripgrep: depends on host-rustc
>   package/cargo: drop package
>   docs/manual: cargo packages depend on host-rustc
>
> Patrick Havelange (2):
>   package/rust: bump to 1.40
>   package/cargo-bin: remove and use cargo-bin from rust-bin package
>
>  DEVELOPERS                                    |   2 -
>  docs/manual/adding-packages-cargo.txt         |   4 +-
>  package/Config.in.host                        |   1 -
>  package/cargo-bin/cargo-bin.hash              |  13 -
>  package/cargo-bin/cargo-bin.mk                |  13 -
>  package/cargo/Config.in.host                  |   9 -
>  package/cargo/cargo.hash                      |   8 -
>  package/cargo/cargo.mk                        |  91 ------
>  package/ripgrep/Config.in                     |   2 +-
>  package/ripgrep/ripgrep.mk                    |   2 +-
>  package/rust-bin/rust-bin.hash                |  93 +++---
>  package/rust-bin/rust-bin.mk                  |  29 +-
>  ...esence-of-LLVM-library-in-stage0-lib.patch | 264 ------------------
>  package/rust/rust.hash                        |   6 +-
>  package/rust/rust.mk                          |   8 +-
>  .../config.in => rustc/cargo-config.in}       |   0
>  package/rustc/rustc.mk                        |  12 +
>  support/testing/tests/package/test_rust.py    |   2 -
>  18 files changed, 85 insertions(+), 474 deletions(-)
>  delete mode 100644 package/cargo-bin/cargo-bin.hash
>  delete mode 100644 package/cargo-bin/cargo-bin.mk
>  delete mode 100644 package/cargo/Config.in.host
>  delete mode 100644 package/cargo/cargo.hash
>  delete mode 100644 package/cargo/cargo.mk
>  delete mode 100644 package/rust/0001-Workaround-presence-of-LLVM-library-in-stage0-lib.patch
>  rename package/{cargo/config.in => rustc/cargo-config.in} (100%)
>
> --
> 2.24.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



--

Matthew Weber | Associate Director Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber@collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber@corp.rockwellcollins.com address.
Thomas Petazzoni July 27, 2020, 11:48 a.m. UTC | #2
Hello,

On Fri,  7 Feb 2020 19:08:19 +0100
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> wrote:

> Eric Le Bihan (7):
>   package/rust: build and install cargo
>   package/cargo-bin: install if rust-bin selected
>   package/rust-bin: host variant depends on host-cargo-bin
>   package/rust: drop dependency on host-cargo-bin
>   package/ripgrep: depends on host-rustc
>   package/cargo: drop package
>   docs/manual: cargo packages depend on host-rustc
> 
> Patrick Havelange (2):
>   package/rust: bump to 1.40
>   package/cargo-bin: remove and use cargo-bin from rust-bin package

Thanks a lot, I have applied the whole series.

One thing that I find strange is that host-rust-bin gets installed to
$(HOST_DIR) into the traditional places, and then when you build
host-rust, it installs *over* host-rust-bin. It was already like that
prior to your series, so this is not really a change, but I'm wondering
if we should clarify this. Related to this, this is also non very nice:

                echo 'cargo = "$(HOST_RUST_BIN_DIR)/cargo/bin/cargo"'; \
                echo 'rustc = "$(HOST_RUST_BIN_DIR)/rustc/bin/rustc"'; \

Here, we're pointing directly to the source directory of another
package, which we generally try to avoid.

So, I'm wondering if we shouldn't be installed host-rust-bin in some
unusual $(HOST_DIR) location, maybe $(HOST_DIR)/opt/rust-bin/ or
something like that.

Then:

 - If the host-rustc virtual package uses host-rust-bin as the
   provider, then we create the appropriate
   $(HOST_DIR)/bin/{rustc,cargo} symlinks to
   $(HOST_DIR)/opt/rust-bin/{rustc,cargo}

 - If the host-rustc virtual package uses host-rust as the provider,
   then host-rust will use $(HOST_DIR)/opt/rust-bin/ to build itself,
   and then will install $(HOST_DIR)/bin/{rustc,cargo}

Thoughts ?

Best regards,

Thomas