GNU bug report logs - #13588
Pax hangs in case big UID

Previous Next

Package: automake;

Reported by: Petr Hracek <phracek <at> redhat.com>

Date: Wed, 30 Jan 2013 13:33:02 UTC

Severity: normal

Tags: patch

Merged with 8343

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13588 in the body.
You can then email your comments to 13588 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 30 Jan 2013 13:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petr Hracek <phracek <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Wed, 30 Jan 2013 13:33:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: bug-automake <at> gnu.org
Subject: Pax hangs in case big UID
Date: Wed, 30 Jan 2013 14:31:11 +0100
Dear folks,

I am trying to solve problem in case that user is created with big UID
and during configuration pax hangs and need user interaction.

Last list are:
http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html
https://bugzilla.redhat.com/show_bug.cgi?id=843376

Below patch to my previous correction
http://lists.gnu.org/archive/html/automake/2013-01/msg00079.html

It checks also command id whether it exists.
If id does not exists on (not Linux system) then we do not care about that.

Patch is bellow and against upstream:

diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..fc03e8e 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -23,6 +23,7 @@ AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
+AC_SUBST([AM_BIG_ID], [2097152])
 m4_if([$1], [v7],
      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 
xf -'],
      [m4_case([$1], [ustar],, [pax],,
@@ -33,6 +34,7 @@ _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax 
cpio none'
 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 # Do not fold the above two line into one, because Tru64 sh and
 # Solaris sh will not grok spaces in the rhs of '-'.
+ac_returnCode=0
 for _am_tool in $_am_tools
 do
   case $_am_tool in
@@ -79,13 +81,42 @@ do
   mkdir conftest.dir
   echo GrepMe > conftest.dir/file
   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  ac_return=$?
   rm -rf conftest.dir
+  if test $ac_return -ne 0; then
+      if test "$_am_tool" = "pax"; then
+            ac_returnCode=$ac_return
+            echo "pax return value is: $ac_returnCode"
+            break;
+    fi
+    if test "$_am_tool" = "gnutar"; then
+            ac_returnCode=$ac_return
+            echo "gnutar return value is: $ac_returnCode"
+            break;
+    fi
+  fi
   if test -s conftest.tar; then
     AM_RUN_LOG([$am__untar <conftest.tar])
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
 done
 rm -rf conftest.dir
+if test $ac_returnCode -ne 0; then
+  # Do not want to print user_id on screen
+  AC_CHECK_PROG([ID_TEST], id , [yes], [no])
+  if test x"$ID_TEST" = x"yes"; then
+    user_id=`id -u`
+    if test $? -eq 0; then
+        #Test if $user_id is greater then 2^21
+        #if yes then failed. This is valid only for pax and gnutar 
utilities
+        if test $user_id -gt $AM_BIG_ID ; then
+          AC_MSG_ERROR([The uid may be too big ...],[2])
+        fi
+    else
+        AC_MSG_WARN([id -u command was not found and check to id is 
suppressed])
+    fi
+  fi
+fi

 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 AC_MSG_RESULT([$am_cv_prog_tar_$1])])


Please check and incorporate them if you agree.

-- 
S pozdravem / Best regards

Petr Hracek

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 30 Jan 2013 13:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 30 Jan 2013 14:45:26 +0100
Hi Petr,

I have looked at this only cursory, but FWIW,

On 2013-01-30 14:31, Petr Hracek wrote:

*snip*

> +AC_SUBST([AM_BIG_ID], [2097152])

*snip*

> +        #Test if $user_id is greater then 2^21

s/then/than/
And please add a space after the comment hash-marks.

> +        #if yes then failed. This is valid only for pax and gnutar utilities
> +        if test $user_id -gt $AM_BIG_ID ; then

This should be "-ge", right? (and please zap the space before ";")

Cheers,
Peter





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 30 Jan 2013 14:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Peter Rosin <peda <at> lysator.liu.se>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 30 Jan 2013 15:47:33 +0100
On 01/30/2013 02:45 PM, Peter Rosin wrote:
> Hi Petr,
>
> I have looked at this only cursory, but FWIW,
>
> On 2013-01-30 14:31, Petr Hracek wrote:
>
> *snip*
>
>> +AC_SUBST([AM_BIG_ID], [2097152])
> *snip*
>
>> +        #Test if $user_id is greater then 2^21
> s/then/than/
> And please add a space after the comment hash-marks.
>
>> +        #if yes then failed. This is valid only for pax and gnutar utilities
>> +        if test $user_id -gt $AM_BIG_ID ; then
> This should be "-ge", right? (and please zap the space before ";")
>
> Cheers,
> Peter
>
>
>
>
Hello Peter,

-ge is right.

with id 2097151 (less by 1) all is working properly.

I will remember that conventions.

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 05 Feb 2013 12:03:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: bug-automake <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 05 Feb 2013 13:00:49 +0100
Hello Peter,

just a one question regarding that problem
Can that patch applicable?

Did you observe any problems on other platforms?

Thank you in advance

Best regards
Petr

On 01/30/2013 03:47 PM, Petr Hracek wrote:
> On 01/30/2013 02:45 PM, Peter Rosin wrote:
>> Hi Petr,
>>
>> I have looked at this only cursory, but FWIW,
>>
>> On 2013-01-30 14:31, Petr Hracek wrote:
>>
>> *snip*
>>
>>> +AC_SUBST([AM_BIG_ID], [2097152])
>> *snip*
>>
>>> +        #Test if $user_id is greater then 2^21
>> s/then/than/
>> And please add a space after the comment hash-marks.
>>
>>> +        #if yes then failed. This is valid only for pax and gnutar 
>>> utilities
>>> +        if test $user_id -gt $AM_BIG_ID ; then
>> This should be "-ge", right? (and please zap the space before ";")
>>
>> Cheers,
>> Peter
>>
>>
>>
>>
> Hello Peter,
>
> -ge is right.
>
> with id 2097151 (less by 1) all is working properly.
>
> I will remember that conventions.
>

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 05 Feb 2013 12:38:01 GMT) Full text and rfc822 format available.

Message #17 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 05 Feb 2013 13:35:50 +0100
Hi Petr!

On 2013-02-05 13:00, Petr Hracek wrote:
> just a one question regarding that problem
> Can that patch applicable?

As far as I can tell, the patch has other problems, but
since those would be more obvious to whomever was going to
shepherd this patch in (and I'm not what person) I didn't
point them out. E.g. I see little point in AC_SUBSTing
AM_BIG_ID, what's that for? But as I said, I'm not the
person to merge this, I don't feel qualified. Someone else
will have to do that.

> Did you observe any problems on other platforms?

As previously stated, I have just skimmed through it. I have
not tried it.

I apologize if my comments have been seen as a full review
and caused this patch to be left in limbo. That was not my
intention, but I should have stated it explicitly from the
beginning.

Cheers,
Peter





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 05 Feb 2013 12:45:01 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: bug-automake <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 05 Feb 2013 13:42:35 +0100
Hello Peter,

no problem, I will wait.
AC_SUBST is used for one place instance of the variable
so that we will modify (in future) only one row instead of several.
I hope that this is not too much general.

BR
Petr

On 02/05/2013 01:35 PM, Peter Rosin wrote:
> Hi Petr!
>
> On 2013-02-05 13:00, Petr Hracek wrote:
>> just a one question regarding that problem
>> Can that patch applicable?
> As far as I can tell, the patch has other problems, but
> since those would be more obvious to whomever was going to
> shepherd this patch in (and I'm not what person) I didn't
> point them out. E.g. I see little point in AC_SUBSTing
> AM_BIG_ID, what's that for? But as I said, I'm not the
> person to merge this, I don't feel qualified. Someone else
> will have to do that.
>
>> Did you observe any problems on other platforms?
> As previously stated, I have just skimmed through it. I have
> not tried it.
>
> I apologize if my comments have been seen as a full review
> and caused this patch to be left in limbo. That was not my
> intention, but I should have stated it explicitly from the
> beginning.
>
> Cheers,
> Peter
>
>
>
>

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 05 Feb 2013 13:53:01 GMT) Full text and rfc822 format available.

Message #23 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 05 Feb 2013 14:51:19 +0100
Hi Peter and Petr (no typo :-)

FYI, this patch is on my radar, and I intend to consider it (and
likely integrate and adjusted version of it) in the upcoming minor
version of Automake (1.13.2).

If you want to speed things up a bit and make the integration
work easier to us, you can present the patch as the output of
"git format-patch" rather than of "git diff", and add a clear
git commit message that explains the rationale and motivation
for the change.  That would be appreciated.

On 02/05/2013 01:42 PM, Petr Hracek wrote:
> Hello Peter,
> 
> no problem, I will wait.
> AC_SUBST is used for one place instance of the variable
> so that we will modify (in future) only one row instead of several.
>
I don't understand this rationale; and I agree with Peter that the
AC_SUBST call on AM_BIG_ID is unneeded; this should be just a shell
variable (and since it is used only internally by the automake
generated code, it should likely be renamed to something like
'am_big_id', or even '_am_big_id'.

There are other issues too, but I'll get to them when I'll do a proper
review.

> I hope that this is not too much general.
> 
> BR
> Petr

Thanks,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sun, 17 Feb 2013 15:35:02 GMT) Full text and rfc822 format available.

Message #26 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Sun, 17 Feb 2013 16:33:27 +0100
tags 13588 + patch
tags 8343 + patch
merge 13588 8343
thanks

Merging with bug#8343, since it's the same issue

Regards,
  Stefano





Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 17 Feb 2013 15:35:02 GMT) Full text and rfc822 format available.

Merged 8343 13588. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 17 Feb 2013 15:35:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 20 Mar 2013 11:09:02 GMT) Full text and rfc822 format available.

Message #33 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 20 Mar 2013 12:06:17 +0100
Hello Stefano,

in order to help you with that bug I have prepared patch for that issue:

diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..87477f1 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -81,6 +81,27 @@ do
   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
   rm -rf conftest.dir
   if test -s conftest.tar; then
+    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
+    if test x"$ID_TEST" = x"yes"; then
+      if test x"$1" = x"ustar" ; then
+         user_id=`id -u`
+         if test $? -eq 0; then
+           # Maximum allowed UID in case ustar format is 2097151.
+           if test $user_id -ge 2097152; then
+             AC_MSG_ERROR([The uid is big and not allowed in case of 
ustar format. Change format in configure.ac],[2])
+             exit 1
+           fi
+         fi
+         group_id=`id -g`
+         if test $? -eq 0; then
+           # Maximum allowed GID in case ustar format is 2097151
+           if test $group_id -ge 2097152; then
+             AC_MSG_ERROR([The gid is big and not allowed in case of 
ustar format. Change format in configure.ac],[2])
+             exit 1
+           fi
+         fi
+      fi
+    fi
     AM_RUN_LOG([$am__untar <conftest.tar])
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi

I would like to help you so that all issues like style, commit 
message,will be properly set.
If you agree I will commit that patch in accordance GNU coding style and 
HACKING file.

Best regards
Petr
On 02/05/2013 02:51 PM, Stefano Lattarini wrote:
> Hi Peter and Petr (no typo :-)
>
> FYI, this patch is on my radar, and I intend to consider it (and
> likely integrate and adjusted version of it) in the upcoming minor
> version of Automake (1.13.2).
>
> If you want to speed things up a bit and make the integration
> work easier to us, you can present the patch as the output of
> "git format-patch" rather than of "git diff", and add a clear
> git commit message that explains the rationale and motivation
> for the change.  That would be appreciated.
>
> On 02/05/2013 01:42 PM, Petr Hracek wrote:
>> Hello Peter,
>>
>> no problem, I will wait.
>> AC_SUBST is used for one place instance of the variable
>> so that we will modify (in future) only one row instead of several.
>>
> I don't understand this rationale; and I agree with Peter that the
> AC_SUBST call on AM_BIG_ID is unneeded; this should be just a shell
> variable (and since it is used only internally by the automake
> generated code, it should likely be renamed to something like
> 'am_big_id', or even '_am_big_id'.
>
> There are other issues too, but I'll get to them when I'll do a proper
> review.
>
>> I hope that this is not too much general.
>>
>> BR
>> Petr
> Thanks,
>    Stefano
>

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 20 Mar 2013 11:48:01 GMT) Full text and rfc822 format available.

Message #36 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 20 Mar 2013 12:45:59 +0100
Hello Stefano,

one more time. wrong patch file name.

[stone <at> kiasportyw automake(master)]$ cat 
0001-maint-pax-hangs-in-case-big-UID.patch
From af7d2d01b363914ce22628dae06f87065649d402 Mon Sep 17 00:00:00 2001
From: Petr Hracek <phracek <at> redhat.com>
Date: Wed, 20 Mar 2013 12:41:30 +0100
Subject: [PATCH] maint: pax hangs in case big UID

See automake bug #13588

* m4/tar.m4: check for ustar V7 archive format. Maximum value for user 
or group ID
is limited to 2097151
---
 m4/tar.m4 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..a7f41d6 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -81,6 +81,27 @@ do
   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
   rm -rf conftest.dir
   if test -s conftest.tar; then
+    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
+    if test x"$ID_TEST" = x"yes"; then
+      if test x"$1" = x"ustar" ; then
+         user_id=`id -u`
+         if test $? -eq 0; then
+           # Maximum allowed UID in case ustar format is 2097151
+           if test $user_id -ge 2097152; then
+             AC_MSG_ERROR([The uid is big and not allowed in case of 
ustar format. Change format in configure.ac],[2])
+             exit 1
+           fi
+         fi
+         group_id=`id -g`
+         if test $? -eq 0; then
+           # Maximum allowed GID in case ustar format is 2097151
+           if test $group_id -ge 2097152; then
+             AC_MSG_ERROR([The gid is big and not allowed in case of 
ustar format. Change format in configure.ac],[2])
+             exit 1
+           fi
+         fi
+      fi
+    fi
     AM_RUN_LOG([$am__untar <conftest.tar])
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
-- 
1.8.1.4

[stone <at> kiasportyw automake(master)]$
On 03/20/2013 12:06 PM, Petr Hracek wrote:
>
> diff --git a/m4/tar.m4 b/m4/tar.m4 

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 20 Mar 2013 11:58:01 GMT) Full text and rfc822 format available.

Message #39 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Jack Kelly <jack <at> jackkelly.name>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org, Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 20 Mar 2013 22:55:25 +1100
Hi Petr, I have a couple of observations:

- AC_MSG_ERROR is going to stop the configure anyway, so you don't need
  exit 1.

- I'd suggest the following messages for your AC_MSG_ERRORS:

  "the uid is too large for ustar-format tarfiles. Change format in
  configure.ac"

  "the gid is too large for ustar-format tarfiles. Change format in
  configure.ac"

- Is there a reason you've gone with "test -ge 2097152" instead of "test
  -gt 2097151"?

- Test for $1 = ustar first, so you only AC_CHECK_PROG for id when
  needed.

- You could merge some of those nested tests:

if test $? -eq 0 -a $user_id -gt 2097151; then
  AC_MSG_ERROR([...])
fi

- That argument can be conditionally expanded at m4 time, so it'll be a
  bit faster for end users to use an m4 conditional here.

- In fact, you might want to structure it like this:

