Differences between revisions 72 and 73
Revision 72 as of 2020-06-05 11:32:19
Size: 3292
Comment: Revert Backporting example to backporting from testing: Backports are packages taken from the next Debian release (called "testing") according to https://backports.debian.org/
Revision 73 as of 2020-06-05 11:38:34
Size: 3469
Comment: show how to install deb-src entries for testing with sudo and tee, as this is meant to be *simple*BackportCreation
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
Add a testing '''deb''' ''and'' '''deb-src''' entries to your [[SourcesList|apt sources]], run {{{apt update}}}, download the source using the command below: Add a testing '''deb-src''' entries to your [[SourcesList|apt sources]]

{{{
echo "deb-src http://deb.debian.org/debian/ unstable main contrib non-free" | sudo tee /etc/apt/sources.list.d/testing.list
}}}

R
un {{{apt update}}}, download the source using the command below:
Line 39: Line 45:
Once you have downloaded the source, remove the testing entries from your apt sources and run {{{apt update}}} again. Once you have downloaded the source, remove the testing entries from your apt sources

{{{
rm
/etc/apt/sources.list.d/testing.list
}}}

and run {{{apt update}}} again.

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


Please keep in mind that this is meant as a quick howto for how to build private backports and is not the way we expect from official backports for backports.debian.org. For official backports, see this wiki page.

Here we take the example of the package coreutils, from which we want to install a newer release availaible in testing. If the package you're looking for not available in Testing, but in a Ubuntu PPA, you can have a look at CreatePackageFromPPA.

We don't need to be root here except the first and last steps.

Another method for backporting a testing package to testing or stable is described in this section of the Debian Unstable page in the Wiki.

Install Debian packaging tools

sudo apt-get install packaging-dev debian-keyring devscripts equivs

Find out which version is available in the Debian archive

$ rmadison coreutils --architecture amd64
coreutils  | 8.23-4        | oldstable  | amd64
coreutils  | 8.26-3        | stable     | amd64
coreutils  | 8.30-3        | testing    | amd64
coreutils  | 8.30-3        | unstable   | amd64

Add source package entries for the testing distribution

Add a testing deb-src entries to your apt sources

echo "deb-src http://deb.debian.org/debian/ unstable main contrib non-free" | sudo tee /etc/apt/sources.list.d/testing.list

Run apt update, download the source using the command below:

apt source -t testing coreutils

Once you have downloaded the source, remove the testing entries from your apt sources

rm /etc/apt/sources.list.d/testing.list

and run apt update again.

Install build dependencies

cd coreutils-*/
sudo mk-build-deps --install --remove

This will install a package named coreutils-build-deps depending on the listed build dependencies. If you remove this package later, the actual build dependencies will be marked as "automatically installed and no longer needed" and can be cleared with apt autoremove.

Indicate in the changelog a backport revision number

dch --bpo

This will add something like ~bpo9+ to the package version number. The tilde ~ makes the package inferior in version, which should allow a proper package upgrade when you upgrade to the next Debian release (i.e. your package will be replaced with the official Debian package).

Test if we can successfully build the package

fakeroot debian/rules binary

If this should fail with a missing file, apt-file may be useful in locating the dependency you require.

Build a package properly , without GPG signing the package

dpkg-buildpackage -us -uc

Install and enjoy!

sudo apt install ../coreutils_*_*.deb

Go further

You could have a look BuildingFormalBackports and contribute your backport to Debian as explained here: http://backports.debian.org/Contribute/


CategoryPackaging