Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 14 down vote accepted

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.

share|improve this answer
add comment

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!

share|improve this answer
add comment

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.

share|improve this answer
    
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? –  Marco Ceppi Aug 14 '10 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 '10 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 '10 at 19:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.