Adventures in Ubuntu packaging

Lately I’ve been researching how to create Ubuntu packages. For those that don’t know, packages are the Linux way of installing and managing software. Think Windows Update, but for all software on your computer. There are a few differences though: Each package will specify what versions of other packages it requires. This makes it trivial to see if a newer version of some library will break any software on your system. And since everything on your system is managed by one repository, you usually don’t have to worry about each program installing another copy of the same library. This happens on Windows a lot. When you install a game, it tends to install its own private version of DirectX.

The only down side to packaging, is that it takes a few hours to awkwardly walk through making your first package, and many more to properly package more complex programs.

I decided to start by packaging shrip. It is the command-line sister program of ogmrip. It makes it easy to encode DVDs into other containers and formats such as AVI, MPEG, OGG, MKV, et cetera.

I decided on it because, it is a smallish, stand-alone program, which would be much easier than packaging something that is in pieces, like open office. I also wanted to use it for a project I am working on called Ripspread.

I first started learning about packaging by reading the official Complete Ubuntu Packaging Guide. This did not turn out well, as the guide goes off on tangents, and those tangets go off on tangents, and somehow we would end up moving onto the next step, without me understanding which part was actually performed. I muddled through anyway and built the example package. Then I did it again. And again. Even after that I did not retain much of the process.

Then those smarties at ubuntu decided to make a screencast packaging guide. But instead of explaining every possible way of doing it, they focused on how they would do it in real life. And it was nice.

Since then I have been able to package shrip and a few other things. Generally my packages work. But there are some things I have not yet figured out. I want to list them here, so I can refer to them as I continue my research:

  • How do I label a package that is not an official release, but checked out from a code repository? And what if I have to change the code before the package can compile?
  • What about recommended packages? In some places you might want to just install libdvdcss, and others you might want to leave it up to use user’s discretion.
  • What about situations where there are multiple options for a required package? For example there are 3 different options for OCR software for reading subtitles in shrip. But I have to pick one when compiling. Is there any way to let the end user decide which to use when installing the package?
  • What is the difference between XSBC-Original-Maintainer and Original-Maintainer? The Ubuntu guides use XSBC-Original-Maintainer, but many packages just use Original-Maintainer.
  • How does a package get marked as being in Multiverse or Universe? There does not seem to be anything in the control files that indicates this.
  • Is it correct to mark the maintainer as Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>, even though I am not yet a MOTU? People at this mailing list will have no idea what this package is. It makes me feel like I am misrepresenting the MOTU by doing this.
  • What is the difference between having the priority set as “extra” or “optional”? They seem almost the sameĀ  when you read the description.

I hope to figure out these issues, and make some good packages that make it into ubuntu some day.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment