Ubuntu – Manually Created .deb, how to upload to a PPA


I have a manually created .deb, and I'd like to upload it to a PPA.

My question is as follows:

  • Is that possible?

and If so,

  • how do I do that?

Best Answer

No, you cannot do that. Launchpad does not allow uploading of binary packages directly. It needs you to upload the dsc file along changes and original tarball. Then the build system builds it in a clean chrooted environment

How did you build this tarball? You had the packaging directory which was debian/ directory? Right?

This is how I do:

  1. Unzip/untar an upstream tarball. Say foo-x.y.tar.gz

  2. Then put the debian/ directory inside that extracted directory

  3. Put an entry in the debian/changelog file(either manually or using dch -i. If the version number reads say x.y

  4. Rename that foo-x.y.tar.gz to foo_x.y.orig.tar.gz. Please see how the orig tarball should be named - sourcepackagename_x.y.orig.tar.gz

  5. Now change to the directory where you have debian/ directory

  6. Run debuild -S -k9E6622AB where 9E6622AB is my GPG key. You need to sign your packages.

If everything was fine, then three files are created - that .orig.tar.gz file, a .dsc file and a third is .changes file

I hope you would be using pbuilder/cowbuilder or any such builder of your choice to create the deb file.

Rest you have to do is

dput ppa:yourusername/ppaname foo.changes

Ofcourse you need to create a PPA of that name

In case your dependencies are ruby gems which use incompatible packaging system, then you can use postinst, preinst, postrm, and prerm files for better control over the packaging process