1001
Comment:
|
3060
added link to apt-file
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Simple Backport Creation = | #language en ## ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/SimpleBackportCreation|Français]] - [[it/SimpleBackportCreation|Italiano]] - [[ru/SimpleBackportCreation|Русский]] -~ ---- |
Line 3: | Line 6: |
Here we takes the example of the package libmpfr1ldbl, whihc exists in Debian Sid, but not in the stable release. | |
Line 5: | Line 7: |
We don't need to be root ! | 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]]. |
Line 7: | Line 9: |
1. Download the .dsc file from the sid release | 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 [[DebianUnstable#backport|section]] of the Debian Unstable page in the Wiki. <<TableOfContents()>> ===== Install Debian packaging tools ===== |
Line 9: | Line 18: |
dget http://ftp.de.debian.org/debian/pool/main/m/mpfr/mpfr_2.4.2-3.dsc | sudo apt-get install packaging-dev debian-keyring devscripts equivs |
Line 11: | Line 20: |
1. Install dependencies as found in debian/control | ===== Find which version is available in the debian archive ===== |
Line 13: | Line 23: |
cd mpfr-2.4.2 grep Build-Depend debian/control Build-Depends: debhelper (>= 7), libgmp3-dev (>= 4.2.dfsg) Build-Depends-Indep: texinfo, texlive-latex-base sudo apt-get install debhelper libgmp3-dev texinfo texlive-latex-base |
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 |
Line 19: | Line 29: |
# Test if we can build successfully the package | ===== 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 ~bpo80+ --distribution jessie-backports "Rebuild for jessie-backports." }}} This will add something like '''''~bpo80+''''' 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 (ie your package will be replaced with the official debian package) ===== Test if we can successfully build the package ===== |
Line 22: | Line 58: |
.... .... loads of output .... .... |
|
Line 29: | Line 60: |
# Build a pacakge properly , without GPG signing the resulting binary and the resulting .changes file | 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 ===== |
Line 32: | Line 65: |
.... .... loads of output .... .... |
|
Line 39: | Line 67: |
# Install and enjoy ! | ===== Install and enjoy ! ===== |
Line 41: | Line 69: |
sudo dpkg -i ../libmpfr1ldbl_2.4.2-3_amd64.deb | sudo dpkg -i ../mame_0.148-1_amd64.deb |
Line 43: | Line 71: |
===== Go further ===== You could have a look [[BuildingFormalBackports]] and contribute your backport to Debian as explained here: http://backports.debian.org/Contribute/ |
Translation(s): English - Français - Italiano - Русский
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.
Contents
- Install Debian packaging tools
- Find which version is available in the debian archive
- Download the .dsc file from the sid release
- Find and Install missing build dependencies as found in debian/control
- Indicate in the changelog a backport revision number
- Test if we can successfully build the package
- Build a package properly , without GPG signing the package
- Install and enjoy !
- Go further
Install Debian packaging tools
sudo apt-get install packaging-dev debian-keyring devscripts equivs
Find 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 ~bpo80+ --distribution jessie-backports "Rebuild for jessie-backports."
This will add something like ~bpo80+ 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 (ie 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_amd64.deb
Go further
You could have a look BuildingFormalBackports and contribute your backport to Debian as explained here: http://backports.debian.org/Contribute/