Debian backports

From campisano.org
Jump to navigation Jump to search

Debian backports

Bullseye

Configuration

  • /etc/apt/sources.list (remember to setup permissions 644)
# Note: HTTP protocol has less overhead then FTP
# http://unix.stackexchange.com/a/30211

# stable
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free

# security
deb http://security.debian.org/debian-security bullseye-security main contrib non-free

# backport
deb http://deb.debian.org/debian bullseye-backports main contrib non-free

# unstable
#deb http://deb.debian.org/debian/ unstable main contrib non-free
  • /etc/apt/preferences (remember to setup permissions 644)
Package: *
Pin: release o=Debian, a=bullseye
Pin-Priority: 900

Package: *
Pin: release o=Debian Backports
Pin-Priority: 200

#Package: *
#Pin: release o=Debian a=unstable
#Pin-Priority: 100
  • /etc/apt/apt.conf (remember to setup permissions 644)
APT::Default-Release "bullseye";
APT::Cache-Limit 1310851072;

Install a backport package

  • as a preference
apt-get -t bullseye-backports install <PACKAGE>
  • or as a requirement
apt-get install <PACKAGE>/bullseye-backports

Stretch

Configuration

  • /etc/apt/sources.list (remember to setup permissions 644)
# Note: HTTP protocol has less overhead then FTP
# http://unix.stackexchange.com/a/30211

# stable
deb http://ftp.debian.org/debian/ stretch main contrib non-free
deb http://ftp.debian.org/debian/ stretch-updates main contrib non-free
#deb-src http://ftp.debian.org/debian/ stretch main contrib non-free

# security
deb http://security.debian.org/ stretch/updates main contrib non-free
#deb-src http://security.debian.org/ stretch/updates main contrib non-free

# backport
deb http://ftp.debian.org/debian/ stretch-backports main contrib non-free

# unstable
#deb http://ftp.debian.org/debian/ unstable main contrib non-free
  • /etc/apt/preferences (remember to setup permissions 644)
Package: *
Pin: release o=Debian, a=stretch
Pin-Priority: 900

Package: *
Pin: release o=Debian Backports
Pin-Priority: 200

#Package: *
#Pin: release o=Debian a=unstable
#Pin-Priority: 100

  • /etc/apt/apt.conf (remember to setup permissions 644)
APT::Default-Release "stretch";
APT::Cache-Limit 1310851072;

Install a backport package

  • as a preference
apt-get -t stretch-backports install <PACKAGE>
  • or as a requirement
apt-get install <PACKAGE>/stretch-backports

Jessie

Configuration

  • /etc/apt/sources.list
# Note: HTTP protocol has less overhead then FTP
# http://unix.stackexchange.com/a/30211

# stable
deb http://ftp.debian.org/debian/ jessie main contrib non-free
deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
#deb-src http://ftp.debian.org/debian/ jessie main contrib non-free

# security
deb http://security.debian.org/ jessie/updates main contrib non-free
#deb-src http://security.debian.org/ jessie/updates main contrib non-free

# backport
deb http://ftp.debian.org/debian/ jessie-backports main contrib non-free

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


  • /etc/apt/preferences
Package: *
Pin: release o=Debian, a=jessie
Pin-Priority: 900

Package: *
Pin: release o=Debian Backports
Pin-Priority: 200

#Package: *
#Pin: release o=Debian a=unstable
#Pin-Priority: 100


  • /etc/apt/apt.conf
APT::Default-Release "jessie";
APT::Cache-Limit 1310851072;

Install a backport package

apt-get -t jessie-backports install <PACKAGE>

or

apt-get install <PACKAGE>/jessie-backports

Wheezy

Configuration

  • /etc/apt/sources.list
# stable
deb http://http.debian.net/debian/ wheezy main contrib non-free
deb http://http.debian.net/debian/ wheezy-updates main contrib non-free
#deb-src http://http.debian.net/debian/ wheezy main contrib non-free

# security
deb http://security.debian.org/ wheezy/updates main contrib non-free
#deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# backport
deb http://http.debian.net/debian/ wheezy-backports main contrib non-free

# unstable
#deb http://http.debian.net/debian/ unstable main contrib non-free


  • /etc/apt/preferences
Package: *
Pin: release o=Debian, a=wheezy
Pin-Priority: 900

Package: *
Pin: release o=Debian Backports
Pin-Priority: 200

#Package: *
#Pin: release o=Debian a=unstable
#Pin-Priority: 100


  • /etc/apt/apt.conf
APT::Default-Release "wheezy";
APT::Cache-Limit 67108864;

Install a backport package

apt-get -t wheezy-backports install <PACKAGE>

or

apt-get install <PACKAGE>/wheezy-backports

Find packages other than stable

apt-show-versions | grep -v /stable

Make your backports of a package

You can follow the instructions on SimpleBackportCreation to make a backport of a package. To do that without change your local system, you can use chroot, docker or other container tools to install deps and prepare the package.

For instance, we can do a backport of Inter fonts from testing to stable following the instructions from the link above:

[host]$ mkdir -p .volumes/mnt/shared
[host]$ docker run -it --rm --volume=$(pwd)/.volumes/mnt/shared:/mnt/shared debian:bullseye-slim /bin/bash
[docker]$ apt-get update
[docker]$ apt-get install packaging-dev debian-keyring devscripts equivs
[docker]$ rmadison fonts-inter
[docker]$ echo deb-src http://deb.debian.org/debian/ testing main >> /etc/apt/sources.list
[docker]$ apt-get update
[docker]$ apt-get source fonts-inter/testing
[docker]$ cd fonts-inter-3.19+ds/
[docker]$ mk-build-deps --install --remove
[docker]$ dch --bpo
[docker]$ fakeroot debian/rules binary
[docker]$ dpkg-buildpackage -b -us -uc
[docker]$ cd ..
[docker]$ mv *.deb mnt/shared/
[docker]$ exit
[host]$ cd mnt/shared/
[host]$ dpkg -i /mnt/shared/fonts-inter_3.19+ds-2_all.deb
[host]$ dpkg -L fonts-inter

References