Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Setting file permissions for a module built on a Windows PC

by Anonymous Monk
on Aug 23, 2012 at 20:57 UTC ( [id://989380]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have developed a pure perl module which I wish to

dmake dist

for upload to CPAN.

When I execute the above, the file permissions come out as:

C:\Phil\Perl\Math-Subsets-List>tar -tvf Math-Subsets-List-1.005.tar drw-rw-rw- philip r brenan/0 0 2012-08-23 21:35 Math-Subsets-List-1.00 +5/ -rw-rw-rw- philip r brenan/0 548 2012-08-23 21:35 Math-Subsets-List-1. +005/META.yml

This seems to cause problems on Linux etc.

Please tell me what sequence of actions I can perform on a Windows machine with ActiveState Perl and GNU tar/gzip that will produce a tarball with the correct file permissions?

Replies are listed 'Best First'.
Re: Setting file permissions for a module built on a Windows PC
by Monk::Thomas (Friar) on Aug 24, 2012 at 10:05 UTC

    I googled a bit and found this little gem:

    Good news: There’s a standalone tar.exe among the UnixUtils suite (gzip’s there too). And in their characteristically absurd foresight, those devs included an arg to manually set the mode of things as they’re archived.
    Bad news: it’s one arg that applies to everything.

    tar --create --mode=777 -f "archive.tar" "TopDir"

    Technically this exercise can end here. Adding everything as 777 will make scripts work, at the cost of executable jpegs and extra glowy terminals. To do it right though, we’ll have to make multiple passes, walking the tree and only add one kind of thing at a time (dirs, files, scripts).

    -- http://www.misanthropicgeek.net/?p=882p/p

        Thank you - I have used the script successfully.

Re: Setting file permissions for a module built on a Windows PC
by Anonymous Monk on Aug 23, 2012 at 21:21 UTC
    Nothing :) whatever the problem is on linux, it is users problem, they need tar --no-same-permissions ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://989380]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-24 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found