Skip to content

Commit

Permalink
Merge pull request #4120 from tgross35/docker-fixes
Browse files Browse the repository at this point in the history
ci: Update or patch Docker images
  • Loading branch information
tgross35 authored Nov 20, 2024
2 parents 2f931d9 + 0e8d8d2 commit cffbad3
Show file tree
Hide file tree
Showing 30 changed files with 80 additions and 48 deletions.
3 changes: 1 addition & 2 deletions ci/docker/aarch64-linux-android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.10
FROM ubuntu:24.10

RUN dpkg --add-architecture i386
RUN apt-get update
Expand All @@ -8,7 +8,6 @@ RUN apt-get install -y --no-install-recommends \
wget \
ca-certificates \
python3 \
python3-distutils \
unzip \
expect \
openjdk-8-jre \
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/aarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/aarch64-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
3 changes: 1 addition & 2 deletions ci/docker/arm-linux-androideabi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.10
FROM ubuntu:24.10

RUN dpkg --add-architecture i386
RUN apt-get update
Expand All @@ -8,7 +8,6 @@ RUN apt-get install -y --no-install-recommends \
wget \
ca-certificates \
python3 \
python3-distutils \
unzip \
expect \
openjdk-8-jre \
Expand Down
10 changes: 7 additions & 3 deletions ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
9 changes: 6 additions & 3 deletions ci/docker/arm-unknown-linux-musleabihf/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 4 additions & 1 deletion ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 1 addition & 2 deletions ci/docker/asmjs-unknown-emscripten/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,7 +14,6 @@ RUN apt-get install -y --no-install-recommends \
libc6-dev \
libxml2 \
python3 \
python3-distutils \
xz-utils \
bzip2

Expand Down
3 changes: 1 addition & 2 deletions ci/docker/i686-linux-android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.10
FROM ubuntu:24.10

RUN dpkg --add-architecture i386
RUN apt-get update
Expand All @@ -8,7 +8,6 @@ RUN apt-get install -y --no-install-recommends \
wget \
ca-certificates \
python3 \
python3-distutils \
unzip \
expect \
openjdk-8-jre \
Expand Down
11 changes: 8 additions & 3 deletions ci/docker/i686-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
11 changes: 7 additions & 4 deletions ci/docker/i686-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/loongarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/loongarch64-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 4 additions & 1 deletion ci/docker/powerpc-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/s390x-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/s390x-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
7 changes: 7 additions & 0 deletions ci/docker/sparc64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
3 changes: 1 addition & 2 deletions ci/docker/wasm32-unknown-emscripten/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,7 +17,6 @@ RUN apt-get install -y --no-install-recommends \
libc6-dev \
libxml2 \
python3 \
python3-distutils \
cmake \
sudo \
gdb \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/wasm32-wasip1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:24.04
FROM ubuntu:24.10

COPY wasi.sh /
RUN bash /wasi.sh
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/wasm32-wasip2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:24.04
FROM ubuntu:24.10

COPY wasi.sh /
RUN bash /wasi.sh
Expand Down
3 changes: 1 addition & 2 deletions ci/docker/x86_64-linux-android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.10
FROM ubuntu:24.10

RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -7,7 +7,6 @@ RUN apt-get update && \
gcc \
libc-dev \
python3 \
python3-distutils \
unzip

WORKDIR /android/
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/x86_64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/x86_64-unknown-linux-gnux32/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.10
FROM ubuntu:24.10

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
Expand Down
3 changes: 3 additions & 0 deletions ci/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4496,7 +4496,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 {
Expand Down
13 changes: 7 additions & 6 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down

0 comments on commit cffbad3

Please sign in to comment.