18

I'm an avid developer but I never actually gotten around to setting up my own PPA - how would someone go about this? Common issues encountered? How do I get my source code to be compiled into packages on the PPA?

3 Answers 3

15

Register on Launchpad like txwikinger said, then you need to generate a GPG key

gpg --gen-key

and upload it to Ubuntu's keyserver

gpg --keyserver keyserver.ubuntu.com --publish-keys $KEYID

Replacing $KEYID with the number after the slash on the "sec" line of:

gpg -K --fingerprint

Click the green + next to the GPG key part of your profile, and give it the key fingerprint from the earlier command. You'll receive an encrypted email. Decrypt it (setup your GPG key in your mail client to make this easier), then click the link inside to verify that you own the key.

Click on your launchpad.net page to create a new PPA

Follow the packaging guides Source Lab linked, but unlike what Txwikinger said, you will not upload a deb. That's because a deb is a binary package, and PPAs take source packages. After you've got the 4 necessary files (/debian/rules /debian/changelog /debian/control and /debian/copyright) in your source directory and an original tarball of the source outside it, run

debuild -S -sa

A source package will be generated consisting of a .debian.tar.gz (if using source format 3.0) or .diff.tar.gz along with a .dsc and a .changes file. The .dsc and .changes will need to be signed, so you will need to enter your GPG passphrase twice. The -sa is only needed the first time you upload that package to the PPA. Later revisions, you can live it off.

Then you will run:

dput ppa:youruser/ppa *.changes

Obviously filling in your own username, and if you chose a custom name for the PPA, put that after the slash. The PPA's page on Launchpad will tell you the exact ppa: syntax.

1
  • In 14.04 gpg --keyserver keyserver.ubuntu.com --publish-keys $KEYID will end up with an error: gpg: Invalid option "--publish-keys". One should use the --send-keys instead: gpg --keyserver keyserver.ubuntu.com --send-keys $KEYID, as per askubuntu.com/questions/220063/… .
    – landroni
    Apr 29, 2014 at 10:35
4

There are some tools to help you upload you source tarballs + debian control-files to your PPA on launchpad. And this will tell you how. But uploading the package is a very small part of it all...

Setting up a build environment and a debian package (.deb) infrastructure in not a simple thing! It requires a good understanding of the package structure and how different types of scripts work (in particular Make and Shell scripts).

I have found these two guides to be very usefull when i'we been packing .deb's
Ubuntu packaging guide
Debian new maintainers guide

Be careful to read all of the Ubuntu packaging guide thoroughly and you should be on your way to victory!

0

You register for an account in https://launchpad.net on your home page you can start your own ppa. The ppa is hosted on launchpad.

You compile your sources by creating a .deb package and upload it to your ppa with the dput command. The package will then automatically compiled by launchpad's compile farm and is available on a number of platforms.

More information about packaging can be found in the wiki about packaging.

4
  • I think this is more what I was interested. I know the ppa uses Bazaar for source control (I think) so do I just push my code to the PPA and BLAM! Packages, or am I simplifying this? Aug 14, 2010 at 11:57
  • 1
    Bazaar and ppa are somewhat two different things. You can use bazaar to revision control your complete package (including the .deb addons for package management), but bazaar would not need it per se, nor do the packaging for you. Bazzar is basically a central branch of your bzr revision control that has additional management of user rights through launchpad.
    – txwikinger
    Aug 14, 2010 at 14:20
  • bzr is like git but easier. It's not really related to packaging. There are recipes for daily builds from bzr available now to Lauchpad Beta Testers, but you still need to make a packaging branch.
    – maco
    Aug 14, 2010 at 19:28
  • Are you sure we can upload .deb file @txwikinger? I think dput accepts .changes file only? Apr 10, 2023 at 10:27

You must log in to answer this question.

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