m4_if($1, [ustar],
[AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
if test x"$am_prog_have_id" = x"yes"; then
  AC_MSG_CHECKING([if uid is small enough for ustar])
  user_id=`id -u`
  if test $? -eq 0 -a $user_id -gt 2097151; then
    AC_MSG_RESULT([yes])
  else
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([...])
  fi
  AC_MSG_CHECKING([if gid is small enough for ustar])
  group_id=`id -g`
  if test $? -eq 0 -a $group_id -gt 2097151; then
    AC_MSG_RESULT([yes])
  else
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([...])
  fi
fi])

But that's just my opinion, and Stefano's the one who vets the patches
around here.

Stefano: is this the sort of thing that should have
AC_MSG_CHECKING/AC_MSG_RESULT pairs? Also, have I got the m4 quoting
right?

-- Jack

Petr Hracek <phracek <at> redhat.com> writes:
> Hello Stefano,
> diff --git a/m4/tar.m4 b/m4/tar.m4
> index ec8c83e..87477f1 100644
> --- a/m4/tar.m4
> +++ b/m4/tar.m4
> @@ -81,6 +81,27 @@ do
>    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
>    rm -rf conftest.dir
>    if test -s conftest.tar; then
> +    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
> +    if test x"$ID_TEST" = x"yes"; then
> +      if test x"$1" = x"ustar" ; then
> +         user_id=`id -u`
> +         if test $? -eq 0; then
> +           # Maximum allowed UID in case ustar format is 2097151.
> +           if test $user_id -ge 2097152; then
> +             AC_MSG_ERROR([The uid is big and not allowed in case of
> ustar format. Change format in configure.ac],[2])
> +             exit 1
> +           fi
> +         fi
> +         group_id=`id -g`
> +         if test $? -eq 0; then
> +           # Maximum allowed GID in case ustar format is 2097151
> +           if test $group_id -ge 2097152; then
> +             AC_MSG_ERROR([The gid is big and not allowed in case of
> ustar format. Change format in configure.ac],[2])
> +             exit 1
> +           fi
> +         fi
> +      fi
> +    fi
>      AM_RUN_LOG([$am__untar <conftest.tar])
>      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>    fi
>
> I would like to help you so that all issues like style, commit
> message,will be properly set.
> If you agree I will commit that patch in accordance GNU coding style
> and HACKING file.
>
> Best regards
> Petr
> On 02/05/2013 02:51 PM, Stefano Lattarini wrote:
>> Hi Peter and Petr (no typo :-)
>>
>> FYI, this patch is on my radar, and I intend to consider it (and
>> likely integrate and adjusted version of it) in the upcoming minor
>> version of Automake (1.13.2).
>>
>> If you want to speed things up a bit and make the integration
>> work easier to us, you can present the patch as the output of
>> "git format-patch" rather than of "git diff", and add a clear
>> git commit message that explains the rationale and motivation
>> for the change.  That would be appreciated.
>>
>> On 02/05/2013 01:42 PM, Petr Hracek wrote:
>>> Hello Peter,
>>>
>>> no problem, I will wait.
>>> AC_SUBST is used for one place instance of the variable
>>> so that we will modify (in future) only one row instead of several.
>>>
>> I don't understand this rationale; and I agree with Peter that the
>> AC_SUBST call on AM_BIG_ID is unneeded; this should be just a shell
>> variable (and since it is used only internally by the automake
>> generated code, it should likely be renamed to something like
>> 'am_big_id', or even '_am_big_id'.
>>
>> There are other issues too, but I'll get to them when I'll do a proper
>> review.
>>
>>> I hope that this is not too much general.
>>>
>>> BR
>>> Petr
>> Thanks,
>>    Stefano
>>




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 20 Mar 2013 12:05:01 GMT) Full text and rfc822 format available.

Message #42 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Jack Kelly <jack <at> jackkelly.name>
Cc: 13588 <at> debbugs.gnu.org, Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 20 Mar 2013 13:02:36 +0100
Hello Jack,

that's sound better than my proposed patched.
It's shorter and  more understandable.

Yes you are right that user should be informed for testing ustar format.

Best regards
Petr


On 03/20/2013 12:55 PM, Jack Kelly wrote:
> Hi Petr, I have a couple of observations:
>
> - AC_MSG_ERROR is going to stop the configure anyway, so you don't need
>    exit 1.
>
> - I'd suggest the following messages for your AC_MSG_ERRORS:
>
>    "the uid is too large for ustar-format tarfiles. Change format in
>    configure.ac"
>
>    "the gid is too large for ustar-format tarfiles. Change format in
>    configure.ac"
>
> - Is there a reason you've gone with "test -ge 2097152" instead of "test
>    -gt 2097151"?
>
> - Test for $1 = ustar first, so you only AC_CHECK_PROG for id when
>    needed.
>
> - You could merge some of those nested tests:
>
> if test $? -eq 0 -a $user_id -gt 2097151; then
>    AC_MSG_ERROR([...])
> fi
>
> - That argument can be conditionally expanded at m4 time, so it'll be a
>    bit faster for end users to use an m4 conditional here.
>
> - In fact, you might want to structure it like this:
>
> m4_if($1, [ustar],
> [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
> if test x"$am_prog_have_id" = x"yes"; then
>    AC_MSG_CHECKING([if uid is small enough for ustar])
>    user_id=`id -u`
>    if test $? -eq 0 -a $user_id -gt 2097151; then
>      AC_MSG_RESULT([yes])
>    else
>      AC_MSG_RESULT([no])
>      AC_MSG_ERROR([...])
>    fi
>    AC_MSG_CHECKING([if gid is small enough for ustar])
>    group_id=`id -g`
>    if test $? -eq 0 -a $group_id -gt 2097151; then
>      AC_MSG_RESULT([yes])
>    else
>      AC_MSG_RESULT([no])
>      AC_MSG_ERROR([...])
>    fi
> fi])
>
> But that's just my opinion, and Stefano's the one who vets the patches
> around here.
>
> Stefano: is this the sort of thing that should have
> AC_MSG_CHECKING/AC_MSG_RESULT pairs? Also, have I got the m4 quoting
> right?
>
> -- Jack
>
> Petr Hracek <phracek <at> redhat.com> writes:
>> Hello Stefano,
>> diff --git a/m4/tar.m4 b/m4/tar.m4
>> index ec8c83e..87477f1 100644
>> --- a/m4/tar.m4
>> +++ b/m4/tar.m4
>> @@ -81,6 +81,27 @@ do
>>     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
>>     rm -rf conftest.dir
>>     if test -s conftest.tar; then
>> +    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
>> +    if test x"$ID_TEST" = x"yes"; then
>> +      if test x"$1" = x"ustar" ; then
>> +         user_id=`id -u`
>> +         if test $? -eq 0; then
>> +           # Maximum allowed UID in case ustar format is 2097151.
>> +           if test $user_id -ge 2097152; then
>> +             AC_MSG_ERROR([The uid is big and not allowed in case of
>> ustar format. Change format in configure.ac],[2])
>> +             exit 1
>> +           fi
>> +         fi
>> +         group_id=`id -g`
>> +         if test $? -eq 0; then
>> +           # Maximum allowed GID in case ustar format is 2097151
>> +           if test $group_id -ge 2097152; then
>> +             AC_MSG_ERROR([The gid is big and not allowed in case of
>> ustar format. Change format in configure.ac],[2])
>> +             exit 1
>> +           fi
>> +         fi
>> +      fi
>> +    fi
>>       AM_RUN_LOG([$am__untar <conftest.tar])
>>       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>>     fi
>>
>> I would like to help you so that all issues like style, commit
>> message,will be properly set.
>> If you agree I will commit that patch in accordance GNU coding style
>> and HACKING file.
>>
>> Best regards
>> Petr
>> On 02/05/2013 02:51 PM, Stefano Lattarini wrote:
>>> Hi Peter and Petr (no typo :-)
>>>
>>> FYI, this patch is on my radar, and I intend to consider it (and
>>> likely integrate and adjusted version of it) in the upcoming minor
>>> version of Automake (1.13.2).
>>>
>>> If you want to speed things up a bit and make the integration
>>> work easier to us, you can present the patch as the output of
>>> "git format-patch" rather than of "git diff", and add a clear
>>> git commit message that explains the rationale and motivation
>>> for the change.  That would be appreciated.
>>>
>>> On 02/05/2013 01:42 PM, Petr Hracek wrote:
>>>> Hello Peter,
>>>>
>>>> no problem, I will wait.
>>>> AC_SUBST is used for one place instance of the variable
>>>> so that we will modify (in future) only one row instead of several.
>>>>
>>> I don't understand this rationale; and I agree with Peter that the
>>> AC_SUBST call on AM_BIG_ID is unneeded; this should be just a shell
>>> variable (and since it is used only internally by the automake
>>> generated code, it should likely be renamed to something like
>>> 'am_big_id', or even '_am_big_id'.
>>>
>>> There are other issues too, but I'll get to them when I'll do a proper
>>> review.
>>>
>>>> I hope that this is not too much general.
>>>>
>>>> BR
>>>> Petr
>>> Thanks,
>>>     Stefano
>>>

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Thu, 21 Mar 2013 12:38:02 GMT) Full text and rfc822 format available.

Message #45 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Jack Kelly <jack <at> jackkelly.name>
Cc: 13588 <at> debbugs.gnu.org, Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Thu, 21 Mar 2013 13:35:18 +0100
Hello Jack and Stefano,

Bellow is corrected patch for automake.
Jack thank you for corrections. Now the patch looks like better.


From 98a64a309a0f7271d2772dd63e45e43b1163c315 Mon Sep 17 00:00:00 2001
From: Petr Hracek <phracek <at> redhat.com>
Date: Thu, 21 Mar 2013 13:27:39 +0100
Subject: [PATCH] maint: pax hangs in case big UID

See automake bug #13588

* m4/tar.m4: check for ustar V7 archive format. Maximum value for user 
or group ID
is limited to 2097151. Thanks to Jack Kelly for patch corrections
---
 m4/tar.m4 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..9b1d206 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -81,6 +81,28 @@ do
   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
   rm -rf conftest.dir
   if test -s conftest.tar; then
+    m4_if($1, [ustar],
+    [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
+    if test x"$am_prog_have_id" = x"yes"; then
+      AC_MSG_CHECKING([if uid is small enough for ustar])
+      user_id=`id -u`
+      # Maximum allowed UID in case ustar format is 2097151
+      if test $? -eq 0 -a $user_id -gt 2097151; then
+        AC_MSG_RESULT([no])
+        AC_MSG_ERROR([the uid is too large for ustar-format tarfiles. 
Change format in configure.ac],[2])
+      else
+        AC_MSG_RESULT([yes])
+      fi
+      AC_MSG_CHECKING([if gid is small enough for ustar])
+      group_id=`id -g`
+      # Maximum allowed GID in case ustar format is 2097151
+      if test $? -eq 0 -a $group_id -gt 2097151; then
+        AC_MSG_RESULT([no])
+        AC_MSG_ERROR([the gid is too large for ustar-format tarfiles. 
Change format in configure.ac],[2])
+      else
+        AC_MSG_RESULT([yes])
+      fi
+    fi])
     AM_RUN_LOG([$am__untar <conftest.tar])
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
-- 
1.8.1.4


On 03/20/2013 01:02 PM, Petr Hracek wrote:
> Hello Jack,
>
> that's sound better than my proposed patched.
> It's shorter and  more understandable.
>
> Yes you are right that user should be informed for testing ustar format.
>
> Best regards
> Petr
>
>
> On 03/20/2013 12:55 PM, Jack Kelly wrote:
>> Hi Petr, I have a couple of observations:
>>
>> - AC_MSG_ERROR is going to stop the configure anyway, so you don't need
>>    exit 1.
>>
>> - I'd suggest the following messages for your AC_MSG_ERRORS:
>>
>>    "the uid is too large for ustar-format tarfiles. Change format in
>>    configure.ac"
>>
>>    "the gid is too large for ustar-format tarfiles. Change format in
>>    configure.ac"
>>
>> - Is there a reason you've gone with "test -ge 2097152" instead of "test
>>    -gt 2097151"?
>>
>> - Test for $1 = ustar first, so you only AC_CHECK_PROG for id when
>>    needed.
>>
>> - You could merge some of those nested tests:
>>
>> if test $? -eq 0 -a $user_id -gt 2097151; then
>>    AC_MSG_ERROR([...])
>> fi
>>
>> - That argument can be conditionally expanded at m4 time, so it'll be a
>>    bit faster for end users to use an m4 conditional here.
>>
>> - In fact, you might want to structure it like this:
>>
>> m4_if($1, [ustar],
>> [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
>> if test x"$am_prog_have_id" = x"yes"; then
>>    AC_MSG_CHECKING([if uid is small enough for ustar])
>>    user_id=`id -u`
>>    if test $? -eq 0 -a $user_id -gt 2097151; then
>>      AC_MSG_RESULT([yes])
>>    else
>>      AC_MSG_RESULT([no])
>>      AC_MSG_ERROR([...])
>>    fi
>>    AC_MSG_CHECKING([if gid is small enough for ustar])
>>    group_id=`id -g`
>>    if test $? -eq 0 -a $group_id -gt 2097151; then
>>      AC_MSG_RESULT([yes])
>>    else
>>      AC_MSG_RESULT([no])
>>      AC_MSG_ERROR([...])
>>    fi
>> fi])
>>
>> But that's just my opinion, and Stefano's the one who vets the patches
>> around here.
>>
>> Stefano: is this the sort of thing that should have
>> AC_MSG_CHECKING/AC_MSG_RESULT pairs? Also, have I got the m4 quoting
>> right?
>>
>> -- Jack
>>
>> Petr Hracek <phracek <at> redhat.com> writes:
>>> Hello Stefano,
>>> diff --git a/m4/tar.m4 b/m4/tar.m4
>>> index ec8c83e..87477f1 100644
>>> --- a/m4/tar.m4
>>> +++ b/m4/tar.m4
>>> @@ -81,6 +81,27 @@ do
>>>     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
>>>     rm -rf conftest.dir
>>>     if test -s conftest.tar; then
>>> +    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
>>> +    if test x"$ID_TEST" = x"yes"; then
>>> +      if test x"$1" = x"ustar" ; then
>>> +         user_id=`id -u`
>>> +         if test $? -eq 0; then
>>> +           # Maximum allowed UID in case ustar format is 2097151.
>>> +           if test $user_id -ge 2097152; then
>>> +             AC_MSG_ERROR([The uid is big and not allowed in case of
>>> ustar format. Change format in configure.ac],[2])
>>> +             exit 1
>>> +           fi
>>> +         fi
>>> +         group_id=`id -g`
>>> +         if test $? -eq 0; then
>>> +           # Maximum allowed GID in case ustar format is 2097151
>>> +           if test $group_id -ge 2097152; then
>>> +             AC_MSG_ERROR([The gid is big and not allowed in case of
>>> ustar format. Change format in configure.ac],[2])
>>> +             exit 1
>>> +           fi
>>> +         fi
>>> +      fi
>>> +    fi
>>>       AM_RUN_LOG([$am__untar <conftest.tar])
>>>       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>>>     fi
>>>
>>> I would like to help you so that all issues like style, commit
>>> message,will be properly set.
>>> If you agree I will commit that patch in accordance GNU coding style
>>> and HACKING file.
>>>
>>> Best regards
>>> Petr
>>> On 02/05/2013 02:51 PM, Stefano Lattarini wrote:
>>>> Hi Peter and Petr (no typo :-)
>>>>
>>>> FYI, this patch is on my radar, and I intend to consider it (and
>>>> likely integrate and adjusted version of it) in the upcoming minor
>>>> version of Automake (1.13.2).
>>>>
>>>> If you want to speed things up a bit and make the integration
>>>> work easier to us, you can present the patch as the output of
>>>> "git format-patch" rather than of "git diff", and add a clear
>>>> git commit message that explains the rationale and motivation
>>>> for the change.  That would be appreciated.
>>>>
>>>> On 02/05/2013 01:42 PM, Petr Hracek wrote:
>>>>> Hello Peter,
>>>>>
>>>>> no problem, I will wait.
>>>>> AC_SUBST is used for one place instance of the variable
>>>>> so that we will modify (in future) only one row instead of several.
>>>>>
>>>> I don't understand this rationale; and I agree with Peter that the
>>>> AC_SUBST call on AM_BIG_ID is unneeded; this should be just a shell
>>>> variable (and since it is used only internally by the automake
>>>> generated code, it should likely be renamed to something like
>>>> 'am_big_id', or even '_am_big_id'.
>>>>
>>>> There are other issues too, but I'll get to them when I'll do a proper
>>>> review.
>>>>
>>>>> I hope that this is not too much general.
>>>>>
>>>>> BR
>>>>> Petr
>>>> Thanks,
>>>>     Stefano
>>>>
>

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 22 Mar 2013 01:42:01 GMT) Full text and rfc822 format available.

