Linux (RSS)

Linuxy/Open Source tidbits

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.

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 the very cool app SVK. SVK can do much more than just mirroring repo's. Ubuntu users can find it in the Universe repo's as mentioned in the InstallingSVK wiki page.
$ sudo apt-get install svk
It installs alot of libraries but its funkyishly good. Then once its installed follow the guide on svk by running:
$ svk help intro
If you're planning on running a standalone server, dont forget to checkout the Wiki TracStandalone for configuration options, highly recommended you password protect it:-)

Is Trac. Is Good.

UBUNTU: Perfect Setup for home!

I cannot recall the last time I had two whole months off uni. Simply absurd when I think about it, ofcourse this is partly thanks to the Uni Project and having only 2 subjects to really commit to studying for during exam time with the added bonus of having the exams within a 2 week period. So whats a comp-sci guy to do to fill up this 2 month void? Go out and socialise? *pffft* yeah riiight...

Background
Previously I had Ubuntu Feisty running as an intermediate server 'just for play', allowing primarily for me to SSH in home and access the internal network to grab work etc (mapped network shares via Samba), sadly this took my excuse of 'Oooops i left it at home' away. This was all good, however our electricy bills at home keep climbing and the environment is hurting. With the amount of boxes I have at home (most with 600W PSUs) I knew I had to do something about it. So these holidays, it was time to crank open that tower and get the ball rolling on a brand new install of Feisty and replace the Windows 2003 server box that had served its purpose for so long as a Fileserver and webserver.

So here goes my adventure down Feisty Lane.

System Configuration
This is an old box I had that wasnt doing much, so I threw in all the bits I found lying around to build it.
  • GA-8IPE1000 Pro2
  • Pentium 4 3Ghz (HT)
  • 2GB RAM (DDR) [ had no idea we had so much ram going to waste! ]
  • SATA 250Gb Drive, this is where the main Feisty OS will be installed.
  • 8x500Gb SATA drives (WD5000YS RE2) some of these were in RAID-0 configs on the other machines
  • ATI Radeon 9600 AGP, the last surviving AGP 8x card. I have a 9700 All In Wonder and a GeForce Ti somewhere too.
  • Dual Gigabit cards (one on the motherboard, another as a PCI card), the whole house has been Gigabit'd.
I bought a new case too, at work we've been using the V1000+ from Lian-Li with some positive awe, so I went ahead and got the Lian-Li V1000+ Black (the