You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Backport packages: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Effie Mouzeli
mNo edit summary
imported>Majavah
(per talk page)
 
Line 1: Line 1:
{{note|You can find an updated guide under [[Debian Packaging]]}}
#REDIRECT [[Debian Packaging]]
 
{{note|You can follow this tutorial on a fresh labs instance that has the <code>role::package::builder</code> 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 <tt>backportpackage</tt> 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 <tt>--dont-sign</tt> 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 <tt>-s</tt> and the target destination with <tt>-d</tt> 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: <tt>python-d2to1</tt> package is provided by source package <tt>d2to1</tt>.
If you do not have a GPG key, you will want to disable signature (requires <tt>ubuntu-dev-tools</tt> >= 0.142 which Precise satisfy) using <tt>--dont-sign</tt> as above.
 
backportpackage  --dont-sign -s saucy -d precise -w workdir python-git
 
Then create the <tt>.deb</tt> using [[Pbuilder]] or [[cowbuilder]]:
 
sudo BASEPATH=/var/cache/pbuilder/base-precise.cow cowbuilder --distribution=precise --build *.dsc
 
The resulting files are found under <tt>/var/cache/pbuilder/result</tt>
 
== more details ==
 
When running backportpackage, it will automatically download the files using <tt>dpkg-source</tt>:
 
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 <tt>*.changes</tt> files.
 
{{warning|Make sure to also build the dependencies!}}
 
[[Category:Ubuntu]]
[[Category:Package management]]

Latest revision as of 07:13, 4 October 2022

Redirect to: