Interesting new article on package management

August 24, 2009

Benjamin Mako Hill has written a great deal on Ubuntu and Debian and has been around both projects for a while. I just discovered a new article written by him and Kyle Rankin called
Package Management in Ubuntu Server. It appears to be part of a book although I can’t tell which one.

At first it might seem pretty straight forward and something that many of the people who read Planet Maemo would know already, but once I got past the first page I saw that the authors went into some pretty good detail.

The site also has some other interesting articles for Ubuntu and Debian admins and users.

Comments Off

Freesmartphone.org

August 21, 2009

It’s a normal day, I am being bombarded by twitter, facebook, the intertubes, et. al. and I come across a tweet from @debian mentioning the new packages available from the last few weeks. I look at what has come into debian for something interesting and there is a lot, like an ofono package.

What catchse my eye is vala-terminal since vala is something I would like to learn more about. Clicking on the vala-link in the debian packages web interface shows another interesting link to some web site called freesmartphone.org. I click there to find that the same people behind the freesmartphone.org site have created a commercial entity that used to be funded by OpenMoko. So its good to see that the OpenMoko stuff has found its way into the community and that these tools are making there way into debian which is upstream for Maemo.

Things move so quickly nowadays, it’s just amazing to watch the ecosystem for free software expand.

1

Policy is your friend

July 24, 2009
Tags:

On the debian developers mailing list madduck asked about various package checking tools in debian. The resulting discussion revealed how many tools there are in debian to check packages; tools like piuparts, PET, and packagecheck. In contrast to Maemo, debian hackers seemed to be obsessed with the quality of their packages. The mantra “Policy is your friend” is ubiquitous in debian.

I don’t want to place the differences between the two projects in a negative light since the goals are so different. Debian aims to be an easy to use operating system whereas Maemo is a device. Maemo developers often want the device to do cool things, for them packaging is an after-thought. This is why there is a maemo.org debmaster of course; to help developers with packaging and integrate into the operating system so they can focus on cool features and libraries.

Having a debian background I am constantly thinking about the overall system, trying to assure that packages install well, that things “just work” for users. This sometimes makes me wonder if I am doing everything I can for maemo developers and what is the most effective way to encourage best practices and assure quality. While I am excited by the work Niels has done with package promotion and the potential that maemian has, I feel there is more that one can do. While I am sure it is boring to many developers, packaging policy is critical for building the kind of tools that Niels has built. You need to know that the developer has submitted the right email address, declared the correct dependencies, etc. Policy truly is your friend.

I hope to get the chance to speak about packaging at the Maemo Summit, I have submitted a talk anyway, we’ll see if it gets accepted. I also would like to encourage developers who target the Maemo platform to think more about making life easier for their users – after all, it will bring you more users if you can easily install and use your application. I would also like to know more specifically where the pain is, what sucks about the QA process, what sucks about packaging (aside from having to do it at all. :P ) Let’s make packaging policy a tool to make everyone’s life easier.

Comments Off

What’s the point of packaging?

May 22, 2009

This post is an introduction to some of the higher level concepts of packaging, more about the whys than the hows. I plan to start a series of posts on the anatomy of your average deb for Maemo, but before that I wanted to go through some of the reasons for packaging so that the details fit into a larger purpose. That purpose is simply to make life easier for your users by doing the hard work for them.

The hard work is compiling, determining dependencies, and building for the chip architecture of your software. All this stuff is quite esoteric to the average user – they just want to know: how do I install? Does it work with my tablet? With packaging we can answer in the affirmative the latter question and we can make install painless. That makes users of your software happy and more likely to use it.

Debian has as part of its mission the goal of putting users first, this makes Nokia’s choices of debian as an operating system fortuitous. Debian has worked really hard at making software easy to install and their success has made it one of the most popular linux distros out there. Debian’s user-centric focus created the APT (Advanced Packaging Tool) system, with apt-get and aptitude, which Maemo has inherited. This means that maemo packages can take advantage of all the well tested debian tools and the infrastructure which debian has built.

Building packages correctly allows you to insert software onto a variety of architectures, Maemo supports two and Debian supports at least eight.

