Package relations

It would be a major accomplishment in artificial intelligence if package managers could deduce from a package's payload whether the contained software provides a specific feature, collides with other packages, or needs software from other packages to work properly. Unfortunately, the state-of-the-art tools are not capable of such conclusions (yet). Therefore, for dpkg to be able to prevent file collisions even before they occur, or for APT to be able to fulfill dependencies automatically, the...

Partition table types

Partman can create partition table types appropriate for all supported architectures. rr.blr to l.r v so ne rn .U I .r'i > ' -ii .f n ii .* fu S-ji id p -iug tri yn r IIW IUIM'-U yM fn 6S I IvtiK Li. . JJS& gafni 'If Jul 1 iSG iT'l u it i'j-.T- v u vVI '.yvtu .tu- vr. The uujiltu. -h i the devlc th i heed ' t.vi'.i -hu it-iuvi iLif ux efi tTat ton .layeh), ide-mod Li'u - in- driver), .ide-probe-iiiod tindu ID-E r.hibe driver , tde-generic fiiifitiH IDE support I'- id& uflnp& y iLinj-...

Jumpstarting with dhmake

The gruezi software seems manageable and we only require a small change to the location of the resource file to make it coexist peacefully with the other packages on any Debian system. We now fire up dh_make to give us access to the control file templates in . debian and to put the orig.tar.gz file in place as a reference reference which will allow us to isolate the changes we are about to make as part of debianisation. The --single option tells dh_make to make a single binary package and skip...

Interacting with the package database

Dpkg meticulously keeps track of all the packages it installs, and even remembers packages that were once installed but previously removed. In thecurrent incarnation of dpkg, the package database is spread across a number of flat files. These are found in var lib dpkg, which I will call the dpkg database directory. Unless stated otherwise, all files and directories in the following reside below this directory. The package database stores the following data for packages The state of the package...

Monitoring logs with logcheck

One of the strengths of a Unix system is also one of its weaknesses. Many programmes, especially daemons, write log entries for most of their actions. Most of this is informational, but it is also in the logs that problems surface. Nevertheless, the sheer volume of logging that takes place on a busy machine essentially makes it impossible for a system administrator to keep up. When the upstream logcheck died, the Debian project stepped in to take over the maintenance of and improve of this tool...

Creating the DEB file

Our next step is to populate the debian gruezi DEBIAN directory with the necessary control files, which are control, and conffiles. The control file isa different format from the one we just encountered, dpkg-dev provides the dpkg-gencontrol 3A good reference may be found here tool, which can create the binary package control file from the source package control data. We will also create the (optional) md5sums file. The content of conffiles is equally straight forward gruezi-1.1 echo etc...

Using debconf

As discussed in chapter 5.8, debconf is a caching system that supports user interactions in a programmatic and flexible way. debconf-enabled packages query the administrator for desired settings in a freely configurable and programmable way before the package is installed so that the configuration phase can complete without bothering the installing user. To export this functionality, a package must provide (at least) three files which work hand in hand templates, config, and postinst. Chapter...

User and group management

User management on a Debian system is handled by a family of four tools, ad-duser, addgroup, deluser, delgroup, which are commonly referred to as the ad-duser suite, and installed with adduser package. These cover the most important tasks, including group membership management. All other operations, such as the modification of account data or the setting of passwords, are handled by the appropriate standard Unix tools (e.g. chfn, chsh, usermod, or passwd). As with most Debian approaches, you...

FAI Fully automatic installations

FAI stands for Fully Automatic Installation24 and provides a scaleable solution for installation management of any number of clients. Unlike alternative solutions, such as systemimager or replicator, FAI can handle different types of hardware and install systems for different purposes all with a single, central configuration repository. A manual is linked from the FAI homepage25, and user-contributed installation reports and documentation26 provide valuable additional resources. FAI uses NFS to...

The Debian philosophy

During the development cycle that followed Ian Murdock's initial formalisation of the goals, a number of priorities began to crystalise and form the basis for the philosophy by which the project abides. In its foundation documents - the Social Contract (see appendix E) as well as the DFSG (see appendix F) - the project formalises major parts of its philosophy, including the priorities governing the development of the Debian GNU Linux operating system. At first encounter, many of the priorities...

Caching APT archives

APT caches its downloads for the local machine. However, if you operate multiple machines, this cache is useless as you may have to download a package multiple times, once for each machine being upgraded. Depending on the upstream link, this may be time-consuming, and system administrators generally do not like to wait for progress bars to complete. While it is possible to share APT's cache among a bunch of machines, only one machine may access it at any time. The locking required to enforce...

Connectivity via PPP

In addition to kernel-driven network interfaces (most of which are Ethernet these days), PPP is a common way to access computer networks. PPP itself is actually a transfer protocol between two peers with more features than the Ethernet protocol, allowing for authentication and the negotiation of IP addresses for the calling client. PPP is used in standard InternetService Provider (ISP) modemdial-in scenarios, as well as for DSL (PPPoE or PPP-over-Asynchronous-Transfer-Mode (PPPoA)) connections...

The Filesystem Hierarchy Standard FHS

With 15 000 binary packages in the Debian pool at the time of writing, you may wonder how many conflicts had to be resolved between two packages each trying to install a file of the same name. Well, the answer is very few, which may be surprising were it not again for the policy to confine packages to use very specific locations for their files, rather than installing all over the place. Section 9.1.1 of the Debian policy specifies that all installed files and directories must comply with the...

The debhelper suite Overview

Unix is the operating system of scripts and automation. It is therefore unsurprising that most of the steps and functionality needed to create a binary Debian package have been further hidden behind more abstract and simpler interfaces. The most prominent of these interfaces is debhelper, which provides a plethora of small scripts to handle most aspects of packaging in an intuitive and consistent way. The tools are intended for use in the binary-* targets of debian rules. Most of the debhelper...

Anatomy of a personal repository

There is no stringent requirement for the directory layout of an APT repository. APT only needs to find the Packages and or Sources file, which contain the relative paths to the actual data files. APT does not mind whether the layout uses a pool structure like the official Debian mirrors, or all files are in the same directory. For gruezi, we set up a apt directory and put the gruezi package into the directory. This layout scales well to several dozens of packages. For our purposes, we will...

Debsigs and dpkgsig

While APT 0.6 uses index files to verify package integrity and is thus of little use when the indices are not available, two other tools use signatures attached to the DEB file for the integrity verification dpkg-sig and debsigs. debsigs in package debsigs was written shortly after the release of potato. In the mean time, another programme, dpkg-sig in package dpkg-sig was authored to deal with its shortcomings17. A package signature is similar to the digital signatures as used in e.g. emails,...