Thursday, March 11, 2010

Git

The question which version control system is "the best", is often the base for endless discussions. I'm quite pragmatic in this regard: I've used Rational Clearcase during the last 9 years and worked with CVS and Subversion during the last 4 years. From my experience the acceptance of a version control system depends a lot on how it matches to the software development workflow of a company/community.

Personally I prefer the straight forward approach of Subversion over the (technically) powerful Clearcase. Still Subversion is cumbersome when working with temporary development branches and I was curious when I heard about the concepts used in Git. After reading about Git I thought that it unites the benefits of Clearcase and Subversion without introducing any drawbacks.

At Openismus I got the chance to work with Git on a real project. The first impression was ambivalent: On one hand Git is extremely powerful, fast and does not limit the developer how to work with branches or doing merges. On the other hand the learning curve is higher than expected and it requires a different mind set in comparison to centralized version control systems. Because of the huge amount of new possibilities a ruleset for projects using git is highly recommended. Git reminds me to C++: You can do wonderful things with it in a clever way, but it's very easy to shoot oneself in the foot.

I still need to learn a lot about Git, but after a few weeks of working with it I already prefer it over Subversion a lot. More and more projects switch to Git, so this does seem to be a common experience.

Thursday, March 4, 2010

Packaging


Before I joined Openismus, I never created RPM- or Debian-package for my sources. After releasing an early version of the Dolphin sources at www.kde-apps.org, friendly people stepped up and created RPM- or Debian-packages for them. When Dolphin got part of KDE, the packaging anyhow was no problem anymore as it had been done by the Linux distributions.

At Openismus one of my first tasks was the prepare Debian packages for Glom and the Qt frontend Qlom. Beside preparing packages for Ubuntu Karmic, also packages for Maemo had to be created.

I always thought developing software can be tricky, but now I know that creating a package is also very challenging and requires a very focused style of working. As there are many traps for beginners, I'd like to provide some useful links that helped me to fulfill this task (beside the help of my colleagues at Openismus of course):
  • Creating Debian Packages for Maemo: When creating a Debian package for Maemo, some things from the Debian New Maintainer's guide can be skipped, other additional steps are required. Beside step by step instructions to create a Maemo package from scratch, the differences to a default Debian package are explained well there.
Still there is a lot of room to fail at the beginning. There have been some traps I fell into and I'd like to summarize them as long as I can remember them:
  • Don't modify a decompressed version of a file that is part of the *.orig.tar.gz file, without updating the *.orig.tar.gz. This sounds (and is) obvious, but it is easy to fall into this trap when modifying e. g. a configure.ac file for testing. The result of doing such changes is that the local installation of the generated package might behave different in comparison to the official package created by a PPA.
  • Beside the build dependencies take care to verify the runtime dependencies. It is easy to forget this, as the local system most probably will already contain the needed packages.