Subject: bug#13588: closed (Re: bug#13588: Pax hangs in case big UID)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 30 Apr 2013 13:21:03 +0000

Your bug report

#13588: Pax hangs in case big UID

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13588: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13588
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13588: Pax hangs in case big UID
From: Stefano Lattarini <[email-masked]>
To: Pavel Raiskup <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
Date: Tue, 30 Apr 2013 15:20:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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

Subject: Pax hangs in case big UID
From: Petr Hracek <[email-masked]>
To: [email-masked]
Date: Wed, 30 Jan 2013 14:31:11 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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: [email-masked]
Web: www.cz.redhat.com