Differences between revisions 1 and 22 (spanning 21 versions)
Revision 1 as of 2010-07-02 18:07:39
Size: 1244
Editor: HenriLeFoll
Comment: new page
Revision 22 as of 2018-11-20 02:09:59
Size: 6160
Editor: PaulWise
Comment: ensure people choose a mirror rather than using the German mirror
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language en
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/DebianRepository|Français]] - [[it/DebianRepository|Italiano]] - [[ru/DebianRepository|Русский]] - [[sv/DebianRepository|Svenska]]-~||
----
A Debian repository is a set of Debian binary or source packages organized in a special directory tree and with various infrastructure files - checksums, indices, signatures, descriptions translations, ... - added. Client computers can connect to the repository to download and install the packages using an [[Apt]]-based package management tool.
Line 2: Line 7:
== Anatomy of a repository ==
The following description is mostly for people who browse a repository using a standard web browser and wonder what is where and how everything fits together. A more precise and technical description is in [[/Format|Format]].
Line 3: Line 10:
== Introduction == A Debian repository contains several '''releases'''. Debian releases are named after characters from the "Toy Story" movies (wheezy, jessie, stretch, ...).
The codenames have aliases, so called '''suites''' (stable, oldstable, testing, unstable). A release is divided in several '''components'''. In Debian these are named {{{main}}}, {{{contrib}}}, and {{{non-free}}} and indicate the licensing
terms of the software they contain. A release also has packages for various
'''architectures''' (amd64, i386, mips, powerpc, s390x, ...) as well as sources
and architecture independent packages.
Line 5: Line 16:
A Debian [[http://en.wikipedia.org/wiki/Software_repository|repository]] is a directory where you can find software you can install on Debian. The root directory of a repository has a directory {{{dists}}} which in turn has a directory for each release and suite, the latter usually symlinks to the former, but the browser won't show you a difference. Each release
subdirectory contains a cryptographically signed {{{Release}}} file and a directory for each component. Inside these are directories for the different architectures, named {{{binary}}}-''<arch>'' and {{{sources}}}. And in these
are files {{{Packages}}} that are text files containing the meta data of
packages. Hmm, so where are the actual packages?
Line 7: Line 21:
Each Debian [[http://en.wikipedia.org/wiki/Software_distribution|distribution]] has its repository. The packages themselves are below {{{pool}}} in the root directory of the
repository. Below {{{pool}}} there are again directories for all the
components, and in these are directories named {{{0}}}, ..., {{{9}}}, {{{a}}}, {{{b}}}, ... {{{z}}}, {{{liba}}}, ... , {{{libz}}}. And in these are directories named after the software package they contain, and these directories finally contain the actual packages, i.e the {{{.deb}}} files. The name is not necessarily the name of the package itself, the package bsdutils e.g resides in the {{{pool/main/u/util-linux}}} directory, it is the name of the source that the package is generated from. A single upstream source may generate several binary packages, and all of them will end up in the same subdirectory below {{{pool}}}. The additional single letter directories are just a trick to avoid having too many entries in a single directory which is what many systems
traditionally have performance problems with.
Line 9: Line 26:
The Debian repositories can be found on [[http://www.debian.org/mirror/|Debian mirrors]]. In the leaf directories below {{{pool}}} there usually are several versions of a package, and the information on what releases each version belongs to solely resides in the indices. This way, the same version of a package can belong to several releases but use disk space only once, and that without resorting to hardlinks or symlinks, so mirroring is rather simple and even works with systems that don't have these concepts.
Line 12: Line 29:
The official Debian package repository is mirrored all over the world.
Line 13: Line 31:
 There is a [[Teams/Mirrors|team in charge of mirrors]].  * The Debian website has an [[https://www.debian.org/mirror/list|official list of Debian mirrors]]
Line 15: Line 33:
A list of mirrors :  * There also is a list of [[/Unofficial|unofficial repositories]] containing various additional software
Line 17: Line 35:
 * The [[http://www.debian.org/mirror/list|official list of Debian mirrors]]

 * Some [[UnofficialRepositories|unofficial repositories]]
 * There is a [[Teams/Mirrors|team in charge of mirrors]].
Line 22: Line 38:
== Distributions ==

Here is the list of the software include in each Debian distribution :

 * in the [[http://packages.debian.org/stable/|stable repository]]

 * in the [[http://packages.debian.org/lenny-backports/|lenny-backports repository]]

 * in the [[http://packages.debian.org/testing/|testing repository]]

 * in the [[http://packages.debian.org/sid/|sid repository]]
 
 * in the [[http://packages.debian.org/experimental/|experimental repository]]
== Package lists ==
To browse the list of Debian packages grouped by category, you can look at the
[[https://packages.debian.org/stable/|stable]],
[[https://packages.debian.org/testing/|testing]],
[[https://packages.debian.org/unstable/|unstable]]
and various other lists,
or search on the
[[https://packages.debian.org/|packages homepage]]
Line 38: Line 48:
Working with repositories may mean either of two different things:
 1. You can use a repository with the apt family of programs (apt, apt-get, apt-cache, aptitude) to browse or install packages
 2. You can set up a repository yourself and add, remove or replace packages in it.
Line 39: Line 52:
There you can find a list of [[DebianRepository/HowTo|how-tos]] and [[DebianRepository/Tools|tools]] === Using a repository ===
Using a repository is fairly simple: For the official Debian repository open {{{/etc/apt/sources.list}}}, insert the line {{{
deb http://ftp.debian.org/debian stable main contrib non-free
}}}
then run {{{
apt update
}}}
(As the root user or using sudo of course). You might also consider to use a URL like:

 * {{{http://ftp.<CC>.debian.org/debian}}} to use a location closer to you, network-wise.
 * {{{http://deb.debian.org/debian}}} to let a CDN choose the closest mirror to you (more [[http://deb.debian.org/|here]])

For the official Debian repositories this simple procedure is sufficient. The [SourcesList] article contains further information about sources.list entries. For other third party repositories, you might want to follow [[/UseThirdParty|this excellent guide]] to reduce the risk of hosing your system from a carelessly maintained repository.

=== Set up and maintain a repository ===
There are various reasons for building a repository yourself. You might just have a few packages with local modifications that you want to make available to apt, you may want to run a local mirror with those packages used by several machines to save bandwidth, or you build packages yourself and want to test them prior to publication.

 * A comprehensive list of [[/Setup|tools to set up a repository]]
 * [[/FeatureSupport|Feature Comparison]] of various repository handling software (incomplete)
 * Guide how to set up a repository with [[/SetupWithReprepro|reprepro]]
 * How to create a package and a repository with [[DebianRepository/SetupWithMinidinstall|mini-dinstall]]

Translation(s): English - Français - Italiano - Русский - Svenska


A Debian repository is a set of Debian binary or source packages organized in a special directory tree and with various infrastructure files - checksums, indices, signatures, descriptions translations, ... - added. Client computers can connect to the repository to download and install the packages using an Apt-based package management tool.

Anatomy of a repository

The following description is mostly for people who browse a repository using a standard web browser and wonder what is where and how everything fits together. A more precise and technical description is in Format.

A Debian repository contains several releases. Debian releases are named after characters from the "Toy Story" movies (wheezy, jessie, stretch, ...). The codenames have aliases, so called suites (stable, oldstable, testing, unstable). A release is divided in several components. In Debian these are named main, contrib, and non-free and indicate the licensing terms of the software they contain. A release also has packages for various architectures (amd64, i386, mips, powerpc, s390x, ...) as well as sources and architecture independent packages.

The root directory of a repository has a directory dists which in turn has a directory for each release and suite, the latter usually symlinks to the former, but the browser won't show you a difference. Each release subdirectory contains a cryptographically signed Release file and a directory for each component. Inside these are directories for the different architectures, named binary-<arch> and sources. And in these are files Packages that are text files containing the meta data of packages. Hmm, so where are the actual packages?

The packages themselves are below pool in the root directory of the repository. Below pool there are again directories for all the components, and in these are directories named 0, ..., 9, a, b, ... z, liba, ... , libz. And in these are directories named after the software package they contain, and these directories finally contain the actual packages, i.e the .deb files. The name is not necessarily the name of the package itself, the package bsdutils e.g resides in the pool/main/u/util-linux directory, it is the name of the source that the package is generated from. A single upstream source may generate several binary packages, and all of them will end up in the same subdirectory below pool. The additional single letter directories are just a trick to avoid having too many entries in a single directory which is what many systems traditionally have performance problems with.

In the leaf directories below pool there usually are several versions of a package, and the information on what releases each version belongs to solely resides in the indices. This way, the same version of a package can belong to several releases but use disk space only once, and that without resorting to hardlinks or symlinks, so mirroring is rather simple and even works with systems that don't have these concepts.

Mirrors

The official Debian package repository is mirrored all over the world.

Package lists

To browse the list of Debian packages grouped by category, you can look at the stable, testing, unstable and various other lists, or search on the packages homepage

Working with repositories

Working with repositories may mean either of two different things:

  1. You can use a repository with the apt family of programs (apt, apt-get, apt-cache, aptitude) to browse or install packages
  2. You can set up a repository yourself and add, remove or replace packages in it.

Using a repository

Using a repository is fairly simple: For the official Debian repository open /etc/apt/sources.list, insert the line

deb http://ftp.debian.org/debian stable main contrib non-free

then run

apt update

(As the root user or using sudo of course). You might also consider to use a URL like:

  • http://ftp.<CC>.debian.org/debian to use a location closer to you, network-wise.

  • http://deb.debian.org/debian to let a CDN choose the closest mirror to you (more here)

For the official Debian repositories this simple procedure is sufficient. The [SourcesList] article contains further information about sources.list entries. For other third party repositories, you might want to follow this excellent guide to reduce the risk of hosing your system from a carelessly maintained repository.

Set up and maintain a repository

There are various reasons for building a repository yourself. You might just have a few packages with local modifications that you want to make available to apt, you may want to run a local mirror with those packages used by several machines to save bandwidth, or you build packages yourself and want to test them prior to publication.