Message #48 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Jack Kelly <jack <at> jackkelly.name>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org, Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 22 Mar 2013 12:39:46 +1100
Petr Hracek <phracek <at> redhat.com> writes:

> Hello Jack and Stefano,
>
> Bellow is corrected patch for automake.
> Jack thank you for corrections. Now the patch looks like better.

Yes, it looks a lot better. I have more thoughts, if that's ok:

+      # Maximum allowed UID in case ustar format is 2097151

Put a link to
http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html so
it's clear where the number came from.

I'd do it like this (I've also removed the variable assignments for
$user_id and $group_id):

m4_if($1, [ustar],
[AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
if test x"$am_prog_have_id" = x"yes"; then
  # POSIX 1988 "ustar" format is defined with *fixed size* fields. There
  # is notably a 21 bits limit (2097151) for the uid and the gid.
  # http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html so
  am_ustar_max_id=2097151
  ...
  if test $? -eq 0 -a `id -u` -gt $am_ustar_max_id; then
    ...
])

What should the user be told? It's not really their fault that the
developer specified ustar-format archives, so perhaps the error message
should ask the user to run configure with a lower UID or ask the user to
ask upstream to stop using the ustar option.

-- Jack

> From 98a64a309a0f7271d2772dd63e45e43b1163c315 Mon Sep 17 00:00:00 2001
> From: Petr Hracek <phracek <at> redhat.com>
> Date: Thu, 21 Mar 2013 13:27:39 +0100
> Subject: [PATCH] maint: pax hangs in case big UID
>
> See automake bug #13588
>
> * m4/tar.m4: check for ustar V7 archive format. Maximum value for user
> or group ID
> is limited to 2097151. Thanks to Jack Kelly for patch corrections
> ---
>  m4/tar.m4 | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/m4/tar.m4 b/m4/tar.m4
> index ec8c83e..9b1d206 100644
> --- a/m4/tar.m4
> +++ b/m4/tar.m4
> @@ -81,6 +81,28 @@ do
>    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
>    rm -rf conftest.dir
>    if test -s conftest.tar; then
> +    m4_if($1, [ustar],
> +    [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
> +    if test x"$am_prog_have_id" = x"yes"; then
> +      AC_MSG_CHECKING([if uid is small enough for ustar])
> +      user_id=`id -u`
> +      # Maximum allowed UID in case ustar format is 2097151
> +      if test $? -eq 0 -a $user_id -gt 2097151; then
> +        AC_MSG_RESULT([no])
> +        AC_MSG_ERROR([the uid is too large for ustar-format
> tarfiles. Change format in configure.ac],[2])
> +      else
> +        AC_MSG_RESULT([yes])
> +      fi
> +      AC_MSG_CHECKING([if gid is small enough for ustar])
> +      group_id=`id -g`
> +      # Maximum allowed GID in case ustar format is 2097151
> +      if test $? -eq 0 -a $group_id -gt 2097151; then
> +        AC_MSG_RESULT([no])
> +        AC_MSG_ERROR([the gid is too large for ustar-format
> tarfiles. Change format in configure.ac],[2])
> +      else
> +        AC_MSG_RESULT([yes])
> +      fi
> +    fi])
>      AM_RUN_LOG([$am__untar <conftest.tar])
>      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>    fi
> -- 
> 1.8.1.4
>
>
> On 03/20/2013 01:02 PM, Petr Hracek wrote:
>> Hello Jack,
>>
>> that's sound better than my proposed patched.
>> It's shorter and  more understandable.
>>
>> Yes you are right that user should be informed for testing ustar format.
>>
>> Best regards
>> Petr
>>
>>
>> On 03/20/2013 12:55 PM, Jack Kelly wrote:
>>> Hi Petr, I have a couple of observations:
>>>
>>> - AC_MSG_ERROR is going to stop the configure anyway, so you don't need
>>>    exit 1.
>>>
>>> - I'd suggest the following messages for your AC_MSG_ERRORS:
>>>
>>>    "the uid is too large for ustar-format tarfiles. Change format in
>>>    configure.ac"
>>>
>>>    "the gid is too large for ustar-format tarfiles. Change format in
>>>    configure.ac"
>>>
>>> - Is there a reason you've gone with "test -ge 2097152" instead of "test
>>>    -gt 2097151"?
>>>
>>> - Test for $1 = ustar first, so you only AC_CHECK_PROG for id when
>>>    needed.
>>>
>>> - You could merge some of those nested tests:
>>>
>>> if test $? -eq 0 -a $user_id -gt 2097151; then
>>>    AC_MSG_ERROR([...])
>>> fi
>>>
>>> - That argument can be conditionally expanded at m4 time, so it'll be a
>>>    bit faster for end users to use an m4 conditional here.
>>>
>>> - In fact, you might want to structure it like this:
>>>
>>> m4_if($1, [ustar],
>>> [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
>>> if test x"$am_prog_have_id" = x"yes"; then
>>>    AC_MSG_CHECKING([if uid is small enough for ustar])
>>>    user_id=`id -u`
>>>    if test $? -eq 0 -a $user_id -gt 2097151; then
>>>      AC_MSG_RESULT([yes])
>>>    else
>>>      AC_MSG_RESULT([no])
>>>      AC_MSG_ERROR([...])
>>>    fi
>>>    AC_MSG_CHECKING([if gid is small enough for ustar])
>>>    group_id=`id -g`
>>>    if test $? -eq 0 -a $group_id -gt 2097151; then
>>>      AC_MSG_RESULT([yes])
>>>    else
>>>      AC_MSG_RESULT([no])
>>>      AC_MSG_ERROR([...])
>>>    fi
>>> fi])
>>>
>>> But that's just my opinion, and Stefano's the one who vets the patches
>>> around here.
>>>
>>> Stefano: is this the sort of thing that should have
>>> AC_MSG_CHECKING/AC_MSG_RESULT pairs? Also, have I got the m4 quoting
>>> right?
>>>
>>> -- Jack
>>>
>>> Petr Hracek <phracek <at> redhat.com> writes:
>>>> Hello Stefano,
>>>> diff --git a/m4/tar.m4 b/m4/tar.m4
>>>> index ec8c83e..87477f1 100644
>>>> --- a/m4/tar.m4
>>>> +++ b/m4/tar.m4
>>>> @@ -81,6 +81,27 @@ do
>>>>     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
>>>>     rm -rf conftest.dir
>>>>     if test -s conftest.tar; then
>>>> +    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
>>>> +    if test x"$ID_TEST" = x"yes"; then
>>>> +      if test x"$1" = x"ustar" ; then
>>>> +         user_id=`id -u`
>>>> +         if test $? -eq 0; then
>>>> +           # Maximum allowed UID in case ustar format is 2097151.
>>>> +           if test $user_id -ge 2097152; then
>>>> +             AC_MSG_ERROR([The uid is big and not allowed in case of
>>>> ustar format. Change format in configure.ac],[2])
>>>> +             exit 1
>>>> +           fi
>>>> +         fi
>>>> +         group_id=`id -g`
>>>> +         if test $? -eq 0; then
>>>> +           # Maximum allowed GID in case ustar format is 2097151
>>>> +           if test $group_id -ge 2097152; then
>>>> +             AC_MSG_ERROR([The gid is big and not allowed in case of
>>>> ustar format. Change format in configure.ac],[2])
>>>> +             exit 1
>>>> +           fi
>>>> +         fi
>>>> +      fi
>>>> +    fi
>>>>       AM_RUN_LOG([$am__untar <conftest.tar])
>>>>       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>>>>     fi
>>>>
>>>> I would like to help you so that all issues like style, commit
>>>> message,will be properly set.
>>>> If you agree I will commit that patch in accordance GNU coding style
>>>> and HACKING file.
>>>>
>>>> Best regards
>>>> Petr
>>>> On 02/05/2013 02:51 PM, Stefano Lattarini wrote:
>>>>> Hi Peter and Petr (no typo :-)
>>>>>
>>>>> FYI, this patch is on my radar, and I intend to consider it (and
>>>>> likely integrate and adjusted version of it) in the upcoming minor
>>>>> version of Automake (1.13.2).
>>>>>
>>>>> If you want to speed things up a bit and make the integration
>>>>> work easier to us, you can present the patch as the output of
>>>>> "git format-patch" rather than of "git diff", and add a clear
>>>>> git commit message that explains the rationale and motivation
>>>>> for the change.  That would be appreciated.
>>>>>
>>>>> On 02/05/2013 01:42 PM, Petr Hracek wrote:
>>>>>> Hello Peter,
>>>>>>
>>>>>> no problem, I will wait.
>>>>>> AC_SUBST is used for one place instance of the variable
>>>>>> so that we will modify (in future) only one row instead of several.
>>>>>>
>>>>> I don't understand this rationale; and I agree with Peter that the
>>>>> AC_SUBST call on AM_BIG_ID is unneeded; this should be just a shell
>>>>> variable (and since it is used only internally by the automake
>>>>> generated code, it should likely be renamed to something like
>>>>> 'am_big_id', or even '_am_big_id'.
>>>>>
>>>>> There are other issues too, but I'll get to them when I'll do a proper
>>>>> review.
>>>>>
>>>>>> I hope that this is not too much general.
>>>>>>
>>>>>> BR
>>>>>> Petr
>>>>> Thanks,
>>>>>     Stefano
>>>>>
>>




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sat, 20 Apr 2013 18:55:02 GMT) Full text and rfc822 format available.

Message #51 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Jack Kelly <jack <at> jackkelly.name>
Cc: Petr Hracek <phracek <at> redhat.com>, 13588 <at> debbugs.gnu.org,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Sat, 20 Apr 2013 20:50:00 +0200
tags 13588 + patch
stop

[+cc automake-patches]

Hi Jack, Petr, sorry for the ludicrous delay.

On 03/22/2013 02:39 AM, Jack Kelly wrote:
> Petr Hracek <phracek <at> redhat.com> writes:
> 
>> Hello Jack and Stefano,
>>
>> Bellow is corrected patch for automake.
>> Jack thank you for corrections. Now the patch looks like better.
> 
> Yes, it looks a lot better. I have more thoughts, if that's ok:
> 
> +      # Maximum allowed UID in case ustar format is 2097151
> 
> Put a link to
> http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html so
> it's clear where the number came from.
> 
> I'd do it like this (I've also removed the variable assignments for
> $user_id and $group_id):
> 
> m4_if($1, [ustar],
> [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
> if test x"$am_prog_have_id" = x"yes"; then
>   # POSIX 1988 "ustar" format is defined with *fixed size* fields. There
>   # is notably a 21 bits limit (2097151) for the uid and the gid.
>   # http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html so
>   am_ustar_max_id=2097151
>   ...
>   if test $? -eq 0 -a `id -u` -gt $am_ustar_max_id; then
>     ...
> ])
> 
> What should the user be told? It's not really their fault that the
> developer specified ustar-format archives, so perhaps the error message
> should ask the user to run configure with a lower UID or ask the user to
> ask upstream to stop using the ustar option.
>
I still believe that aborting the configure script just to signal the
user that he won't be able to run "make dist" (something only developers
do, usually) is unacceptable.  And in fact, the existing code in tar.m4,
upon failing to find a working tar/pax/whatever propgram good enough to
create a tarball, didn't cause configure to abort, but merely set some
variables to ensure the error would became apparent at "make dist" time.
I think the new code should keep this behaviour.

So, below is my first attempt of a patch.  It sill passes the Automake
testsuite, but before merging it I need to know it works correctly in
real-world problematic situation it is meant to address.  Petr, could
you give the patch a try and report back the results?

Thanks,
  Stefano

---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ----

From 12e62106381ead9467ef7fbe14940e32aa849a61 Mon Sep 17 00:00:00 2001
Message-Id: <12e62106381ead9467ef7fbe14940e32aa849a61.1366483309.git.stefano.lattarini <at> gmail.com>
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Sun, 17 Feb 2013 16:42:46 +0100
Subject: [PATCH] tar: pax could hang configure when big UID are involved

See automake bug#8343 and bug#13588.

Tom Rini tom_rini <at> mentor.com says (in bug#8343):

    When the user has a UID or GID that is larger than the ustar format
    supports, pax does not error out gracefully in some cases (FC13).

Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):

    When "configure" is run by a user with an UID bigger than 21 bits,
    BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
    archive and leaves an empty or corrupted conftest.tar file behind.
    In the next step, pax tries to extract this incomplete or corrupted
    archive and this *** hangs the whole ./configure script ***.

    Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
    silently truncates any big UID to its lower 21 bits. I don't know
    what can be the consequences of this lie.