Packaging has some fringe benefits as well, it forces a certain amount of discipline upon the developer and alerts them to the needs of their users. This is unfortunately something that we as programmers forget to do – to put the user at the center of the experience. Software should be written with users and usability in mind, otherwise no matter how good it is, no one will use it. Packaging helps to enforce best practices which make the installation and upgrade of software standardized. By standardizing distribution of software we are realizing the spirit of the GPL and bringing some pretty amazing technology to everyone, not just the alpha geeks who know their way around a C compiler.

Quick recap: Packaging allow us to

  • Build software for numerous architectures
  • Make software easy to install
  • Follow best practices in the development and distribution of software

So that is the point of packaging; to make software easy to install. It’s good to remember this when you are jumping through the hoops of dpkg and its various tools. :)

1

Packaging python apps for Maemo

May 14, 2009

I wanted to do a quick blog post with some resources for packaging python apps for Maemo. The resources I’ll post here are going to be debian related since maemo packages are based on debian packages. Later on I’ll go into more detail on the differences between debian python packages and maemo python packages, but I think you’ll find these resources to be useful for getting started or for tracking down a problem in your python app’s deb.

The first resource is a link to the debian wiki entry for the Python Modules Team;
http://wiki.debian.org/Teams/PythonModulesTeam

These folks package a lot of python modules for debian, so their documentation will be pretty authoritative and looking at their packages will probably teach you a lot.

The next link is to the Python policy. Boring I know, but you will be directed there for answers to various questions, so you might as well have a handy link to it.
http://python-modules.alioth.debian.org/python-modules-policy.html

Here is an interesting and pretty darn good screencast and tutorial showing how to package a simple python application as a deb on Ubuntu!
http://showmedo.com/videos/video?name=linuxJensMakingDeb

Ubuntu also has a Packaging guide which might be useful, I haven’t read all of it and it is more general than just python programming.
https://wiki.ubuntu.com/PackagingGuide

Hopefully that is enough to get started. I hope for follow up with more info on packaging python apps for maemo and for debian.

Comments Off

Nokia and Intel open up telephony with Ofono

May 12, 2009

Nokia announced on a Maemo developers list that together with Intel that they have released a platform for “building mobile telephony (GSM/UMTS) applications.” The code is under the GPL2 license, so it is free software.

This is really exciting. Now I want someone to run out an build a web to sms gateway. :)

Comments Off

Installing catalyst on Debian Squeeze

May 8, 2009

OHAI

I am going to describe how I installed Catalyst, the surprisingly spicy web framework, written in perl. Since I use debian, and I prefer to develop on sid, this blog will refer to the installation of Catalyst on squeeze/sid. Squeeze is the Testing distribution of debian, one day it will become debian 6.0 when it grows up.

So what do we do? Well, its trivial really;

aptitude install libcatalyst-perl

This pulls in lots of dependencies, but that’s good. As Gabor says, code reuse is a good thing. So far the Catalyst Wiki has been useful, telling me there are debian binaries already packaged. But when I want to start up Catalyst and hack a bit, it kinda lets me down, pushing me to CPAN for a ‘Tutorial’. That’s cool, I’ll go check that out.

Well, I hop down a bit on the tutorial page, mostly because I already know the spiel about MVC, or Model, View, Control, and I don’t need to go through that again. It is useful to read if you are just starting out. The juicy bit I found is that there is a tool, appropriately called catalyst.pl (/usr/bin/catalyst.pl) which is our “helper” – this is the tool we’ll use to set up our Catalyst site.

Okay, it should be simple enough, I do this on the command line;

catalyst.pl first

Thinking that I will get Catalyst to build my first project which I creatively named “first.” But no, I get this instead:

To use the Catalyst development tools including catalyst.pl and the
generated script/myapp_create.pl you need Catalyst::Helper, which is
part of the Catalyst-Devel distribution. Please install this via a
vendor package or by running one of -

perl -MCPAN -e 'install Catalyst::Devel'
perl -MCPANPLUS -e 'install Catalyst::Devel'
BEGIN failed--compilation aborted at /usr/bin/catalyst.pl line 24.

Well. That’s rude. It should just Do What I Mean! But it don’t, so more work for me. Fortunately there is an obscure but powerful tool in debian called apt-file which humbly describes itself as a tool to “search for files within Debian packages.” Because it does that, it can tell me which package holds the module I want. The above error message said I needed Catalyst::Devel, which is stored as a file called Catalyst/Devel.pm on a linux system, so I search like this;

