Differences between revisions 55 and 56
Revision 55 as of 2017-12-30 20:00:03
Size: 3313
Comment:
Revision 56 as of 2018-02-11 22:59:01
Size: 3318
Editor: Calinou
Comment: Typography fixes
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
Line 22: Line 21:
===== Find which version is available in the debian archive ===== ===== Find out which version is available in the Debian archive =====
Line 32: Line 31:
From your web browser at http://packages.debian.org/sid/mame, look at the dsc file and copy the link location From your Web browser at http://packages.debian.org/sid/mame, look at the .dsc file and copy the link location
Line 40: Line 39:
===== Find and Install missing build dependencies as  found in debian/control ===== ===== Find and install missing build dependencies as found in `debian/control` =====
Line 54: Line 53:
The tilde ~ makes the package inferior in version, which should allow a proper package upgrade when you upgrade to the next debian release (ie your package will be replaced with the official debian package) 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).
Line 56: Line 55:
===== Test if we can successfully build  the package ===== ===== Test if we can successfully build the package =====
Line 68: Line 67:
===== Install and enjoy ! ===== ===== Install and enjoy! =====

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.

Here we take the example of the package mame, from which we want to install a newer release availaible in sid/experimental. If the package you're looking for not available in Sid, 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 sid 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 mame --architecture amd64
 mame | 0.146-5 | wheezy/non-free       | amd64
 mame | 0.146-5 | jessie/non-free       | amd64
 mame | 0.146-5 | sid/non-free          | amd64
 mame | 0.148-1 | experimental/non-free | amd64

Download the .dsc file from the sid release

From your Web browser at http://packages.debian.org/sid/mame, look at the .dsc file and copy the link location

dget -x http://ftp.de.debian.org/debian/pool/non-free/m/mame/mame_0.148-1.dsc

Note: If the above command complains about your ~/.gnupg directory not being found, run gpg -k to initialize the GnuPG directory before retrying.

Find and install missing build dependencies as found in `debian/control`

cd mame-0.148
sudo mk-build-deps --install --remove

This will install a package named mame-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-get autoremove.

Indicate in the changelog a backport revision number

dch --local ~bpo9+ --distribution stretch-backports "Rebuild for stretch-backports."

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 dpkg -i ../mame_0.148-1~bpo9+1_amd64.deb

Go further

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