wiki:SourcePackages

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

--

Source Packages

So far we've looked at Debian binary packages (.deb). But there are also Debian source packages, which are used to build the binary package. Source packages consist of a .dsc file, which in turn references one or more .tar.gz files.

Source packages are installed with the dpkg-source command:

$ dpkg-source -x rpncalc_0.1.dsc 
dpkg-source: warning: extracting unsigned source package (rpncalc_0.1.dsc)
dpkg-source: info: extracting rpncalc in rpncalc-0.1
dpkg-source: info: unpacking rpncalc_0.1.orig.tar.gz
dpkg-source: info: unpacking rpncalc_0.1.debian.tar.gz

As with the dpkg command, the APT front end is more commonly used. The same repositories which contain binary packages also contain binary source packages. It's possible to get the source package for any binary package with the apt-get source command. This command downloads the source package to the current directory and unpacks it for you. Note that a single source package may generate multiple binary packages. For example, if you have the binary package foo-utils, which might also come with the package foo-doc, the source for both of those would likely be in the foo package, so apt-get source foo-doc would get you the same source as apt-get source foo-utils. However, with APT, you don't have to worry about this -- it will determine what the appropriate source package is, and it will get it for you.

We now have a source package, which is typically unpacked