bug#81303: Build issue with busybox tar

Hendrik Donner via Bug reports for Automake <[email protected]> Thu, 25 Jun 2026 15:17:16 +0200
Newsgroups gmane.comp.sysutils.automake.bugs
Message-ID <[email protected]>
Hello,

busybox tar depending on configuration does support --version:

$ busybox tar --version
tar (busybox) 1.36.1

However in automake m4/tar.m4, for the plaintar case, the code tries to
detect GNU tar by checking the --version flag output:

(tar --version) >/dev/null 2>&1 && continue

This means busybox tar is detected as GNU tar and skipped, resulting in
eventually executing the none case and setting am__tar, am__tar_ and
am__untar all to false. The build later fails.

The line should be changed to

(tar --version | grep GNU) >/dev/null 2>&1 && continue

or maybe

(tar --version | grep -v busybox) >/dev/null 2>&1 && continue

or similar to fix the build.

Current GNU tar on my system has the following output for --version:

%:tar --version
tar (GNU tar) 1.35
Copyright © 2023 Free Software Foundation, Inc.
Licence GPLv3+: GNU GPL version 3 or later 
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

I'm directly building git commit
153298e27fa9414b25453440a2f36e1bb7bedfc1 (v1.18.1 tag).

Regards,
Hendrik