Showing posts with label launchpad. Show all posts
Showing posts with label launchpad. Show all posts

Sunday, July 19, 2009

Angry Drunken Programmers


One aspect of my talk at OSCON next week is showing how to distribute a custom version of an application via Launchpad PPAs. For my demonstration I chose the game "Angry, Drunken Dwarves" and re-skinned it to be "Angry, Drunken Programmers". You can play the following characters:


  • Alan Kay - Description: Alan has been torn to shreds by Lions that were soaked in psychedelic drugs and gasoline. He still stabs them in the head with authority. He is a computer scientist, known for his mustache, his early pioneering work on object-oriented programming and windowing graphical user interface design.
  • Linus Torvalds - Description: Linus is best known for having initiated the development of the Linux kernel. He has done other stuff, but what else do you need to know other than his his wife is a six-time Finnish national karate champion and she will snap your neck like a pencil.
  • Other characters include: Larry Wall, Richard Stallman, Donald Knuth, Martin Fowler.
While I hope this adds a bit of silliness to my talk, I do think it demonstrates a legitimate use for PPAs. Most of the time if you are making improvements to an open source project it is best to push those improvements back to the community, but there are scenarios when your changes are not generally desirable. The debian build system is very robust and supports being able to make changes to upstream projects without affecting the upstream codebase. Ubuntu makes very heavy use of this and so can you. Come hear my talk and let Angry Drunken Programmers teach us about this!

In the meantime if you run Ubuntu and want to play Angry, Drunken Programmers you can install it via my PPA, here (see the instructions link on the page). Or you can get the source here.

Go Native with Launchpad


Next week I am giving a talk on Launchpad's Personal Package Archives (PPA) feature at OSCON. PPAs allow you to upload Ubuntu source packages to be built and published as an apt repository by Launchpad. Publishing your software as a PPA means that your software will be a "native" installation for the millions of Ubuntu users out there. Aside from attracting that large community there are many other reasons why having a simple and reliable install/uninstall/upgrade path for software is important:
  • less support effort.
  • doesn't scare people away.
  • gives confidence in your software.
The challenge with PPAs is creating the initial Ubuntu source package. I will show some of the basics of this in my talk as well as how you can create and distribute custom versions of software with your PPA.

Monday, April 20, 2009

OSCON 2009, Angry Drunken Dwarves, and Crazy Diagrams.


I'm pretty excited to be presenting at OSCON again this year. In keeping with my tradition of bringing the most slipshod weird diagrams to the open source community, I promise to have crazy diagrams in this talk, even if it is absolutely unwarranted. Oh, and speaking of my talk. it is on using Launchpad's PPA system for distributing open source projects. Sound boring? Don't be too sure. I plan to show you how it is directly applicable to your life and the lives of many an angry drunken dwarf. An abstract of my talk is here.

By the way, if you are interested in attending OSCON you can use this code to get a 15% discount on the registration fee: OS09PGM.

Thursday, January 1, 2009

Creating a Launchpad PPA For a Simple Python Project


For some background information on Launchpad and PPA's see my previous post. For more information about information given here check out the list of links at the bottom of this post. Now on to the bullet points:

Getting Launchpad Ready
  1. Create a new Launchpad project.
  2. Have imported your PGP key to your Launchpad account (apt uses these to verify the authenticity and integrity of packages it installs).
  3. become an Ubuntero (i.e. you must sign the Ubuntu Community Code of Conduct)
  4. activate your PPA on your profile page or your team's overview page.
  5. Build a source package for your project.
Building A Source Package For Your Python Project
  1. I followed these instructions but since we are trying to build a source package, not a binary package I made the following changes.
  2. Added a buildsrc target to the Makefile. See my makefile for specifics.
  3. Changed rules file to have a full path to the destination directory. See my rules file. I did this because Launchpad's process will be calling the rules file directly (probably via debuild) as opposed to using ghantoos's makefile which sets up the DESTDIR environment variable.
Upload Your Source Package
  1. install dput - sudo apt-get install dput
  2. edit ~/.dput.cf so it looks like
    [my-ppa]
    fqdn = ppa.launchpad.net
    method = ftp
    incoming = ~your-launchpad-id/ubuntu/
    login = anonymous
    allow_unsigned_uploads = 0
  3. Run dput my-ppa P_V_source.changes Replace P with the package name and V with the version number.
  4. Now you have to wait 5 or 10 minutes. Launchpad is spinning up a whole virtual server that will grab all the dependencies you listed using pbuilder or some such and will do a clean build of your package. An email will get sent out when your build kicks off.
  5. If you go look at your PPA your build will have a little spinny icon next to it. Here is my PPA site for example.
  6. If something goes wrong you will want to read the build logs to diagnose the problem. Click on one of the various binary builds to get to the link. Here are some sample ones from my build.
That is pretty much it. It is alot of stuff, but I hope my code serves as an example for you to get your own PPA setup. Questions are probably best answered on IRC. #launchpad on irc.freenode.net is loaded with knowledgeable types. Or you can drop your questions in the comments of this post if you have em. I'm no expert, but I might be able to help.

Those links I promised:
  • https://wiki.ubuntu.com/PackagingGuide/Complete
  • http://ghantoos.org/2008/10/19/creating-a-deb-package-from-a-python-setuppy/
  • https://help.launchpad.net/Packaging/PPA

Distribute Your Software Just Like Ubuntu With Launchpad


Launchpad is project hosting provided by Ubuntu. It is free for projects with an open source license. The service consists of distributed version control, bug tracking, team collaboration and other features too numerous to list. The most unique feature and the one under consideration here is the PPA, "Personal Package Archive". This feature allows you to publish your software to users using the standard ubuntu software installation and update tools (apt/synaptic). Imagine finishing a new release of your software, and at the click of a button Launchpad builds your software for multiple architectures, and notifies your users that updates are available. Brilliant! Before PPA's, maintaining a standalone package repository was out of the realm of what mere mortals could accomplish. Now launchpad has removed nearly all the barriers to entry. In my opinion this makes Launchpad the best project hosting out there.

It isn't all beer and skittles though. There is much to know about building packages for ubuntu. I had to spend the better part of a day learning about how debian packages work in order to get my PPA up and running. (It was worth the effort). And launchpad does have its warts. The user interface isn't very nice when compared to git-hub or lighthouse, and with the large number of features packed in there, it takes too long to figure out how to do something for the first time. Also, Launchpad can seem sluggish, especially the bug tracker, which can be infuriating if you are updating lots of bugs.

To sum it all up Launchpad isn't perfect, but it is the only solution for all-in-one project hosting: distributed version control, issue tracking, collaboration and software distribution. In my mind git-hub, lighthouse and google code are the only real contenders for the title. Git-hub has a great UI but doesn't offer issue tracking. Lighthouse has another great UI, but doesn't have version control. Google code is wonderfully simple, but doesn't offer distributed version control. If only I could combine the best parts of Git-hub, Launchpad, Lighthouse and Google code...

Coming up... Based on my own experiences of creating a PPA on launchpad for a project of my own I am going to write a walkthough of setting up your own PPA. However, I am going to make it a separate entry. If you are interested just read my next post.