First Shot at Packaging

One of the most important projects in the Ubuntu community is MOTU – a project to produce Ubuntu packages for the many and various Linux applications out there. MOTU is not only for producing packages, but is also the place where people actually learn to package, eventually becoming MOTU contributors (people who produce packages for the universe repository) or core-dev (people who produce packages in the main repository).

For a while now I have had an item on my TODO list:

  • learn how to produce Ubuntu packages, and maybe learn to become a MOTU

Well, yesterday evening while trying to sleep I developed a cold, and as the day continued, I felt progressively worse. After meeting up with a mate last night, I tried to sleep and failed. So, instead of laying in bed wishing for sleep (I hate that), I figured I would use the time to learn how to package.

To get started I followed the excellent Ubuntu Packaging Guide. As I worked through it, I made some notes about bits of the guide that need fixing, and posted them to ubuntu-motu where they are planned to be merged in. After I had produced the hello packages with the different techniques, I then tried my hand at packaging something. I decided to try and package the new PiTiVi 0.11.0 release.

This resulted in this package. It works on my system, and is built for gutsy. Give it a shot, but this is my first package, so if it eats your important documents, don’t expect sympathy. :) And as for hardcore packaging nutters, yes, I used CDBS for this package, and used the existing PiTiVi package to learn from, and I am new, so don’t kick me too hard. :)

I do plan on continuing to learn how to produce a package using debhelper and not using CDBS. Thanks to everyone in #ubuntu-motu for their help; you are a fine bunch of people. :)

To be frank, I was a bit worried that packaging would be a bit too hardcore for me, but it was easier than I expected, the the tools available are excellent – from the tools to automate creating the package control files, to the pbuilder which helps build the binary package and ensures it pulls in the right dependencies. Obviously, I am at the start the journey, but has gone much smoother than I expected.

Also, don’t forget the range of sessions at Ubuntu Open Week next week for those of you who want to learn to contribute to Ubuntu as packagers. :)

  • LT

    Installed ty

  • http://tarunaai.blogspot.com Onkar

    Why does this package depend on python-zopeinterface? And by the way, it installs but does not run. Following is the error.

    onkar@ps0657:~/Desktop$ pitivi Traceback (most recent call last): File “/usr/bin/pitivi”, line 113, in runpitivi() File “/usr/bin/pitivi”, line 102, in runpitivi import pitivi.pitivi as pitivi File “/usr/lib/pitivi/python/pitivi/pitivi.py”, line 29, in from ui import mainwindow File “/usr/lib/pitivi/python/pitivi/ui/mainwindow.py”, line 49, in from pluginmanagerdialog import PluginManagerDialog File “/usr/lib/pitivi/python/pitivi/ui/pluginmanagerdialog.py”, line 30, in import pitivi.pluginmanager as pluginmanager File “/usr/lib/pitivi/python/pitivi/pluginmanager.py”, line 32, in import pkgresources ImportError: No module named pkgresources

  • http://jeremy.sunriseroad.net/ Jeremy

    A good practice would also be to post your .dsc and .diff.gz (and optionally the orig.tar.gz) files as well. :)

  • TW

    $ pitivi Traceback (most recent call last): File “/usr/bin/pitivi”, line 113, in runpitivi() File “/usr/bin/pitivi”, line 102, in runpitivi import pitivi.pitivi as pitivi File “/usr/lib/pitivi/python/pitivi/pitivi.py”, line 29, in from ui import mainwindow File “/usr/lib/pitivi/python/pitivi/ui/mainwindow.py”, line 49, in from pluginmanagerdialog import PluginManagerDialog File “/usr/lib/pitivi/python/pitivi/ui/pluginmanagerdialog.py”, line 30, in import pitivi.pluginmanager as pluginmanager File “/usr/lib/pitivi/python/pitivi/pluginmanager.py”, line 32, in import pkgresources ImportError: No module named pkgresources

  • http://www.DonAssad.com Josef Assad

    I dunno if this is on your priority list, but you might want to look at building your packages on the openSUSE Build Service. Seeing how there are currently xubuntu and Etch repos listed as valid repo targets, shouldn’t take any extra work to get your package building for Ubuntu 7.10 too there.

    Good way to build for archs you don’t have, too.

  • http://www.mitechie.com Rick Harding

    I’ve recently started down the same path as yourself. I have to say the #ubuntu-motu people are amazingly great with helping out guys like us.

    As to the openSuse build service, it sounds something like the launchpad PPA service. I know Jorge and another friend have setup packages with the PPA service and now have their own hosted repositories. Very cool stuff.

  • Mark Ginter

    I just tried installing your pitivi package. I’m also running gutsy – but when I try to start pitivi it says, Traceback (most recent call last): File “/usr/bin/pitivi”, line 113, in runpitivi() File “/usr/bin/pitivi”, line 102, in runpitivi import pitivi.pitivi as pitivi File “/usr/lib/pitivi/python/pitivi/pitivi.py”, line 29, in from ui import mainwindow File “/usr/lib/pitivi/python/pitivi/ui/mainwindow.py”, line 49, in from pluginmanagerdialog import PluginManagerDialog File “/usr/lib/pitivi/python/pitivi/ui/pluginmanagerdialog.py”, line 30, in import pitivi.pluginmanager as pluginmanager File “/usr/lib/pitivi/python/pitivi/pluginmanager.py”, line 32, in import pkgresources ImportError: No module named pkgresources

    I had 0.10.3 installed previously – so I don’t know if this is a result of trying to upgrade to your package or not.

    Not a critique — most indebted to your packaging efforts — just wanted to offer some feedback :)

  • http://www.tenshu.fr/ tenshu

    congrat’ :mrgreen:

    Packaging look simple but it is hard if you look closer You need to be VERY careful with many details

    Anoying things : _ obtaining a good communication link with the upstream author(s) _ writing a manpage (yeak) _ getting rewied by the REVU team _ shipping your package to debian (debian team is more careful on details than ubuntu MOTU

    My personal advise is to work directly for the debian packaging project Go get a good mentor (i had a bad experience with one of them) Then help ubuntu team to matain your package synced from debian

    My 2cts good luck with packaging Its hard but it’s priceless to see that people are installing it and use it on their system : http://popcon.ubuntu.com/

  • http://buranen.info Derek Buranen

    I installed it on my gutsy here. It works, but the app is still a bit crash happy.

    Importing videos doesn’t work with drag/drop, only via “add” and it crashed when I added an mp3 to the timeline in advanced view.

    Definitely showing progress (not the G. W. Bush progress, but real, verifiable and scientifically demonstrated progress)

    Thanks for packaging Mr. Jono.

  • chris

    missing dependency on my system: python-setuptools

  • http://jrwren.wrenfam.com/blog/ Jay R. Wren

    You should REALLY use PPA. Eat your own dog food!

  • http://daniel.holba.ch/blog/?p=60 Daniel Holbach’s blog » Blog Archive » Cool stuff in MOTU land

    [...] news everybody. First of all, our bearded friend, Jono Bacon is working towards MOTU-ship. Also, we’ll have a MOTU Q&A session, on Friday, 19th Oct on 12:00 UTC in [...]

  • Étienne Bersac

    CDBS is good enough. You should make better use of it instead of diving into lower level deb-helper scripts.

    Étienne.

  • Stuart

    python-zopeinterface a missing dependency on my box.