Dear Diary

life, universe and all the rest

New blogging engine

Finally, after a year of almost no activity, I have updated my blog with new software. I used to run Wordpress for the past seven or so years but finally decided it was time for something new. As of today, I am running on Pelican, a Python-based static website generator. This means good-bye to the php-based dynamic colution. I hope this will give this blog some more security. Comments will be via Disqus for the moment, for want of a better alternative. I still plan to eventually migrate to completely static comments, but for now Disqus will do.

Also, you might notice that the theme I use looks a lot like the one from Octopress. This is because I use the fabolous Pelican Octopress theme by Maurizio Sambati. I don't use Octopress itself at the moment because I still have a hard time working with Ruby on Windows. Also, Pelican easily supports reStructured Text out of the box which I do in fact like better than Markdown (and have used it more often).

My new setup includes some more nifty technical details.

What to do if biber stops working on MacOS X

Yesterday evening I ran into a bit of a problem when I tried building my latex document that uses biblatex/biber. For some reason, biber would not generate any output but fail with

Olivers-MacBook-Air:~ porten$ biber
data source /var/folders/5c/y7ssnfgj2fz1fnx1gz_z7ng80000gn/T/par-porten/cache-5a7f3069e2a4d51fd3557003fc55ec74c554c947//inc/lib/Biber/LaTeX/recode_data.xml not found in .
Compilation failed in require at Biber/ line 21.
BEGIN failed--compilation aborted at Biber/ line 21.
Compilation failed in require at Biber/ line 8.
BEGIN failed--compilation aborted at Biber/ line 8.
Compilation failed in require at (eval 22) line 2.
    ...propagated at /opt/local/lib/perl5/5.14.1/ line 94.
BEGIN failed--compilation aborted at line 5.
Compilation failed in require at script/biber-darwin line 20.
BEGIN failed--compilation aborted at script/biber-darwin line 20.

Now, what fixes this is simply deleting the par cache:

sudo rm -rf /var/folders/5c/y7ssnfgj2fz1fnx1gz_z7ng80000gn/T/par-porten/


Running WindowTester Pro from Maven/Tycho

Running SWTBot tests as part of your maven/tycho build cycle is rather well documented and pretty straight forward (see for example the sonatype docs). Doing so with a WindowTester Pro recorded test is not - but then again it is pretty straigt forward as well.

There are just two things that you need to change from the SWTBot tests pom.xml (as presented in the sonatype docs):

  • have useUIThread = true
  • add a dependecy to to pull in platform specific plugins

You will also need to tell maven/tycho where to find the latter feature, of course, by adding to your repositories.

Running Tycho in Jenkins/Hudson

When I first started running my Tycho/Maven build of my visual editor in Jenkins the build would always fail if a single test failed. That was mainly because the Maven build would run the surefire test automatically but cancel the build if there were any failures in them. In turn, this would not keep artifacts from being generated and thus not create a new snapshot release. To make matters worse, my tests are not that stable yet - running them on Linux sometimes fails for no reason whatsoever, leading to yet another broken build.

CUnit-to-JUnit transform now on BitBucket

One of the most visited blog entries on this blog probably is my article on transforming CUnit results to JUnit results: CUnit Tests in Hudson. There I write about how to use xsltproc to transform the output of CUnit to be processed by Hudson/Jenkins.

Now, I decided to put the file on BitBucket to maybe consolidate the contributions or changes others are making. I welcome everybody to make contributions to the transform there.

The link to the BitBucket project is:

DIY NAS #1: Introduction

I've been pondering the thought of buying a NAS system for quite some time now but could not find a suitable one. My requirements are quite challenging though, I must admit:

  • Silent: I want to run the system near my desk so it has to be very silent. (And I mean super-silent - not just a little silent)
  • Fast: Access to the drives has to be fast.
  • Feature-Rich Software: I want to use the NAS primarily as a NAS, but it should offer features like BT downloading and the like. It should also act as a iTunes and/or DLNA server.
  • Hardware Features: - Wake-On-Lan / Wake-on-Wan - Inegrated WLAN Adapter - Raid 1, 5 or 10; 10 preferred

Setting default applications in Ubuntu 10.10

After installing Adobe Reader into my Ubuntu installation I noticed that the Adobe Reader was actually making itself at home as the default viewer for PDF files. However, I do only rarely use it because I feel that the Ubuntu Document Viewer (aka evince) is the quicker and better solution most of the time.

Testing XMLRPC Controllers in Pylons

Testing is one of the essential tasks in modern software development, so it is only natural to want to test an application as thoroughly as possible.

I'm currently working on an application that offers a service via xmlrpc. For a client side implementaion I use python's xmlrpclib and that is working well. Then again, I obviously want to test the xmlrpc functionality also during regular unit and functional tests and not only using the client. What's more, having to instantiate a server to be able to run tests is cumbersome at best.

Unfortunatly, Pylons does not offer a method to test xmlrpc controllers out of the box. The solution I found is not quite as complicated as I had feared at first. Read more after the break.

Pylons and Apache with repoze.who BasicAuth

To be able to use Basic Authentification in repoze.who running in a wsgi app in your Apache installation, you need to tell Apache to WSGIPassAuthorization. An Apache configuration like this will do:

# Setup mod_wsgi
WSGIPythonHome /var/www/pylons/runtime
WSGIScriptAlias /myApp /var/www/pylons/myApp/mod_wsgi/dispatch.wsgi
WSGIPassAuthorization On

<directory /var/www/pylons/myApp/mod_wsgi>
Order deny,allow
Allow from all

The importanat part here is

WSGIPassAuthorization On

This will pass HTTP authorisation headers through to the WSGI application.

Sources: Repoze-dev Mailing List, modwsgi Wiki