Backport packages

From Wikitech
(Difference between revisions)
Jump to: navigation, search
m (revert)
 
(13 intermediate revisions by one user not shown)
Line 6: Line 6:
 
Example backporting python-git from Quantal to both Precise and Lucid:
 
Example backporting python-git from Quantal to both Precise and Lucid:
  
 +
export DEBEMAIL="hashar at free point fr"
 +
export DEBFULLNAME="Antoine Musso"
 +
export DEBBUILDOPTS="-sa"
 +
export APTCONFDIR="/etc/apt"
 
  mkdir workdir
 
  mkdir workdir
 
  backportpackage -s quantal -d precise -d lucid -w workdir python-git
 
  backportpackage -s quantal -d precise -d lucid -w workdir python-git
  
It will automatically download the dependencies using <tt>dpkg-source</tt>:
+
Then create the <tt>.deb</tt> using [[Pbuilder]].
 +
 
 +
 
 +
== 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.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.orig-doc.tar.gz
 
  dpkg-source: info: unpacking python-git_0.3.2~RC1-1.debian.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!'''
 +
 +
=== without signing ===
  
 
If you do not have a GPG key, you will want to disable signature. This require <tt>ubuntu-dev-tools</tt> >= 0.142 . You could install it from Quantal http://packages.ubuntu.com/quantal/all/ubuntu-dev-tools/download .
 
If you do not have a GPG key, you will want to disable signature. This require <tt>ubuntu-dev-tools</tt> >= 0.142 . You could install it from Quantal http://packages.ubuntu.com/quantal/all/ubuntu-dev-tools/download .
  
Direct link: <s>http://ubuntu.wikimedia.org/ubuntu//pool/universe/u/ubuntu-dev-tools/ubuntu-dev-tools_0.143_all.deb</s> (broken has of Sep 25th 2012).
+
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. So the first command becomes:
 +
 
 +
backportpackage  --dont-sign -s quantal -d precise -d lucid -w workdir python-git
 +
 
  
Alternate link: http://mirrors.us.kernel.org/ubuntu//pool/universe/u/ubuntu-dev-tools/ubuntu-dev-tools_0.143_all.deb
+
[[Category:Ubuntu]]
 +
[[Category:Package management]]

Latest revision as of 15:28, 11 February 2013

You want to use the backportpackage command available in Ubuntu via:

apt-get install ubuntu-dev-tools

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 Quantal to both Precise and Lucid:

export DEBEMAIL="hashar at free point fr"
export DEBFULLNAME="Antoine Musso"
export DEBBUILDOPTS="-sa"
export APTCONFDIR="/etc/apt"
mkdir workdir
backportpackage -s quantal -d precise -d lucid -w workdir python-git

Then create the .deb using Pbuilder.


[edit] 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.

Dialog-warning.svg Make sure to also build the dependencies!

[edit] without signing

If you do not have a GPG key, you will want to disable signature. This require ubuntu-dev-tools >= 0.142 . You could install it from Quantal http://packages.ubuntu.com/quantal/all/ubuntu-dev-tools/download .

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. So the first command becomes:

backportpackage  --dont-sign -s quantal -d precise -d lucid -w workdir python-git
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox