All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 3/4] support/docker: add tar 1.35
Date: Thu,  6 Feb 2025 08:23:19 +0100	[thread overview]
Message-ID: <20250206072321.677851-3-peter@korsgaard.com> (raw)
In-Reply-To: <20250206072321.677851-1-peter@korsgaard.com>

Since commit b11956fb6690 ("support/dependencies: require tar >= 1.35"),
Buildroot will build host-tar if the host does not have >= 1.35 available,
so add it to the container to save build time.

Debian 12 only provides tar 1.34.  Tar 1.35 is available in testing - But
that then depends on a newer glibc, so instead build it from source using
the --disable-year2038 flag like we do for host-tar and install it into
/usr/local/bin so it shadows the Debian one.

This step runs as root (and needs to for make install), so add
FORCE_UNSAFE_CONFIGURE=1 as otherwise the configure script errors out.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 support/docker/Dockerfile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
index f6d3978f9b..e5e45d5a6f 100644
--- a/support/docker/Dockerfile
+++ b/support/docker/Dockerfile
@@ -12,6 +12,9 @@ LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \
       vendor="Buildroot" \
 description="Container with everything needed to run Buildroot"
 
+# We need tar >= 1.35
+ARG TAR_VERSION="1.35"
+
 # Setup environment
 ENV DEBIAN_FRONTEND noninteractive
 
@@ -56,6 +59,16 @@ RUN apt-get -o APT::Retries=3 install -y --no-install-recommends \
     apt-get -y autoremove && \
     apt-get -y clean
 
+# Build host-tar
+RUN curl -sfL https://ftpmirror.gnu.org/tar/tar-${TAR_VERSION}.tar.xz | \
+    tar -Jx -C /tmp && \
+    cd /tmp/tar-${TAR_VERSION} && \
+    FORCE_UNSAFE_CONFIGURE=1 ./configure \
+        --disable-year2028 && \
+    make && \
+    make install && \
+    rm -rf /tmp/tar-${TAR_VERSION}
+
 # To be able to generate a toolchain with locales, enable one UTF-8 locale
 RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
     /usr/sbin/locale-gen
-- 
2.39.5

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2025-02-06  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06  7:23 [Buildroot] [PATCH 1/4] support/docker: move to current bookworm (Debian 12) snapshot Peter Korsgaard
2025-02-06  7:23 ` [Buildroot] [PATCH 2/4] support/docker: add curl Peter Korsgaard
2025-02-06  7:23 ` Peter Korsgaard [this message]
2025-02-06  7:23 ` [Buildroot] [PATCH 4/4] .gitlab-ci.yml: use Debian 12-based container image with curl / tar 1.35 Peter Korsgaard
2025-02-06  8:36   ` Romain Naour via buildroot
2025-02-06  9:03     ` Peter Korsgaard
2025-02-06  9:19       ` Romain Naour via buildroot
2025-02-06 14:37         ` Peter Korsgaard
2025-02-09 21:22           ` Peter Korsgaard

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=20250206072321.677851-3-peter@korsgaard.com \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.