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. On the other side libarchive is a general purpose library and should support all compression programs we have in core. We should not care too much about the increase in filesize of pkgadd. For me most important is the support of *.xz/*.lzma source tarballs, distfiles, in pkgmk. To summarize I would link libarchive against liblzma and have no objections against using bsdtar in pkgmk. Greetings Juergen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux