Ubuntu – How to copy a package from Debian to the PPA

debianpackagingppa

I'd like to add the latest gourmet package from Debian sid to our team's PPA so Ubuntu users who would like to run an up-to-date version of Gourmet can add that PPA to their software sources. (Dependency-wise, that shouldn't be much of an issue as pretty much all our current dependencies are already available in all currently supported Ubuntu versions.)

I've downloaded the *.dsc file and debian and orig tarballs, and even figured out I could use this for the package's source.changes file. I also downloaded the Debian maintainer's public key so dput can validate the package. I then tried to upload the package to our PPA using dput ppa:~gourmet/ppa gourmet_0.17.3-1_source.changes (I also tried without the tilda.)
This seemed to succeed, but I didn't get a confirmation email, and no packages are now displayed at our PPA, which leads me to believe that the package was rejected because the Debian maintainer's key is obviously not among our team members' keys.

So what's the easiest way to "copy" a package from Debian (sid) to a Launchpad PPA? Do I really need to rebuild the entire package locally before I can upload it?

Best Answer

You do need to rebuild the source package locally before uploading in order to adjust the change log and regenerate the changes file. Though since backporting a package is a pretty common task, this has been scripted. Check out the backportpackage Manpage icon command ubuntu-dev-tools Install ubuntu-dev-tools package.

To backport a package from Debian, simply provide the target distro series, PPA, and the dsc file for the package:

backportpackage -d trusty -u ppa:gourmet/ppa http://ftp.de.debian.org/debian/pool/main/g/gourmet/gourmet_0.17.3-1.dsc

It's even simpler to backport a package from one Ubuntu release to another since you don't need to find the dsc file. Let's say we want to backport from utopic to trusty:

backportpackage -s utopic -d trusty -u ppa:gourmet/ppa gourmet
Related Question