How to Sync Packages from Debian to your PPA

If you’re a PPA maintainer, what do you do when you have the cool app (or a newer version of that cool app) you want to use has already been packaged in Debian but isn’t available in the Ubuntu repositories yet? I couldn’t find documentation on how to sync to a PPA so I thought I’d share what I figured out today.

  1. First, install ubuntu-dev-tools.
  2. Then run syncpackage --no-lp nameofpackage
  3. Then upload to your PPA: dput ppa:username/ppaname *source.changes

The --no-lp option is very important; if you don’t use that, syncpackage will attempt to upload to the main Ubuntu repositories.

If you’re running Ubuntu 11.10, step 2 will sync from Debian unstable for upload to Oneiric. If this isn’t what you need then use -d to specify the Debian download series and -r to specify the Ubuntu upload series.

Here’s a real-world example:
$ syncpackage --no-lp tracker -d experimental
syncpackage: Downloading tracker_0.12.4.orig.tar.bz2 from ftp.debian.org (7.640 MiB)
syncpackage: Downloading tracker_0.12.4-1.debian.tar.gz from ftp.debian.org (0.018 MiB)
dpkg-source: info: extracting tracker in tracker-0.12.4
dpkg-source: info: unpacking tracker_0.12.4.orig.tar.bz2
dpkg-source: info: unpacking tracker_0.12.4-1.debian.tar.gz
signfile tracker_0.12.4-1.dsc Jeremy Bicha <EMAIL>
signfile tracker_0.12.4-1_source.changes Jeremy Bicha <EMAIL>
Successfully signed dsc and changes files
$ dput ppa:gnome3-team/gnome3 tracker_0.12.4-1_source.changes
Checking signature on .changes
gpg: Signature made Sun 09 Oct 2011 11:28:07 AM EDT using RSA key ID EBFE6C7D
gpg: Good signature from "Jeremy Bicha <EMAIL>"
Good signature on /home/jeremy/devel/nemiver/temp4/tracker_0.12.4-1_source.changes.
Checking signature on .dsc
gpg: Signature made Sun 09 Oct 2011 11:28:06 AM EDT using RSA key ID EBFE6C7D
gpg: Good signature from "Jeremy Bicha <EMAIL>"
Good signature on /home/jeremy/devel/nemiver/temp4/tracker_0.12.4-1.dsc.
Uploading to ppa (via sftp to ppa.launchpad.net):
tracker_0.12.4-1.dsc: done.
tracker_0.12.4.orig.tar.bz2: done.
tracker_0.12.4-1.debian.tar.gz: done.
tracker_0.12.4-1_source.changes: done.
Successfully uploaded packages.

EDIT: micahg has suggested backportpackage which can do all this and more. One command can pull from any official Debian or Ubuntu repository, build locally, and upload to your PPA.

Posted in Ubuntu
3 comments on “How to Sync Packages from Debian to your PPA
  1. Adrian Popa says:

    Thank you for the script , it will help me to sync quickly the firebird and flamerobin packages into the stable firebird ppa http://jimicompot.blogspot.com/2011/10/how-to-sync-packages-from-debian-to-my.html

Comments are closed.

Jeremy Bicha

Follow via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.