From e103585aaf435ccd6eba15fd564e7a3a7ab54697 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 19 Nov 2024 20:48:21 -0500 Subject: [PATCH 1/6] Change from `$(,)?` to `$(,)*` for ctest `ctest` sometimes reports a parsing failure but it isn't consistent (I do not know why). Just use a less ideal older syntax for now, this is an internal macro. (backport ) (cherry picked from commit 27ad99414328a0589edf9b0b86792004dcb6925f) --- src/macros.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index 19d567dfc3708..23fe345167100 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -197,13 +197,14 @@ macro_rules! e { // FIXME(ctest): ctest can't handle `const extern` functions, we should be able to remove this // cfg completely. +// FIXME(ctest): ctest can't handle `$(,)?` so we use `$(,)*` which isn't quite correct. cfg_if! { if #[cfg(feature = "const-extern-fn")] { /// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled. macro_rules! f { ($( $(#[$attr:meta])* - pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty + pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty $body:block )*) => ($( #[inline] @@ -217,7 +218,7 @@ cfg_if! { macro_rules! safe_f { ($( $(#[$attr:meta])* - pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty + pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty $body:block )*) => ($( #[inline] @@ -231,7 +232,7 @@ cfg_if! { macro_rules! const_fn { ($( $(#[$attr:meta])* - $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty + $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty $body:block )*) => ($( #[inline] @@ -245,7 +246,7 @@ cfg_if! { macro_rules! f { ($( $(#[$attr:meta])* - pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty + pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty $body:block )*) => ($( #[inline] @@ -259,7 +260,7 @@ cfg_if! { macro_rules! safe_f { ($( $(#[$attr:meta])* - pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty + pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty $body:block )*) => ($( #[inline] @@ -273,7 +274,7 @@ cfg_if! { macro_rules! const_fn { ($( $(#[$attr:meta])* - $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty + $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty $body:block )*) => ($( #[inline] From bbf696c50c28e1f8dffbc053b4a1ca67f8bd9d8d Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 20 Nov 2024 00:07:06 -0500 Subject: [PATCH 2/6] ci: Always run rustfmt Since 6ab46bb97c ("ci: Use some tricks..."), `rustfmt` is invoked manually on all files in `src`. However, this stopped running `cargo fmt` which covered everything that wasn't in `src`. This was unintentional so add it back. (backport ) (cherry picked from commit 96b6ec2c2cb6ebed6a67dcacef590aa06068a060) --- ci/style.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/style.sh b/ci/style.sh index d1b639db5bb89..17a47d037360a 100755 --- a/ci/style.sh +++ b/ci/style.sh @@ -14,6 +14,9 @@ rustc ci/style.rs && ./style src command -v rustfmt rustfmt -V +# Run once to cover everything that isn't in `src/` +cargo fmt + # Save a list of all source files tmpfile="file-list~" # trailing tilde for gitignore find src -name '*.rs' > "$tmpfile" From 09b8ed69d7dae6ebb40123d5044abe4ffdf90d24 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 20 Nov 2024 01:19:56 -0500 Subject: [PATCH 3/6] ci: Change 64-bit Docker images to ubuntu:24.10 23.10 is EOL so update to the latest stable version. This change excludes sparc which is stuck on an older version. (backport ) (cherry picked from commit 0c9abeff5569581f2f459524194b5bfca693bbd8) --- ci/docker/aarch64-linux-android/Dockerfile | 3 +-- ci/docker/aarch64-unknown-linux-gnu/Dockerfile | 3 ++- ci/docker/aarch64-unknown-linux-musl/Dockerfile | 2 +- ci/docker/arm-linux-androideabi/Dockerfile | 3 +-- ci/docker/asmjs-unknown-emscripten/Dockerfile | 3 +-- ci/docker/i686-linux-android/Dockerfile | 3 +-- ci/docker/loongarch64-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/loongarch64-unknown-linux-musl/Dockerfile | 2 +- ci/docker/powerpc64-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/s390x-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/s390x-unknown-linux-musl/Dockerfile | 2 +- ci/docker/wasm32-unknown-emscripten/Dockerfile | 3 +-- ci/docker/wasm32-wasip1/Dockerfile | 2 +- ci/docker/wasm32-wasip2/Dockerfile | 2 +- ci/docker/x86_64-linux-android/Dockerfile | 3 +-- ci/docker/x86_64-unknown-linux-gnu/Dockerfile | 3 ++- ci/docker/x86_64-unknown-linux-gnux32/Dockerfile | 3 ++- ci/docker/x86_64-unknown-linux-musl/Dockerfile | 2 +- 20 files changed, 23 insertions(+), 26 deletions(-) diff --git a/ci/docker/aarch64-linux-android/Dockerfile b/ci/docker/aarch64-linux-android/Dockerfile index 7b8bdcfdadb32..d6927e5cc80ec 100644 --- a/ci/docker/aarch64-linux-android/Dockerfile +++ b/ci/docker/aarch64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN dpkg --add-architecture i386 RUN apt-get update @@ -8,7 +8,6 @@ RUN apt-get install -y --no-install-recommends \ wget \ ca-certificates \ python3 \ - python3-distutils \ unzip \ expect \ openjdk-8-jre \ diff --git a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile index c94a7c63c0ea4..00569ddf22c9b 100644 --- a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 + RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev ca-certificates \ gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user diff --git a/ci/docker/aarch64-unknown-linux-musl/Dockerfile b/ci/docker/aarch64-unknown-linux-musl/Dockerfile index bc15db0692297..fd4c1e28f2525 100644 --- a/ci/docker/aarch64-unknown-linux-musl/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/arm-linux-androideabi/Dockerfile b/ci/docker/arm-linux-androideabi/Dockerfile index d0fb3176de7e7..9d6a5c9649832 100644 --- a/ci/docker/arm-linux-androideabi/Dockerfile +++ b/ci/docker/arm-linux-androideabi/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN dpkg --add-architecture i386 RUN apt-get update @@ -8,7 +8,6 @@ RUN apt-get install -y --no-install-recommends \ wget \ ca-certificates \ python3 \ - python3-distutils \ unzip \ expect \ openjdk-8-jre \ diff --git a/ci/docker/asmjs-unknown-emscripten/Dockerfile b/ci/docker/asmjs-unknown-emscripten/Dockerfile index d344cb1368f28..6f2d5ddfc78e1 100644 --- a/ci/docker/asmjs-unknown-emscripten/Dockerfile +++ b/ci/docker/asmjs-unknown-emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 # This is a workaround to avoid the interaction with tzdata. ENV DEBIAN_FRONTEND=noninteractive @@ -14,7 +14,6 @@ RUN apt-get install -y --no-install-recommends \ libc6-dev \ libxml2 \ python3 \ - python3-distutils \ xz-utils \ bzip2 diff --git a/ci/docker/i686-linux-android/Dockerfile b/ci/docker/i686-linux-android/Dockerfile index a78c7cb6e8457..0fb48aca342d4 100644 --- a/ci/docker/i686-linux-android/Dockerfile +++ b/ci/docker/i686-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN dpkg --add-architecture i386 RUN apt-get update @@ -8,7 +8,6 @@ RUN apt-get install -y --no-install-recommends \ wget \ ca-certificates \ python3 \ - python3-distutils \ unzip \ expect \ openjdk-8-jre \ diff --git a/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile b/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile index aebf7c0741956..16b4cf4bfd34e 100644 --- a/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/loongarch64-unknown-linux-musl/Dockerfile b/ci/docker/loongarch64-unknown-linux-musl/Dockerfile index c1219c034c81f..2efd095b0fddd 100644 --- a/ci/docker/loongarch64-unknown-linux-musl/Dockerfile +++ b/ci/docker/loongarch64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl gcc git libc6-dev make qemu-user xz-utils diff --git a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile index b5bf6e90dfbbd..76d8471a63aac 100644 --- a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile index f078a13e7c484..c4c6af25b8684 100644 --- a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile b/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile index 9ada79ac7273d..0624e2c102055 100644 --- a/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile +++ b/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/s390x-unknown-linux-gnu/Dockerfile b/ci/docker/s390x-unknown-linux-gnu/Dockerfile index 70856d78bb879..306d773a61165 100644 --- a/ci/docker/s390x-unknown-linux-gnu/Dockerfile +++ b/ci/docker/s390x-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/s390x-unknown-linux-musl/Dockerfile b/ci/docker/s390x-unknown-linux-musl/Dockerfile index d93eba4bd48e6..d103a1d7488e0 100644 --- a/ci/docker/s390x-unknown-linux-musl/Dockerfile +++ b/ci/docker/s390x-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/wasm32-unknown-emscripten/Dockerfile b/ci/docker/wasm32-unknown-emscripten/Dockerfile index 0e429c055b200..5af38ca5258db 100644 --- a/ci/docker/wasm32-unknown-emscripten/Dockerfile +++ b/ci/docker/wasm32-unknown-emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 # This is a workaround to avoid the interaction with tzdata. ENV DEBIAN_FRONTEND=noninteractive @@ -17,7 +17,6 @@ RUN apt-get install -y --no-install-recommends \ libc6-dev \ libxml2 \ python3 \ - python3-distutils \ cmake \ sudo \ gdb \ diff --git a/ci/docker/wasm32-wasip1/Dockerfile b/ci/docker/wasm32-wasip1/Dockerfile index e1318151d2e62..68940f4615a7e 100644 --- a/ci/docker/wasm32-wasip1/Dockerfile +++ b/ci/docker/wasm32-wasip1/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 +FROM ubuntu:24.10 COPY wasi.sh / RUN bash /wasi.sh diff --git a/ci/docker/wasm32-wasip2/Dockerfile b/ci/docker/wasm32-wasip2/Dockerfile index c433c491353f9..7abaaf54da02d 100644 --- a/ci/docker/wasm32-wasip2/Dockerfile +++ b/ci/docker/wasm32-wasip2/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 +FROM ubuntu:24.10 COPY wasi.sh / RUN bash /wasi.sh diff --git a/ci/docker/x86_64-linux-android/Dockerfile b/ci/docker/x86_64-linux-android/Dockerfile index d4e87b5f419fc..f6331f10f3897 100644 --- a/ci/docker/x86_64-linux-android/Dockerfile +++ b/ci/docker/x86_64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update && \ apt-get install -y --no-install-recommends \ @@ -7,7 +7,6 @@ RUN apt-get update && \ gcc \ libc-dev \ python3 \ - python3-distutils \ unzip WORKDIR /android/ diff --git a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile index aa5d5e043f9b1..b6ad33ebc7cb5 100644 --- a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 + RUN apt-get update RUN apt-get install -y --no-install-recommends \ gcc libc6-dev ca-certificates linux-headers-generic diff --git a/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile b/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile index 6cdc1942c50c7..f50af741db564 100644 --- a/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 + RUN apt-get update RUN apt-get install -y --no-install-recommends \ gcc-multilib libc6-dev ca-certificates diff --git a/ci/docker/x86_64-unknown-linux-musl/Dockerfile b/ci/docker/x86_64-unknown-linux-musl/Dockerfile index 7b65f5fa2a8c1..11fbd6e1be46a 100644 --- a/ci/docker/x86_64-unknown-linux-musl/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:23.10 +FROM ubuntu:24.10 RUN apt-get update RUN apt-get install -y --no-install-recommends \ From 96ffc1e25c3ef91773fbe0eadcfe1fbb95a75a16 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 20 Nov 2024 01:30:12 -0500 Subject: [PATCH 4/6] ci: Change 32-bit Docker images to use EOL repos (backport ) (cherry picked from commit 9830960c19c53b1527593413e0f55c8cfb067344) --- ci/docker/arm-unknown-linux-gnueabihf/Dockerfile | 10 +++++++--- ci/docker/arm-unknown-linux-musleabihf/Dockerfile | 9 ++++++--- ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile | 5 ++++- ci/docker/i686-unknown-linux-gnu/Dockerfile | 11 ++++++++--- ci/docker/i686-unknown-linux-musl/Dockerfile | 11 +++++++---- ci/docker/powerpc-unknown-linux-gnu/Dockerfile | 5 ++++- 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile b/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile index 977acabf4b6ba..8f2d3ea80d065 100644 --- a/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile +++ b/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile @@ -1,7 +1,11 @@ FROM ubuntu:23.10 -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc libc6-dev ca-certificates \ - gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user + +# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time +RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ + /etc/apt/sources.list && \ + apt-get update && apt-get install -y --no-install-recommends \ + gcc libc6-dev ca-certificates \ + gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \ CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \ PATH=$PATH:/rust/bin diff --git a/ci/docker/arm-unknown-linux-musleabihf/Dockerfile b/ci/docker/arm-unknown-linux-musleabihf/Dockerfile index 1709699997e7f..f8a5d27df3b5f 100644 --- a/ci/docker/arm-unknown-linux-musleabihf/Dockerfile +++ b/ci/docker/arm-unknown-linux-musleabihf/Dockerfile @@ -1,8 +1,11 @@ FROM ubuntu:23.10 -RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc make libc6-dev git curl ca-certificates \ - gcc-arm-linux-gnueabihf qemu-user +# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time +RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ + /etc/apt/sources.list && \ + apt-get update && apt-get install -y --no-install-recommends \ + gcc make libc6-dev git curl ca-certificates \ + gcc-arm-linux-gnueabihf qemu-user COPY install-musl.sh / RUN sh /install-musl.sh arm diff --git a/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile b/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile index 585fdc35ff542..330493f54a1d1 100644 --- a/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile +++ b/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile @@ -1,6 +1,9 @@ FROM ubuntu:23.10 -RUN apt-get update && apt-get install -y --no-install-recommends \ +# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time +RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ + /etc/apt/sources.list && \ + apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates qemu-system-arm curl \ xz-utils patch file diff --git a/ci/docker/i686-unknown-linux-gnu/Dockerfile b/ci/docker/i686-unknown-linux-gnu/Dockerfile index 6cdc1942c50c7..fae0b566d33fc 100644 --- a/ci/docker/i686-unknown-linux-gnu/Dockerfile +++ b/ci/docker/i686-unknown-linux-gnu/Dockerfile @@ -1,5 +1,10 @@ FROM ubuntu:23.10 -RUN apt-get update -RUN apt-get install -y --no-install-recommends \ - gcc-multilib libc6-dev ca-certificates + + +# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time +RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ + /etc/apt/sources.list && \ + apt-get update && apt-get install -y --no-install-recommends \ + gcc-multilib libc6-dev ca-certificates + ENV PATH=$PATH:/rust/bin diff --git a/ci/docker/i686-unknown-linux-musl/Dockerfile b/ci/docker/i686-unknown-linux-musl/Dockerfile index a54456fd9942b..4f36d2075485c 100644 --- a/ci/docker/i686-unknown-linux-musl/Dockerfile +++ b/ci/docker/i686-unknown-linux-musl/Dockerfile @@ -1,9 +1,12 @@ FROM ubuntu:23.10 -RUN dpkg --add-architecture i386 -RUN apt-get update -RUN apt-get install -y --no-install-recommends \ - gcc-multilib make libc6-dev git curl ca-certificates libc6-i386 + +# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time +RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ + /etc/apt/sources.list && \ + dpkg --add-architecture i386 && \ + apt-get update && apt-get install -y --no-install-recommends \ + gcc-multilib make libc6-dev git curl ca-certificates libc6-i386 COPY install-musl.sh / RUN sh /install-musl.sh i686 diff --git a/ci/docker/powerpc-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc-unknown-linux-gnu/Dockerfile index 930f0375db219..535202951d2ce 100644 --- a/ci/docker/powerpc-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc-unknown-linux-gnu/Dockerfile @@ -1,6 +1,9 @@ FROM ubuntu:23.10 -RUN apt-get update && apt-get install -y --no-install-recommends \ +# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time +RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ + /etc/apt/sources.list && \ + apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \ qemu-system-ppc From 1d5a76db0f44cf28b5f9d293725cf7fa50346b62 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 20 Nov 2024 01:46:45 -0500 Subject: [PATCH 5/6] tests: Ignore fields as required on Ubuntu 24.10 Recent versions of glibc adjusted the fields in `statvfs`. Update tests to ignore the differences. (backport ) (cherry picked from commit 2d206ecb14c5f220eb67db446d51a21ab7ae093e) --- libc-test/build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 4b5b7f41e3789..c8b1297d691ad 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4562,7 +4562,10 @@ fn test_linux(target: &str) { // `handle` is a VLA (struct_ == "fanotify_event_info_fid" && field == "handle") || // invalid application of 'sizeof' to incomplete type 'long unsigned int[]' - (musl && struct_ == "mcontext_t" && field == "__extcontext" && loongarch64) + (musl && struct_ == "mcontext_t" && field == "__extcontext" && loongarch64) || + // FIXME(#4121): a new field was added from `f_spare` + (struct_ == "statvfs" && field == "__f_spare") || + (struct_ == "statvfs64" && field == "__f_spare") }); cfg.skip_roundtrip(move |s| match s { From d0ba5015206502e9b544a68151c7321cb1694579 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 20 Nov 2024 02:16:37 -0500 Subject: [PATCH 6/6] ci: Add a note about the sparc Ubuntu version (backport ) (cherry picked from commit 0e8d8d2f9754ac330969eb928df863b405c74d09) --- ci/docker/sparc64-unknown-linux-gnu/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/docker/sparc64-unknown-linux-gnu/Dockerfile b/ci/docker/sparc64-unknown-linux-gnu/Dockerfile index ff6810a7fac58..4aff82ee46631 100644 --- a/ci/docker/sparc64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/sparc64-unknown-linux-gnu/Dockerfile @@ -1,3 +1,10 @@ +# FIXME(sparc): newer versions of Ubuntu get the following errors +# ``` +# /prog: /lib/sparc64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /prog) +# /prog: /lib/sparc64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /prog) +# ``` +# Not sure if this is a problem from rustc, our libc, or Ubuntu so we just +# stick with an old LTS for now. FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \