wiki:WhatIsAPackage

Version 1 (modified by jdreed, 12 years ago) (diff)

--

What Is A Package

A Debian package consists of both its contents (generally, the files and directories it includes) and some metadata. There are both source and binary packages, which we will discuss in detail.

Binary packages have the file extension .deb, and are managed with the dpkg command. Given a .deb file, dpkg -c will list the files in the package, and dpkg -I will display the package's "control" information. This is the metadata mentioned above. Let's look at an example:

$ dpkg -I xterm_271-1ubuntu2.1_amd64.deb 
 new debian package, version 2.0.
 size 565320 bytes: control archive= 8406 bytes.
     198 bytes,     6 lines      conffiles            
    1690 bytes,    35 lines      control              
    2031 bytes,    31 lines      md5sums              
   22146 bytes,   665 lines   *  postinst             #!/bin/sh
     160 bytes,     5 lines   *  postrm               #!/bin/sh
   21414 bytes,   647 lines   *  prerm                #!/bin/sh
 Package: xterm
 Version: 271-1ubuntu2.1
 Architecture: amd64
 Maintainer: Ubuntu X-SWAT <ubuntu-x@lists.ubuntu.com>
 Installed-Size: 1382
 Depends: xbitmaps, libc6 (>= 2.15), libfontconfig1 (>= 2.8.0), libice6 (>= 1:1.0.0), libtinfo5, libutempter0 (>= 1.1.5), libx11-6, libxaw7, libxft2 (>> 2.1.1), libxmu6, libxt6
 Recommends: x11-utils
 Suggests: xfonts-cyrillic
 Provides: x-terminal-emulator
 Section: x11
 Priority: optional
 Multi-Arch: foreign
 Homepage: http://invisible-island.net/xterm/xterm.html
 Description: X terminal emulator
  xterm is a terminal emulator for the X Window System.  It provides DEC VT102
  and Tektronix 4014 compatible terminals for programs that cannot use the
  [truncated for brevity]