]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
lcitool: use newer Rust for Debian and Ubuntu
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 2 May 2025 08:21:42 +0000 (10:21 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 May 2025 14:02:04 +0000 (16:02 +0200)
On Debian, the rustc-web package provides a newer Rust compiler (1.78)
for all architectures except mips64el.

On Ubuntu, Rust versions up to 1.80 (?) are available as of this writing
for both Jammy (22.04) and Noble (24.04).  However, the path to rustc
and rustdoc must be provided by hand to the configure script using
either command line arguments or environment variables.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
15 files changed:
docs/about/build-platforms.rst
scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml
scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml
tests/docker/dockerfiles/debian-amd64-cross.docker
tests/docker/dockerfiles/debian-arm64-cross.docker
tests/docker/dockerfiles/debian-armhf-cross.docker
tests/docker/dockerfiles/debian-i686-cross.docker
tests/docker/dockerfiles/debian-mips64el-cross.docker
tests/docker/dockerfiles/debian-mipsel-cross.docker
tests/docker/dockerfiles/debian-ppc64el-cross.docker
tests/docker/dockerfiles/debian-s390x-cross.docker
tests/docker/dockerfiles/debian.docker
tests/docker/dockerfiles/ubuntu2204.docker
tests/lcitool/mappings.yml
tests/lcitool/refresh

index c3651871d20fba8d5d3d749534dd9a050295becd..8ecbd6b26f7d0afcdb6ba8cf82bbf13d480f6c08 100644 (file)
@@ -118,9 +118,14 @@ Rust build dependencies
   include bindgen or have an older version, it is recommended to install
   a newer version using ``cargo install bindgen-cli``.
 
-  Developers may want to use Cargo-based tools in the QEMU source tree;
-  this requires Cargo 1.74.0.  Note that Cargo is not required in order
-  to build QEMU.
+  QEMU requires Rust 1.77.0.  This is available on all supported platforms
+  with one exception, namely the ``mips64el`` architecture on Debian bookworm.
+  For all other architectures, Debian bookworm provides a new-enough Rust
+  compiler in the ``rustc-web`` package.
+
+  Also, on Ubuntu 22.04 or 24.04 this requires the ``rustc-1.77``
+  (or newer) package.  The path to ``rustc`` and ``rustdoc`` must be
+  provided manually to the configure script.
 
 Optional build dependencies
   Build components whose absence does not affect the ability to build QEMU
index dbcd2e076dec69b09fc02fb165ec61670a705b39..f11e9808267e02e53984b716e8414ae8c96a5e1a 100644 (file)
@@ -114,7 +114,7 @@ packages:
   - python3-venv
   - python3-yaml
   - rpm2cpio
-  - rustc
+  - rustc-1.77
   - sed
   - socat
   - sparse
index 4b8ee3d885d5519daf96920870f7aa59778771fe..6559cb29343f9ba4441aa3a4944e19ce192ee41f 100644 (file)
@@ -112,7 +112,7 @@ packages:
   - python3-venv
   - python3-yaml
   - rpm2cpio
-  - rustc
+  - rustc-1.77
   - sed
   - socat
   - sparse
index 05355854285e0513529afebef2e2fbcb34b88966..081f3e00f7bc640c6fc1ad7819cbda66a4e5f146 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 6b1e4fc827977a43606c0eec4a8cb60c0accf25e..91c555a36e977b42af2f71ae64fbec862e0bfd9e 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index cf0fe63af91c10123c5c630eb6413209a2e6107e..f0e2efcda099f43bb228173a9fd4989ef432d2ad 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 1c84dfb9456d13dcae38ee7c8ce05705b86272da..025beb1ce25b72d6377c8406ea38c5eb8e0f01c5 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 257204eae483c5ce14c295c99d376a49bc95dcef..4a941dd870eeca3690d3d7d782e8b5be1d88dd57 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 395c84d65bcef9a096a68b133115f0fb47801e32..4d3e5d711bdc59e282ef088551dd4e81362d6fee 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 1ae227ccded709fb00bcea795ed2e6afe4bedee2..22b4457ba996ae8936299d9a4bc3637f2154b8df 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index afa81a57ba8d3aa4f459204368bd32a68f402890..13ec52c8ad0b728721768a7444200a284398b858 100644 (file)
@@ -50,7 +50,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 5b3bac43ccbe80713ce7cb2c60ed52650f723f01..0a57c1a1d3753f8875fe304e9cab94c4bc64ae9f 100644 (file)
@@ -122,7 +122,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-web \
                       sed \
                       socat \
                       sparse \
index 88ce4ef9a9d3556fce8bcc449a6a50b6fa11d48a..4a1cf2bdff3a1aee49156e1f624c0e1756ec1f04 100644 (file)
@@ -121,7 +121,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-venv \
                       python3-yaml \
                       rpm2cpio \
-                      rustc \
+                      rustc-1.77 \
                       sed \
                       socat \
                       sparse \
@@ -150,6 +150,7 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
+ENV RUSTC=/usr/bin/rustc-1.77
 ENV CARGO_HOME=/usr/local/cargo
 ENV PATH=$CARGO_HOME/bin:$PATH
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
index 74eb13d62b6e67777dc0865510ba3aedc61c1b4f..673baf3936787b37c31243e4f86ed4b1ba09d25d 100644 (file)
@@ -64,6 +64,11 @@ mappings:
   python3-wheel:
     OpenSUSELeap15: python311-pip
 
+  rust:
+    Debian12: rustc-web
+    Ubuntu2204: rustc-1.77
+    Ubuntu2404: rustc-1.77
+
 pypi_mappings:
   # Request more recent version
   meson:
index aa551aca9be265f6df5620691303bb72be0ec11d..8474ea822f4c87a3c174308ab2c046b3a71204cc 100755 (executable)
@@ -141,7 +141,8 @@ fedora_rustup_nightly_extras = [
     'RUN $CARGO --list\n',
 ]
 
-ubuntu2204_bindgen_extras = [
+ubuntu2204_rust_extras = [
+    "ENV RUSTC=/usr/bin/rustc-1.77\n",
     "ENV CARGO_HOME=/usr/local/cargo\n",
     'ENV PATH=$CARGO_HOME/bin:$PATH\n',
     "RUN DEBIAN_FRONTEND=noninteractive eatmydata \\\n",
@@ -170,7 +171,7 @@ try:
     generate_dockerfile("fedora", "fedora-40")
     generate_dockerfile("opensuse-leap", "opensuse-leap-15")
     generate_dockerfile("ubuntu2204", "ubuntu-2204",
-                        trailer="".join(ubuntu2204_bindgen_extras))
+                        trailer="".join(ubuntu2204_rust_extras))
 
     #
     # Non-fatal Rust-enabled build