Months later, Petr Hracek <phracek <at> redhat.com> reports a similar issue
(in bug#13588) for Fedora 17:

    I am trying to solve problem in case a user is created with big
    UID and during configuration pax hangs with message

        ATTENTION! pax archive volume change required.
        Ready for archive volume: 1
        Input archive name or "." to quit pax.
        Archive name >

    and needs user interaction.

    Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>

Time to fix this issue, on the line of a preliminary patch provided by
Petr Hracek in bug#13588.

* m4/tar.m4 (_AM_PROG_TAR): Don't use 'pax' if the UID or GID of the
current user is too high (> 2097151).
* NEWS: Update.
* THANKS: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 NEWS      |  6 ++++++
 THANKS    |  3 +++
 m4/tar.m4 | 30 +++++++++++++++++++++++++++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index f9a1fb1..863ffdf 100644
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,12 @@ New in 1.13.2:

 * Bugs fixed:

+  - When the 'ustar' option is used, the generated configure script no
+    longer risks hanging during the tests for the availability of the
+    'pax' utility, even if the user running configure has a UID or GID
+    that requires more than 21 bits to be represented.
+    See automake bug#8343 and bug#13588.
+
   - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
     again, as they did in Automake 1.12.x (albeit printing runtime
     warnings in the 'obsolete' category).  Removing them has turned
diff --git a/THANKS b/THANKS
index 66498d4..a574909 100644
--- a/THANKS
+++ b/THANKS
@@ -224,6 +224,7 @@ Luo Yi                          luoyi.ly <at> gmail.com
 Maciej Stachowiak               mstachow <at> mit.edu
 Maciej W. Rozycki               macro <at> ds2.pg.gda.pl
 Manu Rouat                      emmanuel.rouat <at> wanadoo.fr
+Marc Herbert                    marc.herbert <at> intel.com
 Marcus Brinkmann                Marcus.Brinkmann <at> ruhr-uni-bochum.de
 Marcus G. Daniels               mgd <at> ute.santafe.edu
 Marius Vollmer                  mvo <at> zagadka.ping.de
@@ -311,6 +312,7 @@ Peter Muir                      iyhi <at> yahoo.com
 Peter O'Gorman                  peter <at> pogma.com
 Peter Rosin                     peda <at> lysator.liu.se
 Peter Seiderer                  seiderer123 <at> ciselant.de
+Petr Hracek                     phracek <at> redhat.com
 Petter Reinholdtsen             pere <at> hungry.com
 Petteri Räty                    betelgeuse <at> gentoo.org
 Phil Edwards                    phil <at> jaj.com
@@ -391,6 +393,7 @@ Tim Rice                        tim <at> multitalents.net
 Tim Van Holder                  tim.van.holder <at> pandora.be
 Toshio Kuratomi                 toshio <at> tiki-lounge.com
 Tom Epperly                     tepperly <at> llnl.gov
+Tom Rini                        tom_rini <at> mentor.com
 Ulrich Drepper                  drepper <at> gnu.ai.mit.edu
 Ulrich Eckhardt                 eckhardt <at> satorlaser.com
 Václav Haisman                  V.Haisman <at> sh.cvut.cz
diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..8e85d03 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -81,7 +81,35 @@ 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])
+    m4_if([$1], [ustar], [
+      if test "$_am_tool" = pax; then
+        # Automake bugs #8343 and #13588: 'pax' can hang when UIDs
+        # or GIDs are involved that requires more than 21 bits to
+        # be stored.
+        am_max_uid=2097151 # 2^21 - 1
+        am_max_gid=$am_max_uid
+        # The $UID and $GID variables are not portable, so we need to
+        # resort to the POSIX-mandated id(1) utility.  Errors here are
+        # definitely unexpected, so allow the users to see them (i.e.,
+        # no stderr redirection).
+        am_uid=`id -u || echo unknown`
+        am_gid=`id -g || echo unknown`
+        AC_MSG_CHECKING([whether UID '$am_uid' is small enough for ustar])
+        if test $am_uid -le $am_max_uid; then
+          AC_MSG_RESULT([yes])
+        else
+          AC_MSG_RESULT([no])
+          continue
+        fi
+        AC_MSG_CHECKING([whether GID '$am_gid' is small enough for ustar])
+        if test $am_gid -le $am_max_gid; then
+          AC_MSG_RESULT([yes])
+        else
+          AC_MSG_RESULT([no])
+          continue
+        fi
+      fi
+    ]) # $1 == ustar
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
 done
-- 
1.8.2.1.389.gcaa7d79




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Mon, 22 Apr 2013 13:27:02 GMT) Full text and rfc822 format available.

Message #54 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13588 <at> debbugs.gnu.org,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Mon, 22 Apr 2013 15:21:33 +0200
Hello Stefano,

thanks for the patch. All is working properly.
User is informed that UID is not enough smaller and configure script 
does not failed.

Result is below:
test <at> localhost: ~/mycproject$ id
uid=17000000(test) gid=1001(test) groups=1001(test) 
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
test <at> localhost: ~/mycproject$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... checking whether UID 
'17000000' is small enough for ustar... no
none
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for pthread_create in -lpthread... yes
checking for pthread_join in -lpthread... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
test <at> localhost: ~/mycproject$


On 04/20/2013 08:50 PM, Stefano Lattarini wrote:
> tags 13588 + patch
> stop
>
> [+cc automake-patches]
>
> Hi Jack, Petr, sorry for the ludicrous delay.
>
> On 03/22/2013 02:39 AM, Jack Kelly wrote:
>> Petr Hracek <phracek <at> redhat.com> writes:
>>
>>> Hello Jack and Stefano,
>>>
>>> Bellow is corrected patch for automake.
>>> Jack thank you for corrections. Now the patch looks like better.
>> Yes, it looks a lot better. I have more thoughts, if that's ok:
>>
>> +      # Maximum allowed UID in case ustar format is 2097151
>>
>> Put a link to
>> http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html so
>> it's clear where the number came from.
>>
>> I'd do it like this (I've also removed the variable assignments for
>> $user_id and $group_id):
>>
>> m4_if($1, [ustar],
>> [AC_CHECK_PROG([am_prog_have_id], [id], [yes], [no])
>> if test x"$am_prog_have_id" = x"yes"; then
>>    # POSIX 1988 "ustar" format is defined with *fixed size* fields. There
>>    # is notably a 21 bits limit (2097151) for the uid and the gid.
>>    # http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.html so
>>    am_ustar_max_id=2097151
>>    ...
>>    if test $? -eq 0 -a `id -u` -gt $am_ustar_max_id; then
>>      ...
>> ])
>>
>> What should the user be told? It's not really their fault that the
>> developer specified ustar-format archives, so perhaps the error message
>> should ask the user to run configure with a lower UID or ask the user to
>> ask upstream to stop using the ustar option.
>>
> I still believe that aborting the configure script just to signal the
> user that he won't be able to run "make dist" (something only developers
> do, usually) is unacceptable.  And in fact, the existing code in tar.m4,
> upon failing to find a working tar/pax/whatever propgram good enough to
> create a tarball, didn't cause configure to abort, but merely set some
> variables to ensure the error would became apparent at "make dist" time.
> I think the new code should keep this behaviour.
>
> So, below is my first attempt of a patch.  It sill passes the Automake
> testsuite, but before merging it I need to know it works correctly in
> real-world problematic situation it is meant to address.  Petr, could
> you give the patch a try and report back the results?
>
> Thanks,
>    Stefano
>
> ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ---- >8 ----
>
>  From 12e62106381ead9467ef7fbe14940e32aa849a61 Mon Sep 17 00:00:00 2001
> Message-Id: <12e62106381ead9467ef7fbe14940e32aa849a61.1366483309.git.stefano.lattarini <at> gmail.com>
> From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> Date: Sun, 17 Feb 2013 16:42:46 +0100
> Subject: [PATCH] tar: pax could hang configure when big UID are involved
>
> See automake bug#8343 and bug#13588.
>
> Tom Rini tom_rini <at> mentor.com says (in bug#8343):
>
>      When the user has a UID or GID that is larger than the ustar format
>      supports, pax does not error out gracefully in some cases (FC13).
>
> Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):
>
>      When "configure" is run by a user with an UID bigger than 21 bits,
>      BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
>      archive and leaves an empty or corrupted conftest.tar file behind.
>      In the next step, pax tries to extract this incomplete or corrupted
>      archive and this *** hangs the whole ./configure script ***.
>
>      Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
>      silently truncates any big UID to its lower 21 bits. I don't know
>      what can be the consequences of this lie.
>
> Months later, Petr Hracek <phracek <at> redhat.com> reports a similar issue
> (in bug#13588) for Fedora 17:
>
>      I am trying to solve problem in case a user is created with big
>      UID and during configuration pax hangs with message
>
>          ATTENTION! pax archive volume change required.
>          Ready for archive volume: 1
>          Input archive name or "." to quit pax.
>          Archive name >
>
>      and needs user interaction.
>
>      Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>
>
> Time to fix this issue, on the line of a preliminary patch provided by
> Petr Hracek in bug#13588.
>
> * m4/tar.m4 (_AM_PROG_TAR): Don't use 'pax' if the UID or GID of the
> current user is too high (> 2097151).
> * NEWS: Update.
> * THANKS: Likewise.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> ---
>   NEWS      |  6 ++++++
>   THANKS    |  3 +++
>   m4/tar.m4 | 30 +++++++++++++++++++++++++++++-
>   3 files changed, 38 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index f9a1fb1..863ffdf 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -78,6 +78,12 @@ New in 1.13.2:
>
>   * Bugs fixed:
>
> +  - When the 'ustar' option is used, the generated configure script no
> +    longer risks hanging during the tests for the availability of the
> +    'pax' utility, even if the user running configure has a UID or GID
> +    that requires more than 21 bits to be represented.
> +    See automake bug#8343 and bug#13588.
> +
>     - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
>       again, as they did in Automake 1.12.x (albeit printing runtime
>       warnings in the 'obsolete' category).  Removing them has turned
> diff --git a/THANKS b/THANKS
> index 66498d4..a574909 100644
> --- a/THANKS
> +++ b/THANKS
> @@ -224,6 +224,7 @@ Luo Yi                          luoyi.ly <at> gmail.com
>   Maciej Stachowiak               mstachow <at> mit.edu
>   Maciej W. Rozycki               macro <at> ds2.pg.gda.pl
>   Manu Rouat                      emmanuel.rouat <at> wanadoo.fr
> +Marc Herbert                    marc.herbert <at> intel.com
>   Marcus Brinkmann                Marcus.Brinkmann <at> ruhr-uni-bochum.de
>   Marcus G. Daniels               mgd <at> ute.santafe.edu
>   Marius Vollmer                  mvo <at> zagadka.ping.de
> @@ -311,6 +312,7 @@ Peter Muir                      iyhi <at> yahoo.com
>   Peter O'Gorman                  peter <at> pogma.com
>   Peter Rosin                     peda <at> lysator.liu.se
>   Peter Seiderer                  seiderer123 <at> ciselant.de
> +Petr Hracek                     phracek <at> redhat.com
>   Petter Reinholdtsen             pere <at> hungry.com
>   Petteri Räty                    betelgeuse <at> gentoo.org
>   Phil Edwards                    phil <at> jaj.com
> @@ -391,6 +393,7 @@ Tim Rice                        tim <at> multitalents.net
>   Tim Van Holder                  tim.van.holder <at> pandora.be
>   Toshio Kuratomi                 toshio <at> tiki-lounge.com
>   Tom Epperly                     tepperly <at> llnl.gov
> +Tom Rini                        tom_rini <at> mentor.com
>   Ulrich Drepper                  drepper <at> gnu.ai.mit.edu
>   Ulrich Eckhardt                 eckhardt <at> satorlaser.com
>   Václav Haisman                  V.Haisman <at> sh.cvut.cz
> diff --git a/m4/tar.m4 b/m4/tar.m4
> index ec8c83e..8e85d03 100644
> --- a/m4/tar.m4
> +++ b/m4/tar.m4
> @@ -81,7 +81,35 @@ 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])
> +    m4_if([$1], [ustar], [
> +      if test "$_am_tool" = pax; then
> +        # Automake bugs #8343 and #13588: 'pax' can hang when UIDs
> +        # or GIDs are involved that requires more than 21 bits to
> +        # be stored.
> +        am_max_uid=2097151 # 2^21 - 1
> +        am_max_gid=$am_max_uid
> +        # The $UID and $GID variables are not portable, so we need to
> +        # resort to the POSIX-mandated id(1) utility.  Errors here are
> +        # definitely unexpected, so allow the users to see them (i.e.,
> +        # no stderr redirection).
> +        am_uid=`id -u || echo unknown`
> +        am_gid=`id -g || echo unknown`
> +        AC_MSG_CHECKING([whether UID '$am_uid' is small enough for ustar])
> +        if test $am_uid -le $am_max_uid; then
> +          AC_MSG_RESULT([yes])
> +        else
> +          AC_MSG_RESULT([no])
> +          continue
> +        fi
> +        AC_MSG_CHECKING([whether GID '$am_gid' is small enough for ustar])
> +        if test $am_gid -le $am_max_gid; then
> +          AC_MSG_RESULT([yes])
> +        else
> +          AC_MSG_RESULT([no])
> +          continue
> +        fi
> +      fi
> +    ]) # $1 == ustar
>       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>     fi
>   done


-- 
Best regards / S pozdravem Petr Hracek




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Mon, 22 Apr 2013 14:01:02 GMT) Full text and rfc822 format available.

Message #57 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Mon, 22 Apr 2013 15:55:46 +0200
Hi Peter, thanks for the feedback.

On 04/22/2013 03:21 PM, Petr Hracek wrote:
> Hello Stefano,
> 
> thanks for the patch. All is working properly.
> User is informed that UID is not enough smaller and configure script does not failed.
>
Good to know the logic is sound.  However, I now notice that there
is still a problem with the output of configure :-/  (details below).

> Result is below:
> test <at> localhost: ~/mycproject$ id
> uid=17000000(test) gid=1001(test) groups=1001(test) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> test <at> localhost: ~/mycproject$ ./configure
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking how to create a ustar tar archive... checking whether UID '17000000' is small enough for ustar... no
> none
>
Oops, there are two messages are crossing.  This is bad.
I think the best solution at this point is simply to report the too-high UID
only in the generated config.log rather than in the console output.  Updated
patch coming up soonish (I hope)...

Thanks,
   Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 23 Apr 2013 08:51:02 GMT) Full text and rfc822 format available.

Message #60 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 23 Apr 2013 10:45:43 +0200
On 04/22/2013 03:55 PM, Stefano Lattarini wrote:
> Hi Peter, thanks for the feedback.
> 
> On 04/22/2013 03:21 PM, Petr Hracek wrote:
>> Hello Stefano,
>>
>> thanks for the patch. All is working properly.
>> User is informed that UID is not enough smaller and configure script does not failed.
>>
> Good to know the logic is sound.  However, I now notice that there
> is still a problem with the output of configure :-/  (details below).
> 
>> Result is below:
>> test <at> localhost: ~/mycproject$ id
>> uid=17000000(test) gid=1001(test) groups=1001(test) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
>> test <at> localhost: ~/mycproject$ ./configure
>> checking for a BSD-compatible install... /usr/bin/install -c
>> checking whether build environment is sane... yes
>> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
>> checking for gawk... gawk
>> checking whether make sets $(MAKE)... yes
>> checking how to create a ustar tar archive... checking whether UID '17000000' is small enough for ustar... no
>> none
>>
> Oops, there are two messages are crossing.  This is bad.
> I think the best solution at this point is simply to report the too-high UID
> only in the generated config.log rather than in the console output.  Updated
> patch coming up soonish (I hope)...
> 
Here it is.  I'd appreciate further testing, if possible.

Thanks,
  Stefano

---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----

From bfb877d2337acfe3af1ef0d6e405f834a9287a37 Mon Sep 17 00:00:00 2001
Message-Id: <bfb877d2337acfe3af1ef0d6e405f834a9287a37.1366706596.git.stefano.lattarini <at> gmail.com>
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Sun, 17 Feb 2013 16:42:46 +0100
Subject: [PATCH] tar: pax could hang configure when big UID are involved

See automake bug#8343 and bug#13588.

