11

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?

1
  • BTW, as the Ubuntu development version auto-syncs its packages from Debian (before DebianImportFreeze, that is), I'll happily accept an answer telling me how to copy a package from Utopic. Jun 1, 2014 at 10:19

2 Answers 2

14

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
1
  • Awesome! The only thing that looks a bit like a bug to me is that the package ended up in my personal PPA (~ockham-razor/ppa) even though I passed ~gourmet/ppa as argument to the -u parameter. (But I was fortunately able to copy it from my PPA to the Gourmet team's via Launchpad.) Jun 1, 2014 at 16:10
2

There are a few ways to do this.

When I did this for Rhythmbox I followed the following receipe:

a. Take the source file and the debian files

enter image description here

b. Uncompress the source (.orig.tar.xz)

c. rename the source folder something like rhythmbox-3.0.3

c. uncompress the debian file (.debian.tar.xz)

d. move the debian folder under the source directory

e. dch -i to change the changelog file

f. change the "unstable" package name to the name of the ubuntu target - here I've used precise for 12.04. Change the version as appropriate for your app. Here rhythmbox was 3.0.3 - so I've just added -1~ppafossfreedom

rhythmbox (3.0.3-1~ppafossfreedom) precise; urgency=low

  * rebuild

 -- fossfreedom <[email protected]>  Thur, 07 Jun 2012 13:19:18 +0100

g. create a new source package: dh_build --createorig

h. Build just the source with your key: debuild -S -k0xABCDEFG where ABCDEFG is your key

i. upload your package for building:

cd ..
dput ppa:fossfreedom/rhythmbox rhythmbox_3.0.3-1_sources.changes    
5
  • Well, that's basically rebuilding the package. Oh well. I was hoping for some easier way, but I guess there isn't any. Jun 1, 2014 at 10:17
  • Take a look at the dget command from the devscripts package. It'll simplify this quite a bit. Jun 1, 2014 at 14:54
  • @andrewsomething - turn that into an answer with an example :) - I would be interested to see if that can simplify my packaging as well.
    – fossfreedom
    Jun 1, 2014 at 15:26
  • Well I have a whole different answer, but you should still learn about dget =) The dsc file contains all the information about the other parts of the source package. So dget will grab everything and extract it correctly if you give it a link to the dsc file. dget -ux http://http.debian.net/debian/pool/main/r/rhythmbox/rhythmbox_3.0.3-1.dsc Jun 1, 2014 at 15:38
  • neat answer - well done +1
    – fossfreedom
    Jun 1, 2014 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .