> > > > > Anyone know if you can get Ant to preserve
> > > > > permissions when rolling tar archives?
> > > > >
> > > > Ant includes a Chmod taskdef, but AFAIK, there is no way to preserve
> > permissons
> > > > during a Copydir or Copyfile.
> > >
> > > I guess I can use a native call to roll the tarball, the
> > > perms have to be right.
> > >
> > It's just the shell scripts you're worried about, right? If so, all you need
is
> >
> >     <chmod dir="${dist}/bin" perm="ugo+rx" includes="**/*.sh"/>
>
> I want them preserved in the tarball so when it's extracted the
> scripts stay executable. When you extract a tarball that has
> been created by Ant all the scripts that I made executable
> with the <chmod> task are no longer executable.
>
Oops! Sorry about that - I misunderstood you previously.

>From looking at the Ant src, I don't think there's any way (currently) for it to
preserve the perms. The Tar task is completely dependent on the properties
provided by java.io.File, one of which is _not_ the permission mode. The tar
code in org.apache.tools.tar.TarEntry does, however, let you specify the
permisson mode. If the Tar task could be re-written to retrieve the current
perms as it's iterating, then just maybe...

Is there a Unix command for retrieving the perms (and just the perms, ma'am) for
a file? Maybe we can patch the Tar task to add an optional parameter like
'preserveperms', which would call a native process similar to what the Chmod
task does. Thoughts?

>
> Jason van Zyl
> [EMAIL PROTECTED]
>

--
Christopher Elkins



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to