Re: replicating package compression used by dpkg-deb
On Thu, Sep 28, 2006 at 03:45:16AM -0700, Ian Bruce wrote:
> It appears that dpkg-deb does not exec gzip, and it's not dynamically
> linked with anything except glibc. I suppose that it's statically linked
> against zlib1g or something like it. So the question is, how can the
> exact compression algorithm used by dpkg-deb be made available for
> another piece of software? Is it something that's well-specified, or is
> it liable to change at any moment?
dpkg is statically linked against zlib (you really don't want to break
the ability to unpack packages if you can avoid it). I presume dpkg-deb
is too though I haven't checked. The precise output of zlib can vary
between versions and depending on the options used when running it.
> Of course the whole problem would be radically simplified if the
> "--rsyncable" option were used when the packages were being built. Does
> anyone know what the rationale for not doing that is?
It's not implemented by zlib. There is an open bug report asking for
it with a link to a patch but I wasn't happy with the patch since it
is enabled using an environment variable and wanted to rework it to have
an API before forwarding upstream. I've not yet had sufficient
enthusiasm to do that; current progress suggests that you shouldn't hold
your breath on that one.
"You grabbed my hand and we fell into it, like a daydream - or a fever."