Monday, July 31, 2017

package management - How can I start my own Repository


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?



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.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...