Mark Rosenstand [2009-06-16 13:19]:
On Mon, Jun 15, 2009 at 10:39 AM, Juergen Daubert<jue@jue.li> wrote:
On Sun, Jun 14, 2009 at 01:23:37PM +0200, Tilman Sauerbeck wrote:
Hi Tilman,
[...]
There's two possible solutions for this: a) link to liblzma (XZ!) too. This will increase the size of our pkgadd binary since now a few more object files from liblzma.a will be included. b) initialize libarchive so that support for XZ is disabled -> no need to link to liblzma. This means that pkgadd/pkginfo will not be able to open xz'ed tarballs.
I don't think that we need this. Changing our package-format to xz might be an nice option, but looking at typical compression times is really disappointing.
Here's a quick test with our latest xulrunner package:
$:> mkdir foo $:> tar -C foo -xf xulrunner#1.9.0.11-1.pkg.tar.gz
$:> time tar -czf foo.tar.gz foo real 0m4.409s user 0m4.250s sys 0m0.150s
$:> time tar -cJf foo.tar.xz foo # -9 compression real 1m11.419s user 1m10.950s sys 0m0.570s
$:> echo 'scale=2; (60+11.42)/4.41' | bc 16.19
$:> ls -l *.gz *.xz -rw-r--r-- 1 juergen users 18224116 Jun 15 10:02 foo.tar.gz -rw-r--r-- 1 juergen users 12979240 Jun 15 10:04 foo.tar.xz
Note that this does NOT apply to pkgmk. pkgmk doesn't use libarchive obviously, but instead calls out to tar to extract stuff. In case we decide to build bsdtar with libarchive support, I would like to change pkgmk so that it uses bsdtar to extract *.tar.gz, *.tar.Z, *.tgz, *.tar.bz2, *.tar.xz, *.zip
Let me know what you think.
Having bz2 and xz support in libarchive makes only sense IMO if other programs like bsdtar can use that support, obviously we don't need it for pkgadd.
It's a one line change to make pkgadd only initialize gzip decompression, avoiding statically linking in all of libarchive's supported formats.
We know (and I already did the change before posting this).
I'm not sure .pkg.bz2 packages even work though pkgadd already pulls in bz2. Last time I checked (admittedly long ago, around the libtar -> libarchive port) the package extension was hardcoded.
It still is. Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?