Issue Details (XML | Word | Printable)

Key: RIO-110
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dennis Reedy
Reporter: Dennis Reedy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Rio

Support extracting tar files

Created: 22/Sep/08 01:49 PM   Updated: 31/Jul/09 03:46 PM
Component/s: Deployment
Affects Version/s: 4.0 M3
Fix Version/s: 4.0 M3

Time Tracking:
Not Specified


 Description  « Hide
Need to support the ability to extract tar files during software provisioning & downloading

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dennis Reedy added a comment - 22/Sep/08 03:09 PM
One way to address this is to simply use the untar capability found in Ant. The easiest way to include this into the runtime would be to include ant.jar. I am not sure if I like including Ant in the service runtime for this, this would also mean distributing Ant with Rio.

What do others think? Is it an issue?


Jerome Bernard added a comment - 22/Sep/08 03:20 PM
The idea with TAR support is to avoid loosing the execution flags on the executables.
Otherwise, we have to chmod the files we're interested in.

The other drawback to is that most Linux distributions comes either in .tar.gz or .tar.bz2 flavors, so if we want to use such software we have to untar it then zip it.


Jerome Bernard added a comment - 22/Sep/08 03:33 PM
Maybe we could do two different things:
1/ just reuse the TAR stuff in Ant and not package a complete Ant lib
2/ package Ant and then "expose" many other tasks such as cvs/svn (so that instead of downloading from HTTP, we could simply checkout some binaries from a SCM repository), scp, and so on.

Dennis Reedy added a comment - 23/Sep/08 03:07 PM
Reusing the tar feature in Ant had been my plan. This easy actually pretty straightforward with classdepandjar. What amazed me was the amount of org.apache.tools.ant classes were determined as dependencies. With included ant classes rio.jar became 1.6 MB, without it rio.jar is 1.2 MB. Seems to be an awful lot of cruft for one capability.

At this point I am thinking of re-engineering the untar classes to make them lighter and less of an impact.

To your other point, I had been leaning towards using Ivy or Maven to do part of this, also looking towards apache commons net to assist with ftp, and others.


Jerome Bernard added a comment - 26/Jul/09 10:27 AM
http://commons.apache.org/compress/ should be of help for this issue.

Dennis Reedy added a comment - 31/Jul/09 03:46 PM
Tar files are now supported. The Apache Commons Compress project is used, and added as a 3rd party dependency.

Rio provides a best effort to handle the mode of the extracted files, modifying the file permissions accordingly. Care must be taken when using this feature if using Java 1.5, as the file permissions are not changed since the File.setReadable(), File.setWriteable() and File.setExecutable() were not added until Java 1.6