Tom Rini tom_rini <at> mentor.com says (in bug#8343):

    When the user has a UID or GID that is larger than the ustar format
    supports, pax does not error out gracefully in some cases (FC13).

Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):

    When "configure" is run by a user with an UID bigger than 21 bits,
    BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
    archive and leaves an empty or corrupted conftest.tar file behind.
    In the next step, pax tries to extract this incomplete or corrupted
    archive and this *** hangs the whole ./configure script ***.

    Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
    silently truncates any big UID to its lower 21 bits. I don't know
    what can be the consequences of this lie.

Months later, Petr Hracek <phracek <at> redhat.com> reports a similar issue
(in bug#13588) for Fedora 17:

    I am trying to solve problem in case a user is created with big
    UID and during configuration pax hangs with message

        ATTENTION! pax archive volume change required.
        Ready for archive volume: 1
        Input archive name or "." to quit pax.
        Archive name >

    and needs user interaction.

    Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>

Time to fix this issue, on the line of a preliminary patch provided by
Petr Hracek in bug#13588.

* m4/tar.m4 (_AM_PROG_TAR): Don't use 'pax' if the UID or GID of the
current user is too high (> 2097151).
* NEWS: Update.
* THANKS: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 NEWS      |  6 ++++++
 THANKS    |  3 +++
 m4/tar.m4 | 26 +++++++++++++++++++++++++-
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index f9a1fb1..863ffdf 100644
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,12 @@ New in 1.13.2:

 * Bugs fixed:

+  - When the 'ustar' option is used, the generated configure script no
+    longer risks hanging during the tests for the availability of the
+    'pax' utility, even if the user running configure has a UID or GID
+    that requires more than 21 bits to be represented.
+    See automake bug#8343 and bug#13588.
+
   - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
     again, as they did in Automake 1.12.x (albeit printing runtime
     warnings in the 'obsolete' category).  Removing them has turned
diff --git a/THANKS b/THANKS
index 66498d4..a574909 100644
--- a/THANKS
+++ b/THANKS
@@ -224,6 +224,7 @@ Luo Yi                          luoyi.ly <at> gmail.com
 Maciej Stachowiak               mstachow <at> mit.edu
 Maciej W. Rozycki               macro <at> ds2.pg.gda.pl
 Manu Rouat                      emmanuel.rouat <at> wanadoo.fr
+Marc Herbert                    marc.herbert <at> intel.com
 Marcus Brinkmann                Marcus.Brinkmann <at> ruhr-uni-bochum.de
 Marcus G. Daniels               mgd <at> ute.santafe.edu
 Marius Vollmer                  mvo <at> zagadka.ping.de
@@ -311,6 +312,7 @@ Peter Muir                      iyhi <at> yahoo.com
 Peter O'Gorman                  peter <at> pogma.com
 Peter Rosin                     peda <at> lysator.liu.se
 Peter Seiderer                  seiderer123 <at> ciselant.de
+Petr Hracek                     phracek <at> redhat.com
 Petter Reinholdtsen             pere <at> hungry.com
 Petteri Räty                    betelgeuse <at> gentoo.org
 Phil Edwards                    phil <at> jaj.com
@@ -391,6 +393,7 @@ Tim Rice                        tim <at> multitalents.net
 Tim Van Holder                  tim.van.holder <at> pandora.be
 Toshio Kuratomi                 toshio <at> tiki-lounge.com
 Tom Epperly                     tepperly <at> llnl.gov
+Tom Rini                        tom_rini <at> mentor.com
 Ulrich Drepper                  drepper <at> gnu.ai.mit.edu
 Ulrich Eckhardt                 eckhardt <at> satorlaser.com
 Václav Haisman                  V.Haisman <at> sh.cvut.cz
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])
+    m4_if([$1], [ustar], [
+      if test "$_am_tool" = pax; then
+        # Automake bugs #8343 and #13588: 'pax' can hang when UIDs
+        # or GIDs are involved that requires more than 21 bits to
+        # be stored.
+        am_max_uid=2097151 # 2^21 - 1
+        am_max_gid=$am_max_uid
+        # The $UID and $GID variables are not portable, so we need to
+        # resort to the POSIX-mandated id(1) utility.  Errors here are
+        # definitely unexpected, so allow the users to see them (i.e.,
+        # no stderr redirection).
+        am_uid=`id -u || echo unknown`
+        am_gid=`id -g || echo unknown`
+        if test $am_uid -le $am_max_uid; then :; else
+          AS_ECHO(["$as_me:$LINENO: UID '$am_uid' too large for ustar"]) \
+            >&AS_MESSAGE_LOG_FD
+          continue
+        fi
+        if test $am_gid -le $am_max_gid; then :; else
+          AS_ECHO(["$as_me:$LINENO: GID '$am_gid' too large for ustar"]) \
+            >&AS_MESSAGE_LOG_FD
+          continue
+        fi
+      fi
+    ]) # $1 == ustar
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
 done
-- 
1.8.2.1.389.gcaa7d79




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 23 Apr 2013 15:10:01 GMT) Full text and rfc822 format available.

Message #63 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13588 <at> debbugs.gnu.org,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 23 Apr 2013 17:04:36 +0200
Hello Stefano,

I was a little bit busy.

From my point of view user is not informed that his UID is too big. I 
think that it should be mentioned and visible directly on the screen.
But as I mentioned it is my point of view.

Here are results:
test <at> kiasportyw: ~/mycproject$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... none
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for pthread_create in -lpthread... yes
checking for pthread_join in -lpthread... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
test <at> kiasportyw: ~/mycproject$

and in config.log file is mentioned:
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://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.
configure:2360: $? = 0
configure:2400: tardir=conftest.dir && eval tar --format=ustar -chf - 
"$tardir" >conftest.tar
tar: value 17000000 out of uid_t range 0..2097151
tar: Exiting with failure status due to previous errors
configure:2403: $? = 2
configure:2400: tardir=conftest.dir && eval pax -L -x ustar -w "$tardir" 
>conftest.tar
pax: Ustar header field is too small for conftest.dir
pax: Ustar header field is too small for conftest.dir/file
configure:2403: $? = 1
configure: 2421: UID '17000000' too large for ustar
configure:2400: tardir=conftest.dir && eval find "$tardir" -print | cpio 
-o -H ustar -L >conftest.tar
5 blocks
configure:2403: $? = 0
configure:2400: tardir=conftest.dir && eval false >conftest.tar
configure:2403: $? = 1
configure:2443: result: none
configure:2463: checking for style of include used by make
configure:2491: result: GNU
configure:2562: checking for gcc
configure:2578: found /usr/bin/gcc
configure:2589: result: gcc
configure:2818: checking for C compiler version
configure:2827: gcc --version >&5

Best regards
Petr
On 04/23/2013 10:45 AM, Stefano Lattarini wrote:
> On 04/22/2013 03:55 PM, Stefano Lattarini wrote:
>> Hi Peter, thanks for the feedback.
>>
>> On 04/22/2013 03:21 PM, Petr Hracek wrote:
>>> Hello Stefano,
>>>
>>> thanks for the patch. All is working properly.
>>> User is informed that UID is not enough smaller and configure script does not failed.
>>>
>> Good to know the logic is sound.  However, I now notice that there
>> is still a problem with the output of configure :-/  (details below).
>>
>>> Result is below:
>>> test <at> localhost: ~/mycproject$ id
>>> uid=17000000(test) gid=1001(test) groups=1001(test) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
>>> test <at> localhost: ~/mycproject$ ./configure
>>> checking for a BSD-compatible install... /usr/bin/install -c
>>> checking whether build environment is sane... yes
>>> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
>>> checking for gawk... gawk
>>> checking whether make sets $(MAKE)... yes
>>> checking how to create a ustar tar archive... checking whether UID '17000000' is small enough for ustar... no
>>> none
>>>
>> Oops, there are two messages are crossing.  This is bad.
>> I think the best solution at this point is simply to report the too-high UID
>> only in the generated config.log rather than in the console output.  Updated
>> patch coming up soonish (I hope)...
>>
> Here it is.  I'd appreciate further testing, if possible.
>
> Thanks,
>    Stefano
>
> ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----
>
>  From bfb877d2337acfe3af1ef0d6e405f834a9287a37 Mon Sep 17 00:00:00 2001
> Message-Id: <bfb877d2337acfe3af1ef0d6e405f834a9287a37.1366706596.git.stefano.lattarini <at> gmail.com>
> From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> Date: Sun, 17 Feb 2013 16:42:46 +0100
> Subject: [PATCH] tar: pax could hang configure when big UID are involved
>
> See automake bug#8343 and bug#13588.
>
> Tom Rini tom_rini <at> mentor.com says (in bug#8343):
>
>      When the user has a UID or GID that is larger than the ustar format
>      supports, pax does not error out gracefully in some cases (FC13).
>
> Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):
>
>      When "configure" is run by a user with an UID bigger than 21 bits,
>      BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
>      archive and leaves an empty or corrupted conftest.tar file behind.
>      In the next step, pax tries to extract this incomplete or corrupted
>      archive and this *** hangs the whole ./configure script ***.
>
>      Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
>      silently truncates any big UID to its lower 21 bits. I don't know
>      what can be the consequences of this lie.
>
> Months later, Petr Hracek <phracek <at> redhat.com> reports a similar issue
> (in bug#13588) for Fedora 17:
>
>      I am trying to solve problem in case a user is created with big
>      UID and during configuration pax hangs with message
>
>          ATTENTION! pax archive volume change required.
>          Ready for archive volume: 1
>          Input archive name or "." to quit pax.
>          Archive name >
>
>      and needs user interaction.
>
>      Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>
>
> Time to fix this issue, on the line of a preliminary patch provided by
> Petr Hracek in bug#13588.
>
> * m4/tar.m4 (_AM_PROG_TAR): Don't use 'pax' if the UID or GID of the
> current user is too high (> 2097151).
> * NEWS: Update.
> * THANKS: Likewise.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> ---
>   NEWS      |  6 ++++++
>   THANKS    |  3 +++
>   m4/tar.m4 | 26 +++++++++++++++++++++++++-
>   3 files changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index f9a1fb1..863ffdf 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -78,6 +78,12 @@ New in 1.13.2:
>
>   * Bugs fixed:
>
> +  - When the 'ustar' option is used, the generated configure script no
> +    longer risks hanging during the tests for the availability of the
> +    'pax' utility, even if the user running configure has a UID or GID
> +    that requires more than 21 bits to be represented.
> +    See automake bug#8343 and bug#13588.
> +
>     - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
>       again, as they did in Automake 1.12.x (albeit printing runtime
>       warnings in the 'obsolete' category).  Removing them has turned
> diff --git a/THANKS b/THANKS
> index 66498d4..a574909 100644
> --- a/THANKS
> +++ b/THANKS
> @@ -224,6 +224,7 @@ Luo Yi                          luoyi.ly <at> gmail.com
>   Maciej Stachowiak               mstachow <at> mit.edu
>   Maciej W. Rozycki               macro <at> ds2.pg.gda.pl
>   Manu Rouat                      emmanuel.rouat <at> wanadoo.fr
> +Marc Herbert                    marc.herbert <at> intel.com
>   Marcus Brinkmann                Marcus.Brinkmann <at> ruhr-uni-bochum.de
>   Marcus G. Daniels               mgd <at> ute.santafe.edu
>   Marius Vollmer                  mvo <at> zagadka.ping.de
> @@ -311,6 +312,7 @@ Peter Muir                      iyhi <at> yahoo.com
>   Peter O'Gorman                  peter <at> pogma.com
>   Peter Rosin                     peda <at> lysator.liu.se
>   Peter Seiderer                  seiderer123 <at> ciselant.de
> +Petr Hracek                     phracek <at> redhat.com
>   Petter Reinholdtsen             pere <at> hungry.com
>   Petteri Räty                    betelgeuse <at> gentoo.org
>   Phil Edwards                    phil <at> jaj.com
> @@ -391,6 +393,7 @@ Tim Rice                        tim <at> multitalents.net
>   Tim Van Holder                  tim.van.holder <at> pandora.be
>   Toshio Kuratomi                 toshio <at> tiki-lounge.com
>   Tom Epperly                     tepperly <at> llnl.gov
> +Tom Rini                        tom_rini <at> mentor.com
>   Ulrich Drepper                  drepper <at> gnu.ai.mit.edu
>   Ulrich Eckhardt                 eckhardt <at> satorlaser.com
>   Václav Haisman                  V.Haisman <at> sh.cvut.cz
> 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])
> +    m4_if([$1], [ustar], [
> +      if test "$_am_tool" = pax; then
> +        # Automake bugs #8343 and #13588: 'pax' can hang when UIDs
> +        # or GIDs are involved that requires more than 21 bits to
> +        # be stored.
> +        am_max_uid=2097151 # 2^21 - 1
> +        am_max_gid=$am_max_uid
> +        # The $UID and $GID variables are not portable, so we need to
> +        # resort to the POSIX-mandated id(1) utility.  Errors here are
> +        # definitely unexpected, so allow the users to see them (i.e.,
> +        # no stderr redirection).
> +        am_uid=`id -u || echo unknown`
> +        am_gid=`id -g || echo unknown`
> +        if test $am_uid -le $am_max_uid; then :; else
> +          AS_ECHO(["$as_me:$LINENO: UID '$am_uid' too large for ustar"]) \
> +            >&AS_MESSAGE_LOG_FD
> +          continue
> +        fi
> +        if test $am_gid -le $am_max_gid; then :; else
> +          AS_ECHO(["$as_me:$LINENO: GID '$am_gid' too large for ustar"]) \
> +            >&AS_MESSAGE_LOG_FD
> +          continue
> +        fi
> +      fi
> +    ]) # $1 == ustar
>       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
>     fi
>   done


-- 
Best regards / S pozdravem Petr Hracek




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 23 Apr 2013 19:43:02 GMT) Full text and rfc822 format available.

Message #66 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Petr Hracek <phracek <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 23 Apr 2013 21:37:39 +0200
On 04/23/2013 05:04 PM, Petr Hracek wrote:
> Hello Stefano,
> 
> I was a little bit busy.
>
No worries.

> From my point of view user is not informed that his UID is too big.
> I think that it should be mentioned and visible directly on the screen.
>
But then, following the same logic, we should also report the error from
GNU tar signaling that the UID is to big; this error is currently only
reported in the config.log as well:

  configure:2400: tardir=conftest.dir && eval tar --format=ustar -chf - \
    "$tardir" >conftest.tar
  tar: value 17000000 out of uid_t range 0..2097151

Still, I am quite neutral on this change, so I might accept a patch if
the other reviewers think it would be an improvement.

> But as I mentioned it is my point of view.
>
And you did well to bring it up; the worst that can happen is that we
agree to disagree :-)

