From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 08:32:11 2013 Received: (at submit) by debbugs.gnu.org; 30 Jan 2013 13:32:11 +0000 Received: from localhost ([127.0.0.1]:55441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0Xlq-000527-62 for submit@debbugs.gnu.org; Wed, 30 Jan 2013 08:32:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49890) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0Xli-00051i-AZ for submit@debbugs.gnu.org; Wed, 30 Jan 2013 08:32:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0Xl4-0001jY-EA for submit@debbugs.gnu.org; Wed, 30 Jan 2013 08:31:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD,T_FRT_BELOW2 autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Xl4-0001jT-BJ for submit@debbugs.gnu.org; Wed, 30 Jan 2013 08:31:22 -0500 Received: from eggs.gnu.org ([208.118.235.92]:32972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Xl0-0001um-1L for bug-automake@gnu.org; Wed, 30 Jan 2013 08:31:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0Xkw-0001hC-VK for bug-automake@gnu.org; Wed, 30 Jan 2013 08:31:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Xkw-0001gT-N8 for bug-automake@gnu.org; Wed, 30 Jan 2013 08:31:14 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0UDVCOK028921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Jan 2013 08:31:13 -0500 Received: from unused-4-190.brq.redhat.com (unused-4-190.brq.redhat.com [10.34.4.190]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0UDVB69002028 for ; Wed, 30 Jan 2013 08:31:12 -0500 Message-ID: <5109209F.9010400@redhat.com> Date: Wed, 30 Jan 2013 14:31:11 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: bug-automake@gnu.org Subject: Pax hangs in case big UID Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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 /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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 08:46:11 2013 Received: (at 13588) by debbugs.gnu.org; 30 Jan 2013 13:46:11 +0000 Received: from localhost ([127.0.0.1]:55447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0XzN-0005Nw-E4 for submit@debbugs.gnu.org; Wed, 30 Jan 2013 08:46:10 -0500 Received: from mail.lysator.liu.se ([130.236.254.3]:43839) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0XzK-0005Nn-1G for 13588@debbugs.gnu.org; Wed, 30 Jan 2013 08:46:07 -0500 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 1689D40019; Wed, 30 Jan 2013 14:45:28 +0100 (CET) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id B9F0240015; Wed, 30 Jan 2013 14:45:27 +0100 (CET) Message-ID: <510923F6.5030601@lysator.liu.se> Date: Wed, 30 Jan 2013 14:45:26 +0100 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> In-Reply-To: <5109209F.9010400@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.3 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 09:48:20 2013 Received: (at 13588) by debbugs.gnu.org; 30 Jan 2013 14:48:20 +0000 Received: from localhost ([127.0.0.1]:55517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0YxX-0006oa-Cv for submit@debbugs.gnu.org; Wed, 30 Jan 2013 09:48:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31128) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0YxR-0006oP-ER for 13588@debbugs.gnu.org; Wed, 30 Jan 2013 09:48:17 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0UElYRJ031132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Jan 2013 09:47:35 -0500 Received: from unused-4-190.brq.redhat.com (unused-4-190.brq.redhat.com [10.34.4.190]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0UElXiK000919; Wed, 30 Jan 2013 09:47:34 -0500 Message-ID: <51093285.4070709@redhat.com> Date: Wed, 30 Jan 2013 15:47:33 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Peter Rosin Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> In-Reply-To: <510923F6.5030601@lysator.liu.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.4 (-------) 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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 05 07:02:18 2013 Received: (at submit) by debbugs.gnu.org; 5 Feb 2013 12:02:18 +0000 Received: from localhost ([127.0.0.1]:37267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2hEA-0005Sw-3r for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:02:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51153) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2hE6-0005So-DM for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:02:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2hCw-0005Uv-0j for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:01:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2hCv-0005Um-U8 for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:01:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2hCs-0006Ue-Ek for bug-automake@gnu.org; Tue, 05 Feb 2013 07:01:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2hCp-0005Tr-Mj for bug-automake@gnu.org; Tue, 05 Feb 2013 07:00:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2hCp-0005Ta-FI for bug-automake@gnu.org; Tue, 05 Feb 2013 07:00:55 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r15C0rkl030596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 5 Feb 2013 07:00:54 -0500 Received: from unused-4-190.brq.redhat.com (unused-4-190.brq.redhat.com [10.34.4.190]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r15C0nT0005973 for ; Tue, 5 Feb 2013 07:00:53 -0500 Message-ID: <5110F471.3070302@redhat.com> Date: Tue, 05 Feb 2013 13:00:49 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: bug-automake@gnu.org Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> In-Reply-To: <51093285.4070709@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) 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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 05 07:37:07 2013 Received: (at 13588) by debbugs.gnu.org; 5 Feb 2013 12:37:07 +0000 Received: from localhost ([127.0.0.1]:37329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2hlr-0007BY-CP for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:37:07 -0500 Received: from mail.lysator.liu.se ([130.236.254.3]:43309) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2hln-0007BM-Nz for 13588@debbugs.gnu.org; Tue, 05 Feb 2013 07:37:06 -0500 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 129F540009; Tue, 5 Feb 2013 13:35:52 +0100 (CET) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id A150840007; Tue, 5 Feb 2013 13:35:51 +0100 (CET) Message-ID: <5110FCA6.7030609@lysator.liu.se> Date: Tue, 05 Feb 2013 13:35:50 +0100 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> In-Reply-To: <5110F471.3070302@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 05 07:44:04 2013 Received: (at submit) by debbugs.gnu.org; 5 Feb 2013 12:44:04 +0000 Received: from localhost ([127.0.0.1]:37338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2hsa-0007Lw-7C for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:44:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34275) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2hsW-0007LM-M2 for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:44:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2hrI-0001L9-G6 for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:42:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2hrI-0001L5-DR for submit@debbugs.gnu.org; Tue, 05 Feb 2013 07:42:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2hrF-0008O8-AR for bug-automake@gnu.org; Tue, 05 Feb 2013 07:42:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2hrB-0001G9-IK for bug-automake@gnu.org; Tue, 05 Feb 2013 07:42:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2hrB-0001FT-Bv for bug-automake@gnu.org; Tue, 05 Feb 2013 07:42:37 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r15CgaEB026088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 5 Feb 2013 07:42:36 -0500 Received: from unused-4-190.brq.redhat.com (unused-4-190.brq.redhat.com [10.34.4.190]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r15CgZ21005241 for ; Tue, 5 Feb 2013 07:42:36 -0500 Message-ID: <5110FE3B.9060502@redhat.com> Date: Tue, 05 Feb 2013 13:42:35 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: bug-automake@gnu.org Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> In-Reply-To: <5110FCA6.7030609@lysator.liu.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) 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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 05 08:52:42 2013 Received: (at 13588) by debbugs.gnu.org; 5 Feb 2013 13:52:42 +0000 Received: from localhost ([127.0.0.1]:37417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2ix0-0000Zb-6q for submit@debbugs.gnu.org; Tue, 05 Feb 2013 08:52:42 -0500 Received: from mail-bk0-f53.google.com ([209.85.214.53]:35108) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2iwy-0000ZT-0y for 13588@debbugs.gnu.org; Tue, 05 Feb 2013 08:52:41 -0500 Received: by mail-bk0-f53.google.com with SMTP id j10so81329bkw.26 for <13588@debbugs.gnu.org>; Tue, 05 Feb 2013 05:51:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ITfsCgnRWPq7LyeF1q3xFKN/HE6lj2nutaaXDHPd26w=; b=N0hKxZC506NNUzPIdzAoKUYnPZGZqtF4NYWyoq+wSWZQ+dfenPZA3Z1nbjkOB/DWmJ s6ANhMq5sLnTQ6K3dBF4FSekMNYTJsa3srt34x26tvMAqw75FzKPxQJlJc6vCwx3KqVa DeQfN9s7mMAEudchM672J6UZD2aVJPvs/aP4gk+HHosCY+IvRTXSqQ+w6maIFMHEztjT oKz8r404Wt10Jm1TTxxSS/wGiMlCMTMPE3N0NbNPqVQp/QeybyR+GAt806+l+83gZn/e ex42BuZ0Y25JZQdBxDPgT0RMA4xvd9QtemQ2g38PCFpM48KMHZelNkXuwYTBLC/QE0t5 uaxQ== X-Received: by 10.204.150.134 with SMTP id y6mr6209538bkv.15.1360072288551; Tue, 05 Feb 2013 05:51:28 -0800 (PST) Received: from [192.168.178.20] (host137-94-dynamic.4-87-r.retail.telecomitalia.it. [87.4.94.137]) by mx.google.com with ESMTPS id gy3sm6547652bkc.16.2013.02.05.05.51.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Feb 2013 05:51:27 -0800 (PST) Message-ID: <51110E57.1090606@gmail.com> Date: Tue, 05 Feb 2013 14:51:19 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> In-Reply-To: <5110FE3B.9060502@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 17 10:34:28 2013 Received: (at 13588) by debbugs.gnu.org; 17 Feb 2013 15:34:28 +0000 Received: from localhost ([127.0.0.1]:33178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U76G4-0008UG-HG for submit@debbugs.gnu.org; Sun, 17 Feb 2013 10:34:28 -0500 Received: from mail-ee0-f48.google.com ([74.125.83.48]:44455) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U76G1-0008U4-Jk; Sun, 17 Feb 2013 10:34:27 -0500 Received: by mail-ee0-f48.google.com with SMTP id t10so2526482eei.21 for ; Sun, 17 Feb 2013 07:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=S0nO2EcoTpFXh9ZI+Ds60B18IIGCLkhH1TEMJjil0cg=; b=drkscpIBOpgJgLZmOZe8OcftH0J6pWjVV5mk0HImH9Kp9lczk+ZVIIC6xLuH5hMrRo sa/OZLguvi8CCHZg/itfEFsvL0oRThnedgDWywPYcp1aCe6DYBBzR/OdIerDT5NrKl/k 0wjXBWvaBlNfqEdjB07EhIHMNRTsrK5kMrDzqt5zF8mruRUfTr5AodQTM8JBId/mdlsC fZp9O7DJTuvvjtUV6dHJ5sEIHFkhrU+Evwar8hg628zLWOE1MIjJSkBBAeEXSp9tsBTv 3Ag/98b3HR0YzaMJ/AZ7xyfM50VzSLxKpWbunZRbWfLImvx2DpC7OGxycAoyrlMvOK3U dHiA== X-Received: by 10.14.202.71 with SMTP id c47mr33097313eeo.39.1361115210060; Sun, 17 Feb 2013 07:33:30 -0800 (PST) Received: from [192.168.178.20] (host137-94-dynamic.4-87-r.retail.telecomitalia.it. [87.4.94.137]) by mx.google.com with ESMTPS id 46sm24543731eea.3.2013.02.17.07.33.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 07:33:29 -0800 (PST) Message-ID: <5120F847.1020507@gmail.com> Date: Sun, 17 Feb 2013 16:33:27 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> In-Reply-To: <5109209F.9010400@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) tags 13588 + patch tags 8343 + patch merge 13588 8343 thanks Merging with bug#8343, since it's the same issue Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 20 07:08:11 2013 Received: (at 13588) by debbugs.gnu.org; 20 Mar 2013 11:08:11 +0000 Received: from localhost ([127.0.0.1]:36827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIGsM-0005E7-Qe for submit@debbugs.gnu.org; Wed, 20 Mar 2013 07:08:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35760) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIGsH-0005Ds-Dl for 13588@debbugs.gnu.org; Wed, 20 Mar 2013 07:08:07 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2KB6JwZ006180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Mar 2013 07:06:19 -0400 Received: from kiasportyw.brq.redhat.com (unused-4-188.brq.redhat.com [10.34.4.188]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2KB6IYb012227; Wed, 20 Mar 2013 07:06:18 -0400 Message-ID: <51499829.4000308@redhat.com> Date: Wed, 20 Mar 2013 12:06:17 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> In-Reply-To: <51110E57.1090606@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -7.5 (-------) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.4 (---------) 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 /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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 20 07:47:51 2013 Received: (at 13588) by debbugs.gnu.org; 20 Mar 2013 11:47:51 +0000 Received: from localhost ([127.0.0.1]:36870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIHUk-00076f-Bk for submit@debbugs.gnu.org; Wed, 20 Mar 2013 07:47:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11021) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIHUg-00076Q-Vp for 13588@debbugs.gnu.org; Wed, 20 Mar 2013 07:47:49 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2KBk0a2008738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Mar 2013 07:46:00 -0400 Received: from kiasportyw.brq.redhat.com (unused-4-188.brq.redhat.com [10.34.4.188]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2KBjx6N029092; Wed, 20 Mar 2013 07:45:59 -0400 Message-ID: <5149A177.2070205@redhat.com> Date: Wed, 20 Mar 2013 12:45:59 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> In-Reply-To: <51499829.4000308@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -9.4 (---------) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.4 (---------) Hello Stefano, one more time. wrong patch file name. [stone@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 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 /dev/null 2>&1 && break fi -- 1.8.1.4 [stone@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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 20 07:57:25 2013 Received: (at 13588) by debbugs.gnu.org; 20 Mar 2013 11:57:25 +0000 Received: from localhost ([127.0.0.1]:36877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIHdz-0007LB-VI for submit@debbugs.gnu.org; Wed, 20 Mar 2013 07:57:24 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:49465) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIHdw-0007Kv-KC for 13588@debbugs.gnu.org; Wed, 20 Mar 2013 07:57:22 -0400 Received: by mail-pb0-f48.google.com with SMTP id wy12so1290313pbc.21 for <13588@debbugs.gnu.org>; Wed, 20 Mar 2013 04:55:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type:x-gm-message-state; bh=uwi1pExU/gycvvX8DvGgBaFY1clASVv1wj00QExl9ks=; b=ftrcnUZZWafoiB5DRodVrj7Ib8b9/GKpqc5qpq/3QoEDawjauUFhdoLdlvtcPbh+lq rFIGo26zEdARxXbJNtrHikFvnbluJMvKRMX4IJ3oFTk0YeRmhl6H6foZrWWHGdlDRdvg wwZK7AWRpnfb+i3G6u8ByvhwUE4XnK/p237gLqWO0XwARmnNSRAi4XwEk+7yJpl8bfZw P3aaVxFDQ2TKx+b708eK/DoXCZh2JQRklvdo8Sx55YCve32JkpQtq5ainRN+lth/S0V1 1l4cSPsNTHapggZIEOI53JNL5CpS8C8l0DI9a3swVW7dihngXh+3SxP/Teu9Iv1AInAi kHAQ== X-Received: by 10.68.211.225 with SMTP id nf1mr8468652pbc.104.1363780534783; Wed, 20 Mar 2013 04:55:34 -0700 (PDT) Received: from handybilly ([125.253.98.148]) by mx.google.com with ESMTPS id kb3sm1882843pbc.21.2013.03.20.04.55.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 Mar 2013 04:55:33 -0700 (PDT) From: Jack Kelly To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> Date: Wed, 20 Mar 2013 22:55:25 +1100 In-Reply-To: <51499829.4000308@redhat.com> (Petr Hracek's message of "Wed, 20 Mar 2013 12:06:17 +0100") Message-ID: <87620m2slu.fsf@jackkelly.name> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQm26XZkJ66zuUlp6KYQns1VqIoun1wywU8JmuqrgQTAouzJ9JyaFTc/VonpRaAlnc7FHLkg X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, Stefano Lattarini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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 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 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 >> From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 20 08:04:28 2013 Received: (at 13588) by debbugs.gnu.org; 20 Mar 2013 12:04:28 +0000 Received: from localhost ([127.0.0.1]:36897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIHkq-0007Xk-2d for submit@debbugs.gnu.org; Wed, 20 Mar 2013 08:04:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46650) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIHkm-0007Xb-GR for 13588@debbugs.gnu.org; Wed, 20 Mar 2013 08:04:26 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2KC2cUd018294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Mar 2013 08:02:38 -0400 Received: from kiasportyw.brq.redhat.com (unused-4-188.brq.redhat.com [10.34.4.188]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2KC2a7T031054; Wed, 20 Mar 2013 08:02:37 -0400 Message-ID: <5149A55C.5030703@redhat.com> Date: Wed, 20 Mar 2013 13:02:36 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jack Kelly Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> In-Reply-To: <87620m2slu.fsf@jackkelly.name> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -9.4 (---------) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, Stefano Lattarini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.4 (---------) 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 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 > 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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 08:37:17 2013 Received: (at 13588) by debbugs.gnu.org; 21 Mar 2013 12:37:17 +0000 Received: from localhost ([127.0.0.1]:38698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIek8-0002ji-By for submit@debbugs.gnu.org; Thu, 21 Mar 2013 08:37:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50741) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIek5-0002ja-69 for 13588@debbugs.gnu.org; Thu, 21 Mar 2013 08:37:15 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2LCZLbo008148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Mar 2013 08:35:21 -0400 Received: from kiasportyw.brq.redhat.com (unused-4-188.brq.redhat.com [10.34.4.188]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2LCZIVf018759; Thu, 21 Mar 2013 08:35:19 -0400 Message-ID: <514AFE86.1020500@redhat.com> Date: Thu, 21 Mar 2013 13:35:18 +0100 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jack Kelly Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> In-Reply-To: <5149A55C.5030703@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -9.4 (---------) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, Stefano Lattarini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.4 (---------) 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 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 /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 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 >> 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@redhat.com Web: www.cz.redhat.com From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 21:41:59 2013 Received: (at 13588) by debbugs.gnu.org; 22 Mar 2013 01:41:59 +0000 Received: from localhost ([127.0.0.1]:39683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIqzV-0005xF-T6 for submit@debbugs.gnu.org; Thu, 21 Mar 2013 21:41:58 -0400 Received: from mail-da0-f54.google.com ([209.85.210.54]:36202) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIqzQ-0005x4-S8 for 13588@debbugs.gnu.org; Thu, 21 Mar 2013 21:41:55 -0400 Received: by mail-da0-f54.google.com with SMTP id p1so1961935dad.13 for <13588@debbugs.gnu.org>; Thu, 21 Mar 2013 18:39:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type:x-gm-message-state; bh=UbBjwqWa4w0USrIa0cuk7KRsyOs3JwvvD1QUAgfKn0E=; b=XuzoXdwSHvHFwiglPnMBzhclTzyaoj9+uC/MXoccXdZfyB5c/f2FjoqPNlkZNNtnzt TFeapN2OaQBwW28qu49BE6y1hcGg6pM04DTG83Wdtyuyokfs9y2uOFab6u8oB/4KZ31E J+Vi2n1Sx0JrxBup3FALUAqUTPclpPj+LGdlhS/34hJBkrFXPbAqXAtHyU9azvnwyaxn QjPVOMhkp3ZlXzyaWZfoDT9xA3Lsnk1UDNIGW0jW9ScIYV/IptQB0hkAmGipadQkqKA2 iigj6YNUC7wYoPRT3/MAaWJSGna7WM/IBeMvKIwFAVQgU7Lq2RihaUXLX/U4IWnhzwFk LjeA== X-Received: by 10.68.52.69 with SMTP id r5mr17560403pbo.145.1363916398311; Thu, 21 Mar 2013 18:39:58 -0700 (PDT) Received: from handybilly ([125.253.98.148]) by mx.google.com with ESMTPS id hp1sm795349pac.3.2013.03.21.18.39.54 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 21 Mar 2013 18:39:56 -0700 (PDT) From: Jack Kelly To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> Date: Fri, 22 Mar 2013 12:39:46 +1100 In-Reply-To: <514AFE86.1020500@redhat.com> (Petr Hracek's message of "Thu, 21 Mar 2013 13:35:18 +0100") Message-ID: <87r4j81acd.fsf@jackkelly.name> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQlKAqjlQTB3Ufsx5jxC8WZN07zli5RR8xckOBUq7Yi4jenCkO2KDnt70XWMoST89P8IigT1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, Stefano Lattarini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Petr Hracek 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 > 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 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 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 >>> 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 >>>>> >> From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 20 14:54:57 2013 Received: (at 13588) by debbugs.gnu.org; 20 Apr 2013 18:54:57 +0000 Received: from localhost ([127.0.0.1]:33875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UTcvy-0002EI-TR for submit@debbugs.gnu.org; Sat, 20 Apr 2013 14:54:57 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:48746) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UTcvu-0002E2-7M; Sat, 20 Apr 2013 14:54:49 -0400 Received: by mail-we0-f172.google.com with SMTP id r3so4645936wey.31 for ; Sat, 20 Apr 2013 11:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=qKScobLXrrxner1jFffuN2a8SXenrvv1v+qQFRRsjUU=; b=sBltbdaoJl5jyFKlsHz2Ok/odNPxLTFPgu41V24H7SqbKcQ5oFKVOwKQ7aTltgy9nl tY3Sl6+PEI3NBGECoOXEayx7Qj2oTbzCAIbf3/guNhpqUoV7nOTUqwJbKciktkS+sJqp 0pILzDOqnvihz+nPa9nr3i/KjKBzyj6yn3KBmF63zjKDSCzN/5dm9pFjAHt8MkYmvWX6 dJT92mMLlzoFgFc50dMLJlgr9Y1vwLPjt5kM9nE23O6kevLh3Za1cKLBWciqEFin384t 1lcFGoUBmD6RPh/d9RpU2zSduXZqdMaEq+wvVG1wsCPGHjSkO/3XDMKIAosRAs+KmXVM zf9Q== X-Received: by 10.180.79.227 with SMTP id m3mr2019748wix.12.1366483804032; Sat, 20 Apr 2013 11:50:04 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id g4sm11356590wib.11.2013.04.20.11.50.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Apr 2013 11:50:03 -0700 (PDT) Message-ID: <5172E358.3070503@gmail.com> Date: Sat, 20 Apr 2013 20:50:00 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Jack Kelly Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> <87r4j81acd.fsf@jackkelly.name> In-Reply-To: <87r4j81acd.fsf@jackkelly.name> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: Petr Hracek , 13588@debbugs.gnu.org, GNU bug tracker automated control server , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) 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 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@gmail.com> From: Stefano Lattarini 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@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 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 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: 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 --- 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@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl Manu Rouat emmanuel.rouat@wanadoo.fr +Marc Herbert marc.herbert@intel.com Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Marcus G. Daniels mgd@ute.santafe.edu Marius Vollmer mvo@zagadka.ping.de @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com Peter O'Gorman peter@pogma.com Peter Rosin peda@lysator.liu.se Peter Seiderer seiderer123@ciselant.de +Petr Hracek phracek@redhat.com Petter Reinholdtsen pere@hungry.com Petteri Räty betelgeuse@gentoo.org Phil Edwards phil@jaj.com @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Toshio Kuratomi toshio@tiki-lounge.com Tom Epperly tepperly@llnl.gov +Tom Rini tom_rini@mentor.com Ulrich Drepper drepper@gnu.ai.mit.edu Ulrich Eckhardt eckhardt@satorlaser.com Václav Haisman V.Haisman@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 /dev/null 2>&1 && break fi done -- 1.8.2.1.389.gcaa7d79 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 22 09:26:44 2013 Received: (at 13588) by debbugs.gnu.org; 22 Apr 2013 13:26:44 +0000 Received: from localhost ([127.0.0.1]:36738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUGlV-0005l7-P7 for submit@debbugs.gnu.org; Mon, 22 Apr 2013 09:26:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30807) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUGlJ-0005kM-EG; Mon, 22 Apr 2013 09:26:36 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MDLawm011409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Apr 2013 09:21:36 -0400 Received: from localhost.localdomain (unused-4-188.brq.redhat.com [10.34.4.188]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3MDLYcX001133; Mon, 22 Apr 2013 09:21:34 -0400 Message-ID: <5175395D.6080604@redhat.com> Date: Mon, 22 Apr 2013 15:21:33 +0200 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> <87r4j81acd.fsf@jackkelly.name> <5172E358.3070503@gmail.com> In-Reply-To: <5172E358.3070503@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r3MDLawm011409 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, GNU bug tracker automated control server , Jack Kelly , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hello Stefano, thanks for the patch. All is working properly. User is informed that UID is not enough smaller and configure script=20 does not failed. Result is below: test@localhost: ~/mycproject$ id uid=3D17000000(test) gid=3D1001(test) groups=3D1001(test)=20 context=3Dunconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 test@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=20 '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@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 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 s= o >> 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" =3D x"yes"; then >> # POSIX 1988 "ustar" format is defined with *fixed size* fields. Th= ere >> # is notably a 21 bits limit (2097151) for the uid and the gid. >> # http://lists.gnu.org/archive/html/bug-automake/2011-11/msg00014.h= tml so >> am_ustar_max_id=3D2097151 >> ... >> 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 messag= e >> 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 developer= s > 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.st= efano.lattarini@gmail.com> > From: Stefano Lattarini > Date: Sun, 17 Feb 2013 16:42:46 +0100 > Subject: [PATCH] tar: pax could hang configure when big UID are involve= d > > See automake bug#8343 and bug#13588. > > Tom Rini tom_rini@mentor.com says (in bug#8343): > > When the user has a UID or GID that is larger than the ustar forma= t > supports, pax does not error out gracefully in some cases (FC13). > > Marc Herbert 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 corrupte= d > 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 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: > > 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 > --- > 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@gmail.com > Maciej Stachowiak mstachow@mit.edu > Maciej W. Rozycki macro@ds2.pg.gda.pl > Manu Rouat emmanuel.rouat@wanadoo.fr > +Marc Herbert marc.herbert@intel.com > Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de > Marcus G. Daniels mgd@ute.santafe.edu > Marius Vollmer mvo@zagadka.ping.de > @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com > Peter O'Gorman peter@pogma.com > Peter Rosin peda@lysator.liu.se > Peter Seiderer seiderer123@ciselant.de > +Petr Hracek phracek@redhat.com > Petter Reinholdtsen pere@hungry.com > Petteri R=E4ty betelgeuse@gentoo.org > Phil Edwards phil@jaj.com > @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.ne= t > Tim Van Holder tim.van.holder@pandora.be > Toshio Kuratomi toshio@tiki-lounge.com > Tom Epperly tepperly@llnl.gov > +Tom Rini tom_rini@mentor.com > Ulrich Drepper drepper@gnu.ai.mit.edu > Ulrich Eckhardt eckhardt@satorlaser.com > V=E1clav Haisman V.Haisman@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=3Dconftest.dir && eval $am__tar_ >conftest.tar]) > rm -rf conftest.dir > if test -s conftest.tar; then > - AM_RUN_LOG([$am__untar + m4_if([$1], [ustar], [ > + if test "$_am_tool" =3D 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=3D2097151 # 2^21 - 1 > + am_max_gid=3D$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=3D`id -u || echo unknown` > + am_gid=3D`id -g || echo unknown` > + AC_MSG_CHECKING([whether UID '$am_uid' is small enough for ust= ar]) > + 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 ust= ar]) > + if test $am_gid -le $am_max_gid; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + continue > + fi > + fi > + ]) # $1 =3D=3D ustar > grep GrepMe conftest.dir/file >/dev/null 2>&1 && break > fi > done --=20 Best regards / S pozdravem Petr Hracek From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 22 10:00:47 2013 Received: (at 13588) by debbugs.gnu.org; 22 Apr 2013 14:00:47 +0000 Received: from localhost ([127.0.0.1]:37060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUHIU-0000D9-T0 for submit@debbugs.gnu.org; Mon, 22 Apr 2013 10:00:47 -0400 Received: from mail-bk0-f47.google.com ([209.85.214.47]:33625) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUHIR-0000Cl-0e; Mon, 22 Apr 2013 10:00:44 -0400 Received: by mail-bk0-f47.google.com with SMTP id ji2so1007629bkc.20 for ; Mon, 22 Apr 2013 06:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ZOZJrEfRXleSka9RgYCORDW1rWx9++/92LLaY0SYYvQ=; b=XkHhigKtocltxcLI5mdxOalKtBoUTHYAVkKAMF4cEX9NtUouwR1UcRdpyzbdDsu7kX 0NoEuEM4A8YTPWp1CbWJu1IidUD2rL4/OnOA+NTLpiyH/DaEtgi1eoJFvDqvYpg/3trE iznX7JT5YKnKkWrZ7jHTGiw/U+mc7V0cWNnzOFKhOdCOUjhKnz3oK6YhZB2bZRJoqIc6 13DQ8eQoA+7V9944lfyB14kR6mUN7JtasBPsj972UcwFTGsyYwhWtusmNeLcN5ZnI0fN ybjxnwR4S1EoXTKSBK/2/ORKHWxLR2vUOkShOCXehhvXhnxFlVK8ok/K3dPScn10sxpj JF6Q== X-Received: by 10.205.105.196 with SMTP id dr4mr11363658bkc.45.1366638950070; Mon, 22 Apr 2013 06:55:50 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id f4sm2301125bkz.14.2013.04.22.06.55.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 06:55:49 -0700 (PDT) Message-ID: <51754162.7010805@gmail.com> Date: Mon, 22 Apr 2013 15:55:46 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> <87r4j81acd.fsf@jackkelly.name> <5172E358.3070503@gmail.com> <5175395D.6080604@redhat.com> In-Reply-To: <5175395D.6080604@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, GNU bug tracker automated control server , Jack Kelly , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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@localhost: ~/mycproject$ id > uid=17000000(test) gid=1001(test) groups=1001(test) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 > test@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 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 23 04:50:51 2013 Received: (at 13588) by debbugs.gnu.org; 23 Apr 2013 08:50:51 +0000 Received: from localhost ([127.0.0.1]:38301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUYw6-0001wU-Cd for submit@debbugs.gnu.org; Tue, 23 Apr 2013 04:50:51 -0400 Received: from mail-bk0-f44.google.com ([209.85.214.44]:42294) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUYw0-0001vw-1J; Tue, 23 Apr 2013 04:50:46 -0400 Received: by mail-bk0-f44.google.com with SMTP id jk14so44017bkc.17 for ; Tue, 23 Apr 2013 01:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=B5qwcj0sBw2+0pOyoHmLpf9jp03TFCHXu2fGmgbU1tY=; b=fq6FgsUDqJKLmREc5u3Bj3SdQm5sQBMip4YHhWXRzB+IYjijaEx0hqgccJuF+tyZD8 scaCnO7G0odYgAj7UEuY9AYcD7zVkmaG8G7zkxanzH8B4I5Hk8icjl8hBbK5XRK3JZWA Pq7N7EbUEPyK7flABpAEYFMX5ZhAJG7f/OhCqB6cAXDz2f/L9OUDVDebPXSm1vSrZLpE K6X5THWKrn1kdU9wtGjAaKRzrvwe5d5XYlwc7uE65AcwicJEd9axulhWK1Kmqb/OzUmC 6JKX395+09xdj0qvdLp3vy1EUV8uxjZr/Hl9jQctcFNfDu/0eG4+5kWWRx+JkFFRP2KO iaGg== X-Received: by 10.205.22.196 with SMTP id qx4mr3515526bkb.57.1366706747057; Tue, 23 Apr 2013 01:45:47 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPS id jm15sm7657256bkb.13.2013.04.23.01.45.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 01:45:46 -0700 (PDT) Message-ID: <51764A37.7020003@gmail.com> Date: Tue, 23 Apr 2013 10:45:43 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> <87r4j81acd.fsf@jackkelly.name> <5172E358.3070503@gmail.com> <5175395D.6080604@redhat.com> <51754162.7010805@gmail.com> In-Reply-To: <51754162.7010805@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, GNU bug tracker automated control server , Jack Kelly , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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@localhost: ~/mycproject$ id >> uid=17000000(test) gid=1001(test) groups=1001(test) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 >> test@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: From: Stefano Lattarini 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@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 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 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: 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 --- 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@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl Manu Rouat emmanuel.rouat@wanadoo.fr +Marc Herbert marc.herbert@intel.com Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Marcus G. Daniels mgd@ute.santafe.edu Marius Vollmer mvo@zagadka.ping.de @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com Peter O'Gorman peter@pogma.com Peter Rosin peda@lysator.liu.se Peter Seiderer seiderer123@ciselant.de +Petr Hracek phracek@redhat.com Petter Reinholdtsen pere@hungry.com Petteri Räty betelgeuse@gentoo.org Phil Edwards phil@jaj.com @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Toshio Kuratomi toshio@tiki-lounge.com Tom Epperly tepperly@llnl.gov +Tom Rini tom_rini@mentor.com Ulrich Drepper drepper@gnu.ai.mit.edu Ulrich Eckhardt eckhardt@satorlaser.com Václav Haisman V.Haisman@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 &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 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 23 11:09:41 2013 Received: (at 13588) by debbugs.gnu.org; 23 Apr 2013 15:09:42 +0000 Received: from localhost ([127.0.0.1]:39147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUeqi-0007xY-Tv for submit@debbugs.gnu.org; Tue, 23 Apr 2013 11:09:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22969) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUeqf-0007xJ-0s; Tue, 23 Apr 2013 11:09:39 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3NF4cnu009196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 23 Apr 2013 11:04:38 -0400 Received: from [10.34.4.188] (unused-4-188.brq.redhat.com [10.34.4.188]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3NF4Z7n026589; Tue, 23 Apr 2013 11:04:36 -0400 Message-ID: <5176A304.3010202@redhat.com> Date: Tue, 23 Apr 2013 17:04:36 +0200 From: Petr Hracek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> <87r4j81acd.fsf@jackkelly.name> <5172E358.3070503@gmail.com> <5175395D.6080604@redhat.com> <51754162.7010805@gmail.com> <51764A37.7020003@gmail.com> In-Reply-To: <51764A37.7020003@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r3NF4cnu009196 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, GNU bug tracker automated control server , Jack Kelly , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hello Stefano, I was a little bit busy. From my point of view user is not informed that his UID is too big. I=20 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@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@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=20 . 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: $? =3D 0 configure:2400: tardir=3Dconftest.dir && eval tar --format=3Dustar -chf -= =20 "$tardir" >conftest.tar tar: value 17000000 out of uid_t range 0..2097151 tar: Exiting with failure status due to previous errors configure:2403: $? =3D 2 configure:2400: tardir=3Dconftest.dir && eval pax -L -x ustar -w "$tardir= "=20 >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: $? =3D 1 configure: 2421: UID '17000000' too large for ustar configure:2400: tardir=3Dconftest.dir && eval find "$tardir" -print | cpi= o=20 -o -H ustar -L >conftest.tar 5 blocks configure:2403: $? =3D 0 configure:2400: tardir=3Dconftest.dir && eval false >conftest.tar configure:2403: $? =3D 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@localhost: ~/mycproject$ id >>> uid=3D17000000(test) gid=3D1001(test) groups=3D1001(test) context=3Du= nconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 >>> test@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 '1= 7000000' 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-hi= gh UID >> only in the generated config.log rather than in the console output. U= pdated >> 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: > From: Stefano Lattarini > Date: Sun, 17 Feb 2013 16:42:46 +0100 > Subject: [PATCH] tar: pax could hang configure when big UID are involve= d > > See automake bug#8343 and bug#13588. > > Tom Rini tom_rini@mentor.com says (in bug#8343): > > When the user has a UID or GID that is larger than the ustar forma= t > supports, pax does not error out gracefully in some cases (FC13). > > Marc Herbert 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 corrupte= d > 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 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: > > 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 > --- > 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@gmail.com > Maciej Stachowiak mstachow@mit.edu > Maciej W. Rozycki macro@ds2.pg.gda.pl > Manu Rouat emmanuel.rouat@wanadoo.fr > +Marc Herbert marc.herbert@intel.com > Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de > Marcus G. Daniels mgd@ute.santafe.edu > Marius Vollmer mvo@zagadka.ping.de > @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com > Peter O'Gorman peter@pogma.com > Peter Rosin peda@lysator.liu.se > Peter Seiderer seiderer123@ciselant.de > +Petr Hracek phracek@redhat.com > Petter Reinholdtsen pere@hungry.com > Petteri R=E4ty betelgeuse@gentoo.org > Phil Edwards phil@jaj.com > @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.ne= t > Tim Van Holder tim.van.holder@pandora.be > Toshio Kuratomi toshio@tiki-lounge.com > Tom Epperly tepperly@llnl.gov > +Tom Rini tom_rini@mentor.com > Ulrich Drepper drepper@gnu.ai.mit.edu > Ulrich Eckhardt eckhardt@satorlaser.com > V=E1clav Haisman V.Haisman@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=3Dconftest.dir && eval $am__tar_ >conftest.tar]) > rm -rf conftest.dir > if test -s conftest.tar; then > - AM_RUN_LOG([$am__untar + m4_if([$1], [ustar], [ > + if test "$_am_tool" =3D 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=3D2097151 # 2^21 - 1 > + am_max_gid=3D$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=3D`id -u || echo unknown` > + am_gid=3D`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 =3D=3D ustar > grep GrepMe conftest.dir/file >/dev/null 2>&1 && break > fi > done --=20 Best regards / S pozdravem Petr Hracek From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 23 15:42:58 2013 Received: (at 13588) by debbugs.gnu.org; 23 Apr 2013 19:42:58 +0000 Received: from localhost ([127.0.0.1]:39533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUj7B-0003f5-Hj for submit@debbugs.gnu.org; Tue, 23 Apr 2013 15:42:57 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:38234) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUj72-0003em-Ew; Tue, 23 Apr 2013 15:42:56 -0400 Received: by mail-wg0-f52.google.com with SMTP id k13so479317wgh.19 for ; Tue, 23 Apr 2013 12:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=rGpQgEo/R1btOAk7kiasP36TlHbGEI2qOA5L6zomIcc=; b=u8RslZSUOXvy7xZku0hfP3ZuKSqxhS1ibnseXEYK2mzBrGGq9lzC/zj88GYYBt/Fj4 RzD19q+/cJbpw0Lf0VUZ18LFWBI59elcbedETzBbbuOY1iALZB3My4QOyMqN6MSRKbe2 c640lNK7BcdVaDefqT+UpUr2PguzuufeSNsTikvlhk2m8N4vHCAeR3JK8uuhn+ivOAJ2 3JAAoVOkEe/rvhJRVhpHN+aCqyCxRL4HW+Et7F44pwHCOFY/Rl5KkzpVg8oxk8dB7v7u AUWEiXjnWmue/l98/2OcUz+sIzPuXRNu9fA3jvCA1TMmtPvlGKli6/y2VbYwAb5xtB+P Yw+w== X-Received: by 10.181.12.5 with SMTP id em5mr62417119wid.24.1366745869500; Tue, 23 Apr 2013 12:37:49 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id s6sm13348033wij.4.2013.04.23.12.37.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Apr 2013 12:37:48 -0700 (PDT) Message-ID: <5176E303.1000303@gmail.com> Date: Tue, 23 Apr 2013 21:37:39 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Petr Hracek Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <510923F6.5030601@lysator.liu.se> <51093285.4070709@redhat.com> <5110F471.3070302@redhat.com> <5110FCA6.7030609@lysator.liu.se> <5110FE3B.9060502@redhat.com> <51110E57.1090606@gmail.com> <51499829.4000308@redhat.com> <87620m2slu.fsf@jackkelly.name> <5149A55C.5030703@redhat.com> <514AFE86.1020500@redhat.com> <87r4j81acd.fsf@jackkelly.name> <5172E358.3070503@gmail.com> <5175395D.6080604@redhat.com> <51754162.7010805@gmail.com> <51764A37.7020003@gmail.com> <5176A304.3010202@redhat.com> In-Reply-To: <5176A304.3010202@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, GNU bug tracker automated control server , Jack Kelly , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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@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@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 . > 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 24 09:00:01 2013 Received: (at submit) by debbugs.gnu.org; 24 Apr 2013 13:00:01 +0000 Received: from localhost ([127.0.0.1]:40614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUzIm-0005rI-9D for submit@debbugs.gnu.org; Wed, 24 Apr 2013 09:00:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43584) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UUzIj-0005r0-1O for submit@debbugs.gnu.org; Wed, 24 Apr 2013 08:59:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUzDo-0002H3-Dz for submit@debbugs.gnu.org; Wed, 24 Apr 2013 08:54:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-106.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:38210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUzDo-0002Gu-8z for submit@debbugs.gnu.org; Wed, 24 Apr 2013 08:54:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUzDj-0003cZ-6F for bug-automake@gnu.org; Wed, 24 Apr 2013 08:54:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUzDg-0002AQ-OT for bug-automake@gnu.org; Wed, 24 Apr 2013 08:54:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUzDg-0002AA-FO; Wed, 24 Apr 2013 08:54:44 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3OCscU9025487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Apr 2013 08:54:38 -0400 Received: from unused-4-121.brq.redhat.com (unused-4-121.brq.redhat.com [10.34.4.121]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3OCsbdQ005606; Wed, 24 Apr 2013 08:54:37 -0400 From: Pavel Raiskup To: bug-automake@gnu.org Subject: Re: bug#13588: Pax hangs in case big UID Date: Wed, 24 Apr 2013 14:54:36 +0200 Message-ID: <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> User-Agent: KMail/4.10.2 (Linux/3.8.8-202.fc18.x86_64; KDE/4.10.2; x86_64; ; ) In-Reply-To: <51764A37.7020003@gmail.com> References: <5109209F.9010400@redhat.com> <51754162.7010805@gmail.com> <51764A37.7020003@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit Cc: 13588@debbugs.gnu.org, "automake-patches@gnu.org" , Jack Kelly , Stefano Lattarini , Petr Hracek , GNU bug tracker automated control server X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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 rm -rf conftest.dir > if test -s conftest.tar; then > - AM_RUN_LOG([$am__untar + 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 25 08:24:54 2013 Received: (at submit) by debbugs.gnu.org; 25 Apr 2013 12:24:54 +0000 Received: from localhost ([127.0.0.1]:42497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVLEK-0002Ry-GK for submit@debbugs.gnu.org; Thu, 25 Apr 2013 08:24:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34098) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVLEH-0002Rk-Iq for submit@debbugs.gnu.org; Thu, 25 Apr 2013 08:24:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVL9A-0001Zm-Sd for submit@debbugs.gnu.org; Thu, 25 Apr 2013 08:19:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:39366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVL9A-0001Zi-Nj for submit@debbugs.gnu.org; Thu, 25 Apr 2013 08:19:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVL93-0002zZ-An for bug-automake@gnu.org; Thu, 25 Apr 2013 08:19:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVL8v-0001GY-Sm for bug-automake@gnu.org; Thu, 25 Apr 2013 08:19:25 -0400 Received: from mail-bk0-x22a.google.com ([2a00:1450:4008:c01::22a]:34150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVL8v-0001GJ-Do; Thu, 25 Apr 2013 08:19:17 -0400 Received: by mail-bk0-f42.google.com with SMTP id jc3so1228882bkc.1 for ; Thu, 25 Apr 2013 05:19:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=eVN29DkdKLoIQfCSfJbqIhLnMG1z33ZBGeX4MAoT6YU=; b=EHFjE0wDqdyqWnWJzy3dVGzxmQlAH4RacBbd/NkJou50PuOclKKu1F6VgDBBpQa1Qv xe4rezPNtBGG/3ML+iFiXsYR8s4E5llP69Mw1vBnw0qxlv4e9GVAi8Jik54CYk32w+0L 1tRVyiUXF1zuo2U0glq7V+ZZOiY/+kV+xYy8Vim2PGj5X597pBB2/4d2gpXCRjgE+A5g o9Mxqyusg2TSFCrZuaia25Sqegjur9xs2sg3KXGu1DLUJNBnIqCVE0b8GHizwk/yOvLh CuMbbFYMEhCwBIyknXqkUIvdeeoNRqrqcH03ZPlFD+ZO/GjqFKpPrpWAed/cK1D/GqGq +f0g== X-Received: by 10.205.22.196 with SMTP id qx4mr6977396bkb.57.1366892356307; Thu, 25 Apr 2013 05:19:16 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id jm15sm1511148bkb.13.2013.04.25.05.19.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 05:19:15 -0700 (PDT) Message-ID: <51791F34.4040006@gmail.com> Date: Thu, 25 Apr 2013 14:19:00 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <51754162.7010805@gmail.com> <51764A37.7020003@gmail.com> <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> In-Reply-To: <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: 13588@debbugs.gnu.org, "automake-patches@gnu.org" , Jack Kelly , bug-automake@gnu.org, Petr Hracek , GNU bug tracker automated control server X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) 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 > 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 > + 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: From: Stefano Lattarini 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@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 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 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: 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 Helped-by: Petr Hracek Helped-by: Marc Herbert Helped-by: Tom Rini Signed-off-by: Stefano Lattarini --- 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@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl Manu Rouat emmanuel.rouat@wanadoo.fr +Marc Herbert marc.herbert@intel.com Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Marcus G. Daniels mgd@ute.santafe.edu Marius Vollmer mvo@zagadka.ping.de @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com Peter O'Gorman peter@pogma.com Peter Rosin peda@lysator.liu.se Peter Seiderer seiderer123@ciselant.de +Petr Hracek phracek@redhat.com Petter Reinholdtsen pere@hungry.com Petteri Räty betelgeuse@gentoo.org Phil Edwards phil@jaj.com @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Toshio Kuratomi toshio@tiki-lounge.com Tom Epperly tepperly@llnl.gov +Tom Rini tom_rini@mentor.com Ulrich Drepper drepper@gnu.ai.mit.edu Ulrich Eckhardt eckhardt@satorlaser.com Václav Haisman V.Haisman@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 /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 . + +# 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 < 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 +# . +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 +# . +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)) +# . +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 < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 06:48:28 2013 Received: (at submit) by debbugs.gnu.org; 26 Apr 2013 10:48:28 +0000 Received: from localhost ([127.0.0.1]:44257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVgCZ-0004gY-On for submit@debbugs.gnu.org; Fri, 26 Apr 2013 06:48:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51641) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVgCW-0004gO-Tu for submit@debbugs.gnu.org; Fri, 26 Apr 2013 06:48:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVgCU-0006xv-0M for submit@debbugs.gnu.org; Fri, 26 Apr 2013 06:48:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-104.2 required=5.0 tests=BAYES_50, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVgCT-0006xo-UB for submit@debbugs.gnu.org; Fri, 26 Apr 2013 06:48:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVgCR-0004yM-8f for bug-automake@gnu.org; Fri, 26 Apr 2013 06:48:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVgCP-0006wY-Kr for bug-automake@gnu.org; Fri, 26 Apr 2013 06:48:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVgCP-0006wO-Dc; Fri, 26 Apr 2013 06:48:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3QAmA3m011238 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Apr 2013 06:48:11 -0400 Received: from unused-4-121.brq.redhat.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3QAm90Z000930; Fri, 26 Apr 2013 06:48:10 -0400 From: Pavel Raiskup To: bug-automake@gnu.org Subject: Re: bug#13588: Pax hangs in case big UID Date: Fri, 26 Apr 2013 12:48:08 +0200 Message-ID: <10687216.7DJVJh5VXv@unused-4-121.brq.redhat.com> User-Agent: KMail/4.10.2 (Linux/3.8.8-202.fc18.x86_64; KDE/4.10.2; x86_64; ; ) In-Reply-To: <51791F34.4040006@gmail.com> References: <5109209F.9010400@redhat.com> <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> <51791F34.4040006@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org, jack@jackkelly.name, Stefano Lattarini , phracek@redhat.com, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, I'm just thinking aloud here.. I'm ok with this. > Marc Herbert 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 corrupt= ed > 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 t= han 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 ev= en more interesting. Consider running everything under user with big UID:= When 'star' is asked for 'ustar' format, it does not complain and wor= ks. 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 t= hat it is impossible to store _correctly_ into 'ustar' (which will always b= e 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 =E2=80=94 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 =E2=80=94 people dealing with this problem ar= e upstream so they may easily switch to 'pax'. The most important is to not hang during ./configure phase, and stop do= ing it asap. One thing as a future enhancement would be to allow redefine the am__ta= r 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 re= sort > + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls= below > + # are definitely unexpected, so allow the users to see them (tha= t is, > + # avoid stderr redirection). > + am_uid=3D`id -u || echo unknown` > + am_gid=3D`id -g || echo unknown` > + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar for= mat]) > + if test $am_uid -le $am_max_uid; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + _am_tools=3Dnone > + fi > + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar for= mat]) > + if test $am_gid -le $am_max_gid; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + _am_tools=3Dnone > + fi], Here ^^ it would be possible to de-duplicate (just one message to stand= ard 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D commit 1f28bce58b3d98fcae26af3f848ecf900b2d43d1 (HEAD, branch-1.13.2) Author: Pavel Raiskup AuthorDate: Thu Apr 25 15:22:38 2013 +0200 Commit: Pavel Raiskup 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 suppor= t # 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=3D2097151 # 2^21 - 1 - am_max_gid=3D$am_max_uid + am_max_id=3D2097151 # 2^21 - 1 + # The $UID and $GID variables are not portable, so we need to reso= rt # to the POSIX-mandated id(1) utility. Errors in the 'id' calls b= elow # are definitely unexpected, so allow the users to see them (that = is, # avoid stderr redirection). am_uid=3D`id -u || echo unknown` am_gid=3D`id -g || echo unknown` - AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar forma= t]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - _am_tools=3Dnone - fi - AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar forma= t]) - 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; the= n 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=3D$(pwd)/bin$PATH_SEPARATOR$PATH am_uid=3D16777216; export am_uid am_gid=3D1000; 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" =20 # Another problematic ID reported in @@ -71,8 +70,7 @@ checked "how to create a ustar tar archive" "none" am_uid=3D1000; export am_uid am_gid=3D17000000; 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" =20 # The minimal ID that is too big. @@ -81,8 +79,14 @@ two_to_twentyone=3D$((32 * 32 * 32 * 32 * 2)) am_uid=3D$two_to_twentyone; export am_uid am_gid=3D$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" =20 +# The maximal ID that is OK. +two_to_twentyone_minus_one=3D$((32 * 32 * 32 * 32 * 2 - 1 )) +# . +am_uid=3D$two_to_twentyone_minus_one; export am_uid +am_gid=3D$two_to_twentyone_minus_one; export am_gid +run_configure +checked "whether UID and GID are storable in ustar archive" "yes" : From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 07:03:41 2013 Received: (at 13588) by debbugs.gnu.org; 26 Apr 2013 11:03:41 +0000 Received: from localhost ([127.0.0.1]:44276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVgRI-0006Zm-1F for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:03:41 -0400 Received: from mail.lysator.liu.se ([130.236.254.3]:53852) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVgRE-0006Yx-Dc for 13588@debbugs.gnu.org; Fri, 26 Apr 2013 07:03:38 -0400 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 0AB2040038; Fri, 26 Apr 2013 13:03:35 +0200 (CEST) Received: from [192.168.0.64] (90-227-119-137-no95.business.telia.com [90.227.119.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 53EA340005; Fri, 26 Apr 2013 13:03:34 +0200 (CEST) Message-ID: <517A5F05.7060504@lysator.liu.se> Date: Fri, 26 Apr 2013 13:03:33 +0200 From: Peter Rosin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Stefano Lattarini Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <51754162.7010805@gmail.com> <51764A37.7020003@gmail.com> <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> <51791F34.4040006@gmail.com> In-Reply-To: <51791F34.4040006@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) 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 > Helped-by: Petr Hracek > Helped-by: Marc Herbert > Helped-by: Tom Rini > Signed-off-by: Stefano Lattarini > --- > NEWS | 6 ++++ > THANKS | 3 ++ I don't think gitlog-to-changelog recognizes anything other than Copyright-paperwork-exempt: Yes Co-authored-by: Joe User Signed-off-by: Joe User 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 07:18:49 2013 Received: (at submit) by debbugs.gnu.org; 26 Apr 2013 11:18:49 +0000 Received: from localhost ([127.0.0.1]:44296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVgfw-0007iH-ON for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:18:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59334) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVgfv-0007i7-Cj for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:18:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVgft-0000QL-6s for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:18:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVgft-0000QG-3g for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:18:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVgfr-0001qj-US for bug-automake@gnu.org; Fri, 26 Apr 2013 07:18:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVgfq-0000Pt-Np for bug-automake@gnu.org; Fri, 26 Apr 2013 07:18:43 -0400 Received: from mail-bk0-x232.google.com ([2a00:1450:4008:c01::232]:55238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVgfq-0000Pi-G8; Fri, 26 Apr 2013 07:18:42 -0400 Received: by mail-bk0-f50.google.com with SMTP id ik5so1717809bkc.37 for ; Fri, 26 Apr 2013 04:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=A2sBN6qTVZDpeSdL4rXE76cRbpngC+Gqh0zW77Lsj48=; b=i54vtgjqKw3VolW6ik3PGkXlaA5/uW4EdCMoRTwNECbqKN4PFUFFHalelYhvXbWuvU sK7ddvCwKt6BNM+LtYuphHCSnFq06lTUIY/3Ut97y1N6Unzq1pJdArRkHYasz1Hq7wdU sB92Hm0aoXtjzQ64uddY3CgY60dZwEbUBHpeOrJzawAxtiQvVZ7dNCRIs4l+TGQJFNJt s/oOA9AfUDVkK4J8TnaG8uvFA/4phmxh8BORT8gYh72NqHn33eDxqFsjt379vmmD4BwP y3paafjnI/6gJAcz9SNqI7o6hQ45HGBkqXTT+TnfLwROBlUVI6j+oI+gh/5qKmTahr6U 7iig== X-Received: by 10.204.57.131 with SMTP id c3mr18071332bkh.22.1366975120873; Fri, 26 Apr 2013 04:18:40 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id jz9sm3033339bkb.1.2013.04.26.04.18.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 04:18:39 -0700 (PDT) Message-ID: <517A628D.8040507@gmail.com> Date: Fri, 26 Apr 2013 13:18:37 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> <51791F34.4040006@gmail.com> <10687216.7DJVJh5VXv@unused-4-121.brq.redhat.com> In-Reply-To: <10687216.7DJVJh5VXv@unused-4-121.brq.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org, jack@jackkelly.name, bug-automake@gnu.org, phracek@redhat.com, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 07:19:52 2013 Received: (at 13588) by debbugs.gnu.org; 26 Apr 2013 11:19:52 +0000 Received: from localhost ([127.0.0.1]:44306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVggx-0007nb-Ao for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:19:51 -0400 Received: from mail-bk0-f42.google.com ([209.85.214.42]:50572) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVggu-0007nE-4D for 13588@debbugs.gnu.org; Fri, 26 Apr 2013 07:19:49 -0400 Received: by mail-bk0-f42.google.com with SMTP id jc3so1700396bkc.29 for <13588@debbugs.gnu.org>; Fri, 26 Apr 2013 04:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=0aO1RW7NdG5cvIn44MIhaBKNn2cnRX3vntkbk79Xhas=; b=lzbHBXXqxzRKWvln61vVhLTld17gJhxv+RKHJ633s12EqHMQv4QBM0EAaA3RyOGEiB iDpW4P1pcf8wj7AWqVlxjHBkrnDihLF9R+vC9XYC5sKJlPPXsihKhh+EVrcvd/3Uvw8V 3xKMBoAogYpq41h1Osds46Pyjut7VO43b2YQykkRvEXtEzWAD0fookN1ip2+6B377Gcd vRqg7WVUJFCc9BlRzbT+l0LK/iQ/n9GTiqLfJAYej6Aftd2NNW+ZwdvC71gWLrlslSp9 iuGlcojMiREk0sNIZvvFtrK+YB/pyCUEgYdl0tHwi23ch842AZhY/qXblCC9zuUqC/BT 7YEQ== X-Received: by 10.205.105.196 with SMTP id dr4mr18596484bkc.45.1366975187191; Fri, 26 Apr 2013 04:19:47 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id 2sm3019016bki.19.2013.04.26.04.19.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 04:19:46 -0700 (PDT) Message-ID: <517A62D0.1040403@gmail.com> Date: Fri, 26 Apr 2013 13:19:44 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Peter Rosin Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <51754162.7010805@gmail.com> <51764A37.7020003@gmail.com> <3493565.N0imbrX8o3@unused-4-121.brq.redhat.com> <51791F34.4040006@gmail.com> <517A5F05.7060504@lysator.liu.se> In-Reply-To: <517A5F05.7060504@lysator.liu.se> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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 >> Helped-by: Petr Hracek >> Helped-by: Marc Herbert >> Helped-by: Tom Rini >> Signed-off-by: Stefano Lattarini >> --- >> NEWS | 6 ++++ >> THANKS | 3 ++ > > I don't think gitlog-to-changelog recognizes anything other than > > Copyright-paperwork-exempt: Yes > Co-authored-by: Joe User > Signed-off-by: Joe User > > 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 07:49:12 2013 Received: (at submit) by debbugs.gnu.org; 26 Apr 2013 11:49:12 +0000 Received: from localhost ([127.0.0.1]:44321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVh9L-0002SZ-Fu for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:49:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39592) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVh9I-0002SE-LZ for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:49:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVh9H-0002Yv-3f for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:49:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-105.5 required=5.0 tests=BAYES_05, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:34253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVh9G-0002Yo-W0 for submit@debbugs.gnu.org; Fri, 26 Apr 2013 07:49:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVh9F-0005oC-Uf for bug-automake@gnu.org; Fri, 26 Apr 2013 07:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVh9E-0002Xn-Bv for bug-automake@gnu.org; Fri, 26 Apr 2013 07:49:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVh9E-0002XA-3e; Fri, 26 Apr 2013 07:49:04 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3QBmvwN022397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Apr 2013 07:48:58 -0400 Received: from unused-4-121.brq.redhat.com (ovpn-116-57.ams2.redhat.com [10.36.116.57]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3QBmujD022187; Fri, 26 Apr 2013 07:48:57 -0400 From: Pavel Raiskup To: bug-automake@gnu.org Subject: Re: bug#13588: Pax hangs in case big UID Date: Fri, 26 Apr 2013 13:48:55 +0200 Message-ID: <1561120.RkRRaR8MNL@unused-4-121.brq.redhat.com> User-Agent: KMail/4.10.2 (Linux/3.8.8-202.fc18.x86_64; KDE/4.10.2; x86_64; ; ) In-Reply-To: <517A628D.8040507@gmail.com> References: <5109209F.9010400@redhat.com> <10687216.7DJVJh5VXv@unused-4-121.brq.redhat.com> <517A628D.8040507@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2360538.y1hxCr4XUY" Content-Transfer-Encoding: 7Bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org, jack@jackkelly.name, Stefano Lattarini , phracek@redhat.com, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is a multi-part message in MIME format. --nextPart2360538.y1hxCr4XUY Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" > 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 --nextPart2360538.y1hxCr4XUY Content-Disposition: attachment; filename="test-suite.log.gz" Content-Transfer-Encoding: base64 Content-Type: application/gzip; name="test-suite.log.gz" H4sICDhpelEAA3Rlc3Qtc3VpdGUubG9nAO1ZbXPaOBD+fP4VexxTmhDhQNPLjBlujmtybaYvyRB6 10nSI8IW4MNvJ8mBJs1/v5VsAwbc0kwvN+0kH4gsPfvsane1kuxWa/M/AwCev3kL7ViGPh0zqNfq T2p124KaKZmQRMSuZDUvHBpfwNoyjJ+ge9xtv7Kgjs2T9umpBbCLzdOXRydp893v7SMEqGbS0th3 CVj1HnY6xx3VNGo1sMNAskAKywLLYZEcWdAwjERQmpJyEl4xzl2HrbXUMDpxELjBEAY89MENhKSe Z4+YPbYgCI0uThZOeChDO/RUT8CMk3b3BbTAHIU+MyNOXTGOI2yEfzNbCpOmPjOlOeE0sjbA0all xoKbntv/ec+0bYoGpD2hTT2z7wbJo27MnobUZ2IRJ2ZDy628DWu6aguaVsBGtQrRxDE2mMqix2uO yzPRKtgTp3UnAmD2KIT2s97x2+7J266iolL9jvzQAVqdAvUJQbnZCLX1bIjKWiB/IlmoBpUWzJdB 2lQKUwgZhJy5wyAD439MA8TVTCXgDmPODJ0VOlUQQOG30wNih35Epdv3WJY6NczJLFRm2gfEngtP RkyOGId+7HoOsODK5WHgYwqDK0DQgCmGD0wsq5MjzqhDBB0w8MfoGCBRTlnWmRcc0slYwdT/VSP0 2hZMCig/ft1+ebi1ojyPjKMo5IgOcFkwB64odylOXqyIjcIJyBBstFkytP5qHzBAQLk9cq/0FIdB rEI2k5AjKmHIAsapoh64SIt4hromqB+HA5jFQhE4ai3OeqxEl2LKYlZD58tYGLmnBdxrnJJSg2HW s3NcIQ3d0k0yvHYjTK1eLwqF7HHmY1r21Aj6uVX51apo8Hn9vQWHWIS44sQhTOiQf4DLO+R6xXAH oOorEAdKi6OYp7ulJnqBBeiaYN0oEPkhwlnAj5gEjPtAGru7QNiU2elSiasTuLmFSrMCjx6BQvDB OqKPH+EGhMdYBE8/iWzCbROYJxhYTTTLKDZdcSYJujqWigVQKsGFgcCNJ7j/9ClK/JCfI59Md4Zh lU/VXC+aQELEgBJaFt/b2wPiucFYQD3nKFrlnxdecu5GMkqhltErVow22USWkySrKgTFiQ3Ez1Qn 2rUHE5NIRw+t8zjlKomXB1Sw1TLV9dCnsoXLltijARAolRMZjCQ8Pzs6aRHSV2HTiwTN+GWZq4Yd teH1fI28YvTqYYlUU+MHUOSwKngCf4YcuUdUEB4HamPzGA16kvkRPihthQRQ2U7FtiuI7bY7rcpd 0izdVHEXCSuLJVJX7Ic6+VAnH+rkQ538z5aITbFZKXBWBU/bGMDt9HF7SyfSqrsdu7BIfkwCOFUx azYzrv51IyXrI0GjmAGBBRReZo73SRO8IhOmmfz0ulh6WiR9lgrHgbqacCaESrq1HGdrKMToyx2a yiBbHKh2SoX4mS1KdkVOdSooE1Rdj7KFSCYrUGOecytDSbFc7jZ7yfVqtV8VhZRvrapsyRQxYkKz qSthV1UQx+6lRabXx3xtXT47UC8HWqXyzdnpi94fh53To+M31dqtVVLJbxcZpAbxkowuFHj1IZj4 Yuev87+siwvzvXWufnfMncql9iZCUa3Dku0VNXVfnxwcdYgp/ehWbdqOTcpls5SB1casrt6XqGDG cAc7k+mn8rWFezFWQcFtZQxeygjBpBu4U6Reck5iEP4t/EOm5ByRe3Cu3HyHPnHku7Kb9brONfA4 WCugDimzIS3WS5xaZDusk8k4czlcwIGwxzdztsfoavQlOg4HYp+KMezu72sDk0NAeR7r0tZcbjaD g8PTLka/lQPmvLMJPu+eTSTm/ljvk7kfZyKroOaM5jbZKLLdYVGumay3Om4QW5kL1+FWI7uELtoJ VuT0UTsfWdwky+lCShRlZaD+8Fboe30r9LUvLWZBTV24Hr0J5UjPOoQ+01PR0brEbKnUvvYJcQN7 /v+Z417w/c483dmIflmd6G7cn+4vubs/uQ+zvu0Ly8Od/j7u9CvJ8w1e8p/cQyH7HtbSIPuuR7LX oLMSub29DecLxfM9HOrPdvU55N62igVbqJ8Z0rjfPSu1YvZ6du6Pqqru6qjak5xGaFdVH1x7ybmn pZ7xpAdV9RUMj7mfsyx7f60+hEML10ekP7pi5MpaT+S5tmIfu5EA9eE4gTcwf/6BXXwcYzb0ZHJm Fy11OtQWqm500mxkxprDJ4ycyZgHmk2bPjUWfWMlB/OGYfwL+PgmN/EgAAA= --nextPart2360538.y1hxCr4XUY-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 26 14:30:00 2013 Received: (at 13588) by debbugs.gnu.org; 26 Apr 2013 18:30:00 +0000 Received: from localhost ([127.0.0.1]:45300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVnPD-0001LK-QD for submit@debbugs.gnu.org; Fri, 26 Apr 2013 14:30:00 -0400 Received: from mail-ee0-f51.google.com ([74.125.83.51]:62168) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVnPC-0001L6-2D; Fri, 26 Apr 2013 14:29:58 -0400 Received: by mail-ee0-f51.google.com with SMTP id c1so880194eek.24 for ; Fri, 26 Apr 2013 11:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PRctjluxg3G8Fr2vGAvlFa9V8M0gl2gmRR3XNLxOU7E=; b=KVkbikZnK/uILmbK9mybVlkLv+S+J73uLS+H1UdX+GhJ6Mde8MEimJuakVt6Y5+nfV 15+fxuOPziTLRvw638lxMksUVNLA19132dlsVQT4CfBMYNSUX3Dl0JGiQyhE+22qEWHk rj60qoMuEHpUO+Tj6v3gM+v/LHP8GX7E6K5tZ446A8HWi9YpKBVPduRM9cO2ip9cJW1X Ux4Qshp5z8wAkVL1RsilUpIPrcYMXq3PoXmPe05s/+XBANrQ8uJz/93ouFNCwXt0tJCW A0p8c+fuLj+0uBK4LLIGP0Mw33rQl/qch6Bx+Yj+EFTtfDc/YLhbwwQMHQVBLmM+L/NZ DCKg== X-Received: by 10.14.3.137 with SMTP id 9mr2722300eeh.0.1367000995512; Fri, 26 Apr 2013 11:29:55 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id n7sm17428984eeo.0.2013.04.26.11.29.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 11:29:54 -0700 (PDT) Message-ID: <517AC79F.4000400@gmail.com> Date: Fri, 26 Apr 2013 20:29:51 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <10687216.7DJVJh5VXv@unused-4-121.brq.redhat.com> <517A628D.8040507@gmail.com> <1561120.RkRRaR8MNL@unused-4-121.brq.redhat.com> In-Reply-To: <1561120.RkRRaR8MNL@unused-4-121.brq.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 13588 Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org, jack@jackkelly.name, bug-automake@gnu.org, phracek@redhat.com, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 27 08:47:45 2013 Received: (at submit) by debbugs.gnu.org; 27 Apr 2013 12:47:45 +0000 Received: from localhost ([127.0.0.1]:46254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW4XX-0004kO-DR for submit@debbugs.gnu.org; Sat, 27 Apr 2013 08:47:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38574) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW4XU-0004kA-J7 for submit@debbugs.gnu.org; Sat, 27 Apr 2013 08:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW4XK-0001qp-MU for submit@debbugs.gnu.org; Sat, 27 Apr 2013 08:47:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW4XK-0001ql-Ij for submit@debbugs.gnu.org; Sat, 27 Apr 2013 08:47:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW4XH-0005aA-Qm for bug-automake@gnu.org; Sat, 27 Apr 2013 08:47:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW4XF-0001pt-12 for bug-automake@gnu.org; Sat, 27 Apr 2013 08:47:27 -0400 Received: from mail-bk0-x233.google.com ([2a00:1450:4008:c01::233]:38977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW4XE-0001pk-Hx; Sat, 27 Apr 2013 08:47:24 -0400 Received: by mail-bk0-f51.google.com with SMTP id y7so1044511bkt.10 for ; Sat, 27 Apr 2013 05:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=UxrLAqmvN/59otMsq+t+SJEdTLzbzsAf5wPp3HUNNYo=; b=oSxCxt3931UJMbJsbWU5cmukisOudmVD9fiAFtgXVO7AE8LE4KMM0QSR1LZ76550r0 kK6CVQHqFO+Z6wYbgtbWGIlOCjNzveiofVJjW47R2K3kJVK40CYeldI1X3qytE6ktGMv rpEB6XBIp7YnMDXR+H4ATIsFOXe9XFspLVjfMdvzP0HGXB+DoaMnHCI23r5mAKV/G8vH Jt8pWrWX6a0Q5ha/0tIC+hIlO23iXYW9EPbDicXXMFW+3tAR1aBCdAyQyrFfRXcSkV0L uk50gCEMi/T3gktDlkHtxLyuZpoPWAFWe9PuzyoqbSjlkqrz2j9tRRxyxFOjdAxdnywF wf8Q== X-Received: by 10.204.173.142 with SMTP id p14mr19353277bkz.115.1367066842964; Sat, 27 Apr 2013 05:47:22 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id io13sm4419408bkc.15.2013.04.27.05.47.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 27 Apr 2013 05:47:20 -0700 (PDT) Message-ID: <517BC8D5.40307@gmail.com> Date: Sat, 27 Apr 2013 14:47:17 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <10687216.7DJVJh5VXv@unused-4-121.brq.redhat.com> <517A628D.8040507@gmail.com> <1561120.RkRRaR8MNL@unused-4-121.brq.redhat.com> <517AC79F.4000400@gmail.com> In-Reply-To: <517AC79F.4000400@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: 13588@debbugs.gnu.org, automake-patches@gnu.org, jack@jackkelly.name, bug-automake@gnu.org, phracek@redhat.com, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) 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@gmail.com> From: Stefano Lattarini 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@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 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 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: 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 Helped-by: Petr Hracek Helped-by: Marc Herbert Helped-by: Tom Rini Signed-off-by: Stefano Lattarini --- 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@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl Manu Rouat emmanuel.rouat@wanadoo.fr +Marc Herbert marc.herbert@intel.com Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Marcus G. Daniels mgd@ute.santafe.edu Marius Vollmer mvo@zagadka.ping.de @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com Peter O'Gorman peter@pogma.com Peter Rosin peda@lysator.liu.se Peter Seiderer seiderer123@ciselant.de +Petr Hracek phracek@redhat.com Petter Reinholdtsen pere@hungry.com Petteri Räty betelgeuse@gentoo.org Phil Edwards phil@jaj.com @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Toshio Kuratomi toshio@tiki-lounge.com Tom Epperly tepperly@llnl.gov +Tom Rini tom_rini@mentor.com Ulrich Drepper drepper@gnu.ai.mit.edu Ulrich Eckhardt eckhardt@satorlaser.com Václav Haisman V.Haisman@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 /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /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 . + +# 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 < 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 +# . +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 +# . +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)) +# . +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 < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 27 12:21:49 2013 Received: (at submit) by debbugs.gnu.org; 27 Apr 2013 16:21:49 +0000 Received: from localhost ([127.0.0.1]:47169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW7sj-0005sB-2E for submit@debbugs.gnu.org; Sat, 27 Apr 2013 12:21:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52266) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW7sg-0005rz-Hn for submit@debbugs.gnu.org; Sat, 27 Apr 2013 12:21:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW7sX-0003PX-Tg for submit@debbugs.gnu.org; Sat, 27 Apr 2013 12:21:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-106.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:60999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW7sX-0003PT-Qj for submit@debbugs.gnu.org; Sat, 27 Apr 2013 12:21:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW7sW-0007g8-SW for bug-automake@gnu.org; Sat, 27 Apr 2013 12:21:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW7sW-0003P2-3i for bug-automake@gnu.org; Sat, 27 Apr 2013 12:21:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW7sV-0003Oe-SR; Sat, 27 Apr 2013 12:21:36 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3RGLTlX003194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 27 Apr 2013 12:21:29 -0400 Received: from unused-4-121.brq.redhat.com (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3RGLSbg007773; Sat, 27 Apr 2013 12:21:28 -0400 From: Pavel Raiskup To: bug-automake@gnu.org, jack@jackkelly.name Subject: Re: bug#13588: Pax hangs in case big UID Date: Sat, 27 Apr 2013 18:21:27 +0200 Message-ID: <1913818.TDD2WFxWIa@unused-4-121.brq.redhat.com> User-Agent: KMail/4.10.2 (Linux/3.8.8-202.fc18.x86_64; KDE/4.10.2; x86_64; ; ) In-Reply-To: <517BC8D5.40307@gmail.com> References: <5109209F.9010400@redhat.com> <517AC79F.4000400@gmail.com> <517BC8D5.40307@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit Cc: phracek@redhat.com, 13588@debbugs.gnu.org, Stefano Lattarini , automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 28 05:07:46 2013 Received: (at submit) by debbugs.gnu.org; 28 Apr 2013 09:07:46 +0000 Received: from localhost ([127.0.0.1]:47842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWNaB-0000tM-SV for submit@debbugs.gnu.org; Sun, 28 Apr 2013 05:07:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42109) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWNa6-0000sw-GJ for submit@debbugs.gnu.org; Sun, 28 Apr 2013 05:07:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWNZq-0008JS-CL for submit@debbugs.gnu.org; Sun, 28 Apr 2013 05:07:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:52392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWNZq-0008JI-99 for submit@debbugs.gnu.org; Sun, 28 Apr 2013 05:07:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWNZm-0004rw-IE for bug-automake@gnu.org; Sun, 28 Apr 2013 05:07:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWNZi-0008Hv-CJ for bug-automake@gnu.org; Sun, 28 Apr 2013 05:07:18 -0400 Received: from mail-bk0-x236.google.com ([2a00:1450:4008:c01::236]:36804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWNZh-0008Hi-Sw; Sun, 28 Apr 2013 05:07:14 -0400 Received: by mail-bk0-f54.google.com with SMTP id q11so2273850bkw.41 for ; Sun, 28 Apr 2013 02:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=YfKZJk8TZszpLVq6eeRtfQgeOvqxka/L7bMNaDhDnV4=; b=0pqJzL+TQXvsvfwAhvHm5Dg7Jg/wubdKQjleCl2L8LvlYwMk6RmVMbrzMM8lGYKbBX bBIv0XoLoV5znm987DCiprAHl70uFHHVD3RBgIMeaf45RzC1W8Kxa0lgJRIpZCIJLxpg ttQ/ck6UFvz3fv4e2/NE0XrRQ3ShS3fvt6y0cIkzoQ2qxoc5sxA81S/hzpWze9Fn6DAK IJlQd7gE4l7iZJIHEg7BJJOSPZnVVXeOeRT9g2paWE7nhLkIjHiKyfh79cu2mX+hPu1v oS5PaBmdZedxgUaEBvsJvWP4hr0PgNzcBf+fwENmuHPrwuDyENM+6gnNC9TNnjLc3a0X +Y/g== X-Received: by 10.204.231.198 with SMTP id jr6mr6618127bkb.104.1367140033023; Sun, 28 Apr 2013 02:07:13 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id f4sm5174411bkz.14.2013.04.28.02.07.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Apr 2013 02:07:12 -0700 (PDT) Message-ID: <517CE6BD.1030709@gmail.com> Date: Sun, 28 Apr 2013 11:07:09 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <517AC79F.4000400@gmail.com> <517BC8D5.40307@gmail.com> <1913818.TDD2WFxWIa@unused-4-121.brq.redhat.com> In-Reply-To: <1913818.TDD2WFxWIa@unused-4-121.brq.redhat.com> Content-Type: multipart/mixed; boundary="------------030604070800030409080608" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: phracek@redhat.com, 13588@debbugs.gnu.org, bug-automake@gnu.org, jack@jackkelly.name, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) This is a multi-part message in MIME format. --------------030604070800030409080608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------030604070800030409080608 Content-Type: text/x-patch; name="diff-w.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="diff-w.patch" >From edfd3bc4c1057be0b5553b5789a44f1b77bb2b45 Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Sun, 17 Feb 2013 16:42:46 +0100 Subject: [PATCH] tar: format 'ustar' cannot support UID/GID longer than 21 bits 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@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 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 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: 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 Helped-by: Petr Hracek Helped-by: Marc Herbert Helped-by: Tom Rini Signed-off-by: Stefano Lattarini --- NEWS | 6 ++++ THANKS | 3 ++ m4/tar.m4 | 58 ++++++++++++++++++++++++------ 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, 175 insertions(+), 30 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@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl Manu Rouat emmanuel.rouat@wanadoo.fr +Marc Herbert marc.herbert@intel.com Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Marcus G. Daniels mgd@ute.santafe.edu Marius Vollmer mvo@zagadka.ping.de @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com Peter O'Gorman peter@pogma.com Peter Rosin peda@lysator.liu.se Peter Seiderer seiderer123@ciselant.de +Petr Hracek phracek@redhat.com Petter Reinholdtsen pere@hungry.com Petteri Räty betelgeuse@gentoo.org Phil Edwards phil@jaj.com @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Toshio Kuratomi toshio@tiki-lounge.com Tom Epperly tepperly@llnl.gov +Tom Rini tom_rini@mentor.com Ulrich Drepper drepper@gnu.ai.mit.edu Ulrich Eckhardt eckhardt@satorlaser.com Václav Haisman V.Haisman@sh.cvut.cz diff --git a/m4/tar.m4 b/m4/tar.m4 index ec8c83e..aac6d8f 100644 --- a/m4/tar.m4 +++ b/m4/tar.m4 @@ -19,26 +19,62 @@ # 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}']) + +# 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_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, + + [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]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + + # 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 + + for _am_tool in $_am_tools; do case $_am_tool in gnutar) - for _am_tar in tar gnutar gtar; - do + 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"' @@ -74,7 +110,7 @@ do # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break - # tar/untar a dummy directory, and stop if the command works + # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file @@ -82,6 +118,7 @@ do rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done @@ -89,6 +126,7 @@ 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_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 . + +# 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 < 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 +# . +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 +# . +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)) +# . +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 < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < 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 --------------030604070800030409080608 Content-Type: text/x-patch; name="real.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="real.patch" >From edfd3bc4c1057be0b5553b5789a44f1b77bb2b45 Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Sun, 17 Feb 2013 16:42:46 +0100 Subject: [PATCH] tar: format 'ustar' cannot support UID/GID longer than 21 bits 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@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 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 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: 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 Helped-by: Petr Hracek Helped-by: Marc Herbert Helped-by: Tom Rini Signed-off-by: Stefano Lattarini --- NEWS | 6 ++ THANKS | 3 + m4/tar.m4 | 160 ++++++++++++++++++++++++++++----------------- 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, 226 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@gmail.com Maciej Stachowiak mstachow@mit.edu Maciej W. Rozycki macro@ds2.pg.gda.pl Manu Rouat emmanuel.rouat@wanadoo.fr +Marc Herbert marc.herbert@intel.com Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de Marcus G. Daniels mgd@ute.santafe.edu Marius Vollmer mvo@zagadka.ping.de @@ -311,6 +312,7 @@ Peter Muir iyhi@yahoo.com Peter O'Gorman peter@pogma.com Peter Rosin peda@lysator.liu.se Peter Seiderer seiderer123@ciselant.de +Petr Hracek phracek@redhat.com Petter Reinholdtsen pere@hungry.com Petteri Räty betelgeuse@gentoo.org Phil Edwards phil@jaj.com @@ -391,6 +393,7 @@ Tim Rice tim@multitalents.net Tim Van Holder tim.van.holder@pandora.be Toshio Kuratomi toshio@tiki-lounge.com Tom Epperly tepperly@llnl.gov +Tom Rini tom_rini@mentor.com Ulrich Drepper drepper@gnu.ai.mit.edu Ulrich Eckhardt eckhardt@satorlaser.com Václav Haisman V.Haisman@sh.cvut.cz diff --git a/m4/tar.m4 b/m4/tar.m4 index ec8c83e..aac6d8f 100644 --- a/m4/tar.m4 +++ b/m4/tar.m4 @@ -19,76 +19,114 @@ # 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__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 /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /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 . + +# 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 < 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 +# . +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 +# . +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)) +# . +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 < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < configure.ac << 'END' -AC_INIT([tar2], [1.0]) +cat > configure.ac < 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 --------------030604070800030409080608-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 02:12:00 2013 Received: (at 13588) by debbugs.gnu.org; 29 Apr 2013 06:12:00 +0000 Received: from localhost ([127.0.0.1]:49375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWhJg-00064a-0I for submit@debbugs.gnu.org; Mon, 29 Apr 2013 02:12:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24641) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWhJc-00064R-Jw for 13588@debbugs.gnu.org; Mon, 29 Apr 2013 02:11:58 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3T6BdkG024400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Apr 2013 02:11:39 -0400 Received: from unused-4-121.brq.redhat.com (unused-4-121.brq.redhat.com [10.34.4.121]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3T6Bb1X017833; Mon, 29 Apr 2013 02:11:38 -0400 From: Pavel Raiskup To: bug-automake@gnu.org Subject: Re: bug#13588: Pax hangs in case big UID Date: Mon, 29 Apr 2013 08:11:37 +0200 Message-ID: <1721983.WaeegkkWyg@unused-4-121.brq.redhat.com> User-Agent: KMail/4.10.2 (Linux/3.8.8-202.fc18.x86_64; KDE/4.10.2; x86_64; ; ) In-Reply-To: <517CE6BD.1030709@gmail.com> References: <5109209F.9010400@redhat.com> <1913818.TDD2WFxWIa@unused-4-121.brq.redhat.com> <517CE6BD.1030709@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: 13588 Cc: phracek@redhat.com, 13588@debbugs.gnu.org, Stefano Lattarini , jack@jackkelly.name, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.3 (---------) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 29 06:19:01 2013 Received: (at submit) by debbugs.gnu.org; 29 Apr 2013 10:19:01 +0000 Received: from localhost ([127.0.0.1]:49628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWlAj-0001cz-06 for submit@debbugs.gnu.org; Mon, 29 Apr 2013 06:19:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44627) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UWlAh-0001ck-2X for submit@debbugs.gnu.org; Mon, 29 Apr 2013 06:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWlAN-0000XZ-SQ for submit@debbugs.gnu.org; Mon, 29 Apr 2013 06:18:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:35868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWlAN-0000XQ-PC for submit@debbugs.gnu.org; Mon, 29 Apr 2013 06:18:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWlAM-0002tn-MA for bug-automake@gnu.org; Mon, 29 Apr 2013 06:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWlAL-0000XC-IA for bug-automake@gnu.org; Mon, 29 Apr 2013 06:18:38 -0400 Received: from mail-bk0-x231.google.com ([2a00:1450:4008:c01::231]:50931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWlAL-0000X7-AN; Mon, 29 Apr 2013 06:18:37 -0400 Received: by mail-bk0-f49.google.com with SMTP id w5so2609049bku.8 for ; Mon, 29 Apr 2013 03:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=hTPErrxijKiN+4hNC1K3K9IBJ2ehBiJjzhFROyUax9o=; b=NnXKwFY/G2qk0xE7qFIFUga8scAblAfnqxBiIWKNduf6XesstrtHXhXgpFe5n4s2wH 9wzDKCtfW7ELyfERlE9eyZLZkRI7OuVR95B9gQi45vhjvQ7WzbxljczSnaQR/SpRaI/H JuOz3fSlfsP1nhhBLsj1q1/JMoflYPWNc3t8Zge+2WqQR4pL9ySB3UOTYt4hmE5uYx+x OSOzsAtBRtcO2ldtvSqVSx9z2wzf+dnretPokRtGd4Pthi/nwzj3vh5flHcIK1TzGPri RbtqNGUm+xeZz5sZL5Nyy0NEyJq9r870xCZp6tfEVdVKbwUC5Q7b7Uzhj6nbXp4HaHT8 Yycw== X-Received: by 10.205.107.71 with SMTP id dx7mr21105343bkc.119.1367230716186; Mon, 29 Apr 2013 03:18:36 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id ss14sm6529549bkb.21.2013.04.29.03.18.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 03:18:35 -0700 (PDT) Message-ID: <517E48F2.7050909@gmail.com> Date: Mon, 29 Apr 2013 12:18:26 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <1913818.TDD2WFxWIa@unused-4-121.brq.redhat.com> <517CE6BD.1030709@gmail.com> <1721983.WaeegkkWyg@unused-4-121.brq.redhat.com> In-Reply-To: <1721983.WaeegkkWyg@unused-4-121.brq.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: phracek@redhat.com, 13588@debbugs.gnu.org, bug-automake@gnu.org, jack@jackkelly.name, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 30 09:20:53 2013 Received: (at submit) by debbugs.gnu.org; 30 Apr 2013 13:20:53 +0000 Received: from localhost ([127.0.0.1]:51780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UXAUF-00054X-3v for submit@debbugs.gnu.org; Tue, 30 Apr 2013 09:20:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58871) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UXAU5-00053y-8P for submit@debbugs.gnu.org; Tue, 30 Apr 2013 09:20:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXATf-0003ho-NV for submit@debbugs.gnu.org; Tue, 30 Apr 2013 09:20:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXATf-0003hk-K3 for submit@debbugs.gnu.org; Tue, 30 Apr 2013 09:20:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXATa-0006ip-0g for bug-automake@gnu.org; Tue, 30 Apr 2013 09:20:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXATY-0003fo-Rw for bug-automake@gnu.org; Tue, 30 Apr 2013 09:20:09 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:56695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXATY-0003fB-9i; Tue, 30 Apr 2013 09:20:08 -0400 Received: by mail-ee0-f50.google.com with SMTP id b15so260127eek.9 for ; Tue, 30 Apr 2013 06:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=fCCxV0mHQc6MrMZbQewoiFyXvpGaVEVdDXkKjbKkETA=; b=oJTs9XA5GRoNn4DtIscvx1YQUYFjF3t+Pv4/f9TaMLxRbvk3EWp4XBQH24btBlTOUK yP8tubjW93bHx0VJafseTBg2l+53u0dHmgrv/sOkyt4sHacxWczEAc+cnwSVT6oEsBNa nA+tuY//L279WyPfLN9DvcU6a6KmjXc8flr0SUHqcW3t6pDJmvJ+2CEA78rqdZbwo6qm U0QBLjROy5GgFebw6H5NeZSM7udCaB0t7vt8zSDFQJ0yopkNflboi0R9p71As5Oxid4w THvHHxJ5sL65Z69zSMdlXmRmEOJWKggb0fM3SlYmQEUAXCEz3MTsZgaIlL6a/XDIaw5e wsng== X-Received: by 10.14.102.9 with SMTP id c9mr5092031eeg.29.1367328007538; Tue, 30 Apr 2013 06:20:07 -0700 (PDT) Received: from [192.168.178.20] (host93-95-dynamic.6-79-r.retail.telecomitalia.it. [79.6.95.93]) by mx.google.com with ESMTPSA id i3sm2803521eev.1.2013.04.30.06.20.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Apr 2013 06:20:06 -0700 (PDT) Message-ID: <517FC504.5090903@gmail.com> Date: Tue, 30 Apr 2013 15:20:04 +0200 From: Stefano Lattarini MIME-Version: 1.0 To: Pavel Raiskup Subject: Re: bug#13588: Pax hangs in case big UID References: <5109209F.9010400@redhat.com> <1913818.TDD2WFxWIa@unused-4-121.brq.redhat.com> <517CE6BD.1030709@gmail.com> <1721983.WaeegkkWyg@unused-4-121.brq.redhat.com> <517E48F2.7050909@gmail.com> In-Reply-To: <517E48F2.7050909@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit Cc: phracek@redhat.com, 13588-done@debbugs.gnu.org, bug-automake@gnu.org, jack@jackkelly.name, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) 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 From unknown Sat Aug 09 22:40:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 May 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator