Subject: bug#13588: Pax hangs in case big UID

From: Pavel Raiskup <[email-masked]>
Date: Wed, 24 Apr 2013 14:54:36 +0200

Hi, thanks a lot for working on this!  I would like to point some notes,
sorry for doing it so late..

> diff --git a/m4/tar.m4 b/m4/tar.m4
> index ec8c83e..61c1206 100644
> --- a/m4/tar.m4
> +++ b/m4/tar.m4
> @@ -81,7 +81,31 @@ do
>    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
>    rm -rf conftest.dir
>    if test -s conftest.tar; then
> -    AM_RUN_LOG([$am__untar <conftest.tar])

We are dropping here the testing of unpack phase completely, I am not sure
whether this is intentional?

>    rm -rf conftest.dir
>    if test -s conftest.tar; then
> -    AM_RUN_LOG([$am__untar <conftest.tar])
> +    m4_if([$1], [ustar], [
> +      if test "$_am_tool" = pax; then

The problem here is not about pax utility, it is rather general problem;
there is not worth to check whether even the GNU tar works if we are requesting
'ustar' format of archive && $UID/$GID >= 2^21 (it will _always_ fail).

> [..skip..]

I would go rather for the approach of (a) check whether the
$UID/$GID > bigger than 2^21 and if yes, write some error output to *.log file
(don't try any archivers as they all should fail).

I would also add the advice to use 'pax' format (which is not currently
supported by 'pax' utility - it is quite funny - but GNU tar is OK here).

Pavel