Open Source (RSS)

Open Sauce baby!

Blog moved to WordPress and new domain...

I've moved my blog to my own domain and onto a WordPress engine, CS + SPAM was driving me nuts!

Catchup posts: Oh yes, I've been in Japan for a couple of months, first 2 weeks of photos are uploaded on Flickr, I still havent had a chance to upload the thousands after.

Whats more, I've actually written some information about me so you can finally find out my sad sad way of life. See About Thushan Fernando.

UBUNTU: Gutsy stuck at 82% "Scanning the mirror" status fix

So I finally had some time to install Gutsy on the Dell M1330, however I got stuck at 82% while it was "Scanning the mirror", it was stuck for atleast 40mins (went to get some dinner, came back and it hadnt moved!). This is because the official mirror's are getting a pounding right now, so here's a quick fix if your stuck in the same boat.
  1. Goto System -> Administration -> Software Sources
  2. Drop down the Download From combo box and select 'Other'
  3. Then click 'Select Best Server', this will go and try a list of official mirrors and pick the fastest, for me i'm using the Pacific mirror in Aus.
  4. Make sure you opt to reload the apt sources list.
  5. Give it a couple of minutes, the installer should use the new mirror and continue installing/configuring...
Easy as:-)


UBUNTU: 7.10 Gutsy Gibbon is finally out!

Thats right, the final countdown comes to an end and Gutsy's ISO's are now able to be downloaded from the Ubuntu servers. Mirror's should start propogating it soonishly! *HOWEVER* I would strongly suggest you try the Ubuntu 7.10 (Desktop AMD-64) Torrent (Desktop x86 or Server x86 / Server x64 ) instead, faster download and less choking on the server.

I've been busting to install it on the Dell M1330 XPS ever since I got it and now finally the moment has come. Oh, i'm so happy.

UPDATE:
Mirror's for those down-under.

PEE-PANTS-WORTHY: Microsoft will be releasing the source to the .NET BCL, ADO.NET, ASP.NET *AND* WPF!!!

I had to read this a few times before I was able to digest it, then I pee'd my pants - it was also raining tonight on the walk back to the car from uni... Scott Guthrie's blog just mentioned about .NET being openned up with the release of Orcas. Here's the important bits:
One of the things my team has been working to enable has been the ability for .NET developers to download and browse the source code of the .NET Framework libraries, and to easily enable debugging support in them.

Today I'm excited to announce that we'll be providing this with the .NET 3.5 and VS 2008 release later this year.

We'll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows). We'll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ). The source code will be released under the Microsoft Reference License (MS-RL).

You'll be able to download the .NET Framework source libraries via a standalone install (allowing you to use any text editor to browse it locally). We will also provide integrated debugging support of it within VS 2008.
Unfortunately, the licensing terms make this a 'readonly' view of the source as stated in the Licensing Terms. So what does this mean to .NET Developers? We can finally debug at the Framework level!!! You can even opt to download the sources from MSDN. Checkout the Channel9 video of Shawn Burk, the man behind the curtain that made it happen and discusses the implications! His official announcement is available on Shawn's blog! . If you havent already, grab the latest Beta 2 release of Visual Studio 2008 or wait for the final due out early November.

Personally I cant wait to see the sources for WPF. So many good things coming in the next couple of months, not to forget Ubuntu Gutsy Gibbon (7.10), MythUbuntu and Visual Studio 2008.

LINUX: /bin/rm: Argument list too long - and how to work around it!

Came across an interesting problem today. My MailQueue was overloaded causing sendmail to go nuts apon a system reboot. (Load was insanely high!) so I figured i'd delete the pending mail in the following locations:
/var/spool/mqueue
/var/spool/mqueue-client

Delete em:
# rm  ./*
But alas I was greeted by:
/bin/rm: Argument list too long.
Say what? Just *how* many files are we talking about here?
# ls -l |wc -l
32832
Even worse for the other folder! Swwaaahoooiiiieeeh? Unfortunately telling the rm application to remove that many files are a little out of its boundaries, so how to fix it? Simple, take the find command and pipe it to rm instead like so (this also works if the there are spaces in the filenames):
# find . -print0 | xargs -0 rm
If you want to filter it (so only say 'dfl81*' files are deleted):
# find . -name 'dfl81*' -print0 | xargs -0 rm
I still havent looked at why there were so many emails in the queue. My guess would be the SVK mirror'ing I do from home to pickup changes in Mercury (our uni's SVN Repo).

