Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
If you thought rpm's choice for cpio (over tar) was weird, just wait until you see that deb produces a sadistic .tar.gz.a matroshka.
Who maintains RPM? (2011 edition)
Posted May 4, 2011 8:21 UTC (Wed) by tzafrir (subscriber, #11501)
A deb package is technically gluing of two tarballs: "control" and "data". This gluing is done using an ar archive as ar is a very light-weight archive that adds very little overhead. Here is the content of that archive for some random package:
$ ar tv $PACKAGE.deb
rw-r--r-- 0/0 4 Apr 17 06:55 2011 debian-binary
rw-r--r-- 0/0 1975 Apr 17 06:55 2011 control.tar.gz
rw-r--r-- 0/0 73363 Apr 17 06:55 2011 data.tar.gz
$ ar p $PACKAGE.deb control.tar.gz | tar tzf -
$ ar p $PACKAGE.deb control.tar.gz | tar xOzf - ./control
Maintainer: CDBS Hackers <firstname.lastname@example.org>
Depends: debhelper (>= 5.0.30)
Description: common build system for Debian packages
This package contains the Common Debian Build System, an abstract build
system based on Makefile inheritance which is completely extensible and
overridable. In other words, CDBS provides a sane set of default rules
upon which packages can build; any or all rules may be overridden as
The rough equivalents of those in an rpm package is:
data.tar.gz is the cpio archive you mentioned. The metadata and the gluing in a deb package are done in a way that is at least accessible through standard shell tools. It was originally done with some custom dictionary and custom gluing as in RPM, but later on they preferred to use a more standard method.
I'm sure there are some merits to the rpm format. It's just that your criticism is wrong.
Posted May 5, 2011 17:18 UTC (Thu) by vonbrand (subscriber, #4458)
Using cpio (one standard format) instead of tar (each version has its own quirks) is sane...
Posted May 6, 2011 1:10 UTC (Fri) by lindahl (subscriber, #15266)
Posted May 6, 2011 4:58 UTC (Fri) by rahulsundaram (subscriber, #21946)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds