From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/7] ci: container: download and delete kvx.tgz in the same layer
Date: Wed, 26 Mar 2025 13:36:14 +0100 [thread overview]
Message-ID: <20250326123619.282897-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250326123619.282897-1-a.fatoum@pengutronix.de>
The results of each RUN instruction are saved to layer in the resulting
container. Having a separate RUN instruction to delete temporary files
thus only hides them at runtime, but the files are still there eating
up space.
The common wisdom is thus to combine creation, usage and deletion of
temporary files into a single RUN instruction.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
test/Containerfile | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/test/Containerfile b/test/Containerfile
index 94b3f618261c..246f50d5b648 100644
--- a/test/Containerfile
+++ b/test/Containerfile
@@ -65,12 +65,10 @@ RUN korg_crosstool_dl() { wget -nv -O - https://mirrors.edge.kernel.org/pub/tool
korg_crosstool_dl x86_64 ${GCC_VERSION} powerpc-linux && \
korg_crosstool_dl x86_64 ${GCC_VERSION} riscv64-linux
-RUN wget -nv -O kvx.tgz https://github.com/kalray/build-scripts/releases/download/v5.0.0/gcc-kalray-kvx-ubuntu-22.04-v5.0.0.tar.gz
-
-RUN echo "d27b3d6e6246f5debffee0bb01e77eb133bd32c658782a68a779cf9fb4c436bc kvx.tgz" | \
- sha256sum --check --status
-
-RUN tar -C /opt -xzf kvx.tgz && rm kvx.tgz
+RUN tgz_checksum_dl() { set -e; wget -nv -O archive.tgz "$1"; \
+ echo "$2 archive.tgz" | sha256sum --check --status; tar -C /opt -xzf archive.tgz; rm archive.tgz; } && \
+ tgz_checksum_dl https://github.com/kalray/build-scripts/releases/download/v5.0.0/gcc-kalray-kvx-ubuntu-22.04-v5.0.0.tar.gz \
+ d27b3d6e6246f5debffee0bb01e77eb133bd32c658782a68a779cf9fb4c436bc
RUN wget -nv "https://github.com/qemu/qemu/blob/v5.2.0/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin?raw=true" -O /usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.bin
--
2.39.5
next prev parent reply other threads:[~2025-03-26 12:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 12:36 [PATCH 0/7] ci: container: include musl and LLVM Ahmad Fatoum
2025-03-26 12:36 ` [PATCH 1/7] Revert "ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0" Ahmad Fatoum
2025-03-26 12:36 ` Ahmad Fatoum [this message]
2025-03-26 12:36 ` [PATCH 3/7] ci: container: don't leave labgrid checkout in /tmp Ahmad Fatoum
2025-03-26 12:36 ` [PATCH 4/7] ci: container: don't install recommended packages Ahmad Fatoum
2025-03-26 12:36 ` [PATCH 5/7] ci: container: run apt-get clean after installation Ahmad Fatoum
2025-03-26 12:36 ` [PATCH 6/7] ci: container: add musl-tools Ahmad Fatoum
2025-03-26 12:36 ` [PATCH 7/7] ci: container: install LLVM/clang Ahmad Fatoum
2025-03-27 9:21 ` [PATCH 0/7] ci: container: include musl and LLVM Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250326123619.282897-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox