OpenSource



23 Feb 10

I just go a mail on Subversion mailing list informing that today is the 6th Birthday of Subversion for those who are thinking what is Subversion they can read here.

So Subversion has come along pretty well since it’s 1.0 release 6 years back and this day I would like to thank all developers who have put in there efforts to make Subversion what it is today; it stands tall among the many commercial tools.

So how I celebrated the Subversion’s birthday I went to svnforum.org and tried to answer queries of people as thats the way you can help Subversion adoption to grow among masses.

Developers are doing there bit by developing it; so we as a part of community need to contribute in what ever way possible.

This day I wish many many happy returns of the day to Subversion and want to congratulate Subversion community for great going looking ahead to more great accomplishments in future.







13 Dec 09

Few days back I was trying to create database in a batch job using createdb.exe and I encountered this problem createdb.exe prompts for password and there is no way of passing password from command line as an argument.
I tried to find out how to do this but in vein there is no way you can pass password as an command line argument; than after looking around for sometime and googling I found two ways of doing it

  • Setting up PGPASSWORD environment variable : This method is not preferable as it’s insecure more for further details read this


  • Setting up password in pgpass.conf : The file is to be located
    %APPDATA%\postgresql\pgpass.conf

File has the following format

hostname:port:database:username:password

Each of the first four fields may be a literal value, or *, which matches anything.

For further details the postgres documentation







10 Nov 09

Here I am going to talk about three useful and handy subcommands  of svnadmin that will help us in dumping our data and restoring it back to fresh repository, restore is very critical, as we keep on backing up data but we seldom bother about restoring it to check if everything is working fine or not. I would like to put one point across that your backup is as good as your last restore.

Dumping the repository

>>svnadmin dump /srv/svn/test > backup.dump
* Dumped revision 0.
* Dumped revision 1.
* Dumped revision 2.
* Dumped revision 3.
* Dumped revision 4.
* Dumped revision 5.
* Dumped revision 6.
* Dumped revision 7.
* Dumped revision 8.
* Dumped revision 9.
* Dumped revision 10.
* Dumped revision 11.
* Dumped revision 12.
* Dumped revision 13.

This is the simplest option for dumping the repository for purpose of backing up your repository. If you want to do an incremental back than you need to specify –incremental flag and give start and end revision for same.

Restoring the repository back

E:\mywork\prolific_prolific_20091110165216>svnadmin load /srv/svn/newrepo <  backup.dump
<<< Started new transaction, based on original revision 1
* adding path : branches … done.
* adding path : documents … done.
* adding path : tags … done.
* adding path : trunk … done.

——- Committed revision 1 >>>

<<< Started new transaction, based on original revision 2
* adding path : documents/test.txt … done.

——- Committed revision 2 >>>

<<< Started new transaction, based on original revision 3
* editing path : documents/test.txt … done.

Verify the restore

>>svnadmin verify /srv/svn/newrepo
* Verified revision 0.
* Verified revision 1.
* Verified revision 2.
* Verified revision 3.
* Verified revision 4.
* Verified revision 5.
* Verified revision 6.
* Verified revision 7.
* Verified revision 8.
* Verified revision 9.
* Verified revision 10.
* Verified revision 11.
* Verified revision 12.
* Verified revision 13.

Habit of restoring the data regularly is very important for having usable backup.







20 Oct 09

This article covers how to setup domain authentication for Subversion with Apache using mod_auth_sspi , I am running Apache 2.2 and Subversion 1.5. First of all you need to get SSPI module from its new home at sourceforge , module can be directly downloaded from here. Once you have downloaded the module extract using some zip utility there will be a bin folder inside the extracted folder and inside bin folder there will a file named mod_auth_sspi.so take this file and drop it in Apache’s modules folder.

Once you are done with above steps we now need to modify Apache’s httpd.conf to include the domain authentication for our Subversion repository make changes to httpd.conf as shown below,  first we need to ensure that we have required modules loaded

LoadModule sspi_auth_module   modules/mod_auth_sspi.so
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

To mod_dav_svn to work you need to uncomment the line which loads mod_dav module Apache look for it and uncomment if its commented.

Now the real magic configuration starts which will enable us to authenticate Subversion users against AD domains make changes in httpd.conf as shown below

<Location /svn/myrepo>
dav svn
SVNPath “d:/svnrepos/myrepo”
# Domain Authentication settings
AuthName “Subversion domain”
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain MYDOMAINNAME
SSPIOfferBasic on
SSPIOmitDomain On
Require valid-user
# Subversion’s authorization file
AuthzSVNAccessFile “d:/svnrepos/authz”
</Location>

Once done with above changes save the file and restart Apache and try accessing the URL http://<yourservername>/svn/myrepo you will be prompted for authentication saying “Subversion Domain” enter your domain name without domain as we have SSPIOmitDomain On and based on Subversion authorization file i.e authz in our scenario you will be able to see repository or you will get forbidden error.

We are done with setting up domain authentication, in-case you face any problem with above settings feel free to write to me.

LoadModule sspi_auth_module   modules/mod_auth_sspi.so
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so