LINUX: gpg WARNING: unsafe permissions on configuration file

Whats the best way to learn a new operating system? Dive into the deepend and mess around. Long story short I changed the permissions for my home folder (i chmod'd the entire /home/thushan/* to 777), long story short x2 I messed  a few things and openned up the entire home folder to be accessible to everyone. Not good, trying to "fix it" I created another mess. So when  I tried to enter a new key I got:
gpg: WARNING: unsafe ownership on configuration file `.gnupg/gpg.conf'
gpg: WARNING: unsafe ownership on configuration file `.gnupg/gpg.conf'
gpg: external program calls are disabled due to unsafe options file permissions
gpg: keyserver communications error: general error
gpg: keyserver receive failed: general error
Hmmm. What to do here? Easy reset the permissions.
  1. First make sure you have ownership of the file still, goto the home folder (cd ~):
     # ls -lah 
    This will give you a list of your folder's contents including permissions. Make sure it states something like this with your username:
    drwx------  2 thushan thushan 4.0K 2007-08-15 00:01 .gnupg 
    If it has root (where it says thushan) you can fix this by changing the owner with chown:
    # sudo chown USERNAME:USERNAME~/.gnupg 
    Then do another ls to make sure its working properly.

  2. Next up lets set the right permissions:
    # chmod 700 ~/.gnupg
    # chmod 600 ~/.gnupg/* 
Thats it! now you can import keys again.

UBUNTU: Configuring Trac on Feisty fixing up the ClearSilver mess.

Last night i took a stab at installing Trac and failed. It was late (about 3am) and I needed sleep so I left it, today I've got it working but had to hop over a few hurdles to get there.

Firstly I'm trying to install the latest 'stable' version of Trac which is 0.10.4, this unfortunately requires the ClearSilver libraries which ho-hum is *not* included with Trac now. This means you have to build it from source and let me tell you that chances are (atleast on feisty) it wont work straight from the source files. So let me go through it for you:-)

Firstly we want to get ClearSilver installed and ready before we follow the TracInstall Guide and continue from there.

Building ClearSilver
Right lets get to work.
  • First thing we have to do is to get all the dependencies.
    $ sudo apt-get build-dep python-dev python-clearsilver
  • Then once thats retrieved, download the latest (as of writing 0.10.4) of ClearSilver:
    $ wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz
    $ tar xzvf clearsilver-0.10.4.tar.gz
  • Then we need to make two modifications to the configure and configure.in files. That is to add the correct version of python to the list of allowed python distro's. (v2.5). Easiest way to do this is to knock up Nano and find 'python_version=' (or goto line 6560 in configure and line 250 in configure.in. I'm too lazy so i used WhereIs (CTRL+W):
    $ nano configure
    $ nano configure.in
  • Now that we have modified the configure files lets configure and make it.
    $ ./configure --with-python=/usr/bin/python2.5
    $ make
    $ sudo make install
  • After a few minutes it should build and (for me it threw a few errors which I ignored) now its time to copy the shared file 'neo_cgi.so' to our python site packages:
    $ sudo cp -bi python/neo_cgi.so /usr/lib/python2.5/site-packages/neo_cgi.so
  • Almost there! Now its time to run the Python installation app for Trac and continue on with the TracInstall Guide:
    $ python ./setup.py install
This got Trac installed, however I got an error trying to access my SVN repo:
TracError: Unsupported version control system "svn". Check that the Python bindings for "svn" are correctly installed.
*doh* If you get a similar error simply install the Python bindings for SVN:
$ sudo apt-get install python-subversion
This will hopefully fix it!

Cool utility to mirror SVN Repo's!
If you have a remote SVN Repo you want Trac to make use of then there's no option (yet) to do that natively. However this is the open-source world and *someone* has already worked on addressing this need with