From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] check-host-tar.sh: blacklist tar 1.30+
Date: Mon, 26 Feb 2018 23:38:05 +0100 [thread overview]
Message-ID: <20180226223805.17496-2-peter@korsgaard.com> (raw)
In-Reply-To: <20180226223805.17496-1-peter@korsgaard.com>
Tar 1.30 changed the --numeric-owner output for filenames > 100 characters,
leading to hash mismatches for the tar archives we create ourselves from
git. This is really a fix for a bug in earlier tar versions regarding
deterministic output, so it is unlikely to be reverted in later versions.
To work around this issue, blacklist tar 1.30+ similar to how we do it for
pre-1.17 versions so Buildroot falls back to building host-tar.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
support/dependencies/check-host-tar.sh | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
index 932d3c4fb2..2143877524 100755
--- a/support/dependencies/check-host-tar.sh
+++ b/support/dependencies/check-host-tar.sh
@@ -30,13 +30,28 @@ fi
# containing hard-links if the --strip-components option is used).
major_min=1
minor_min=17
-if [ $major -gt $major_min ]; then
- echo $tar
-else
- if [ $major -eq $major_min -a $minor -ge $minor_min ]; then
- echo $tar
- else
- # echo nothing: no suitable tar found
- exit 1
- fi
+
+# Maximal version = 1.29 (1.30 changed --numeric-owner output for
+# filenames > 100 characters). This is really a fix for a bug in
+# earlier tar versions regarding deterministic output so it is
+# unlikely to be reverted in later versions.
+major_max=1
+minor_max=29
+
+if [ $major -lt $major_min -o $major -gt $major_max ]; then
+ # echo nothing: no suitable tar found
+ exit 1
fi
+
+if [ $major -eq $major_min -a $minor -lt $minor_min ]; then
+ # echo nothing: no suitable tar found
+ exit 1
+fi
+
+if [ $major -eq $major_max -a $minor -gt $minor_max ]; then
+ # echo nothing: no suitable tar found
+ exit 1
+fi
+
+# valid
+echo $tar
--
2.11.0
prev parent reply other threads:[~2018-02-26 22:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 22:38 [Buildroot] [PATCH 1/2] dependencies.mk: reverse check-host-*.mk include to work around lzip -> tar dependency Peter Korsgaard
2018-02-26 22:38 ` Peter Korsgaard [this message]
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=20180226223805.17496-2-peter@korsgaard.com \
--to=peter@korsgaard.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox