support/dependencies: require tar >= 1.35

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@free.fr>
[Arnout: also increment BR_FMT_VERSION and extend the commit message]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
Yann E. MORIN 2024-05-04 23:40:18 +02:00 committed by Arnout Vandecappelle
parent c68d67bfad
commit b11956fb66
2 changed files with 8 additions and 19 deletions

View File

@ -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

View File

@ -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