Re: [RFC PATCH 6/7] t5004: use GNU tar to avoid known issues with BSD tar
- Date: Mon, 26 Nov 2018 15:52:19 +0900
- From: Junio C Hamano <gitster@xxxxxxxxx>
- Subject: Re: [RFC PATCH 6/7] t5004: use GNU tar to avoid known issues with BSD tar
Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx> writes:
> 56ee96572a ("t5004: resurrect original empty tar archive test", 2013-05-09)
> added a test to try to detect and workaround issues with the standard tar
> from BSD, but at least in NetBSD would be better to instead require GNU tar
> which is available from pkgsrc
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
> t/t5004-archive-corner-cases.sh | 2 ++
> 1 file changed, 2 insertions(+)
> diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh
> index ced44355ca..baafc553f8 100755
> --- a/t/t5004-archive-corner-cases.sh
> +++ b/t/t5004-archive-corner-cases.sh
> @@ -31,6 +31,8 @@ test_lazy_prereq UNZIP_ZIP64_SUPPORT '
> "$GIT_UNZIP" -v | grep ZIP64_SUPPORT
> +test $uname_s = NetBSD && TAR="gtar"
This smells wrong.
Isn't the top-level Makefile ask you to use TAR=gtar if that is the
usable implementation of tar on your platform, and isn't what you
specify as $(TAR) exported down to the t/Makefile to be used here?
> # bsdtar/libarchive versions before 3.1.3 consider a tar file with a
> # global pax header that is not followed by a file record as corrupt.
> if "$TAR" tf "$TEST_DIRECTORY"/t5004/empty-with-pax-header.tar >/dev/null 2>&1