%%
%% Define the fonts we will use
%%
%deffont "standard" tfont "arial.ttf"
%deffont "typewriter" tfont "courbd.tf"
%%
%% Default settings for special lines
%%
%default 1 leftfill, fore "yellow", back "darkblue"
%default 2 size 7, vgap 10, prefix " ", font "standard"
%default 3 size 2, bar "gray70", vgap 10
%default 4 size 5, vgap 30, font "standard"
%%
%% Default settings for indented lines
%%
%tab 1 size 5, vgap 40, prefix " ", icon box "green" 50
%tab 2 size 4, vgap 40, prefix " ", icon arc "yellow" 50
%tab 3 size 3, vgap 40, prefix " ", icon delta3 "white" 40
%%
%%%%%%%%%%%%%%%%%%
%page
%nodefault, font "standard", fore "yellow", back "darkblue"
%center
Linux package management
%size 6
Wichert Akkerman
%size 5
wichert@cistron.nl
%%%%%%%%%%%%%%%%%%
%page
Overview
History of distribrution methods
Sources
Precompiled binaries
Packages
Package management
A new package format
%%%%%%%%%%%%%%%%%%
%page
Standard source distribution
Originally software was only shipped as source in a tar-archive. You had to \
manually download, configure and install it.
%font "typewriter", size 3
% ftp somewhere
> cd /pub/linux
> bin
> get lilo.tar.gz
> quit
% gunzip lilo.tar.gz
% tar xf lilo.tar
% cd lilo
% more README
% vi Makefile
% make
% make clean
% vi Makefile
% make
% make install
%%%%%%%%%%%%%%%%%%
%page
Problems with this approach
User problems:
Easy to make mistakes
Lot of similar work
Programmer problems:
Easy to make mistakes
Lot of similar work
%%%%%%%%%%%%%%%%%%
%page
Autoconfed source distribution
Use a general framework to configure packages.
%font "typewriter", size 3
% ftp ftp.gnu.org
> cd /gnu
> bin
> get grep-2.4.tar.gz
> quit
% gunzip grep-2.4.tar.gzx
% tar cf grep-2.4
% cd grep-2.4
% ./configure --prefix=/usr
% make
% make install
%%%%%%%%%%%%%%%%%%
%page
Moving along
With more and more software becoming available and the high speed of \
development installing from source became impractical:
Continuous configuring and compiling takes time
Lot of similar work
%%%%%%%%%%%%%%%%%%
%page
Binary distribution
Big packages like gcc, libc and XFree86 are also distributed in \
precompiled form.
%font "typewriter", size 3
% ftp tsx-11.mit.edu
> cd /pub/ALPHA/gcc/private
> bin
> get gcc-2.7.2.binary.tar.gz
> quit
% cd /
% tar xfz ~/gcc-2.7.2.binary.tar.gz
%%%%%%%%%%%%%%%%%%
%page
Still not perfect
With the increasing complexity of systems this was still not good enough:
there is no way to keep track of what software is installed
there might be undetected conflicts between programs
Some software needs other software to run; checking such \
dependencies can be a tedious job
%%%%%%%%%%%%%%%%%%
%page
Introducing packages
The concept of packages and package management systems was introduced:
package: archive which contains precompiled binaries and \
metadata which describes the contents of the archive
package management system: a system which keeps track of the \
packages that are installed in the system and can install, \
upgrade and remove packages
%%%%%%%%%%%%%%%%%%
%page
Early package managers
The first package managers were little more then wrappers around tar. \
With the realization that packages are not stand-alone objects relations \
were added: dependencies and conflicts.
Dependency: states that a package needs another package(s) to do its \
work. Example: autoconf needs both m4 and perl.
Conflicts: states that two packages cannot be installed at the same \
time. Example: sendmail and smail.
%%%%%%%%%%%%%%%%%%
%page
Alternatives explosion
Dependencies and conflicts became cumbersome with the increasing number \
alternatives for a package: everytime a new alternative was introduced \
all packages referencing it needed to be updated. Example:
Assume sendmail, postfix and exim are the only MTAs available. Mutt will then \
have:
%font "typewriter", size 3
Package: mutt
Depends: sendmail | postfix | exim
%center, newimage "depends.eps"
%%%%%%%%%%%%%%%%%%
%page
It's a mess of relations
Now a new MTA is introduced: smail. Mutt and all similar packages need \
to be updated:
%font "typewriter", size 3
Package: mutt
Depends: sendmail | postfix | exim | smail
%center, newimage "moredepends.eps"
%%%%%%%%%%%%%%%%%%
%page
Virtual packages
Provide a method to state that a package provides a certain interface or \
functionality. This is done by introducing a provides-relation.
Using this we now get:
%font "typewriter", size 3
Package: mutt
Depends: mail-transport-agent
Package: sendmail
Provides: mail-transport-agent
Package: smail
Provides: mail-transport-agent
%%%%%%%%%%%%%%%%%%
%page
Virtual packages in action
%center, newimage "virtualdepends.eps"
%%%%%%%%%%%%%%%%%%
%page
Download on demand
The next logical step was being able to use remote archives \
transparently:
%font "typewriter", size 3
[tornado;~]-4# apt-get install gnome-stones
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
gnome-games-locale
The following NEW packages will be installed:
gnome-games-locale gnome-stones
0 packages upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 127kB/325kB of archives. After unpacking 821kB will be used.
Do you want to continue? [Y/n]
%%%%%%%%%%%%%%%%%%
%page
What is next?
As we have seen we have come a long way since software was only \
distributed in sourceform. However there is still room for improvements:
better frontends for package management systems
new common package format
%%%%%%%%%%%%%%%%%%
%page
Why a new package format?
We already have the deb and rpm formats which work fine and are well \
supported. So why a new format?
supporting two formats is troublesome for vendors
both formats lack a couple of desirable features:
internationalization support
multiple architecture and OS support
multiple payloads
In order to resolve these issues we decided that it was desirable to \
design a new format that will hopefully replace deb and rpm and become \
the new standard packaging format.
%%%%%%%%%%%%%%%%%%
%page
Design goals
In order for this to be accepted as a new standard packaging format we
set some design goals:
Extractable using traditional UNIX tools
Must support all features of the deb and rpm formats
Must support signatures and checksums
Must not be Linux-specific
Must be extensible
%%%%%%%%%%%%%%%%%%
%page
Basic structure
The basic structure of the format is a tar wrapper which contains payloads \
with the actual data.
A payload is a collection of two to four files which represent an installable \
part of the package. The type of each file is encoded in the filename. \
In addition the version of the format used is also encoded in the name \
of the metadata-file. The files may be compressed using gzip or \
optionally bzip2.
%center, newimage "package.eps"
%%%%%%%%%%%%%%%%%%
%page
Payload file types
There are four types of possible files in a payload:
metadata
scripts
data
signatures
%%%%%%%%%%%%%%%%%%
%page
Metadata
XML file which describes the package and how it should be installed. \
Using XML gives us a couple of advantages:
it is a very extensible format
it's non-proprietary
built-in support for internationalization
we can use XML-namespaces to add distribrution-specific information
Common information will be governed by the LSB to make sure this remains \
portable across distributions.
%%%%%%%%%%%%%%%%%%
%page
metadata example
(Please note that at this moment the format is not complete, so this \
will change)
%font "typewriter", size 3
mount
2.9t-1
Tools for mounting and manipulating filesystems
This package provides the mount(8), umount(8), swapon(8),
swapoff(8), and losetup(8) commands.
mount,umount,filesystem
Andries Brouwer
aeb@cwi.nl
Andries
Vincent Renardias
vincent@debian.org
ftp://sunsite.unc.edu:/pub/Linux/system/Misc/util-linux-2.5.tar.gz
Debian
GPL
%%%%%%%%%%%%%%%%%%
%page
Scripts
Unfinished part of the specification: differences between dpkg and rpm \
in calling scripts add complexity. There will be a number of fixed \
points during installation / removal sequence when scripts might be \
called. Which scripts is called when will be defined in the metadata.
Supported will be scripts for pre and post installation and removal of \
both packages and triggers.
Scripts (which can actually be any kind of binary) are stored in a \
(possibly compressed) tar archive.
%%%%%%%%%%%%%%%%%%
%page
Data
They data are the files that will be installed in the filesystem. It \
is distributed as a gzip or bzip2 compressed tar archive.
In order to be portable only a defined subset of tar features \
may be used. This subset is taken from GNU tar and consists of \
long filenames and sparse file support.
%%%%%%%%%%%%%%%%%%
%page
Signatures
Digital signatures and checksums will be stores in a simple XML file. \
There are different signatures for the different files in a chunk, and \
per file multiple signatures are possible.
%font "typewriter", size 2
db9557f3fdd690d07bc9f2682b7d0447
732813edc871575e107dd8324ed417ce
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA4w1bAP4VifPYwQCsRApV7AJ9xporhmU11+nOYgHFSVQJ++UtHsgCgwawT
ruLKGjuFPQnNmLamTU9OTEI=
=Wg9K
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA4w1blP4VifPYwQCsRAp0ZAJ9zBMy75Og3RpoYceg2ULgNb1MynACfXk6u
3mKwj/m750YKblxz4jjeq1k=
=N9zL
-----END PGP SIGNATURE-----
%%%%%%%%%%%%%%%%%%
%page
Issues to resolve
As mentioned the design is not finished yet. We still need to:
define interface for maintainer-scripts
define script-execution points
define dependency-namespaces
specify install/removal ordering
indexing of archives
%%%%%%%%%%%%%%%%%%
%page
Notes
An important thing to note is that most of the differences between \
distributions do not arise from the package format used, but from the \
policies used in creating packages. This means that:
distributions will not become more alike
package will not magically become portable, this needs efforts \
like LSB and FHS.
%%%%%%%%%%%%%%%%%%
%page
Thanks
The following have contributed to the new package format:
Marcus Brinkmann
Ben Collins
Jeff Johnson
Erik Troan
Daniel Veillard
Matt Wilson
%%%%%%%%%%%%%%%%%%
%page
The end
%% (This is where you ask questions or take a break)