From 92adcb908fc83c1675c045aee9f50a54a49e1055 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Tue, 22 Oct 2024 18:10:03 -0300 Subject: [PATCH] feat: bump to Ubuntu 24.04 --- Dockerfile | 24 +++++++----------------- fs/Dockerfile | 29 +++++++++++++++-------------- rollup-http/.cargo/config.toml | 2 +- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4cf117d1..b9513135 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # -FROM ubuntu:22.04 AS tools-env +FROM ubuntu:24.04 AS tools-env ARG IMAGE_KERNEL_VERSION=v0.20.0 ARG LINUX_VERSION=6.5.13-ctsi-1 ARG LINUX_HEADERS_URLPATH=https://github.com/cartesi/image-kernel/releases/download/${IMAGE_KERNEL_VERSION}/linux-libc-dev-riscv64-cross-${LINUX_VERSION}-${IMAGE_KERNEL_VERSION}.deb @@ -32,38 +32,28 @@ apt-get update apt-get upgrade -y apt-get install -y --no-install-recommends \ dpkg-dev \ - g++-12 \ - gcc-12 \ + g++ \ + gcc \ make \ ca-certificates \ git \ wget \ + adduser \ libclang-dev \ pkg-config \ dpkg-cross \ - gcc-12-riscv64-linux-gnu \ - g++-12-riscv64-linux-gnu - -for tool in cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool; do - update-alternatives --install /usr/bin/riscv64-linux-gnu-$tool riscv64-linux-gnu-$tool /usr/bin/riscv64-linux-gnu-$tool-12 12 - update-alternatives --install /usr/bin/$tool $tool /usr/bin/$tool-12 12 -done -update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 12 + gcc-riscv64-linux-gnu \ + g++-riscv64-linux-gnu wget -O ${LINUX_HEADERS_FILEPATH} ${LINUX_HEADERS_URLPATH} echo "2723435e8b45d8fb7a79e9344f6dc517b3dbc08e03ac17baab311300ec475c08 ${LINUX_HEADERS_FILEPATH}" | sha256sum --check -apt-get install -y --no-install-recommends ${LINUX_HEADERS_FILEPATH} +apt-get install -y --no-install-recommends --allow-downgrades ${LINUX_HEADERS_FILEPATH} adduser developer -u 499 --gecos ",,," --disabled-password mkdir -p ${BUILD_BASE}/tools && chown -R developer:developer ${BUILD_BASE}/tools rm -rf /var/lib/apt/lists/* ${LINUX_HEADERS_FILEPATH} EOF -ENV RISCV_ARCH="rv64gc" -ENV RISCV_ABI="lp64d" -ENV CFLAGS="-march=$RISCV_ARCH -mabi=$RISCV_ABI" -ENV TOOLCHAIN_PREFIX="riscv64-linux-gnu-" - FROM tools-env AS builder COPY --chown=developer:developer sys-utils/ ${BUILD_BASE}/tools/sys-utils/ diff --git a/fs/Dockerfile b/fs/Dockerfile index ae3fb6b2..946cad7f 100644 --- a/fs/Dockerfile +++ b/fs/Dockerfile @@ -1,22 +1,23 @@ # Final image -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG TOOLS_DEB=machine-emulator-tools-v0.16.2.deb ADD ${TOOLS_DEB} /tmp/ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - busybox-static=1:1.30.1-7ubuntu3 \ - coreutils=8.32-4.1ubuntu1.2 \ - bash=5.1-6ubuntu1.1 \ - psmisc=23.4-2build3 \ - bc=1.07.1-3build1 \ - curl=7.81.0-1ubuntu1.18 \ - device-tree-compiler=1.6.1-1 \ - jq=1.6-2.1ubuntu3 \ - lua5.4=5.4.4-1 \ - lua-socket=3.0~rc1+git+ac3201d-6 \ - xxd=2:8.2.3995-1ubuntu2.19 \ - file=1:5.41-3ubuntu0.1 \ - stress-ng=0.13.12-2ubuntu1 \ + busybox-static=1:1.36.1-6ubuntu3.1 \ + coreutils=9.4-3ubuntu6 \ + bash=5.2.21-2ubuntu4 \ + psmisc=23.7-1build1 \ + bc=1.07.1-3ubuntu4 \ + curl=8.5.0-2ubuntu10.4 \ + device-tree-compiler=1.7.0-2build1 \ + jq=1.7.1-3build1 \ + lua5.4=5.4.6-3build2 \ + lua-socket=3.1.0-1 \ + xxd=2:9.1.0016-1ubuntu7.3 \ + file=1:5.45-3build1 \ + stress-ng=0.17.06-1build1 \ + libatomic1=14.2.0-4ubuntu2~24.04 \ /tmp/${TOOLS_DEB} \ && \ rm -rf /var/lib/apt/lists/* /tmp/${TOOLS_DEB} diff --git a/rollup-http/.cargo/config.toml b/rollup-http/.cargo/config.toml index b7f2f7bf..0f7bbea4 100644 --- a/rollup-http/.cargo/config.toml +++ b/rollup-http/.cargo/config.toml @@ -1,5 +1,5 @@ [target.riscv64gc-unknown-linux-gnu] -linker = "riscv64-linux-gnu-gcc-12" +linker = "riscv64-linux-gnu-gcc" [net] git-fetch-with-cli = true