Debian Backporting

From ConShell
Jump to navigation Jump to search

This page describes step-by-step how to make a backport package for Debian and Ubuntu.

(Ubuntu uses Debian's package format).

Please read Debian Packaging first!

This page explains how to build a "backport" on Ubuntu Hardy of the imaginary package called package-1.2.3.

  • Setup the build server requirements
sudo aptitude install build-essential automake gnupg lintian fakeroot \
pbuilder dput cdbs dh-make dpatch
sudo pbuilder create [--distribution distro]
  • Visit the Ubuntu packages page and search for package name
  • Find the package you want to backport (hint: use the search form)
  • Drill down and find the links on the right-hand side of the page for the file ending in .dsc
dget -x <url>

On newer versions i.e. Jaunty add -u

This will pull down the deps and extract it all for you. Next, modify the debian/changelog for your "new" version cd package-1.2.3/debian/ dch -i

add changelog entry, with appropriate changes...

(Note that -hardy1 was appended to version and release changed to hardy-backports)

cd ..
dpkg-buildpackage -S -us -uc -rfakeroot

now we have package-1.2.3-hardy1.dsc in directory below

Next ensure your .dsc will compile

cd ..
sudo pbuilder build package-1.2.3-hardy1.dsc

If all goes well, you'll have a .deb file (package) in the folder /var/cache/pbuilder/result/

This you can install here and elsewhere, drop into a repo, upload to PPA (Launchpad) etc. Of course, you need to build a signed-source package for PPA, so add -kXXXXXXXX to the dpkg-buildpackage command above for that.