[Pkg-fonts-devel] Possible abuse of dpkg-deb -z9 for xz compressed binary packages
guillem at debian.org
Mon Sep 1 12:20:30 UTC 2014
I had noticed this a while ago while reading changelogs, but didn't
realize at the time this poses actual problems, besides being possibly
just a dubious practice.
There seems to be some packages overriding the default compression
level for xz to 9. This means dpkg-deb will require way more memory on
both compression and decompression usually for extremely little gain,
and might even fail on some systems with low memory (see #757740 for
an example). But the real issue is that (as mentioned on the xz man
page), using such high levels might actually make no sense at all
when being using with data that is smaller than the dictionary size.
From doing a quick search on <http://codesearch.debian.net/> for
“dpkg-deb.*-z9” and “dh_builddeb.*-z9”, but w/o looking in detail, it
seems that most packages are or have been maintained by Daniel Baumann
or the Fonts Team (both CCed). Was there an actual reason to use -z9,
beside maybe trying to get the “bestest” compression possible? :)
This could be checked from lintian by using something like:
$ ar x pkg.deb data.tar.xz
$ xz --list --verbose --verbose --robot data.tar.xz
and comparing the file sizes with the dictionary size used. I'll be
filing a bug report about this.
More information about the Pkg-fonts-devel