next up previous contents index
Next: Appendix 6: Linux as Up: Appendix Previous: Appendix 4: Multiple OS   Contents   Index

Appendix 5: Building Packages Files

Files with the extension .deb contain the packages managed by dpkg. For information on how these packages are built, the programmer.html/ and policy.html/ directories will provide much useful information. These files are found on a Debian system in the /usr/doc/dpkg.

What you need to build a Packages file:

  1. Debian GNU/Linux system with dpkg-dev installed.
  2. A collection of .deb package files.
  3. The override file for the distribution involved.

The Debian package dpkg-dev provides the script dpkg-scanpackages which is used to produce Packages files. With this tool an arbitrary collection of Debian binary packages can be converted into a ``distribution''. Normally the Debian distribution resides in the sub-directories of the directory binary-i386. Many times however, even with a ``standard'' archives of this distribution, the Packages file is not in sync with the archive, and a new Packages file will be required. The proper operation of dselect depends on an accurate and up-to-date Packages file.

Another reason for building a Packages file relates to the construction of a ``custom'' installation. Collecting a specific subset of the Debian distribution for installation using dselect will require a Packages file for this subset. Once these packages are collected into a sub-tree, a Packages file can be created.

dpkg-scanpackages has two required parameters, and sends its output to stdout. The first parameter is the path to the archives while the second points to the override file for the release being used. The 1.3 release is code named bo, while the previous release was rex and the next one was hamm (all characters from the movie dgbToy Story). These override files are found in the indices/ directory of any Debian mirror with the name override.bo or override.rex or override.hamm depending on which distribution the packages came from. The command line would look something like:

dpkg-scanpackage ./bo/binary-i386 ./indices/override.bo >Packages

and will run for quite some time. Upon completion the script will print information about any differences found between packages and information found in the override file. This is typically caused by the fact that the maintainer changed and the override file does not reflect the new maintainer. These errors are never a problem to the correct operation of the Packages file, but are informative only. The final information provided by the script gives the total number of packages added to the Packages file. A copy of this file along with a gzipped copy should be placed in the outer directory of the distribution tree. For the standard distribution the Packages file goes into ../binary-i386. When a group of packages are collected into one directory that is the directory where the Packages and Packages.gz files should be placed as well. Once this has been accomplished the distribution is ready to be installed using dselect.


next up previous contents index
Next: Appendix 6: Linux as Up: Appendix Previous: Appendix 4: Multiple OS   Contents   Index
Dale Scheetz