> Here are results:
> test <at> kiasportyw: ~/mycproject$ ./configure
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking how to create a ustar tar archive... none
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking dependency style of gcc... gcc3
> checking for pthread_create in -lpthread... yes
> checking for pthread_join in -lpthread... yes
> checking for gcc... (cached) gcc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for gcc option to accept ISO C89... (cached) none needed
> checking dependency style of gcc... (cached) gcc3
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating src/Makefile
> config.status: executing depfiles commands
> test <at> kiasportyw: ~/mycproject$
> 
> and in config.log file is mentioned:
> tar (GNU tar) 1.26
> Copyright (C) 2011 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://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.
> configure:2360: $? = 0
> configure:2400: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar
> tar: value 17000000 out of uid_t range 0..2097151
> tar: Exiting with failure status due to previous errors
> configure:2403: $? = 2
> configure:2400: tardir=conftest.dir && eval pax -L -x ustar -w "$tardir" >conftest.tar
> pax: Ustar header field is too small for conftest.dir
> pax: Ustar header field is too small for conftest.dir/file
> configure:2403: $? = 1
> configure: 2421: UID '17000000' too large for ustar
> configure:2400: tardir=conftest.dir && eval find "$tardir" -print | cpio -o -H ustar -L >conftest.tar
> 5 blocks
> configure:2403: $? = 0
> configure:2400: tardir=conftest.dir && eval false >conftest.tar
> configure:2403: $? = 1
> configure:2443: result: none
> configure:2463: checking for style of include used by make
> configure:2491: result: GNU
> configure:2562: checking for gcc
> configure:2578: found /usr/bin/gcc
> configure:2589: result: gcc
> configure:2818: checking for C compiler version
> configure:2827: gcc --version >&5
> 
OK, at least the problem is correctly detected now!  I will merge the
patch in branch-1.13.2 soon, so that the fix will appear in the next
maintenance version of Automake (1.13.2).

> Best regards
> Petr

Thanks, and best regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 24 Apr 2013 13:00:07 GMT) Full text and rfc822 format available.

Message #69 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pavel Raiskup <praiskup <at> redhat.com>
To: bug-automake <at> gnu.org
Cc: 13588 <at> debbugs.gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>,
	Stefano Lattarini <stefano.lattarini <at> gmail.com>,
	Petr Hracek <phracek <at> redhat.com>,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
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





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Wed, 24 Apr 2013 13:00:10 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Thu, 25 Apr 2013 12:25:01 GMT) Full text and rfc822 format available.

Message #75 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>,
	Jack Kelly <jack <at> jackkelly.name>, bug-automake <at> gnu.org,
	Petr Hracek <phracek <at> redhat.com>,
	GNU bug tracker automated control server <control <at> debbugs.gnu.org>
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Thu, 25 Apr 2013 14:19:00 +0200
On 04/24/2013 02:54 PM, Pavel Raiskup wrote:
> Hi, thanks a lot for working on this!  I would like to point some notes,
> sorry for doing it so late..
>
No worries, I hadn't merged the patch yet.

>> 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?
>
Not intentional, I messed up.  Thanks for catching it!

>>    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).
>
Seems sensible.  Done something similar in the updated patch below.  The logic
and order of the checks are quite different from those in the previous version,
so reviews and testing are appreciated.

> 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).
>
I don't know, I'd rather not mess with historical Automake behaviour ...
Certainly not in a bug-fixing patch.  Still, it might be something
worth considering for Automake 2.0, in case someone is willing to write
the patches and report all the necessary explanations ;-)

> Pavel
> 

---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----

From d657168e8b7b8c166f022867aa3adc9024aabc77 Mon Sep 17 00:00:00 2001
Message-Id: <d657168e8b7b8c166f022867aa3adc9024aabc77.1366892178.git.stefano.lattarini <at> gmail.com>
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Sun, 17 Feb 2013 16:42:46 +0100
Subject: [PATCH] tar: pax could hang configure when big UID are involved

See automake bug#8343 and bug#13588.

Tom Rini tom_rini <at> mentor.com says (in bug#8343):

    When the user has a UID or GID that is larger than the ustar format
    supports, pax does not error out gracefully in some cases (FC13).

Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):

    When "configure" is run by a user with an UID bigger than 21 bits,
    BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
    archive and leaves an empty or corrupted conftest.tar file behind.
    In the next step, pax tries to extract this incomplete or corrupted
    archive and this *** hangs the whole ./configure script ***.

    Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
    silently truncates any big UID to its lower 21 bits. I don't know
    what can be the consequences of this lie.

Months later, Petr Hracek <phracek <at> redhat.com> reports a similar issue
(in bug#13588) for Fedora 17:

    I am trying to solve problem in case a user is created with big
    UID and during configuration pax hangs with message

        ATTENTION! pax archive volume change required.
        Ready for archive volume: 1
        Input archive name or "." to quit pax.
        Archive name >

    and needs user interaction.

    Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>

Time to fix this issue, on the line of a preliminary patch provided by
Petr Hracek in bug#13588.  The final patch ended up being remarkably
different from that original proposition, though.

* m4/tar.m4 (_AM_PROG_TAR): If the UID or GID of the current user is
too high (> 2097151), the 'ustar' format cannot work.  Adjust checks
accordingly.  Some related (minor) code reordering and clean-up.
* NEWS: Update.
* THANKS: Likewise.
* t/tar-ustar-id-too-high.sh: New test.
* t/list-of-tests.mk: Add it.
* t/tar2.sh: While at it, tweak and enhance a little.
* t/tar3.sh: Likewise.
* t/tar-override.sh: Likewise.

Helped-by: Pavel Raiskup <praiskup <at> redhat.com>
Helped-by: Petr Hracek <phracek <at> redhat.com>
Helped-by: Marc Herbert <marc.herbert <at> intel.com>
Helped-by: Tom Rini <tom_rini <at> mentor.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 NEWS                       |  6 ++++
 THANKS                     |  3 ++
 m4/tar.m4                  | 54 +++++++++++++++++++++++-----
 t/list-of-tests.mk         |  1 +
 t/tar-override.sh          | 12 ++++---
 t/tar-ustar-id-too-high.sh | 88 ++++++++++++++++++++++++++++++++++++++++++++++
 t/tar2.sh                  | 11 +++---
 t/tar3.sh                  | 10 +++---
 8 files changed, 163 insertions(+), 22 deletions(-)
 create mode 100755 t/tar-ustar-id-too-high.sh

diff --git a/NEWS b/NEWS
index f9a1fb1..863ffdf 100644
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,12 @@ New in 1.13.2:

 * Bugs fixed:

+  - When the 'ustar' option is used, the generated configure script no
+    longer risks hanging during the tests for the availability of the
+    'pax' utility, even if the user running configure has a UID or GID
+    that requires more than 21 bits to be represented.
+    See automake bug#8343 and bug#13588.
+
   - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
     again, as they did in Automake 1.12.x (albeit printing runtime
     warnings in the 'obsolete' category).  Removing them has turned
diff --git a/THANKS b/THANKS
index 66498d4..a574909 100644
--- a/THANKS
+++ b/THANKS
@@ -224,6 +224,7 @@ Luo Yi                          luoyi.ly <at> gmail.com
 Maciej Stachowiak               mstachow <at> mit.edu
 Maciej W. Rozycki               macro <at> ds2.pg.gda.pl
 Manu Rouat                      emmanuel.rouat <at> wanadoo.fr
+Marc Herbert                    marc.herbert <at> intel.com
 Marcus Brinkmann                Marcus.Brinkmann <at> ruhr-uni-bochum.de
 Marcus G. Daniels               mgd <at> ute.santafe.edu
 Marius Vollmer                  mvo <at> zagadka.ping.de
@@ -311,6 +312,7 @@ Peter Muir                      iyhi <at> yahoo.com
 Peter O'Gorman                  peter <at> pogma.com
 Peter Rosin                     peda <at> lysator.liu.se
 Peter Seiderer                  seiderer123 <at> ciselant.de
+Petr Hracek                     phracek <at> redhat.com
 Petter Reinholdtsen             pere <at> hungry.com
 Petteri Räty                    betelgeuse <at> gentoo.org
 Phil Edwards                    phil <at> jaj.com
@@ -391,6 +393,7 @@ Tim Rice                        tim <at> multitalents.net
 Tim Van Holder                  tim.van.holder <at> pandora.be
 Toshio Kuratomi                 toshio <at> tiki-lounge.com
 Tom Epperly                     tepperly <at> llnl.gov
+Tom Rini                        tom_rini <at> mentor.com
 Ulrich Drepper                  drepper <at> gnu.ai.mit.edu
 Ulrich Eckhardt                 eckhardt <at> satorlaser.com
 Václav Haisman                  V.Haisman <at> sh.cvut.cz
diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..4b728e6 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -23,16 +23,53 @@ AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_case([$1],
+
+  [v7],
+    [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [ustar],
+    [# Automake bugs #8343 and #13588: the ustar format doesn't support
+    # an UID or a GID that require more than 21 bits to be stored.
+    # In fact, the 'pax' utility can hang when such IDs are involved.
+    am_max_uid=2097151 # 2^21 - 1
+    am_max_gid=$am_max_uid
+    # The $UID and $GID variables are not portable, so we need to resort
+    # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls below
+    # are definitely unexpected, so allow the users to see them (that is,
+    # avoid stderr redirection).
+    am_uid=`id -u || echo unknown`
+    am_gid=`id -g || echo unknown`
+    AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+    if test $am_uid -le $am_max_uid; then
+       AC_MSG_RESULT([yes])
+    else
+       AC_MSG_RESULT([no])
+       _am_tools=none
+    fi
+    AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+    if test $am_gid -le $am_max_gid; then
+       AC_MSG_RESULT([yes])
+    else
+       AC_MSG_RESULT([no])
+       _am_tools=none
+    fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+AC_MSG_CHECKING([how to create a $1 tar archive])
+
+# Go ahead even if we have the value already cached.  We do so because we
+# need to set the values for the 'am__tar' and 'am__untar' variables.
 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
+
 for _am_tool in $_am_tools
 do
   case $_am_tool in
@@ -82,6 +119,7 @@ do
   rm -rf conftest.dir
   if test -s conftest.tar; then
     AM_RUN_LOG([$am__untar <conftest.tar])
+    AM_RUN_LOG([cat conftest.dir/file])
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
 done
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index f1e3dca..664a902 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1151,6 +1151,7 @@ t/tags-pr12372.sh \
 t/tar.sh \
 t/tar2.sh \
 t/tar3.sh \
+t/tar-ustar-id-too-high.sh \
 t/tar-override.sh \
 t/target-cflags.sh \
 t/targetclash.sh \
diff --git a/t/tar-override.sh b/t/tar-override.sh
index 863b9ab..e3e82ff 100755
--- a/t/tar-override.sh
+++ b/t/tar-override.sh
@@ -44,22 +44,24 @@ $AUTOCONF
 $AUTOMAKE
 ./configure

+clean_temp () { rm -f *.tar.* *has-run*; }
+
 $MAKE dist
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 ls | grep has-run && exit 1

-rm -f *.tar.* *has-run*
+clean_temp

 TAR="$cwd/am--tar foo" $MAKE distcheck
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 test "$(cat am--tar-has-run)" = foo

-rm -f *.tar.* *has-run*
+clean_temp

 TAR=; unset TAR
 # Creative use of eval to pacify maintainer checks.
 eval \$'MAKE dist "TAR=./am--tar mu"'
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 test "$(cat am--tar-has-run)" = mu

 :
diff --git a/t/tar-ustar-id-too-high.sh b/t/tar-ustar-id-too-high.sh
new file mode 100755
index 0000000..79ae89d
--- /dev/null
+++ b/t/tar-ustar-id-too-high.sh
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that UID or GID too high for the ustar format are correctly
+# rwcognized and diagnosed by configure.  See bug#8343 and bug#13588.
+
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([tar-ustar])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+run_configure()
+{
+  st=0; ./configure ${1+"$@"}  >stdout || st=$?
+  cat stdout || exit 1
+  test $st -eq 0 || exit 1
+}
+
+checked ()
+{
+  grep "^checking $1\.\.\. $2$" stdout
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir bin
+cat > bin/id <<'END'
+#!/bin/sh -e
+case "$*" in
+  -u) echo "${am_uid-1000}";;
+  -g) echo "${am_gid-1000}";;
+   *) echo "id: bad/unexpected usage" >&2; exit 1;;
+esac
+END
+chmod a+x bin/id
+
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
+
+# Problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=16777216; export am_uid
+am_gid=1000;     export am_gid
+run_configure
+checked "whether UID '$am_uid' is supported by ustar format" "no"
+checked "whether GID '1000' is supported by ustar format" "yes"
+checked "how to create a ustar tar archive" "none"
+
+# Another problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=1000;     export am_uid
+am_gid=17000000; export am_gid
+run_configure
+checked "whether UID '1000' is supported by ustar format" "yes"
+checked "whether GID '$am_gid' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+# The minimal ID that is too big.
+two_to_twentyone=$((32 * 32 * 32 * 32 * 2))
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=$two_to_twentyone; export am_uid
+am_gid=$two_to_twentyone; export am_gid
+run_configure
+checked "whether UID '$two_to_twentyone' is supported by ustar format" "no"
+checked "whether GID '$two_to_twentyone' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+:
diff --git a/t/tar2.sh b/t/tar2.sh
index 5a9d4d7..758d89a 100755
--- a/t/tar2.sh
+++ b/t/tar2.sh
@@ -18,8 +18,8 @@

 . test-init.sh

-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure

-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi

 $MAKE distcheck
-test -f tar2-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:
diff --git a/t/tar3.sh b/t/tar3.sh
index 040d7b4..befc23f 100755
--- a/t/tar3.sh
+++ b/t/tar3.sh
@@ -18,8 +18,8 @@

 . test-init.sh

-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax tar-v7])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -37,8 +37,8 @@ grep "'tar-v7'"  tar-err

 rm -rf autom4te.cache

-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -47,6 +47,6 @@ END
 echo 'AUTOMAKE_OPTIONS = tar-pax' > Makefile.am

 AUTOMAKE_fails
-grep '^Makefile\.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr
+grep "^Makefile\.am:1:.*'tar-pax'.*AM_INIT_AUTOMAKE" stderr

 :
-- 
1.8.2.1.610.g562af5b





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Thu, 25 Apr 2013 12:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 10:49:02 GMT) Full text and rfc822 format available.

Message #81 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pavel Raiskup <praiskup <at> redhat.com>
To: bug-automake <at> gnu.org
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org, jack <at> jackkelly.name,
	Stefano Lattarini <stefano.lattarini <at> gmail.com>,
	phracek <at> redhat.com, control <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 26 Apr 2013 12:48:08 +0200
Hi, I'm just thinking aloud here.. I'm ok with this.

> Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):
>
>     When "configure" is run by a user with an UID bigger than 21 bits,
>     BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
>     archive and leaves an empty or corrupted conftest.tar file behind.
>     In the next step, pax tries to extract this incomplete or corrupted
>     archive and this *** hangs the whole ./configure script ***.
>
>     Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
>     silently truncates any big UID to its lower 21 bits. I don't know
>     what can be the consequences of this lie.

I'm reading this once again and thinking about it  - and I was bad with
saying that 'ustar' may not success (it will not success completely).
This probably depends what we am__tar need for.., or?  Because the
resulted Makefile imo uses 'am__tar' just for creation distribution
tarball, we don't care about UID truncation.  This unnecessary UID/GID
information is not going to be used on user's (meaning user of the
tarball) machine.
...
So there could be probably considered the cpio good enough and better than
nothing?  But what if this is a bug in GNU cpio (and in others)?

I have done a little bit more observing here and found this a little even
more interesting.  Consider running everything under user with big UID:

  When 'star' is asked for 'ustar' format, it does not complain and works.
  When 'bsdtar' is asked for 'ustar' format, it complains, exits with 0
  return value and the resulted tarball is empty...  So..

  Another one - what if GNU tar behaviour is bad and the rule should be
  relaxed in future -> just warn user that the 'UID' is too big and
  truncate?

