Fix Mac OS X svn ssl bug: "bad decompression"

Using SVN over SSL has been a real pain on Mac OS X (tested on snow leopard and lion).

The more 'heavy' SVN commands cause "SSL handshake failed: SSL error: bad decompression".

After some research this should be due a bug in the SSL library bundled with Apple's developer tools.

On the CollabNet forums someone suggested switching the standard http library called Neon for a new one called Serf written by some Google developers. This library should be really performant and handles SSL by itself.

Sadly the SVN tools from Apple don't come with the Serf library so we have to download a package which does.

The trick is the configure SVN to use the Serf library instead of the Neon library.

Owkay, so let's fix this step by step!

Step 1: check existing svn

Open up a terminal and check if the Serf library is for some reason already available by using following command:

svn --version

Screen_shot_2011-07-30_at_11

The library is available when you find "*ra_serf" in the list. If so, goto step 4.

Step 2: install svn package

*Snow Leopard

Download a SVN package and install. Remember the location where the svn tools will live. (note: i've used CollabNet but registration is required, others should do fine also I think)

*Lion

At the time of writing this post there seems to be no package available for Lion on CollabNet but you can with MacPorts. After upgrading to Lion, you'll also have to upgrade (sudo port -v selfupdate) or install MacPorts but you'll also need the latest Xcode (>= 4.1). You can install subversion with MacPorts with "sudo port install subversion". Following steps stay the same except the svn tools will live in another directory, for me that's /opt/local/bin.

Step 3: check for serf library

Let's check again if Serf's available. (note: replace path with your own install location)

/opt/subversion/bin/svn --version

Screen_shot_2011-07-30_at_14
As you can see, the Serf library is available!

Step 4: configure svn

Great, now we just have to configure your subversion settings so it will use the Serf library. 

open ~/.subversion/servers 

Search for the [global] section and add "http-library = serf" and save file.
Screen_shot_2011-07-30_at_14

Step 5: add new svn tools to path

To complete this, we add the freshly installed svn tools to the environment path.

open ~/.profile

And add following:

export PATH=/opt/subversion/bin:$PATH
 
Again, use the path to which you've installed the tools. Make sure the existing path gets appended so the new svn tools will take precedence over old ones.

Step 6: retry failed svn commands

After this, you should be able to execute svn command without the SSL "bad decompression" error.

If not, check if you really using the new svn tools and make sure they got exported to your environment. (note: initiate new terminal session so path changes take effect)

A good command to diagnose the problem in my case was doing a recursive svn list command.

svn ls -R https://svn.example.com/project/trunk

That's it! Enjoy!

Gentse Feesten 2011 app

Gisteren las ik een leuke (re)tweet van Daniel Termont met een link naar het volledige programma van de Genste Feesten in excel formaat.

Tot mijn verwondering vond ik geen enkele Genste Feesten Android app op de market.

Bij deze zelf snel (lees enkele uren) iets elkaar gestoken dus gelieve dat in het achterhoofd te houden.

Download nu van Android Market!

 

Features:

  • Volledig programma offline beschikbaar!
  • Bekijk gebeurtenissen per dag en locatie
  • Mogelijkheid te filteren op locatie
  • Bekijk wat er vandaag of nu bezig is op de feesten

Opmerking: de data ongewijzigd zoals ik deze heb afgehaald, je zal gauw merken dat niet alles correct is.

Ik hoop ook nog enkele andere zaken toe te voegen als ik de tijd vind zoals het bekijken wat nu bezig is en de mogelijkheid gebeurtenissen een ster te geven en deze in apart lijstje te raadplegen. Alsook een eenvoudig zoekfuntie zou handig zijn. Suggesties altijd welkom!

Voor de geïnsteresseerden, code op github: https://github.com/niob/gf2011

Changelog:

1.5

  • Toon openbare toiletten op een kaartje

1.4

  • Filteren op locatie beschikbaar op elk scherm
  • Filter heeft invloed op elke lijst
  • Direct toegang naar wat vandaag te doen is

1.2 - 1.3

  • Bugfix: database kopieren werkt gewoon niet op sommige devices dus in deze versie wordt dat database eenmalig opgevuld bij het opstarten.

1.1

  • Bekijk welke gebeurtenissen er nu bezig zijn
  • Bugfix: sommige devices waren niet in staat de sqlite database te kopieren bij eerste gebruik, dit doordat sommige Android toestellen niet instaat zijn ingepakte bestanden groter dan 1mb uit de assets folder te decomprimeren.
  • Opkuisen van data: sommige (belangrijke) locaties kwamen dubbel voor.

1.0

  • Volledig programma offline te bekijken
  • Bekijk gebeurtenissen per dag en locatie
  • Mogelijkheid te filteren op locatie