1 Oct 09

I have been fiddling around with Apache for quite sometime now on Ubuntu and there were few questions which used to come to my mind as novice user initially like how do i install apache on first place, where are Apache logs, where are Apache conf files located, how do I add new site to Apache server, stopping and restarting the server so I thought that I would some up answer to all these question at a single place for my own future reference and for the help of my readers.

So first things first I will start with how to install apache here apt-get comes to your rescue and thanks to Ubuntu archives all you need to give simple on liner as shown below

sudo apt-get install apache2

So now that we are done with installation lets move on other things like for troubleshooting you need to know where are apache logs, apache logs can be found at below mentioned path here you can find access logs as well as error logs

/var/log/apache2/

we also need to know where are configuration related files to our web server for that we need to look at path mentioned below here you will find apache2.conf, httpd.conf, ports.conf and other configuration related files how to modify and update them is beyond the scope of this nifty article

/etc/apache2/

Moving on to next FAQ this one is my favourite now that I have setup apache how do I go about hosting my site thats the whole purpose for you following along this article, all you need to do is follow the sequence mentioned below

Create a file mysite or what ever name you want to give and add configuration related to your site in this file

gedit /etc/apache2/sites-available/mysite
cd /etc/apache2/sites-available
sudo a2ensite mysite

you are done with setting up your site.

Last of these faq’s is how do I start and stop the server for doing this all you need to know about is apache2ctl utility and you can start stop using it pretty easily

apache2ctl start
apache2ctl stop
apache2ctl restart

We are done with the faq’s which were in mind and I will keep on updating this list in future as and when things come to my mind. In next article I would covering how to use apache to host Subversion repositories along with domain authentication so stay tuned.

/etc/apache2/conf.d/






22 Sep 09

Nice tutorial to get you started with your OpenSocial applications entirely in eclipse.

Installation details and tutorials can be found here. Enjoy OpenSocial development.







16 Sep 09

I was struggling due to this problem for two days now and got the solution just now so thought I will share it
with you all; as I don’t want anyone else to land up in trouble as i did so I am using Hardy and was trying to build subvertpy from source as the package was not available for same.

The problem occurs due to absence of Python development headers as many python modules have dependency on  Python development headers to compile.

Solution is to install development headers using package manager; open the terminal and issue the following commands

sudo apt-cache search python

and select the package that matches your installation as in my case it is python2.5-dev; issue the following command to install it

sudo apt-get install python2.5-dev

This will install development headers in /usr/include/python2.5 and now you can build your python module successfully.







7 Sep 09

Just wanted to let you know about an exciting event siliconindia is organizing on September 12 (Saturday in Mumbai). It’s by far the largest and most exciting event of its kind in Mumbai.

It is your chance to know the building of companies like Rediff.com, Syntel, Netmagic, Sulekha, Microworld and many more as their founders come and share their journey with us:
Venki Nishtala, Founder & CEO, Rediff.com
Keshav R. Murugesh, CEO, Syntel
Sharad Sanghi, Founder & CEO, Netmagic
Govind Rammurthy, Founder, CEO & MD, MicroWorld Technologies
Satya Prabhakar, Founder & CEO, Sulekha.com

There will be 30 most promising technology startups showcasing their products. You can meet these entrepreneurs and also over 30 investors.

To attend this event, register FREE at http://www.siliconindia.com/startupcity_mumbai/index.php

Watch live product demonstrations
Get a peek into cutting edge technologies
Lay hands on the best-of-breed solutions
Meet young, energetic, passionate geeks
Experience the culture of innovation in small companies
Visionary Keynotes
In-depth Panel Discussions

TIME: 8.45 AM to 5 PM
WHEN: Saturday, September 12, 2009
WHERE: Hotel RanSgarda, Bandra, Mumbai







4 Sep 09

Eclipse latest version is Galileo and its not available from ubuntu archive I just finished installing it on my machine i thought I will share instructions with my readers.
So here we have a step by step instruction to install Eclipse Galileo (3.5) on Ubuntu mine is Hardy

Lets start with creating a directory where we want to install

mkdir /bin/ide

cd  /bin/ide

you can manually download the installable from one of the available mirrors or you can use wget for same I prefer using wget

wget http://d2u376ub0heus3.cloudfront.net/galileo/eclipse-java-galileo-linux-gtk.tar.gz

than we need to unzip the contents of the zip file and we are almost done

tar xzvf eclipse-java-galileo-linux-gtk .tar.gz

You can set the eclipse executable to your path

PATH=$PATH:/bin/ide/eclipse

This is not the best way to do it but still does the job alternatively you can create a simple shell file and keep it in bin directory whcih just calls eclipse and you are good to go.







25 Jun 09

Few months back I wrote this module for some product which I was working that didn’t work out so I thought I will make it available to people to use.

This is very simple PHP API for fetching stock quotes from yahoo finance. I hope people find it useful. How to use it is mentioned in the PHP file itself. In case you have some queries regarding same ; do let me know.

You can download the PHP file from this link ystock

Any feedbacks are welcome.