Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 39662
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: ambs [...] cpan.org
ANIRVAN [...] cpan.org
rjurney [...] lucision.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.30
Fixed in: (no value)



Subject: Failing tilde expansion tests
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2194
Download (untitled) / with headers
text/plain 2.1k
Hello. Trying to install Module::Build on my mac, used 'sudo cpan', and 'install Module::Build'. Everything got well. Just failed t/tilde errors (see bellow). I have a slight idea about why this happens (one is the root home, the other is the user doing sudo's home). t/tilde...............ok 1/17 # Failed test at t/tilde.t line 54. # got: '/var/root' # expected: '/Users/ambs' t/tilde...............NOK 3/17 # Failed test at t/tilde.t line 56. # got: '/var/root/foo' # expected: '/Users/ambs/foo' t/tilde...............ok 5/17 # Failed test at t/tilde.t line 62. # got: '/var/root/ foo' # expected: '/Users/ambs/ foo' t/tilde...............NOK 7/17 # Failed test at t/tilde.t line 64. # got: '/var/root/fo o' # expected: '/Users/ambs/fo o' t/tilde...............NOK 8/17 t/tilde...............NOK 10/17# Failed test at t/tilde.t line 68. # got: '/var/root' # expected: '/Users/ambs' # Failed test at t/tilde.t line 74. # got: '/var/root/lib' # expected: '/Users/ambs/lib' # Failed test at t/tilde.t line 76. # got: '/var/root/html' # expected: '/Users/ambs/html' # Failed test at t/tilde.t line 77. # got: '/var/root/html' # expected: '/Users/ambs/html' t/tilde...............NOK 13/17 # Failed test at t/tilde.t line 80. # got: '/var/root/lib' # expected: '/Users/ambs/lib' t/tilde...............NOK 14/17 t/tilde...............NOK 15/17# Failed test at t/tilde.t line 83. # got: '/var/root' # expected: '/Users/ambs' t/tilde...............ok 16/17# Looks like you failed 10 tests of 17. t/tilde...............dubious Test returned status 10 (wstat 2560, 0xa00) DIED. FAILED tests 3-4, 7-8, 10-15 Failed 10/17 tests, 41.18% okay
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-4413-1222636475-423.39662-4-0 [...] rt.cpan.org>
References: <RT-Ticket-39662 [...] rt.cpan.org> <rt-3.6.HEAD-4413-1222636475-423.39662-4-0 [...] rt.cpan.org>
X-Pobox-Relay-Id: 15D70E0E-8DA8-11DD-8633-F4FB75724C3F-02258300!a-sasl-quonix.pobox.com
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 9FC9D4D8099 for <bug-Module-Build [...] rt.cpan.org>; Sun, 28 Sep 2008 17:55:04 -0400 (EDT)
Received: (qmail 9295 invoked from network); 28 Sep 2008 21:55:03 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 28 Sep 2008 21:55:03 -0000
Received: from a-sasl-quonix.sasl.smtp.pobox.com (HELO sasl.smtp.pobox.com) (208.72.237.25) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Sun, 28 Sep 2008 14:54:59 -0700
Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 2537183999 for <bug-Module-Build [...] rt.cpan.org>; Sun, 28 Sep 2008 17:54:55 -0400 (EDT)
Received: from windhund.schwern.org (c-71-195-77-172.hsd1.pa.comcast.net [71.195.77.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id D5B8C83998 for <bug-Module-Build [...] rt.cpan.org>; Sun, 28 Sep 2008 17:54:54 -0400 (EDT)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #39662] Failing tilde expansion tests
User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
Return-Path: <schwern [...] pobox.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Sun, 28 Sep 2008 17:54:43 -0400
X-Spam-Level: *
Message-Id: <48DFFD23.8000808 [...] pobox.com>
To: bug-Module-Build [...] rt.cpan.org
X-Enigmail-Version: 0.95.7
Content-Transfer-Encoding: 8bit
From: Michael G Schwern <schwern [...] pobox.com>
RT-Message-ID: <rt-3.6.HEAD-4413-1222638911-916.39662-0-0 [...] rt.cpan.org>
Content-Length: 1352
Download (untitled) / with headers
text/plain 1.3k
Alberto Simões via RT wrote: Show quoted text
> Trying to install Module::Build on my mac, used 'sudo cpan', and > 'install Module::Build'.
Little tip, don't run cpan as the super user. Run it as a normal user and change make_install_make_command and mbuild_install_build_command to run "sudo make" and "sudo ./Build" respectively. That way a busted build or test stage won't be able to blow away your whole system. If you rerun the CPAN shell configuration (o conf init) it will walk you through this process. Show quoted text
> Everything got well. Just failed t/tilde errors (see bellow). > I have a slight idea about why this happens (one is the root home, the > other is the user doing sudo's home).
Unix::_detildefy() is using getpwnam $> rather than $ENV{HOME}. On my OS X 10.4, sudo sets both $> and $<. So that's a problem. Any reason it's not just using $ENV{HOME}? That's what ~ means, not what's hard coded in /etc/passwd. If $ENV{HOME} isn't defined, then fall back to getpwnam(). Try this. --- lib/Module/Build/Platform/Unix.pm (revision 67091) +++ lib/Module/Build/Platform/Unix.pm (local) @@ -47,7 +47,7 @@ $value =~ s[^~(\w[-\w]*)?(?=/|$)] # tilde with optional username [$1 ? ((getpwnam $1)[7] || "~$1") : - (getpwuid $>)[7] + ($ENV{HOME} || (getpwuid $>)[7]) ]ex; return $value; } -- Hating the web since 1994.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-4418-1222639432-1936.39662-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 44
Yep, r11900 fixes tilde expansion with sudo.
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-4413-1222638911-916.39662-6-0 [...] rt.cpan.org>
References: <RT-Ticket-39662 [...] rt.cpan.org> <rt-3.6.HEAD-4413-1222636475-423.39662-4-0 [...] rt.cpan.org> <48DFFD23.8000808 [...] pobox.com> <rt-3.6.HEAD-4413-1222638911-916.39662-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at alfarrabio.di.uminho.pt
Reply-To: ambs [...] cpan.org
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id EBB3519B81ED for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 05:01:30 -0400 (EDT)
Received: (qmail 17183 invoked from network); 29 Sep 2008 09:01:30 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 29 Sep 2008 09:01:30 -0000
Received: from alfarrabio.di.uminho.pt (HELO alfarrabio.di.uminho.pt) (193.136.19.140) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Sep 2008 02:01:24 -0700
Received: from localhost (localhost [127.0.0.1]) by alfarrabio.di.uminho.pt (Postfix) with ESMTP id B1B0434067F for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 10:01:18 +0100 (WEST)
Received: from alfarrabio.di.uminho.pt ([127.0.0.1]) by localhost (alfarrabio.di.uminho.pt [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9fQ8c1YprYzR for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 10:01:13 +0100 (WEST)
Received: from rachmaninoff.local (gwdi.di.uminho.pt [193.136.19.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by alfarrabio.di.uminho.pt (Postfix) with ESMTPSA id 0647334066F for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 10:01:13 +0100 (WEST)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #39662] Failing tilde expansion tests
User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914)
Return-Path: <ambs [...] cpan.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Mon, 29 Sep 2008 10:01:12 +0100
X-Spam-Level: *
Message-Id: <48E09958.3090600 [...] cpan.org>
To: bug-Module-Build [...] rt.cpan.org
Content-Transfer-Encoding: 8bit
From: Alberto Simoes <ambs [...] cpan.org>
RT-Message-ID: <rt-3.6.HEAD-4418-1222678900-882.39662-0-0 [...] rt.cpan.org>
Content-Length: 1682
Download (untitled) / with headers
text/plain 1.6k
Michael G Schwern via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=39662 > > > Alberto Simões via RT wrote:
>> Trying to install Module::Build on my mac, used 'sudo cpan', and >> 'install Module::Build'.
> > Little tip, don't run cpan as the super user. Run it as a normal user and > change make_install_make_command and mbuild_install_build_command to run "sudo > make" and "sudo ./Build" respectively. That way a busted build or test stage > won't be able to blow away your whole system. > > If you rerun the CPAN shell configuration (o conf init) it will walk you > through this process.
Thanks for the tip ;) Show quoted text
>> Everything got well. Just failed t/tilde errors (see bellow). >> I have a slight idea about why this happens (one is the root home, the >> other is the user doing sudo's home).
> > Unix::_detildefy() is using getpwnam $> rather than $ENV{HOME}. On my OS X > 10.4, sudo sets both $> and $<. So that's a problem. > > Any reason it's not just using $ENV{HOME}? That's what ~ means, not what's > hard coded in /etc/passwd. If $ENV{HOME} isn't defined, then fall back to > getpwnam(). > > Try this. > > --- lib/Module/Build/Platform/Unix.pm (revision 67091) > +++ lib/Module/Build/Platform/Unix.pm (local) > @@ -47,7 +47,7 @@ > $value =~ s[^~(\w[-\w]*)?(?=/|$)] # tilde with optional username > [$1 ? > ((getpwnam $1)[7] || "~$1") : > - (getpwuid $>)[7] > + ($ENV{HOME} || (getpwuid $>)[7]) > ]ex; > return $value; > }
Worked smoothly! 0.31 real soon now? :) -- Alberto Simões - Departamento de Informática - Universidade do Minho Campus de Gualtar - 4710-057 Braga - Portugal
CC: Schwern <schwern [...] pobox.com>
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-4413-1222638911-916.39662-5-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-39662 [...] rt.cpan.org> <rt-3.6.HEAD-4413-1222636475-423.39662-4-0 [...] rt.cpan.org> <48DFFD23.8000808 [...] pobox.com> <rt-3.6.HEAD-4413-1222638911-916.39662-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 3D6FF4D8015 for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 12:05:19 -0400 (EDT)
Received: (qmail 15930 invoked from network); 29 Sep 2008 16:05:17 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 29 Sep 2008 16:05:17 -0000
Received: from rv-out-0506.google.com (HELO rv-out-0506.google.com) (209.85.198.225) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Sep 2008 09:05:13 -0700
Received: by rv-out-0506.google.com with SMTP id g37so2036439rvb.33 for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 09:05:10 -0700 (PDT)
Received: by 10.141.86.14 with SMTP id o14mr2572046rvl.227.1222704310815; Mon, 29 Sep 2008 09:05:10 -0700 (PDT)
Received: by 10.140.204.13 with HTTP; Mon, 29 Sep 2008 09:05:10 -0700 (PDT)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #39662] Failing tilde expansion tests
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=q3/UydYHKemMbIXc6MKroYgiFGXnf5BLRPdiFyPImIhgRwwpNkOdMVKIStZrEkot6P PMRirGkodqDZvEZpaEGpGZyAB7MxrdWwaZD1BDTiwn0twtJbRcUKP9JkJvMxR5qkhVmS 2mR1jeRKK2DFuy7yKTAhZ85Pbcp4myjbM19E8=
Return-Path: <kenahoo [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/ThfLy1aZy+ywV2ZrAQT5QK71sOy3WuMlIK/Fxrn62U=; b=GwUeiCFF8ljhKxz9bFFMrIyCfdmGCymf4LHpV4XNHqib8k/RzU8t/G/7XN+1NZtFfY vDwI0LkVMiTsWvADkANgICNiNwNALjfDuL36doAzEx1a7ZXBbeqmkun9TP2JyAi0aUzW nYyujC5R1+eTDQ3XIvGBeVB9A3GH6E9EGP0Ik=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Mon, 29 Sep 2008 11:05:10 -0500
X-Spam-Level: *
Message-Id: <6a7ee8cc0809290905g10091673j6a9c4dc5d9d7c097 [...] mail.gmail.com>
To: bug-Module-Build [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Ken Williams" <kenahoo [...] gmail.com>
RT-Message-ID: <rt-3.6.HEAD-4393-1222704329-680.39662-0-0 [...] rt.cpan.org>
Content-Length: 306
Download (untitled) / with headers
text/plain 306b
On Sun, Sep 28, 2008 at 4:55 PM, Michael G Schwern via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> > Any reason it's not just using $ENV{HOME}? That's what ~ means, not what's > hard coded in /etc/passwd.
I don't think that's true, from my testing with zsh: % HOME=foo echo ~ /Users/u0048513 -Ken
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-4393-1222704329-680.39662-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-39662 [...] rt.cpan.org> <rt-3.6.HEAD-4413-1222636475-423.39662-4-0 [...] rt.cpan.org> <48DFFD23.8000808 [...] pobox.com> <rt-3.6.HEAD-4413-1222638911-916.39662-5-0 [...] rt.cpan.org> <6a7ee8cc0809290905g10091673j6a9c4dc5d9d7c097 [...] mail.gmail.com> <rt-3.6.HEAD-4393-1222704329-680.39662-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-4420-1222704661-251.39662-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 268
Download (untitled) / with headers
text/plain 268b
On Mon Sep 29 12:05:29 2008, kenahoo@gmail.com wrote: Show quoted text
> I don't think that's true, from my testing with zsh: > > % HOME=foo echo ~ > /Users/u0048513
Never mind, that was of course a flawed test. Here's a better one: % export HOME=foo % echo ~ foo -Ken
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-4420-1222704661-251.39662-5-0 [...] rt.cpan.org>
References: <RT-Ticket-39662 [...] rt.cpan.org> <rt-3.6.HEAD-4413-1222636475-423.39662-4-0 [...] rt.cpan.org> <48DFFD23.8000808 [...] pobox.com> <rt-3.6.HEAD-4413-1222638911-916.39662-5-0 [...] rt.cpan.org> <6a7ee8cc0809290905g10091673j6a9c4dc5d9d7c097 [...] mail.gmail.com> <rt-3.6.HEAD-4393-1222704329-680.39662-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-4420-1222704661-251.39662-5-0 [...] rt.cpan.org>
X-Pobox-Relay-Id: 78167B76-8E4E-11DD-B375-F4FB75724C3F-02258300!a-sasl-quonix.pobox.com
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id EC12419B80A3 for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 13:46:07 -0400 (EDT)
Received: (qmail 23506 invoked from network); 29 Sep 2008 17:46:07 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 29 Sep 2008 17:46:07 -0000
Received: from a-sasl-quonix.sasl.smtp.pobox.com (HELO sasl.smtp.pobox.com) (208.72.237.25) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Sep 2008 10:45:59 -0700
Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 6BF7683990 for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 13:45:56 -0400 (EDT)
Received: from windhund.schwern.org (static-151-201-108-130.pitt.east.verizon.net [151.201.108.130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 3D2258398F for <bug-Module-Build [...] rt.cpan.org>; Mon, 29 Sep 2008 13:45:55 -0400 (EDT)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #39662] Failing tilde expansion tests
User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
Return-Path: <schwern [...] pobox.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Mon, 29 Sep 2008 13:45:41 -0400
X-Spam-Level: *
Message-Id: <48E11445.7050808 [...] pobox.com>
To: bug-Module-Build [...] rt.cpan.org
X-Enigmail-Version: 0.95.7
Content-Transfer-Encoding: 7bit
From: Michael G Schwern <schwern [...] pobox.com>
RT-Message-ID: <rt-3.6.HEAD-4408-1222710379-1169.39662-0-0 [...] rt.cpan.org>
Content-Length: 602
Download (untitled) / with headers
text/plain 602b
Ken Williams via RT wrote: Show quoted text
> Queue: Module-Build > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39662 > > > On Mon Sep 29 12:05:29 2008, kenahoo@gmail.com wrote:
>> I don't think that's true, from my testing with zsh: >> >> % HOME=foo echo ~ >> /Users/u0048513
> > Never mind, that was of course a flawed test. Here's a better one: > > % export HOME=foo > % echo ~ > foo
Caught me out, too -- 54. "Napalm sticks to kids" is *not* a motivational phrase. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Subject: Module::Build t/tilde.t can get confused under sudo, causing test to fail
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1152
Download (untitled) / with headers
text/plain 1.1k
On my CentOS 5 Linux system, when I run "sudo cpan" to install Module::Build, the t/tilde.t test fails This is because sudo transfers over my normal account's environment variables to the root account. The behavior is sometimes a good thing (e.g. I like having my $EDITOR set), but in this case, it means that my $HOME is getting passed along as well. tilde.t figures out what the user's home directory is by looking at $HOME (line 40 in Module::Build 0.30). In this case, stupidly, $HOME can't be trusted -- even though MB itself expands ~ correctly. So when I ran "sudo cpan" to install Module::Build, tilde.t saw ~myusername as the home directory (instead of ~root), and thought that all the run_sample test had failed, because they kept returning (correct) ~root dirs instead of ~anirvan dirs. I don't have a solution to this, but since Module::Build itself gets it right, I suggest either: - using whatever algorithm MB uses to determine ~ to be used in tilde.t - doing a self-test to see if $HOME and the internal "~" expansion are wrong, and spewing something useful to the user I'd be happy to help you test any potential fixes. Thanks.
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <rt-3.6.HEAD-10621-1224957313-307.40376-4-0 [...] rt.cpan.org>
References: <RT-Ticket-40376 [...] rt.cpan.org> <rt-3.6.HEAD-10621-1224957313-307.40376-4-0 [...] rt.cpan.org>
X-Pobox-Relay-Id: BEC6845A-A2E7-11DD-9007-9CEDC82D7133-02258300!a-sasl-fastnet.pobox.com
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id D72534D80B0 for <bug-Module-Build [...] rt.cpan.org>; Sat, 25 Oct 2008 18:53:45 -0400 (EDT)
Received: (qmail 22545 invoked by uid 103); 25 Oct 2008 22:53:44 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 25 Oct 2008 22:53:44 -0000
Received: from a-sasl-fastnet.sasl.smtp.pobox.com (HELO sasl.smtp.pobox.com) (207.106.133.19) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Oct 2008 15:53:35 -0700
Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 47B2A74441 for <bug-Module-Build [...] rt.cpan.org>; Sat, 25 Oct 2008 18:53:31 -0400 (EDT)
Received: from windhund.schwern.org (069-064-236-003.pdx.net [69.64.236.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id C7AFD74440 for <bug-Module-Build [...] rt.cpan.org>; Sat, 25 Oct 2008 18:53:30 -0400 (EDT)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #40376] Module::Build t/tilde.t can get confused under sudo, causing test to fail
User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914)
Return-Path: <schwern [...] pobox.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Sat, 25 Oct 2008 15:52:58 -0700
X-Spam-Level: *
Message-Id: <4903A34A.6040309 [...] pobox.com>
To: bug-Module-Build [...] rt.cpan.org
X-Enigmail-Version: 0.95.7
Content-Transfer-Encoding: 7bit
From: Michael G Schwern <schwern [...] pobox.com>
RT-Message-ID: <rt-3.6.HEAD-10621-1224975238-1294.40376-0-0 [...] rt.cpan.org>
Content-Length: 348
Download (untitled) / with headers
text/plain 348b
Anirvan Chatterjee via RT wrote: Show quoted text
> This is because sudo transfers over my normal account's environment > variables to the root account. The behavior is sometimes a good thing > (e.g. I like having my $EDITOR set), but in this case, it means that my > $HOME is getting passed along as well.
What do these do? sudo echo ~ sudo echo $HOME
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=
In-Reply-To: <rt-3.6.HEAD-10621-1224975238-1294.40376-6-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-40376 [...] rt.cpan.org> <rt-3.6.HEAD-10621-1224957313-307.40376-4-0 [...] rt.cpan.org> <4903A34A.6040309 [...] pobox.com> <rt-3.6.HEAD-10621-1224975238-1294.40376-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 29CD523C0DA for <bug-Module-Build [...] rt.cpan.org>; Sat, 25 Oct 2008 22:03:45 -0400 (EDT)
Received: (qmail 14797 invoked by uid 103); 26 Oct 2008 02:03:44 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 26 Oct 2008 02:03:44 -0000
Received: from green.rahul.net (HELO green.rahul.net) (192.160.13.49) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Oct 2008 19:03:41 -0700
Received: by green.rahul.net (Postfix, from userid 3157) id 7CE7FBE8C7; Sat, 25 Oct 2008 19:03:37 -0700 (PDT)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #40376] Module::Build t/tilde.t can get confused under sudo, causing test to fail
User-Agent: Mutt/1.4i
Return-Path: <ANIRVAN [...] cpan.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Sat, 25 Oct 2008 19:03:37 -0700
X-Spam-Level: *
Message-Id: <20081026020337.GA17209 [...] chatterjee.net>
To: Michael G Schwern via RT <bug-Module-Build [...] rt.cpan.org>
From: Anirvan Chatterjee <ANIRVAN [...] cpan.org>
RT-Message-ID: <rt-3.6.HEAD-10654-1224986638-315.40376-0-0 [...] rt.cpan.org>
Content-Length: 933
Download (untitled) / with headers
text/plain 933b
On Sat, Oct 25, 2008 at 06:54:00PM -0400, Michael G Schwern via RT wrote: Show quoted text
> What do these do?
I ran these, and some other tests, trying to see if I could turn up anything interesting. The only vaguely interesting thing I found is at the end of this email -- the $USER and $SUDO* environment variables. Thanks again for looking into this. % sudo echo ~ /home/my-username % sudo echo $HOME /home/my-username % sudo whoami root % sudo perl -e 'print "$ENV{HOME}\n"' /home/my-username % sudo su # echo ~ /root # echo $HOME /root % su # echo ~ /root # echo $HOME /root % su -c 'echo ~' /root % su -c 'echo $HOME' /root % sudo env # uninteresting lines snipped MAIL=/var/spool/mail/my-username HOME=/home/my-username LOGNAME=root USER=root SUDO_COMMAND=/bin/env SUDO_USER=my-username SUDO_UID=500 # my account's user ID SUDO_GID=500 # my account's group ID -- Anirvan Chatterjee www.chatterjee.net www.bookfinder.com
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-10654-1224986638-315.40376-5-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-40376 [...] rt.cpan.org> <20081026020337.GA17209 [...] chatterjee.net> <rt-3.6.HEAD-10654-1224986638-315.40376-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 601424D8041 for <bug-Module-Build [...] rt.cpan.org>; Sun, 26 Oct 2008 12:22:41 -0400 (EDT)
Received: (qmail 15807 invoked by uid 103); 26 Oct 2008 16:22:40 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 26 Oct 2008 16:22:40 -0000
Received: from rv-out-0506.google.com (HELO rv-out-0506.google.com) (209.85.198.239) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Sun, 26 Oct 2008 09:22:37 -0700
Received: by rv-out-0506.google.com with SMTP id g37so1737422rvb.33 for <bug-Module-Build [...] rt.cpan.org>; Sun, 26 Oct 2008 09:22:33 -0700 (PDT)
Received: by 10.141.37.8 with SMTP id p8mr2635692rvj.256.1225038153899; Sun, 26 Oct 2008 09:22:33 -0700 (PDT)
Received: from eitri.scratchcomputing.com (pool-71-111-83-56.ptldor.dsl-w.verizon.net [71.111.83.56]) by mx.google.com with ESMTPS id l31sm8118878rvb.2.2008.10.26.09.22.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 26 Oct 2008 09:22:33 -0700 (PDT)
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
User-Agent: KMail/1.9.9
Subject: Re: [rt.cpan.org #40376] Module::Build t/tilde.t can get confused under sudo, causing test to fail
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :message-id:from; b=fEKjUHKBCI2rdLfdJInM+GG6411Kv8iyjFSBqX0nKWqHkylb6zO91CPkqvHrkC6Qbt HKFSVmIoI2ZeGVulEf2FcpIW9zk6xEK2HuXTeEXWkc/92oLcggcMzunRTN7foS2ES9WT 1gIWayn9VGXLcoO7g6sEnfj2bwdk0wzo/EBqk=
Return-Path: <scratchcomputing [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:subject:date:user-agent :references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id:from; bh=K++2qsumdNHzvjVVHa9kh8yYrZC/u0IfhyVCuSo9q0s=; b=PtjucaIZ7Vc4GoeWxKZ0pOqXFZqg5qj2PkxRtWdtIsn0mk4IAcKubE9ZP3yXwpDPG3 uLCURM+eGOrLQmzKX115bbPsi6c+F7k1svsXma+9uJvVS4pj8ZR+/J3SzeXQnYH7PppS 0BQIYVhw7x6+RRAMVDSO0OgwYnE4VZA9LQr3o=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Module-Build [...] rt.cpan.org
Date: Sun, 26 Oct 2008 09:21:49 -0700
X-Spam-Level: *
Message-Id: <200810260921.49261.ewilhelm [...] cpan.org>
To: bug-Module-Build [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Eric Wilhelm <scratchcomputing [...] gmail.com>
RT-Message-ID: <rt-3.6.HEAD-10621-1225038242-1103.40376-0-0 [...] rt.cpan.org>
Content-Length: 342
Download (untitled) / with headers
text/plain 342b
# from Anirvan Chatterjee via RT on Saturday 25 October 2008: Show quoted text
>% sudo echo ~ >/home/my-username > >% sudo echo $HOME >/home/my-username >... >% su -c 'echo ~' >/root >% su -c 'echo $HOME' >/root
Note that the first two don't say anything about su. The tilde and variable are expanded by the user's shell before being passed to su. --Eric
MIME-Version: 1.0 (Apple Message framework v929.2)
X-Spam-Status: No, hits=0.0 required=8.0 tests=
X-Mailer: Apple Mail (2.929.2)
content-type: text/plain; charset="utf-8"; delsp="yes"; format="flowed"
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id ADF924D8040 for <bug-Module-Build [...] rt.cpan.org>; Tue, 28 Oct 2008 21:55:24 -0400 (EDT)
Received: (qmail 1496 invoked by uid 103); 29 Oct 2008 01:55:24 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 29 Oct 2008 01:55:24 -0000
Received: from smtpout08-04.prod.mesa1.secureserver.net (HELO smtpout08.prod.mesa1.secureserver.net) (64.202.165.12) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with SMTP; Tue, 28 Oct 2008 18:55:18 -0700
Received: (qmail 21088 invoked from network); 29 Oct 2008 01:55:15 -0000
Received: from unknown (24.98.70.238) by smtpout08-04.prod.mesa1.secureserver.net (64.202.165.12) with ESMTP; 29 Oct 2008 01:55:15 -0000
Delivered-To: cpan-bug+Module-Build [...] diesel.bestpractical.com
Subject: Module tests fail when installing with 'sudo'
Return-Path: <rjurney [...] lucision.com>
X-Original-To: bug-Module-Build [...] rt.cpan.org
X-Spam-Check-BY: 16.mx.develooper.com
Date: Tue, 28 Oct 2008 21:55:12 -0400
X-Spam-Level: *
Message-Id: <1DE276C1-AEAD-408B-811E-578CC0F76B4E [...] lucision.com>
To: bug-Module-Build [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Russell Jurney <rjurney [...] lucision.com>
X-RT-Original-Encoding: US-ASCII
Content-Length: 3346
Download (untitled) / with headers
text/plain 3.2k
rjurney@ubuntu:/mnt/osx/al_trunk/iet$ sudo cpan Module::Build CPAN: Storable loaded ok (v2.15) Going to read /home/rjurney/.cpan/Metadata Database was generated on Tue, 28 Oct 2008 11:26:55 GMT CPAN: YAML loaded ok (v0.66) Going to read 17 yaml files from /home/rjurney/.cpan/build/ CPAN: Time::HiRes loaded ok (v1.86) ............................................................................DONE Restored the state of 17 (in 0.6760 secs) Running install for module 'Module::Build' Running make for K/KW/KWILLIAMS/Module-Build-0.30.tar.gz Has already been unwrapped into directory /home/rjurney/.cpan/build/ Module-Build-0.30-h72tBo Has already been made Running make test /usr/bin/perl Build --makefile_env_macros 1 test t/basic...............ok t/compat..............ok t/destinations........ok t/ext.................ok t/extend..............ok t/files...............ok t/help................ok t/install.............ok t/manifypods..........ok t/mbyaml..............ok t/metadata............ok t/metadata2...........ok t/moduleinfo..........ok t/new_from_context....ok t/notes...............ok t/par.................ok t/parents.............ok t/pod_parser..........ok t/ppm.................ok t/runthrough..........ok t/script_dist.........ok t/signature...........skipped: $ENV{TEST_SIGNATURE} is not set t/test_file_exts......ok t/test_type...........ok t/test_types..........ok t/tilde...............1/17 # Failed test at t/tilde.t line 54. # got: '/root' # expected: '/home/rjurney' t/tilde...............4/17 # Failed test at t/tilde.t line 56. # got: '/root/foo' # expected: '/home/rjurney/foo' # Failed test at t/tilde.t line 62. # got: '/root/ foo' # expected: '/home/rjurney/ foo' # Failed test at t/tilde.t line 64. # got: '/root/fo o' # expected: '/home/rjurney/fo o' # Failed test at t/tilde.t line 68. # got: '/root' # expected: '/home/rjurney' # Failed test at t/tilde.t line 74. # got: '/root/lib' # expected: '/home/rjurney/lib' # Failed test at t/tilde.t line 76. # got: '/root/html' # expected: '/home/rjurney/html' # Failed test at t/tilde.t line 77. # got: '/root/html' # expected: '/home/rjurney/html' # Failed test at t/tilde.t line 80. # got: '/root/lib' # expected: '/home/rjurney/lib' # Failed test at t/tilde.t line 83. # got: '/root' # expected: '/home/rjurney' # Looks like you failed 10 tests of 17. t/tilde............... Dubious, test returned 10 (wstat 2560, 0xa00) Failed 10/17 subtests t/use_tap_harness.....ok t/versions............ok t/xs..................ok Test Summary Report ------------------- t/tilde (Wstat: 2560 Tests: 17 Failed: 10) Failed tests: 3-4, 7-8, 10-15 Non-zero exit status: 10 Files=29, Tests=999, 45 wallclock secs ( 0.21 usr 0.58 sys + 25.65 cusr 18.62 csys = 45.06 CPU) Result: FAIL Failed 1/29 test programs. 10/999 subtests failed. make: *** [test] Error 255 KWILLIAMS/Module-Build-0.30.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports KWILLIAMS/Module-Build-0.30.tar.gz Running make install make test had returned bad status, won't install without force Stopping: 'install' failed for 'Module::Build'.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.