Changes between Version 1 and Version 2 of SourcePackages


Ignore:
Timestamp:
01/23/13 16:36:36 (12 years ago)
Author:
jdreed
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SourcePackages

    v1 v2  
    1313}}} 
    1414 
     15Let's take a look at the actual .dsc file: 
     16 
     17{{{ 
     18$ cat rpncalc_0.1.dsc  
     19Format: 3.0 (quilt) 
     20Source: rpncalc 
     21Binary: rpncalc 
     22Architecture: any 
     23Version: 0.1 
     24Maintainer: Jonathan Reed <jdreed@mit.edu> 
     25Standards-Version: 3.9.3 
     26Build-Depends: debhelper (>= 8.0.0) 
     27Package-List:  
     28 rpncalc deb utils extra 
     29Checksums-Sha1:  
     30 1a43c631b461e7d942b68cee620a892742a71794 901 rpncalc_0.1.orig.tar.gz 
     31 b9d7945e5a6e116746fdb4ecf47544c7b8d8fae4 982 rpncalc_0.1.debian.tar.gz 
     32Checksums-Sha256:  
     33 ff72ff17a9ec795ebac7d94818c70d28b3bd88ad0adf623ee479f6ae11841a56 901 rpncalc_0.1.orig.tar.gz 
     34 d220513f074eafc87cd4f5f2476dbdfe4ede660bf27e793ab1c3409a7245cd25 982 rpncalc_0.1.debian.tar.gz 
     35Files:  
     36 8114cf4a6a276bf6377df0750ecb68de 901 rpncalc_0.1.orig.tar.gz 
     37 2e1c18b8ee84bdd4a24305e547ee8ad7 982 rpncalc_0.1.debian.tar.gz 
     38}}} 
     39 
     40As you can see, it contains metadata about the name of the package, its version, and also contains a list of files -- in this case, rpncalc_0.1.orig.tar.gz and rpncalc_0.1.debian.tar.gz.  These are, respectively, the "upstream" or "source" tarball, and the debian changes.  Debian goes out of its way to keep its packaging changes separate from the upstream source, so that the same packaging can easily be applied to a newer version of the software in the future. (The files are listed multiple times because their checksums are calculated with multiple digest algorithms (MD5, SHA1, SHA256).  Older versions of the dpkg program only understand older algorithms, like MD5.) 
     41 
     42If you use `tar` to examine the files, you'll see the .debian.tar.gz contains a number of files under the `debian/` subdirectory, and the .orig.tar.gz contains the software itself. 
     43 
     44N.B. This is version 3.0 of the source format.  In older versions, the Debian changes were represented in a .diff.gz which was applied with the `patch` command.  Although it was in a different format, the contents were the same.  The older 1.0 format is still quite common, as a "lowest common denominator". 
     45 
    1546As 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. 
    1647 
    17 We now have a source package, which is typically unpacked  
     48We now have a source package, which is typically unpacked into a directory with the name of the package and its version (e.g. rpncalc-0.1).  If we look in that directory, we'll see the software, as well as a `debian` directory.  The `debian` directory contains a number of special files necessary to build the package. 
     49 
     50Next: [[AnatomyOfAPackage]]