Bug 43689 - Need a way to add symlinks to a tar
Summary: Need a way to add symlinks to a tar
Status: RESOLVED DUPLICATE of bug 40059
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: nightly
Hardware: Other other
: P2 enhancement (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 05:29 UTC by Steve Loughran
Modified: 2008-09-04 06:32 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Loughran 2007-10-24 05:29:19 UTC
You cant use Ant's tar to create a RPM package if you want symbolic links in the
tar file. It is probably too hard/non-portable to pick them up from the
filesystem, but we ought to support a <symlink> entry into tar archives that
lets you declare a link in the archive itself. 

-no, I dont know what we should do when untarring.

The short term workaround is to use the unix tar command
Comment 1 Peter Reilly 2007-10-24 06:48:11 UTC
Hopefully, now that microsoft has implemented
symbolic links in ntfs (http://en.wikipedia.org/wiki/NTFS_symbolic_link)
sun may add them to java.
Comment 2 Steve Loughran 2007-10-24 07:03:02 UTC
aah, but they've only done it on an OS that nobody uses ;)

I'm more interested in doing something like

<tar destfile="dest.tar">
 <fileset dir="build/tar/" includes="etc/**/*"/>
 <symlink src="etc/rc5.d/s20example" dest="etc/init.d/example" />
</tar>

Once you get symlinks into your tar, rpmbuild can take ownership of them...
Comment 3 Paul King 2007-10-25 02:06:10 UTC
Re: symlinks in Java

One of the features proposed (perhaps for Java 7) in JSR 203:
http://www.jcp.org/en/jsr/detail?id=203
Comment 4 Peter Reilly 2007-10-25 02:26:01 UTC
yes, it would be cool to have JSR203 in java7.

One could write a isSymbolicLink(File m) and use
reflection to use the JSR203 features or use the current
hack if JSR203 is not present.

Comment 5 Stefan Bodewig 2008-09-04 06:32:59 UTC

*** This bug has been marked as a duplicate of bug 40059 ***