From 28cdad300a517fa2d1b66c730aed33ebd0817d5d Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Wed, 8 Nov 2023 22:22:56 +0100 Subject: [PATCH] RISCV build databroker-cli - Adressing minor review comments Signed-off-by: Sebastian Schildt --- kuksa_databroker/Dockerfile | 6 ++++-- kuksa_databroker/Dockerfile-cli | 6 ++++-- kuksa_databroker/build-all-targets-cli.sh | 5 +++++ kuksa_databroker/build-all-targets.sh | 4 ++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/kuksa_databroker/Dockerfile b/kuksa_databroker/Dockerfile index 03c500e6..badaa829 100644 --- a/kuksa_databroker/Dockerfile +++ b/kuksa_databroker/Dockerfile @@ -31,8 +31,10 @@ COPY ./target/aarch64-unknown-linux-musl/release/databroker /app/databroker # RISCV is a glibc build. Rust toolchain not supported for MUSL -# Distroless has not RISCV support yet, using debian for now -#FROM gcr.io/distroless/base-debian12:debug as target-riscv64 +# Normally we prefer "distroless" base images, i.e.: +# FROM gcr.io/distroless/base-debian12:debug as target-riscv64 +# However, distorless has no RISCV support yet, +# (Nov 2023). Using debian unstable for now FROM riscv64/debian:sid-slim as target-riscv64 ENV BUILDTARGET="riscv64gc-unknown-linux-gnu" diff --git a/kuksa_databroker/Dockerfile-cli b/kuksa_databroker/Dockerfile-cli index f2dff009..8b5b3919 100644 --- a/kuksa_databroker/Dockerfile-cli +++ b/kuksa_databroker/Dockerfile-cli @@ -28,8 +28,10 @@ COPY ./target/aarch64-unknown-linux-musl/release/databroker-cli /app/databroker- # RISCV is a glibc build. Rust toolchain not supported for MUSL -# Distroless has not RISCV support yet, using debian for now -#FROM gcr.io/distroless/base-debian12:debug as target-riscv64 +# Normally we prefer "distroless" base images, i.e.: +# FROM gcr.io/distroless/base-debian12:debug as target-riscv64 +# However, distorless has no RISCV support yet, +# (Nov 2023). Using debian unstable for now FROM riscv64/debian:sid-slim as target-riscv64 ENV BUILDTARGET="riscv64gc-unknown-linux-gnu" COPY ./target/riscv64gc-unknown-linux-gnu/release/databroker-cli /app/databroker-cli diff --git a/kuksa_databroker/build-all-targets-cli.sh b/kuksa_databroker/build-all-targets-cli.sh index 0fc0a249..341ad631 100755 --- a/kuksa_databroker/build-all-targets-cli.sh +++ b/kuksa_databroker/build-all-targets-cli.sh @@ -1,10 +1,15 @@ #!/bin/bash # +# Copyright (c) 2023 Contributors to the Eclipse Foundation +# # Building all currently supported targets for databroker-cli. # Uses cross for cross-compiling. Needs to be executed # before docker build, as docker collects the artifacts # created by this script # this needs the have cross, cargo-license and createbom dependencies installed +# +# SPDX-License-Identifier: Apache-2.0 + # exit on error, to not waste any time set -e diff --git a/kuksa_databroker/build-all-targets.sh b/kuksa_databroker/build-all-targets.sh index 706d9796..b5d72b74 100755 --- a/kuksa_databroker/build-all-targets.sh +++ b/kuksa_databroker/build-all-targets.sh @@ -1,10 +1,14 @@ #!/bin/bash # +# Copyright (c) 2023 Contributors to the Eclipse Foundation +# # Building all currently supported targets. # Uses cross for cross-compiling. Needs to be executed # before docker build, as docker collects the artifacts # created by this script # this needs the have cross, cargo-license and createbom dependencies installed +# +# SPDX-License-Identifier: Apache-2.0 # exit on error, to not waste any time set -e