All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5 of 5] toolchain-external: use host-tar instead of tar to unpack toolchains
Date: Tue, 02 Aug 2011 20:33:19 +0200	[thread overview]
Message-ID: <fe06b4e821ed5f799078.1312309999@localhost6.localdomain6> (raw)
In-Reply-To: <patchbomb.1312309994@localhost6.localdomain6>

Using the system tar with --strip-components causes problems when its version is too old (<1.17). Even recent releases of RedHat/CentOS still ship with tar 1.15. To avoid such problems, always use host-tar instead of tar to unpack toolchains.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
To be honest, I'm not sure what the best way is to handle this. The same problems with tar could occur in other places than just external toolchains. So maybe we should use host-tar in more places.
On the other hand, most users have a recent, working, tar version on there system. It may thus make more sense to detect the system tar version and only use host-tar if it's too old.

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -155,7 +155,7 @@
 endif
 
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
-TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(TOOLCHAIN_EXTERNAL_DIR)/.extracted
+TOOLCHAIN_EXTERNAL_DEPENDENCIES = host-tar $(TOOLCHAIN_EXTERNAL_DIR)/.extracted
 else
 TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(STAMP_DIR)/ext-toolchain-checked
 endif
@@ -227,9 +227,9 @@
 $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2)
 	mkdir -p $(@D)
 	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_1))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) | \
-		$(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
+		$(HOST_TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
 	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_2))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2) | \
-		$(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
+		$(HOST_TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
 ifeq ($(TOOLCHAIN_EXTERNAL_PREFIX),bfin-uclinux)
 	rm -rf $(TOOLCHAIN_EXTERNAL_DIR)/bfin-linux-uclibc
 	mv $(TOOLCHAIN_EXTERNAL_DIR)/bfin-uclinux $(TOOLCHAIN_EXTERNAL_DIR)/tmp
@@ -249,7 +249,7 @@
 
 $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)
 	mkdir -p $(@D)
-	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(HOST_TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
 	$(Q)touch $@
 endif
 

  parent reply	other threads:[~2011-08-02 18:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 18:33 [Buildroot] [PATCH 0 of 5] toolchain-external: support downloading custom toolchains + related misc. fixes Thomas De Schampheleire
2011-08-02 18:33 ` [Buildroot] [PATCH 1 of 5] toolchain-external: allow downloading a custom toolchain Thomas De Schampheleire
2011-08-02 18:33 ` [Buildroot] [PATCH 2 of 5] Support URI schemes in DOWNLOAD function, when not using gentargets Thomas De Schampheleire
2011-08-02 18:33 ` [Buildroot] [PATCH 3 of 5] toolchain-external: fix some typos CodeSoucery -> CodeSourcery Thomas De Schampheleire
2011-08-04 19:47   ` Thomas Petazzoni
2011-08-04 19:57   ` Peter Korsgaard
2011-08-02 18:33 ` [Buildroot] [PATCH 4 of 5] tar: create a host version Thomas De Schampheleire
2011-08-02 18:33 ` Thomas De Schampheleire [this message]
2011-08-19  9:11   ` [Buildroot] [PATCH 5 of 5] toolchain-external: use host-tar instead of tar to unpack toolchains Thomas De Schampheleire
2011-09-21  6:55 [Buildroot] [PATCH 0 of 5] toolchain-external: improve support for custom toolchains Thomas De Schampheleire
2011-09-21  6:55 ` [Buildroot] [PATCH 5 of 5] toolchain-external: use host-tar instead of tar to unpack toolchains Thomas De Schampheleire
2011-09-21  8:02   ` Thomas Petazzoni
2011-09-21  8:35     ` Thomas De Schampheleire
2011-09-21 10:54       ` Michael S. Zick
2011-09-21 12:16         ` Thomas De Schampheleire
2011-09-22 20:02         ` Arnout Vandecappelle
2011-09-23  6:18           ` Thomas De Schampheleire

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=fe06b4e821ed5f799078.1312309999@localhost6.localdomain6 \
    --to=patrickdepinguin+buildroot@gmail.com \
    --cc=buildroot@busybox.net \
    /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.