You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Max Birkoff <ma...@yahoo.com> on 2010/10/27 02:41:10 UTC

support for symlinks

Hello,

I would like to add support for symlinks to:
  org.apache.tools.tar.TarEntry and friends.

I have examined the archives at:
  http://news.gmane.org/gmane.comp.jakarta.ant.devel/
and cannot see the matter discussed there.

I have seen the warning:
  Ant is not symbolic link aware in moves, deletes and when recursing down a tree of directories to build up a list of files. Unexpected things can happen.
on:
  http://ant.apache.org/manual/platform.html

Before sending patches, I would like to determine if there is a reason that this has not been supported in the TarEntry class; it appears that the proper constants are present in TarConstants and I can get at the linkflag through the writeEntryHeader method.

Thanks much in advance,

max



      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: support for symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-10-29, Max Birkoff wrote:

> Do you have any ideas about when commons compress 1.2 might be
> released?

Usually new releases happen when anybody of the committers feels it is
time to do so - and volunteers to create the release.

In commons-compress case there have only been two (seemingly minor)
changes to the tar classes and nothing else, I wouldn't expect that to
be enough to trigger a new release any time soon, sorry.

> I will build from source, test, and communicate on the
> commons-compress mailing list in the meantime.

That's great

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: support for symlinks

Posted by Max Birkoff <ma...@yahoo.com>.
Thanks a lot, Stephan, that makes things a lot more clear. I appreciate you taking the time to further describe the difference between the Compress Antlib and the core tasks, and that you play a dual role between common compress and ant -- knowing that makes everything very reasonable and a lot easier to understand.

Thank you.

I've also seen that you've resolved:
  https://issues.apache.org/jira/browse/COMPRESS-122
Thank you very much!

Do you have any ideas about when commons compress 1.2 might be released? I will build from source, test, and communicate on the commons-compress mailing list in the meantime.

Thanks very much again, and I hope this finds you well!

max


--- On Fri, 10/29/10, Stefan Bodewig <bo...@apache.org> wrote:

> From: Stefan Bodewig <bo...@apache.org>
> Subject: Re: support for symlinks
> To: dev@ant.apache.org
> Date: Friday, October 29, 2010, 1:09 AM
> On 2010-10-27, Max Birkoff wrote:
> 
> > I must admit to being a little confused by your
> suggestion. On one
> > hand you seem to say "go to another project" and on
> the other hand,
> > ant's code base contains the tar code that I have been
> using and would
> > like to improve.
> 
> 8-)
> 
> This is what I wanted to say:
> 
> If you are using Ant's codebase to get access to the tar
> package, then I
> recommend you use Commons Compress instead (and improve
> that).  The tar
> package in Commons Compress started as a copy of Ant's code
> but already
> has been improved with things Ant itself doesn't need.
> 
> > Do you plan to remove org.apache.tools.tar from your
> code base?
> 
> No.
> 
> Since I'm a committer on Commons Compress as well as Ant I
> usually merge
> bugfixes from one to the other, but I don't invest time
> into merging
> enhancements that wouldn't be used by the tar/untar tasks
> in Ant.
> 
> And then there is the Compress Antlib which also contains
> tar/untar
> classes based on Commons Compress.  Personally I
> prefer working on the
> Compress Antlib over adding features to the core tasks
> because it is
> easier - that doesn't stop other Ant committers from doing
> it in a
> different way.
> 
> > Is supporting symlinks in a tar file just unimportant
> to ant?
> 
> So far it hasn't been important enough to any user of Ant
> in way that
> would have led to a patch.  That's all I know.
> 
> Stefan
> 
> PS: yes, I've seen you've already approached Commons
> Compress and will
> look into the JIRA issue, I just can't promise a timeframe
> for it right
> now.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: support for symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-10-27, Max Birkoff wrote:

> I must admit to being a little confused by your suggestion. On one
> hand you seem to say "go to another project" and on the other hand,
> ant's code base contains the tar code that I have been using and would
> like to improve.

8-)

This is what I wanted to say:

If you are using Ant's codebase to get access to the tar package, then I
recommend you use Commons Compress instead (and improve that).  The tar
package in Commons Compress started as a copy of Ant's code but already
has been improved with things Ant itself doesn't need.

> Do you plan to remove org.apache.tools.tar from your code base?

