[Buildroot] [git commit] support/dependencies: require tar >= 1.35

Arnout Vandecappelle arnout at mind.be
Thu May 9 20:45:07 UTC 2024


commit: https://git.buildroot.net/buildroot/commit/?id=b11956fb6690e0083eab9f30b5dc146fc40c2d5f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

We can't stay in the past forever and ever...

Since tar 1.35, the way some fields (devmajor and devminor) are stored
has changed. These fields exist for each file in the tarball, but only
used for device nodes. In previous versions of GNU tar, they were set to
zero; since 1.35, they are set to empty.

Although this doesn't change anything about the content of the tarball,
and it will be extracted in exactly the same way regardless of the tar
version used for extracting, it does change the hash of the tarball.
Therefore, we have to
- make sure that the correct version of tar is used;
- update the format version so that the filename is different from
  before.

Increment all BR_FMT_VERSION by one.

Require tar >= 1.35 instead of < 1.35.

Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
[Arnout: also increment BR_FMT_VERSION and extend the commit message]
Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
---
 package/pkg-download.mk                |  8 ++++----
 support/dependencies/check-host-tar.sh | 19 ++++---------------
 2 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 61e565b002..4be45c9d12 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -20,10 +20,10 @@ export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES))
 
 # Version of the format of the archives we generate in the corresponding
 # download backend and post-process:
-BR_FMT_VERSION_git = -git3
-BR_FMT_VERSION_svn = -svn4
-BR_FMT_VERSION_go = -go1
-BR_FMT_VERSION_cargo = -cargo1
+BR_FMT_VERSION_git = -git4
+BR_FMT_VERSION_svn = -svn5
+BR_FMT_VERSION_go = -go2
+BR_FMT_VERSION_cargo = -cargo2
 
 DL_WRAPPER = support/download/dl-wrapper
 
diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
index 7d6b3bf688..271080e365 100755
--- a/support/dependencies/check-host-tar.sh
+++ b/support/dependencies/check-host-tar.sh
@@ -27,18 +27,12 @@ if [ -n "${version_bsd}" ] ; then
     exit 1
 fi
 
-# Minimal version = 1.27 (previous versions do not correctly unpack archives
-# containing hard-links if the --strip-components option is used or create
-# different gnu long link headers for path elements > 100 characters).
-major_min=1
-minor_min=27
-
-# Maximal version = 1.34 (1.35 changed devmajor/devminor for files)
+# Minimal version = 1.35 (1.35 changed devmajor/devminor for files)
 # https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00005.html
-major_max=1
-minor_max=34
+major_min=1
+minor_min=35
 
-if [ $major -lt $major_min -o $major -gt $major_max ]; then
+if [ $major -lt $major_min ]; then
 	# echo nothing: no suitable tar found
 	exit 1
 fi
@@ -48,10 +42,5 @@ if [ $major -eq $major_min -a $minor -lt $minor_min ]; then
 	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



More information about the buildroot mailing list