Differences between revisions 62 and 108 (spanning 46 versions)
Revision 62 as of 2010-09-06 04:33:44
Size: 6444
Editor: FranklinPiat
Comment: Backports service becoming official
Revision 108 as of 2020-10-04 03:16:26
Size: 6468
Comment: Simplify instructions after a new user on /r/debian expressed confusion at the steps: Replace aptitude with apt, move sloppy instructions, use "apt edit-sources", remove Iceweasel, expand section.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
##
##
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Backports|Français]] - [[it/Backports|Italiano]] - [[de/Backports|Deutsch]]-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]||
----
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[de/Backports|Deutsch]] - [[es/Backports|Español]] - [[fr/Backports|Français]] - [[it/Backports|Italiano]] - [[ru/Backports|Русский]] - [[zh_CN/Backports|简体中文]]-~

Line 16: Line 15:
For official instructions on how to use Debian Backports, visit [[http://backports.debian.org/Instructions/]]. For official instructions on how to use Debian Backports, visit [[https://backports.debian.org/Instructions/]].
Line 18: Line 17:
{{{{#!wiki note
On Sept. 5th, 2010, Backports became an official service (see [[http://www.debian.org/News/2010/20100905|announcement]]).
If you want to create a non-official backport of a package you need, have a look at SimpleBackportCreation.
Line 21: Line 19:
If your system is already configured to use backports.org, you may want to [[#migrate-to-bdo|Migrate from backports.org to backports.debian.org]].
}}}}
If you want to build a backport with the intent of sharing it with others within Debian, see the BuildingFormalBackports page.
Line 25: Line 23:
 <<TableOfContents(3)>> <<TableOfContents(3)>>
Line 28: Line 26:
== Verifying backports ==
In order to verify the integrity of downloaded backports before installing them, APT needs the Backports archive key.
The package DebPkg:debian-backports-keyring contains this key. So you should install it first.
In the following example, we will use <<DebianCodename(stable)>> as the current codename for Debian Stable.
Please adjust the codename accordingly if you are using a different version of Debian.
Line 32: Line 29:
'''Note:''' The Backports repository has to be added first. If you're setting up backports for a system that isn't running the latest version of Debian
(e.g. a <<DebianCodename(oldstable)>> system while the latest is <<DebianCodename(stable)>>)
then you will also want to add a line for the "sloppy" backports section.
Currently that is <<DebianCodename(oldstable)>>-backports-sloppy,
but after the release of <<DebianCodename(testing)>>,
you'll want to add a line for <<DebianCodename(stable)>>-backports-sloppy.
Line 37: Line 40:
 * Go to:
{{{
   Configuration > Repository}}}
 * Add this repository:
 * Go to "''Settings -> Repositories''":
Line 42: Line 42:
 {{attachment:Screenshot-Repositories.png}} || {{attachment:backports_synaptic_1.png}} ||

 * In the following dialog box, select the tab "''Third-Party Software''" and click on the "''Add...''" button in the lower left corner:

|| {{attachment:backports_synaptic_2.png}} ||

 * Copy the repository below, then hit the "''Add Source''" button:

{{{deb http://deb.debian.org/debian buster-backports main contrib non-free}}}

|| {{attachment:backports_synaptic_3.png}} ||

 * Finally, hit the "''Reload''" button in Synaptic's main panel to update the repository information on your system.
Line 45: Line 58:
Become root and open the file {{{/etc/apt/sources.list}}} in your favorite editor:
{{{
human@debian:~$ su
Password:
debian:/home/human# nano /etc/apt/sources.list}}}
Add the following lines:
As root, or using sudo, open your sources.list file (Nano is the recommended editor for new users):
Line 52: Line 60:
# Backports.org repository
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free}}}
# apt edit-sources
}}}
A
ppend the following line to the bottom of the file:
{{{

deb http://deb.debian.org/debian buster-backports main contrib non-free
}}}
Line 55: Line 67:
(See [[http://www.debian.org/doc/manuals/debian-reference/ch-system.de.html#s-stable|Debian sections]] for details.) (See [[https://www.debian.org/doc/manuals/debian-reference/ch02.html|Debian package management]] for details.)
Line 59: Line 71:
debian:/home/human# aptitude update}}} # apt update
}}}
Line 66: Line 79:
There are a several different ways to find out if a backport of a certain Debian package exists. A pretty convenient one is using Debian's web-based package search ([[http://packages.debian.org|packages.debian.org]]).
If you are running Iceweasel, simply use the built-in search plugin (Deb Search).
There are a several different ways to find out if a backport of a certain Debian package exists. A pretty convenient one is using Debian's web-based package search ([[https://packages.debian.org|packages.debian.org]]).

Backported versions of packages will also appear when searching their names with the {{{apt search}}} command, or one can view all available versions of a package b
y running:
{{{
apt show package-name -a
}}}
Replacing {{{package-name}}} with the name of the package yo
u wish to view.
Line 75: Line 93:
debian:/home/human# aptitude -t lenny-backports install iceweasel}}}
The {{{-t}}} option here specifies {{{lenny-backports}}} as the target release. This would install Iceweasel 3.5 from Backports instead of version 3.0 from the Debian stable release.

== Automatic upgrades ==

Because the Backports repository is deactivated by default, your installed backports will not recieve upgrades automatically. However, you can use ''pinning'' to cause APT to perform automatic upgrades.
''Pinning'' basically means controlling which version of which package is to be selected for installation. (See the [[http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-pin|APT HOWTO]] and {{{man apt_preferences}}} for in-depth explanation.)

In order to make APT perfom automatic upgrades of installed backports, follow these steps:

 1. Open the file {{{/etc/apt/preferences}}} in an editor of your choice. (as root)
 1. Insert the text below.
 1. Save and exit.
{{{
# APT PINNING PREFERENCES
Package: *
Pin: release a=lenny-backports
Pin-Priority: 200
}}}
After changing APT's behavior in that file, it will act like this:

If a package was installed from Backports.org and there is a
newer version there, it will be upgraded from there.
Other packages that are also available from Backports will not be upgraded to the Backports version unless explicitly
stated with {{{-t lenny-backports}}}.
# apt -t buster-backports install cockpit}}}
The {{{-t}}} option here specifies {{{buster-backports}}} as the target release. This would install a newer version of Cockpit and all its reverse dependencies from buster-backports instead of the older one from Debian stable release.
Line 105: Line 100:
[[http://lists.debian.org/debian-backports/|debian-backports]] list. [[https://lists.debian.org/debian-backports/|debian-backports]] list.
Line 109: Line 104:
On Sept. 5th, 2010, Backports became an official service (see [[http://www.debian.org/News/2010/20100905|announcement]]). On Sept. 5th, 2010, Backports became an official service (see [[https://www.debian.org/News/2010/20100905|announcement]]).
Line 111: Line 106:
Systems configured to use backports.org should reconfigured to use the new
repository/URL (in {{{/etc/apt/source.list*}}}), since backports.org
service will be stopped at some point.
Systems configured to use backports.org should be reconfigured to use the new
repository/URL (in {{{/etc/apt/sources.list*}}}), since backports.org
service is already stopped.
Line 115: Line 110:
 1. replace {{{backports.org}}} with {{{backports.debian.org}}} in {{{/etc/apt/source.list*}}}.
 2. run {{{aptitude update}}}
 1. replace {{{backports.org}}} with {{{http://deb.debian.org/debian}}} in {{{/etc/apt/sources.list*}}}.
 2. run {{{apt update}}}
Line 118: Line 113:
  * {{{apt-get purge debian-backports-keyring}}}<<BR>>''or''   * {{{apt purge debian-backports-keyring}}}<<BR>>''or''
Line 121: Line 116:
== List installed backports ==
Out of all installed packages, which ones are backports? One way to tell is by version: all backports are tagged with ''~bpo'', for example, `24.5+1-6~bpo8+1`, so at the command line you might say:{{{
    dpkg-query -W | grep '~bpo'
}}}
Line 122: Line 122:
 * [[http://backports.debian.org/|backports.debian.org]] for more information  * [[https://backports.debian.org/|backports.debian.org]] for more information
Line 124: Line 124:
 * [[http://backports.deb.at/lenny-backports|Diffs between lenny-backports and squeeze]]: A useful comparison of package versions in {{{lenny-backports}}} and {{{squeeze}}}.
----
 CategoryDistributionRelease
 * [[https://backports.debian.org/buster-backports/overview/|Diffs between buster-backports and bullseye]]: A useful comparison of package versions in {{{buster-backports}}} and {{{bullseye}}}.
Line 128: Line 126:
ToDo : update the screenshot !
----------------------

CategoryPackageManagement CategoryRelease

Translation(s): English - Deutsch - Español - Français - Italiano - Русский - 简体中文

You are running Debian stable because you prefer the stable Debian tree. It runs great, there is just one problem: The software is a little bit outdated compared to other distributions. That is where backports come in.

Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates), so they will run without new libraries (wherever it is possible) on a stable Debian distribution. It is recommended to pick out single backports which fit your needs, and not to use all backports available.

This article illustrates how to:

  • configure your stable system to use the Backports repository
  • find a specific backport
  • install packages from the repository
  • have your backports upgraded automatically

For official instructions on how to use Debian Backports, visit https://backports.debian.org/Instructions/.

If you want to create a non-official backport of a package you need, have a look at SimpleBackportCreation.

If you want to build a backport with the intent of sharing it with others within Debian, see the BuildingFormalBackports page.


Configuring your stable system

In the following example, we will use bullseye as the current codename for Debian Stable. Please adjust the codename accordingly if you are using a different version of Debian.

If you're setting up backports for a system that isn't running the latest version of Debian (e.g. a buster system while the latest is bullseye) then you will also want to add a line for the "sloppy" backports section. Currently that is buster-backports-sloppy, but after the release of bookworm, you'll want to add a line for bullseye-backports-sloppy.

Adding the repository

Using Synaptic

  • Open Synaptic
  • Go to "Settings -> Repositories":

backports_synaptic_1.png

  • In the following dialog box, select the tab "Third-Party Software" and click on the "Add..." button in the lower left corner:

backports_synaptic_2.png

  • Copy the repository below, then hit the "Add Source" button:

deb http://deb.debian.org/debian buster-backports main contrib non-free

backports_synaptic_3.png

  • Finally, hit the "Reload" button in Synaptic's main panel to update the repository information on your system.

Using the command line

As root, or using sudo, open your sources.list file (Nano is the recommended editor for new users):

# apt edit-sources

Append the following line to the bottom of the file:

deb http://deb.debian.org/debian buster-backports main contrib non-free

If you are a free software enthusiast, you might want to remove the contrib and non-free sections. (See Debian package management for details.)

Now that you have added the repository, update APT's cache to include the backports in the list of available packages:

# apt update

Done.

Using backports

Finding backports

There are a several different ways to find out if a backport of a certain Debian package exists. A pretty convenient one is using Debian's web-based package search (packages.debian.org).

Backported versions of packages will also appear when searching their names with the apt search command, or one can view all available versions of a package by running:

apt show package-name -a

Replacing package-name with the name of the package you wish to view.

Installing backports on the command line

The backports repository is deactivated by default. So, if you want to install a backported package, you will have to state that explicitly.

For example:

# apt -t buster-backports install cockpit

The -t option here specifies buster-backports as the target release. This would install a newer version of Cockpit and all its reverse dependencies from buster-backports instead of the older one from Debian stable release.

FAQ

Reporting bugs

Because of limitations in the Debian Bug Tracking System, any bugs relevant to backported packages still have to be reported to the debian-backports list.

Migrate from backports.org to backports.debian.org

On Sept. 5th, 2010, Backports became an official service (see announcement).

Systems configured to use backports.org should be reconfigured to use the new repository/URL (in /etc/apt/sources.list*), since backports.org service is already stopped.

  1. replace backports.org with http://deb.debian.org/debian in /etc/apt/sources.list*.

  2. run apt update

  3. remove the backports.org key from your keyring. Depending how you installed it...
    • apt purge debian-backports-keyring
      or

    • apt-key del 16BA136C

List installed backports

Out of all installed packages, which ones are backports? One way to tell is by version: all backports are tagged with ~bpo, for example, 24.5+1-6~bpo8+1, so at the command line you might say:

    dpkg-query -W | grep '~bpo'

External links


CategoryPackageManagement CategoryRelease