You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
Backport packages
![]() | You can find an updated guide under Debian Packaging |
![]() | You can follow this tutorial on a fresh labs instance that has the role::package::builder class applied. You will need appropriate sudo rights. |
All of the documentation for using it is kept up to date at:
https://phabricator.wikimedia.org/diffusion/OPUP/browse/production/modules/package_builder/
Consider the rest below this as slightly to hugely outdated
Outdated
You want to use the backportpackage command available in Ubuntu via. The one provided by Precise (0.141) does not let you create package without signing. You will want to manually install 0.142 or later.
Direct link: http://ubuntu.wikimedia.org/ubuntu//pool/universe/u/ubuntu-dev-tools/ubuntu-dev-tools_0.143_all.deb
0.142 adds a new --dont-sign option which disable signing entirely.
Read the manual documentation at http://manpages.ubuntu.com/manpages/precise/man1/backportpackage.1.html . You basically pass the source distribution with -s and the target destination with -d then the package as argument.
Example backporting python-git from Saucy to Precise:
export DEBEMAIL="hashar at free point fr" export DEBFULLNAME="Antoine Musso" export DEBBUILDOPTS="-sa -us -uc" # src pkg, disable signing export APTCONFDIR="/etc/apt" mkdir workdir && cd workdir backportpackage --dont-sign -s saucy -d precise -w . python-git
Make sure to pass the source package name (ex: python-d2to1 package is provided by source package d2to1. If you do not have a GPG key, you will want to disable signature (requires ubuntu-dev-tools >= 0.142 which Precise satisfy) using --dont-sign as above.
backportpackage --dont-sign -s saucy -d precise -w workdir python-git
Then create the .deb using Pbuilder or cowbuilder:
sudo BASEPATH=/var/cache/pbuilder/base-precise.cow cowbuilder --distribution=precise --build *.dsc
The resulting files are found under /var/cache/pbuilder/result
more details
When running backportpackage, it will automatically download the files using dpkg-source:
dpkg-source: info: unpacking python-git_0.3.2~RC1.orig.tar.gz dpkg-source: info: unpacking python-git_0.3.2~RC1.orig-doc.tar.gz dpkg-source: info: unpacking python-git_0.3.2~RC1-1.debian.tar.gz
Once the process has finished, you will end up with a bunch of files in the working directory:
ls -1 workdir/python-git_* workdir/python-git_0.3.2~RC1-1.debian.tar.gz workdir/python-git_0.3.2~RC1-1.dsc workdir/python-git_0.3.2~RC1-1~ubuntu10.04.1.debian.tar.gz workdir/python-git_0.3.2~RC1-1~ubuntu10.04.1.dsc workdir/python-git_0.3.2~RC1-1~ubuntu10.04.1_source.build workdir/python-git_0.3.2~RC1-1~ubuntu10.04.1_source.changes workdir/python-git_0.3.2~RC1-1~ubuntu12.04.1.debian.tar.gz workdir/python-git_0.3.2~RC1-1~ubuntu12.04.1.dsc workdir/python-git_0.3.2~RC1-1~ubuntu12.04.1_source.build workdir/python-git_0.3.2~RC1-1~ubuntu12.04.1_source.changes workdir/python-git_0.3.2~RC1.orig-doc.tar.gz workdir/python-git_0.3.2~RC1.orig.tar.gz $
You will want to manually review the *.changes files.
![]() | Make sure to also build the dependencies! |