Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 41808
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

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



Subject: Configuring the tar command used to avoid spurious permission issues.
Hello, When running CPAN as root the files are untarred and the permissions inside the tarball are preserved. This is a problem when the arbitrary given UID/GID happens to exist and has some issue like being over quota: /bin/tar: Text-CSV-1.10/t: Cannot change ownership to uid 1031, gid 100: Disk quota exceeded And so the install fails, even though you are root! To avoid this we typically tell tar not to preserve the tarball owner/group etc... We have a function that calculates which flags tar needs on a given system to make that happen (IE -o, --no-same-owner, etc) and would like CPAN's use of /bin/tar to use the appropriate flags as well. Is it possible to configure the tar flags? (Aside from the verbosity level of course) If not could I make that a feature request? TIA guys!
Subject: Re: [rt.cpan.org #41808] Configuring the tar command used to avoid spurious permission issues.
Date: Thu, 18 Dec 2008 11:13:20 -0500
To: bug-CPAN [...] rt.cpan.org
From: "David Golden" <dagolden [...] cpan.org>
On Thu, Dec 18, 2008 at 10:30 AM, Daniel Muey via RT <bug-CPAN@rt.cpan.org>wrote: Show quoted text
> We have a function that calculates which flags tar needs on a given system > to make that > happen (IE -o, --no-same-owner, etc) > and would like CPAN's use of /bin/tar to use the appropriate flags as well. > > Is it possible to configure the tar flags? (Aside from the verbosity level > of course) > > If not could I make that a feature request? >
I think there's an environment variable for tar options, so perhaps it could be done there. I'm reluctant to add yet another config option -- if you have a function, will it work across all major OS's? If so, maybe CPAN should just "do the right thing" without setting a config at all? -- David
Show quoted text
> I'm reluctant to add yet another config option -- if you have a > function, > will it work across all major OS's? If so, maybe CPAN should just "do > the > right thing" without setting a config at all?
Well, it requires parsing tar --help: See get_targz_no_owner_flag() at http://httpupdate.cpanel.net/cpanelsync/easy_test/Cpanel/Easy/Utils/Targz.pm Perhaps CPAN could do the same thing via open3() ? that'd be great!