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.

Full log


View this message in rfc822 format

From: Petr Hracek <phracek <at> redhat.com>
To: 13588 <at> debbugs.gnu.org
Subject: bug#13588: 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





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.