mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
support/docker: add tar 1.35
Since commit b11956fb66 ("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>
This commit is contained in:
@@ -12,6 +12,9 @@ LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \
|
|||||||
vendor="Buildroot" \
|
vendor="Buildroot" \
|
||||||
description="Container with everything needed to run Buildroot"
|
description="Container with everything needed to run Buildroot"
|
||||||
|
|
||||||
|
# We need tar >= 1.35
|
||||||
|
ARG TAR_VERSION="1.35"
|
||||||
|
|
||||||
# Setup environment
|
# Setup environment
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
@@ -57,6 +60,16 @@ RUN apt-get -o APT::Retries=3 install -y --no-install-recommends \
|
|||||||
apt-get -y autoremove && \
|
apt-get -y autoremove && \
|
||||||
apt-get -y clean
|
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
|
# 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 && \
|
RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
|
||||||
/usr/sbin/locale-gen
|
/usr/sbin/locale-gen
|
||||||
|
|||||||
Reference in New Issue
Block a user