Definitely hard to detect.

-------

Ok, I think that we should not care about it *so* much and simply say that
it is impossible to store _correctly_ into 'ustar' (which will always be
truth) and set am__tar/am__untar to false as you propose.  Still, this
make-dist targets are used usually on up2date machines.  Usually not
running under big UIDs — and in that case, GNU tar should win.  At least,
upstream maintainers will always be able to use lower UID before
distribution.  At the end — people dealing with this problem are upstream
so they may easily switch to 'pax'.

The most important is to not hang during ./configure phase, and stop doing
it asap.

One thing as a future enhancement would be to allow redefine the am__tar
and am__untar by hand.  But it may be done later.

So *ACKing* :) with one simple remark which follows.

> [....]
> +    # The $UID and $GID variables are not portable, so we need to resort
> +    # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls below
> +    # are definitely unexpected, so allow the users to see them (that is,
> +    # avoid stderr redirection).
> +    am_uid=`id -u || echo unknown`
> +    am_gid=`id -g || echo unknown`
> +    AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
> +    if test $am_uid -le $am_max_uid; then
> +       AC_MSG_RESULT([yes])
> +    else
> +       AC_MSG_RESULT([no])
> +       _am_tools=none
> +    fi
> +    AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
> +    if test $am_gid -le $am_max_gid; then
> +       AC_MSG_RESULT([yes])
> +    else
> +       AC_MSG_RESULT([no])
> +       _am_tools=none
> +    fi],

Here ^^ it would be possible to de-duplicate (just one message to standard
output and little simpler code).  But it is just a matter of taste.  To make
it easier, follows the patch, do not assign me as a co-author.

I'm also quite afraid of testsuite performance of testsuite - this
check costs more than 6 seconds..

Thanks a lot, Pavel

===========================================================================

commit 1f28bce58b3d98fcae26af3f848ecf900b2d43d1 (HEAD, branch-1.13.2)
Author:     Pavel Raiskup <praiskup <at> redhat.com>
AuthorDate: Thu Apr 25 15:22:38 2013 +0200
Commit:     Pavel Raiskup <praiskup <at> redhat.com>
CommitDate: Fri Apr 26 12:39:30 2013 +0200

    possible fixes

diff --git a/m4/tar.m4 b/m4/tar.m4
index 4b728e6..728afb4 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -36,23 +36,17 @@ m4_case([$1],
     [# Automake bugs #8343 and #13588: the ustar format doesn't support
     # an UID or a GID that require more than 21 bits to be stored.
     # In fact, the 'pax' utility can hang when such IDs are involved.
-    am_max_uid=2097151 # 2^21 - 1
-    am_max_gid=$am_max_uid
+    am_max_id=2097151 # 2^21 - 1
+
     # The $UID and $GID variables are not portable, so we need to resort
     # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls below
     # are definitely unexpected, so allow the users to see them (that is,
     # avoid stderr redirection).
     am_uid=`id -u || echo unknown`
     am_gid=`id -g || echo unknown`
-    AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
-    if test $am_uid -le $am_max_uid; then
-       AC_MSG_RESULT([yes])
-    else
-       AC_MSG_RESULT([no])
-       _am_tools=none
-    fi
-    AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
-    if test $am_gid -le $am_max_gid; then
+
+    AC_MSG_CHECKING([whether UID and GID are storable in ustar archive])
+    if test $am_uid -le $am_max_id && test $am_gid -le $am_max_id; then
        AC_MSG_RESULT([yes])
     else
        AC_MSG_RESULT([no])
diff --git a/t/tar-ustar-id-too-high.sh b/t/tar-ustar-id-too-high.sh
index 79ae89d..441e8c2 100644
--- a/t/tar-ustar-id-too-high.sh
+++ b/t/tar-ustar-id-too-high.sh
@@ -62,8 +62,7 @@ PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
 am_uid=16777216; export am_uid
 am_gid=1000;     export am_gid
 run_configure
-checked "whether UID '$am_uid' is supported by ustar format" "no"
-checked "whether GID '1000' is supported by ustar format" "yes"
+checked "whether UID and GID are storable in ustar archive" "no"
 checked "how to create a ustar tar archive" "none"
 
 # Another problematic ID reported in
@@ -71,8 +70,7 @@ checked "how to create a ustar tar archive" "none"
 am_uid=1000;     export am_uid
 am_gid=17000000; export am_gid
 run_configure
-checked "whether UID '1000' is supported by ustar format" "yes"
-checked "whether GID '$am_gid' is supported by ustar format" "no"
+checked "whether UID and GID are storable in ustar archive" "no"
 checked "how to create a ustar tar archive" "none"
 
 # The minimal ID that is too big.
@@ -81,8 +79,14 @@ two_to_twentyone=$((32 * 32 * 32 * 32 * 2))
 am_uid=$two_to_twentyone; export am_uid
 am_gid=$two_to_twentyone; export am_gid
 run_configure
-checked "whether UID '$two_to_twentyone' is supported by ustar format" "no"
-checked "whether GID '$two_to_twentyone' is supported by ustar format" "no"
+checked "whether UID and GID are storable in ustar archive" "no"
 checked "how to create a ustar tar archive" "none"
 
+# The maximal ID that is OK.
+two_to_twentyone_minus_one=$((32 * 32 * 32 * 32 * 2 - 1 ))
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=$two_to_twentyone_minus_one; export am_uid
+am_gid=$two_to_twentyone_minus_one; export am_gid
+run_configure
+checked "whether UID and GID are storable in ustar archive" "yes"
 :





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 10:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 11:04:02 GMT) Full text and rfc822 format available.

Message #87 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Peter Rosin <peda <at> lysator.liu.se>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 26 Apr 2013 13:03:33 +0200
On 2013-04-25 14:19, Stefano Lattarini wrote:
*snip*
> * THANKS: Likewise.
> * t/tar-ustar-id-too-high.sh: New test.
> * t/list-of-tests.mk: Add it.
> * t/tar2.sh: While at it, tweak and enhance a little.
> * t/tar3.sh: Likewise.
> * t/tar-override.sh: Likewise.
> 
> Helped-by: Pavel Raiskup <praiskup <at> redhat.com>
> Helped-by: Petr Hracek <phracek <at> redhat.com>
> Helped-by: Marc Herbert <marc.herbert <at> intel.com>
> Helped-by: Tom Rini <tom_rini <at> mentor.com>
> Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> ---
>  NEWS                       |  6 ++++
>  THANKS                     |  3 ++

I don't think gitlog-to-changelog recognizes anything other than

	Copyright-paperwork-exempt: Yes
	Co-authored-by: Joe User <user <at> example.com>
	Signed-off-by: Joe User <user <at> example.com>

So, any other random tags like Helped-by: etc, appearing after the
file list will break the ChangeLog format.

Either that, or gitlog-to-changelog has seen a recent update.

Cheers,
Peter





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 11:19:01 GMT) Full text and rfc822 format available.

Message #90 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org, jack <at> jackkelly.name,
	bug-automake <at> gnu.org, phracek <at> redhat.com, control <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 26 Apr 2013 13:18:37 +0200
On 04/26/2013 12:48 PM, Pavel Raiskup wrote:
> Hi, I'm just thinking aloud here.. I'm ok with this.
>
> [SNIP]
>
> So *ACKing* :) with one simple remark which follows.
> 
>> [....]
>> +    # The $UID and $GID variables are not portable, so we need to resort
>> +    # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls below
>> +    # are definitely unexpected, so allow the users to see them (that is,
>> +    # avoid stderr redirection).
>> +    am_uid=`id -u || echo unknown`
>> +    am_gid=`id -g || echo unknown`
>> +    AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
>> +    if test $am_uid -le $am_max_uid; then
>> +       AC_MSG_RESULT([yes])
>> +    else
>> +       AC_MSG_RESULT([no])
>> +       _am_tools=none
>> +    fi
>> +    AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
>> +    if test $am_gid -le $am_max_gid; then
>> +       AC_MSG_RESULT([yes])
>> +    else
>> +       AC_MSG_RESULT([no])
>> +       _am_tools=none
>> +    fi],
> 
> Here ^^ it would be possible to de-duplicate (just one message to standard
> output and little simpler code).  But it is just a matter of taste.
>
Actually, I prefer to keep the checks distinct, and output the problematic
UID/GID as well (makes debugging easier).  So I'd rather drop the squash-in
patch you proposed.

> To make it easier, follows the patch, do not assign me as a co-author.
> 
> I'm also quite afraid of testsuite performance of testsuite - this
> check costs more than 6 seconds..
>
Wait, you mean the new checks in m4/tar.4m?  That can't be right, they
should be very fast ...  Am I missing something?

> Thanks a lot, Pavel
> 

Thanks for all the testing and feedback,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 11:19:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 11:20:03 GMT) Full text and rfc822 format available.

Message #96 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Rosin <peda <at> lysator.liu.se>
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 26 Apr 2013 13:19:44 +0200
On 04/26/2013 01:03 PM, Peter Rosin wrote:
> On 2013-04-25 14:19, Stefano Lattarini wrote:
> *snip*
>> * THANKS: Likewise.
>> * t/tar-ustar-id-too-high.sh: New test.
>> * t/list-of-tests.mk: Add it.
>> * t/tar2.sh: While at it, tweak and enhance a little.
>> * t/tar3.sh: Likewise.
>> * t/tar-override.sh: Likewise.
>>
>> Helped-by: Pavel Raiskup <praiskup <at> redhat.com>
>> Helped-by: Petr Hracek <phracek <at> redhat.com>
>> Helped-by: Marc Herbert <marc.herbert <at> intel.com>
>> Helped-by: Tom Rini <tom_rini <at> mentor.com>
>> Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
>> ---
>>  NEWS                       |  6 ++++
>>  THANKS                     |  3 ++
> 
> I don't think gitlog-to-changelog recognizes anything other than
> 
> 	Copyright-paperwork-exempt: Yes
> 	Co-authored-by: Joe User <user <at> example.com>
> 	Signed-off-by: Joe User <user <at> example.com>
> 
> So, any other random tags like Helped-by: etc, appearing after the
> file list will break the ChangeLog format.
> 
> Either that, or gitlog-to-changelog has seen a recent update.
>
Not that I know, but I wouldn't care too deeply about warts in the
ChangeLog.  They are either harmless, or can be fixed be enhancing
gitlog-to-changelog, if the need arises.

Regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 11:50:01 GMT) Full text and rfc822 format available.

Message #99 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pavel Raiskup <praiskup <at> redhat.com>
To: bug-automake <at> gnu.org
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org, jack <at> jackkelly.name,
	Stefano Lattarini <stefano.lattarini <at> gmail.com>,
	phracek <at> redhat.com, control <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 26 Apr 2013 13:48:55 +0200
[Message part 1 (text/plain, inline)]
> Actually, I prefer to keep the checks distinct, and output the problematic
> UID/GID as well (makes debugging easier).  So I'd rather drop the squash-in
> patch you proposed.

No problem :).

> > I'm also quite afraid of testsuite performance of testsuite - this
> > check costs more than 6 seconds..
>
> Wait, you mean the new checks in m4/tar.4m?  That can't be right, they
> should be very fast ...  Am I missing something?

I mean the test t/tar-ustar-id-too-high.sh (~6seconds for such trivial
task, but it may not be bottleneck?).

Another thing, attaching log for failed task:
   make check TESTS=t/tar-override.sh

Pavel
[test-suite.log.gz (application/gzip, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 11:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 18:30:02 GMT) Full text and rfc822 format available.

Message #105 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org, jack <at> jackkelly.name,
	bug-automake <at> gnu.org, phracek <at> redhat.com, control <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Fri, 26 Apr 2013 20:29:51 +0200
On 04/26/2013 01:48 PM, Pavel Raiskup wrote:
>> Actually, I prefer to keep the checks distinct, and output the problematic
>> UID/GID as well (makes debugging easier).  So I'd rather drop the squash-in
>> patch you proposed.
> 
> No problem :).
> 
>>> I'm also quite afraid of testsuite performance of testsuite - this
>>> check costs more than 6 seconds..
>>
>> Wait, you mean the new checks in m4/tar.4m?  That can't be right, they
>> should be very fast ...  Am I missing something?
> 
> I mean the test t/tar-ustar-id-too-high.sh (~6seconds for such trivial
> task, but it may not be bottleneck?).
>
Alas no, our testsuite is already slooow; this test is just a drop in the
pond.  Not worth worrying about it now.

> Another thing, attaching log for failed task:
>    make check TESTS=t/tar-override.sh
>
I can reproduce this as well :-(  Let's see if I can solve it; in the
meantime, I'll refrain from pushing.  But I definitely want this bug fixed
in Automake 1.13.2, so don't worry: merging this topic is still high
priority!

Thanks, and best regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Fri, 26 Apr 2013 18:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sat, 27 Apr 2013 12:48:01 GMT) Full text and rfc822 format available.

Message #111 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: 13588 <at> debbugs.gnu.org, automake-patches <at> gnu.org, jack <at> jackkelly.name,
	bug-automake <at> gnu.org, phracek <at> redhat.com, control <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Sat, 27 Apr 2013 14:47:17 +0200