apt-file search Catalyst/Devel.pm

apt-file conveniently tells me that Catalyst::Devel lives in libcatalyst-modules-perl. w00t! I install libcatalyst-modules-perl and it pulls in tons and tons of modules. No big deal really since this still only adds up to about 37 megs, which is a little big, but I can manage. A modular system is often preferable to a monolithic system, so I think we are alright here.

Now I run catalyst.pl first and whaddya know? It works! Fantastic!

But how do I view my new masterpiece? Well, after further perusal of the documentation on CPAN, i.e. the tutorial, I can see that we are to cd into the directory “first” which got created when I ran catalyst.pl. From there I run script/first_server.pl and viola, I get a bunch of Catalyst output. Now all I need to do is direct my browser to http://localhost:3000/ and I can see Catalyst serving dynamic web content. Yay! \o/

1

Swedish nanny state strikes again

May 6, 2009

Everyone knows Sweden is the ultimate nanny state, taking care of your every whim so no one ever has to worry about anything – there is a government subsidy and law for every possible occasion.

However, the price of the nanny state is constant vigilance by the nanny herself, Mother Svea. While applying for a drivers license, Mother Svea felt she needed to know some very intimate details about me. For example, do I have liver disease? Do I have Tourette’s syndrome? Do I have Aspergers syndrome? And she told me to list all the medicines I take.

What does having Asperger’s syndrome have to do with a driver’s license? Answer: nothing. Aspergers sufferers may have clumsiness, but are there really documented cases of people crashing because they have Aspergers? I highly doubt it.

With the kind of scrutiny you face in Sweden you would think that you would be very safe on the roads here, but as any one in Gothenburg knows, you take your life in your hands each time you set foot in a crosswalk in this town.

Dear Mother Svea, get a job.

1

Top 25 packages in terms of disk space in maemo

April 23, 2009

I have been trying to shrink the package repositories in maemo as we have lots of packages. Having lots of packages is a good thing, a sign of a healthy developer community. Of course, there is no need to keep older versions of the package around, people should be using the latest package because that is the one with the bug fixes and new features.

In doing a little digging in the repos that exist on one of the maemo machines, I have found some duplicates. I thought I would publish a list of the packages that have the largest number of different versions so that I could focus my work on reducing those packages first. Here is the top 25 packages and the number of versions they have:

106 mcalendar
102 osm2go
92 youamp
68 feedcircuit
58 pyrdesktop
58 irreco-core
54 kmplayer
52 wifiinfo
52 irreco-core-dev
48 omweather
48 mnotes
48 gpodder
44 libobd-dev
44 libobd
44 carmand-panel
44 carmand
43 weightjinni
42 mathjinni
40 libillumination0-dev
40 libillumination0
40 carman-ui
38 carman-cleanup
38 carman
38 advanced-backlight
36 scopa-cards-extra

As you can see, there are a lot of duplicates, even though this takes into account packages in extras _and_ extras-devel.

You might say, “Hey, what’s the big deal. You should just have an automated tool that removes old packages whenever someone uploads a new one.” Well, you would be right. And that is what I am writing now. :)

Comments Off

“Rum, bloggery, and the lash”

April 22, 2009

So Matt Trout had a talk on “Rum, bloggery, and the lash” at the most recent Nordic Perl Workshop. In his inimitable style, he exhorted people to join his “Ironman” blogging competition so that we can populate the interwebs with chatter about perl. All of this in an effort to evangelize perl to a new generation and to hopefully correct some misunderstandings about perl.

One of the misunderstandings I want to address is that perl is a read-only language. That is just not true. And before you send me reams of obfuscated perl code, realize that I am referring to the modern implementation of the language, i.e. perl5 and associated modules, which allows one a great deal of flexibility and readability, especially in its modern object system.

That object system, Moose, has a large and very enthusiastic community gathering around it and it has pulled in older perl hackers drawn by Moose’s syntax and ease of use in addition to its powerful Meta Object Programming features. I hope to write more about Moose as I learn about it and blog about perl.

Hmm, that blog post was only eight lines, despite being nearly 200 words. I guess I’ll have to add two more to reach the ten line limit. :)

Comments Off