build issues with BusyBox tar on Alpine
erik.joelsson at oracle.com
erik.joelsson at oracle.com
Wed Apr 27 16:52:01 UTC 2022
On 2022-04-27 06:55, Baesken, Matthias wrote:
> Hi, today I was running into build problems with busybox tar on Alpine Linux .
> When building “product-bundles” I get :
>
> /bin/tar: unrecognized option: I
> BusyBox v1.34.1 (2022-04-04 10:19:27 UTC) multi-call binary
> Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [LONGOPT]... [FILE]...
>
> Looks like the TAR_INCLUDE_PARAM is not correctly detected .
> We handle already some different tar implementations in autoconf/basic_tools.m4 but so far not BusyBox :
>
> if test "x$TAR_TYPE" = "xgnu"; then
> TAR_INCLUDE_PARAM="T"
> TAR_SUPPORTS_TRANSFORM="true"
> elif test "x$TAR_TYPE" = "aix"; then
> # -L InputList of aix tar: name of file listing the files and directories
> # that need to be archived or extracted
> TAR_INCLUDE_PARAM="L"
> TAR_SUPPORTS_TRANSFORM="false"
> else
> TAR_INCLUDE_PARAM="I"
> TAR_SUPPORTS_TRANSFORM="false"
> Fi
>
> So this leads us to I for TAR_INCLUDE_PARAM but seems Busybox tar has also T like gnutar :
>
> bash-5.1# tar -v
> BusyBox v1.34.1 (2022-04-04 10:19:27 UTC) multi-call binary.
>
> Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [LONGOPT]... [FILE]...
>
> Create, extract, or list files from a tar file
> ………………….
> -T FILE File with names to include
>
> Should we add logic to autoconf/basic_tools.m4 to handle Busybox tar and set TAR_INCLUDE_PARAM correctly ?
Seems like a reasonable suggestion.
/Erik
> My “workaround” was to additionally install gnu tar on my Alpine (this is available too ).
>
> (another option might be to add some kind of check , currently configure runs successfully but still the build fails which is not really nice 😉 ) !
>
> Best regards, Matthias
>
>
>
>
More information about the build-dev
mailing list