On 04/26/2013 08:29 PM, Stefano Lattarini wrote:
> On 04/26/2013 01:48 PM, Pavel Raiskup wrote:
>>> Actually, I prefer to keep the checks distinct, and output the problematic
>>> UID/GID as well (makes debugging easier).  So I'd rather drop the squash-in
>>> patch you proposed.
>>
>> No problem :).
>>
>>>> I'm also quite afraid of testsuite performance of testsuite - this
>>>> check costs more than 6 seconds..
>>>
>>> Wait, you mean the new checks in m4/tar.4m?  That can't be right, they
>>> should be very fast ...  Am I missing something?
>>
>> I mean the test t/tar-ustar-id-too-high.sh (~6seconds for such trivial
>> task, but it may not be bottleneck?).
>>
> Alas no, our testsuite is already slooow; this test is just a drop in the
> pond.  Not worth worrying about it now.
> 
>> Another thing, attaching log for failed task:
>>    make check TESTS=t/tar-override.sh
>>
> I can reproduce this as well :-(  Let's see if I can solve it; in the
> meantime, I'll refrain from pushing.
>
OK, fixed.  I had simply and stupidly messed up some logic in _AM_PROG_TAR;
now everything should be alright.  The final patch is below.  I will push it
shortly if there are no more objections.

Best regards,
  Stefano

---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----

From 269c392dc63f284573f5bb1586316bb5edd50fa1 Mon Sep 17 00:00:00 2001
Message-Id: <269c392dc63f284573f5bb1586316bb5edd50fa1.1367066615.git.stefano.lattarini <at> gmail.com>
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Sun, 17 Feb 2013 16:42:46 +0100
Subject: [PATCH] tar: pax could hang configure when big UID are involved

See automake bug#8343 and bug#13588.

POSIX 1988 'ustar' format is defined with *fixed-size* fields. There
is notably a 21 bits limit (2097151) for the UID and the GID.

Tom Rini tom_rini <at> mentor.com says (in bug#8343):

    When the user has a UID or GID that is larger than the ustar format
    supports, pax does not error out gracefully in some cases (FC13).

Marc Herbert <marc.herbert <at> intel.com> adds (in bug#8343):

    When "configure" is run by a user with an UID bigger than 21 bits,
    BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
    archive and leaves an empty or corrupted conftest.tar file behind.
    In the next step, pax tries to extract this incomplete or corrupted
    archive and this *** hangs the whole ./configure script ***.

    Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
    silently truncates any big UID to its lower 21 bits. I don't know
    what can be the consequences of this lie.

    I think there is currently a design issue in automake/m4/tar.m4
    considering that a ustar archive should should *never* succeed when
    ./configure is run from a big user ID.

Months later, Petr Hracek <phracek <at> redhat.com> reports a similar issue
(in bug#13588) for Fedora 17:

    I am trying to solve problem in case a user is created with big
    UID and during configuration pax hangs with message

        ATTENTION! pax archive volume change required.
        Ready for archive volume: 1
        Input archive name or "." to quit pax.
        Archive name >

    and needs user interaction.

    Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>

Time to fix this issue, on the line of a preliminary patch provided by
Petr Hracek in bug#13588.  The final patch ended up being remarkably
different from that original proposition, though.

* m4/tar.m4 (_AM_PROG_TAR): If the UID or GID of the current user is
too high (> 2097151), the 'ustar' format cannot work.  Adjust checks
accordingly.  Some related code reordering and clean-up.
* t/tar-ustar-id-too-high.sh: New test.
* t/list-of-tests.mk: Add it.
* t/tar.sh: While at it, tweak and enhance a little.
* t/tar2.sh: Likewise.
* t/tar3.sh: Likewise.
* t/tar-override.sh: Likewise.
* NEWS: Update.
* THANKS: Likewise.

Helped-by: Pavel Raiskup <praiskup <at> redhat.com>
Helped-by: Petr Hracek <phracek <at> redhat.com>
Helped-by: Marc Herbert <marc.herbert <at> intel.com>
Helped-by: Tom Rini <tom_rini <at> mentor.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 NEWS                       |   6 ++
 THANKS                     |   3 +
 m4/tar.m4                  | 159 ++++++++++++++++++++++++++++-----------------
 t/list-of-tests.mk         |   1 +
 t/tar-override.sh          |  17 +++--
 t/tar-ustar-id-too-high.sh |  88 +++++++++++++++++++++++++
 t/tar.sh                   |  11 ++--
 t/tar2.sh                  |  11 ++--
 t/tar3.sh                  |  10 +--
 9 files changed, 225 insertions(+), 81 deletions(-)
 create mode 100755 t/tar-ustar-id-too-high.sh

diff --git a/NEWS b/NEWS
index f9a1fb1..863ffdf 100644
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,12 @@ New in 1.13.2:

 * Bugs fixed:

+  - When the 'ustar' option is used, the generated configure script no
+    longer risks hanging during the tests for the availability of the
+    'pax' utility, even if the user running configure has a UID or GID
+    that requires more than 21 bits to be represented.
+    See automake bug#8343 and bug#13588.
+
   - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
     again, as they did in Automake 1.12.x (albeit printing runtime
     warnings in the 'obsolete' category).  Removing them has turned
diff --git a/THANKS b/THANKS
index 66498d4..a574909 100644
--- a/THANKS
+++ b/THANKS
@@ -224,6 +224,7 @@ Luo Yi                          luoyi.ly <at> gmail.com
 Maciej Stachowiak               mstachow <at> mit.edu
 Maciej W. Rozycki               macro <at> ds2.pg.gda.pl
 Manu Rouat                      emmanuel.rouat <at> wanadoo.fr
+Marc Herbert                    marc.herbert <at> intel.com
 Marcus Brinkmann                Marcus.Brinkmann <at> ruhr-uni-bochum.de
 Marcus G. Daniels               mgd <at> ute.santafe.edu
 Marius Vollmer                  mvo <at> zagadka.ping.de
@@ -311,6 +312,7 @@ Peter Muir                      iyhi <at> yahoo.com
 Peter O'Gorman                  peter <at> pogma.com
 Peter Rosin                     peda <at> lysator.liu.se
 Peter Seiderer                  seiderer123 <at> ciselant.de
+Petr Hracek                     phracek <at> redhat.com
 Petter Reinholdtsen             pere <at> hungry.com
 Petteri Räty                    betelgeuse <at> gentoo.org
 Phil Edwards                    phil <at> jaj.com
@@ -391,6 +393,7 @@ Tim Rice                        tim <at> multitalents.net
 Tim Van Holder                  tim.van.holder <at> pandora.be
 Toshio Kuratomi                 toshio <at> tiki-lounge.com
 Tom Epperly                     tepperly <at> llnl.gov
+Tom Rini                        tom_rini <at> mentor.com
 Ulrich Drepper                  drepper <at> gnu.ai.mit.edu
 Ulrich Eckhardt                 eckhardt <at> satorlaser.com
 Václav Haisman                  V.Haisman <at> sh.cvut.cz
diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..30e104c 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -19,76 +19,113 @@
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac

-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],

-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    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])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir

-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index f1e3dca..664a902 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1151,6 +1151,7 @@ t/tags-pr12372.sh \
 t/tar.sh \
 t/tar2.sh \
 t/tar3.sh \
+t/tar-ustar-id-too-high.sh \
 t/tar-override.sh \
 t/target-cflags.sh \
 t/targetclash.sh \
diff --git a/t/tar-override.sh b/t/tar-override.sh
index 863b9ab..bbf3fbb 100755
--- a/t/tar-override.sh
+++ b/t/tar-override.sh
@@ -16,8 +16,8 @@

 # Check that the user can override the tar program used by "make dist"
 # at runtime, by redefining the 'TAR' environment variable.
-# FIXME: currently this works only when the tar format used is 'v7'
-# FIXME: (which is the default one).
+# NOTE: currently this works only when the tar format used is 'v7'
+#       (which is the default one).

 . test-init.sh

@@ -35,6 +35,7 @@ chmod a+x am--tar

 cat > Makefile.am <<'END'
 check-local: dist
+	ls -l ;: For debugging.
 	test -f am--tar-has-run
 CLEANFILES = am--tar-has-run
 END
@@ -44,22 +45,24 @@ $AUTOCONF
 $AUTOMAKE
 ./configure

+clean_temp () { rm -f *.tar.* *has-run*; }
+
 $MAKE dist
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 ls | grep has-run && exit 1

-rm -f *.tar.* *has-run*
+clean_temp

 TAR="$cwd/am--tar foo" $MAKE distcheck
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 test "$(cat am--tar-has-run)" = foo

-rm -f *.tar.* *has-run*
+clean_temp

 TAR=; unset TAR
 # Creative use of eval to pacify maintainer checks.
 eval \$'MAKE dist "TAR=./am--tar mu"'
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 test "$(cat am--tar-has-run)" = mu

 :
diff --git a/t/tar-ustar-id-too-high.sh b/t/tar-ustar-id-too-high.sh
new file mode 100755
index 0000000..79ae89d
--- /dev/null
+++ b/t/tar-ustar-id-too-high.sh
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that UID or GID too high for the ustar format are correctly
+# rwcognized and diagnosed by configure.  See bug#8343 and bug#13588.
+
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([tar-ustar])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+run_configure()
+{
+  st=0; ./configure ${1+"$@"}  >stdout || st=$?
+  cat stdout || exit 1
+  test $st -eq 0 || exit 1
+}
+
+checked ()
+{
+  grep "^checking $1\.\.\. $2$" stdout
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir bin
+cat > bin/id <<'END'
+#!/bin/sh -e
+case "$*" in
+  -u) echo "${am_uid-1000}";;
+  -g) echo "${am_gid-1000}";;
+   *) echo "id: bad/unexpected usage" >&2; exit 1;;
+esac
+END
+chmod a+x bin/id
+
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
+
+# Problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=16777216; export am_uid
+am_gid=1000;     export am_gid
+run_configure
+checked "whether UID '$am_uid' is supported by ustar format" "no"
+checked "whether GID '1000' is supported by ustar format" "yes"
+checked "how to create a ustar tar archive" "none"
+
+# Another problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=1000;     export am_uid
+am_gid=17000000; export am_gid
+run_configure
+checked "whether UID '1000' is supported by ustar format" "yes"
+checked "whether GID '$am_gid' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+# The minimal ID that is too big.
+two_to_twentyone=$((32 * 32 * 32 * 32 * 2))
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=$two_to_twentyone; export am_uid
+am_gid=$two_to_twentyone; export am_gid
+run_configure
+checked "whether UID '$two_to_twentyone' is supported by ustar format" "no"
+checked "whether GID '$two_to_twentyone' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+:
diff --git a/t/tar.sh b/t/tar.sh
index 58e52ea..c146ad9 100755
--- a/t/tar.sh
+++ b/t/tar.sh
@@ -18,8 +18,8 @@

 . test-init.sh

-cat > configure.ac << 'END'
-AC_INIT([tar], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-ustar])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure

-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi

 $MAKE distcheck
-test -f tar-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:
diff --git a/t/tar2.sh b/t/tar2.sh
index 5a9d4d7..758d89a 100755
--- a/t/tar2.sh
+++ b/t/tar2.sh
@@ -18,8 +18,8 @@

 . test-init.sh

-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure

-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi

 $MAKE distcheck
-test -f tar2-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:
diff --git a/t/tar3.sh b/t/tar3.sh
index 040d7b4..befc23f 100755
--- a/t/tar3.sh
+++ b/t/tar3.sh
@@ -18,8 +18,8 @@

 . test-init.sh

-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax tar-v7])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -37,8 +37,8 @@ grep "'tar-v7'"  tar-err

 rm -rf autom4te.cache

-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -47,6 +47,6 @@ END
 echo 'AUTOMAKE_OPTIONS = tar-pax' > Makefile.am

 AUTOMAKE_fails
-grep '^Makefile\.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr
+grep "^Makefile\.am:1:.*'tar-pax'.*AM_INIT_AUTOMAKE" stderr

 :
-- 
1.8.2.1.610.g562af5b




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sat, 27 Apr 2013 12:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sat, 27 Apr 2013 16:22:02 GMT) Full text and rfc822 format available.

Message #117 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pavel Raiskup <praiskup <at> redhat.com>
To: bug-automake <at> gnu.org, jack <at> jackkelly.name
Cc: phracek <at> redhat.com, 13588 <at> debbugs.gnu.org,
	Stefano Lattarini <stefano.lattarini <at> gmail.com>, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Sat, 27 Apr 2013 18:21:27 +0200
Stefano, this patch is quite hard to follow because of the new
indentation.  But both checks are saying PASS for me now.

I have found one possible problem (missing one line):

> -    done
> -    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
> -    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
> -    am__untar="$_am_tar -xf -"

> +      done
> +      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
> +      am__untar="$_am_tar -xf -"

Don't know whether the check now works correctly.

Pavel





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sat, 27 Apr 2013 16:22:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sun, 28 Apr 2013 09:08:02 GMT) Full text and rfc822 format available.

Message #123 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: phracek <at> redhat.com, 13588 <at> debbugs.gnu.org, bug-automake <at> gnu.org,
	jack <at> jackkelly.name, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Sun, 28 Apr 2013 11:07:09 +0200
[Message part 1 (text/plain, inline)]
On 04/27/2013 06:21 PM, Pavel Raiskup wrote:
> Stefano, this patch is quite hard to follow because of the new
> indentation.
>
Sorry, I now attach a version formatted with the '-w', which should
be free from the noise caused by the indentation change.

>  But both checks are saying PASS for me now.
> 
> I have found one possible problem (missing one line):
> 
>> -    done
>> -    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
>> -    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
>> -    am__untar="$_am_tar -xf -"
> 
>> +      done
>> +      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
>> +      am__untar="$_am_tar -xf -"
> 
> Don't know whether the check now works correctly.
>
Oops, I messed up again :-(  Nice catch BTW.  I have re-introduced the
line removed by mistake.

The updated patch is attached (formatted both with and without the '-w'
option).

Thanks, and sorry for the confusion,
  Stefano
[diff-w.patch (text/x-patch, attachment)]
[real.patch (text/x-patch, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Sun, 28 Apr 2013 09:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Mon, 29 Apr 2013 06:12:02 GMT) Full text and rfc822 format available.

Message #129 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Pavel Raiskup <praiskup <at> redhat.com>
To: bug-automake <at> gnu.org
Cc: phracek <at> redhat.com, 13588 <at> debbugs.gnu.org,
	Stefano Lattarini <stefano.lattarini <at> gmail.com>,
	jack <at> jackkelly.name, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Mon, 29 Apr 2013 08:11:37 +0200
Hi!

> I have re-introduced the line removed by mistake.

It seems to be completely OK now, thanks a LOT for your patience.  I don't
see any problems and also all test passes for me.

Have a nice day,
Pavel





Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Mon, 29 Apr 2013 06:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Mon, 29 Apr 2013 10:19:02 GMT) Full text and rfc822 format available.

Message #135 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: phracek <at> redhat.com, 13588 <at> debbugs.gnu.org, bug-automake <at> gnu.org,
	jack <at> jackkelly.name, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Mon, 29 Apr 2013 12:18:26 +0200
On 04/29/2013 08:11 AM, Pavel Raiskup wrote:
> Hi!
> 
>> I have re-introduced the line removed by mistake.
> 
> It seems to be completely OK now,
>
Thanks, I will push shortly then, barring further objections.

> thanks a LOT for your patience.
>
I think you and the other reviewers should be thanked for
*your* patience here ;-)

> I don't see any problems and also all test passes for me.
> 
> Have a nice day,
> Pavel
> 

Regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Mon, 29 Apr 2013 10:19:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#13588; Package automake. (Tue, 30 Apr 2013 13:21:02 GMT) Full text and rfc822 format available.

Message #141 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Pavel Raiskup <praiskup <at> redhat.com>
Cc: phracek <at> redhat.com, 13588-done <at> debbugs.gnu.org, bug-automake <at> gnu.org,
	jack <at> jackkelly.name, automake-patches <at> gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Tue, 30 Apr 2013 15:20:04 +0200
On 04/29/2013 12:18 PM, Stefano Lattarini wrote:
> On 04/29/2013 08:11 AM, Pavel Raiskup wrote:
>> Hi!
>>
>>> I have re-introduced the line removed by mistake.
>>
>> It seems to be completely OK now,
>>
> Thanks, I will push shortly then, barring further objections.
> 
>> thanks a LOT for your patience.
>>
> I think you and the other reviewers should be thanked for
> *your* patience here ;-)
> 
>> I don't see any problems and also all test passes for me.
>>
>> Have a nice day,
>> Pavel
>>
> 
> Regards,
>   Stefano
>
Patch merged, at last!  I'm finally closing this bug report.

Thanks to all the involved people for their help and patience,
  Stefano




Reply sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
You have taken responsibility. (Tue, 30 Apr 2013 13:21:02 GMT) Full text and rfc822 format available.

Notification sent to Petr Hracek <phracek <at> redhat.com>:
bug acknowledged by developer. (Tue, 30 Apr 2013 13:21:03 GMT) Full text and rfc822 format available.

Reply sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
You have taken responsibility. (Tue, 30 Apr 2013 13:21:04 GMT) Full text and rfc822 format available.

Notification sent to Tom Rini <tom_rini <at> mentor.com>:
bug acknowledged by developer. (Tue, 30 Apr 2013 13:21:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 29 May 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.