You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by di...@covalent.net on 2002/04/05 14:58:02 UTC

ANT, gzip/tar targets and the Zaurus.

Whilst trying to build a little build.xml task for the Sharp
Zaurus - I ran into a problem with the way ANT does the gzipping
and the tarring.

The zaurus seems to

-	Want its file with a string uid rather than '0'

-	Wants its gzip files of OS type unix and with
	the original name.

-	It wants filenames to start with a './' starting.

As other wise the debian like pkg management system is not happy.

I.e. It expects:
	$ file java-anttest_1.00_arm.ipk: gzip compressed data,
		deflated, original filename,
		last modified: Tue Nov 27 16:48:01 2001, os: Unix
rather than
	$ file java-anttest_1.00_arm.ipk:
		gzip compressed data, deflated, last modified: Thu Jan  1
		01:00:00 1970, os: MS-DOS

and for the inside of the tar it wants entries:
	$ tar ztvf ~/Sites/java-hello_1.00_arm.ipk
	-rw-r--r-- zaurus/sharp     275 2002-04-05 14:48:42 ./control.tar.gz
	-rw-r--r-- zaurus/sharp    2350 2002-04-05 14:49:13 ./data.tar.gz

rather than
	$ tar zvtf dist/java-hello_1.00_arm.ipk
	-rw-r--r-- 0/0             260 2002-04-05 14:54:00 control.tar.gz
	-rw-r--r-- 0/0            2420 2002-04-05 14:54:00 data.tar.gz

What are my chances of getting these capabilities into ant ? Right now I
am using an external shell script to do the 'right' thing with a bit
of tar/gzip magic from the cmd line.

Dw
-- 
Dirk-Willem van Gulik


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ANT, gzip/tar targets and the Zaurus.

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 5 Apr 2002, <di...@covalent.net> wrote:

> -	Want its file with a string uid rather than '0'

Inside the tar file?  Use tarfileset to collect your files, you have
the option to specify the uid there.

> -	Wants its gzip files of OS type unix and with
> 	the original name.

Bad luck 8-(

We are using Java's built-in classes to write the gzip files.  If
these classes create the files the wrong way, there is nothing much we
can do.

We could reimplement the GZIPOutputStream class, we are already doing
so for ZipOutputStream.  Want to lend a hand?

> -	It wants filenames to start with a './' starting.

Again, tarfilest is your friend (but only if you use the CVS version
of Ant).

<tar destfile="java-anttest_1.00_arm">
  <tarfileset dir="." username="dirkx" prefix="./">
    <include ...>
  </tarfileset>
</tar>

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>