No.

Since I'm a committer on Commons Compress as well as Ant I usually merge
bugfixes from one to the other, but I don't invest time into merging
enhancements that wouldn't be used by the tar/untar tasks in Ant.

And then there is the Compress Antlib which also contains tar/untar
classes based on Commons Compress.  Personally I prefer working on the
Compress Antlib over adding features to the core tasks because it is
easier - that doesn't stop other Ant committers from doing it in a
different way.

> Is supporting symlinks in a tar file just unimportant to ant?

So far it hasn't been important enough to any user of Ant in way that
would have led to a patch.  That's all I know.

Stefan

PS: yes, I've seen you've already approached Commons Compress and will
look into the JIRA issue, I just can't promise a timeframe for it right
now.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: support for symlinks

Posted by Max Birkoff <ma...@yahoo.com>.
Thanks for the Reply Stefan.

I hadn't checked bugzilla; thanks for letting me know. There I see:
  https://issues.apache.org/bugzilla/show_bug.cgi?id=19252
and:
  https://issues.apache.org/bugzilla/show_bug.cgi?id=15244
as well as other bugs referenced from those.

I must admit to being a little confused by your suggestion. On one hand you seem to say "go to another project" and on the other hand, ant's code base contains the tar code that I have been using and would like to improve. Do you plan to remove org.apache.tools.tar from your code base? Is supporting symlinks in a tar file just unimportant to ant?

Thanks much in advance,

b

--- On Wed, 10/27/10, Stefan Bodewig <bo...@apache.org> wrote:

> From: Stefan Bodewig <bo...@apache.org>
> Subject: Re: support for symlinks
> To: dev@ant.apache.org
> Date: Wednesday, October 27, 2010, 12:19 AM
> On 2010-10-27, Max Birkoff wrote:
> 
> > I would like to add support for symlinks to:
> >   org.apache.tools.tar.TarEntry and
> friends.
> 
> I'd recommend you'd put that effort into the tar classes in
> Apache
> Commons Compress <http://commons.apache.org/compress/> instead. 
> The tar
> and zip classes of Ant are really only a subset of the
> compress classes
> and I'd expect Ant's "copy" of the classes will only get
> the parts
> merged that are useful to the existing Ant tasks.
> 
> Personally I would prefer enhancing the compress Antlib
> <http://ant.apache.org/antlibs/compress/index.html>
> rather than the core
> tasks as well - the core tasks carry to much baggage of
> backwards
> compatibility ti keep IMHO.
> 
> > I have examined the archives at:
> >   http://news.gmane.org/gmane.comp.jakarta.ant.devel/
> > and cannot see the matter discussed there.
> 
> There is at least one bugzilla issue raised for it.
> 
> > Before sending patches, I would like to determine if
> there is a reason
> > that this has not been supported in the TarEntry
> class;
> 
> Those who have been working on the code didn't need symlink
> support and
> those who needed it never provided patches 8-)
> 
> > it appears that the proper constants are present in
> TarConstants and I
> > can get at the linkflag through the writeEntryHeader
> method.
> 
> It is true that it doesn't seem to be too difficult.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: support for symlinks

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-10-27, Max Birkoff wrote:

> I would like to add support for symlinks to:
>   org.apache.tools.tar.TarEntry and friends.

I'd recommend you'd put that effort into the tar classes in Apache
Commons Compress <http://commons.apache.org/compress/> instead.  The tar
and zip classes of Ant are really only a subset of the compress classes
and I'd expect Ant's "copy" of the classes will only get the parts
merged that are useful to the existing Ant tasks.

Personally I would prefer enhancing the compress Antlib
<http://ant.apache.org/antlibs/compress/index.html> rather than the core
tasks as well - the core tasks carry to much baggage of backwards
compatibility ti keep IMHO.

> I have examined the archives at:
>   http://news.gmane.org/gmane.comp.jakarta.ant.devel/
> and cannot see the matter discussed there.

There is at least one bugzilla issue raised for it.

> Before sending patches, I would like to determine if there is a reason
> that this has not been supported in the TarEntry class;

Those who have been working on the code didn't need symlink support and
those who needed it never provided patches 8-)

> it appears that the proper constants are present in TarConstants and I
> can get at the linkflag through the writeEntryHeader method.

It is true that it doesn't seem to be too difficult.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org