From 049f4db74d8bd4d5b3a811a24236a38a19ab83e7 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Tue, 20 May 2025 22:13:13 +0100 Subject: [PATCH] build: Use xtrace in bash scripts in Dockerfile --- docker/Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3029282f..44e74180 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,13 +18,14 @@ ARG LLVM_VERSION=19 # Line three: for xx-verify RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ -apt-get update && apt-get install -y \ + apt-get update && apt-get install -y \ clang-${LLVM_VERSION} lld-${LLVM_VERSION} pkg-config make jq \ curl git \ file # Create symlinks for LLVM tools RUN <> /etc/environment # Configure pkg-config RUN <> /etc/environment echo "PKG_CONFIG=/usr/bin/$(xx-info)-pkg-config" >> /etc/environment echo "PKG_CONFIG_ALLOW_CROSS=true" >> /etc/environment @@ -82,12 +85,14 @@ EOF # Configure cc to use clang version RUN <> /etc/environment echo "CXX=clang++" >> /etc/environment EOF # Cross-language LTO RUN <> /etc/environment echo "CXXFLAGS=-flto" >> /etc/environment # Linker is set to target-compatible clang by xx @@ -98,6 +103,7 @@ EOF ARG TARGET_CPU= RUN <> /etc/environment @@ -118,7 +124,6 @@ COPY . . ARG TARGETPLATFORM # Verify environment configuration -RUN cat /etc/environment RUN xx-cargo --print-target-triple # Conduwuit version info @@ -142,6 +147,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/app/target \ bash <<'EOF' set -o allexport + set -o xtrace . /etc/environment TARGET_DIR=($(cargo metadata --no-deps --format-version 1 | \ jq -r ".target_directory")) @@ -162,6 +168,7 @@ EOF RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git/db \ bash <<'EOF' + set -o xtrace mkdir /out/sbom typeset -A PACKAGES for BINARY in /out/sbin/*; do @@ -180,6 +187,7 @@ EOF # Extract dynamically linked dependencies RUN <