Open source world conference 2008
Today started the Open Source World Conference in Málaga. Around 9.000 participants willing to take part during three days in many interesting conferences, workshops, discussions and so on. The event is held in Palacio de Ferias y Congresos, an amazing building full of facilities for this kind of events.
Taking a look to the programme you can get an idea of how many people from different sectors are involved in this event. It's just pity that many meetings will be at the same time.
This morning I've chosen Apache Workshop by Santiago Gala and Thorsten Scherler from the Apache Software Foundation. They were explaining the bases behind the ASF, how they organize the projects, the hierarchy they use, and the concept of the meritocracy.
It's nice the way they work, if you're a commiter and you want to make some special change in the project, you make a proposal that everyone will vote. You just need 3 positive votes and none negative point to be allowed to do it. In the case someone puts a negative vote he needs to make good explanation to convince everyone why he did it.
This kind of workflow allows people that actually do things, to following doing stuff instead of stopping them. If someone run faster than you, just take out from his way and let him to go.
They also exposed a little the Apache License 2.0 which I didn't know so much and now I think it's quite nice for some kind of projects. For standards related for example, this license allows companies to modify the source code by themselves without need to redistribute it. I agree more with this kind of philosophy focused in the community and in the process to develop a successful project instead of focusing everything in the code itself (that could be more the GNU way).
About that way to think and the philosophy behind their way to accept new project proposals you should read the article Worse is better (Richard P.Gabriel). It exposes some nice thoughts that can be used while creating software communities around a nice, but still far from perfect, idea.
After a small break it started the official presentation of the OSWC. Firstly there were some political words as usually followed by the awaited presentation from Tim O'Reilly about web2.0.
It was the first time I was in a presentation from Tim, and I really like his point of view about the whole open/proprieatry software situation and the misunderstanding of the concept of freedom when we speak about software (to use, to copy, to ask for changes, to modify...).
The speech also focused in the obsession of people with the fight between windows and linux when the monopoly actually is coming from a other source. It's not coming from your computer OS but through the internet, like for example google, flickr, amazon, etc. Almost all of them were born using opensource software, but they're proprietary software as well as the criticized Microsoft.
After that just time for lunch and relax while watching the stands from the sponsors. No so much activity there, just in the O'Reilly stand it was nice to see 35% of discount for their nice books. There I got a present: Beautiful code (Thank you!). I was reading nice reviews about this book, so I hope I'll find it interesting, I'll let you know :)
That's all for today let's see how will go the rest days.
RSS bugfixed!
How to set up a Subversion server on Ubuntu
When you start to learn how to code, it doesn't matter which language, you can see how everywhere they put special attention on things like document and put commentaries on the code, create a planning for the project you want to do, follow some kind of notation, create backups regularly and so on.
But usually there's something missing: maintenance of code version.
Many people still think that use a version control system is just required when you work in a group but they're absolutely wrong as you can get really nice advantages even if you use just for yourself.
Some examples of the situations where we'll see clear the advantages can be:
- I've been using two computers for developing some applications. Even if I tried to keep the consistencies between both versions I always ended up with many different versions spread in many folders. So first advantage of control version is obvious, you will get one central copy of whole code and it will be all the time in the same place.. All the others local copies will be synchronized with this remote copy.
- You touch something and the program start to fail:
ok... no problem, I'll delete the lines that I've changed (Compile and execute again... crash!) ouch!... maybe I forgot something, let's take a look again (...after a while...) ok.. I've found it... let's execute again (Crash!) life sucks :(
This is very common situation that will be remove with control version. You just revert the current copy in your harddrive to the previous version stored in the remote server and you're done. Or if you prefer you can compare both files (the one you've change and the original one) so you can check where you did something wrong. - When you develop an application and you think the current version is stable enough, usually you just create new folder and copy everything there, calling it folder Project v2 stable. Then you go changing something and maybe you find a bug that you should apply to all the stored versions... not very funny eh?. With a control version you can create tag for each stable release version and then play with them as you want. You can for example merge two releases into one and using some files from a third release. You can compare the differences from one version to another to check why the new version doesn't work on some clients while the previous one does.
- Sometimes you want to try something new in your project but you're not sure if it will works or not, so you start to make a big change in the whole system, and after all it doesn't work, or what is more hard... something works but something not. With cvs you can create an alternative development branches. In this branches you can create new code as much as you want and if you realized that it doesn't go anywhere, just cut it. But if it's working you can merge it with the main development branch (aka trunk).
- Backup! Enough descriptive by itself, but not just normal backup such as copy the current folder to somewhere, but also copy all the changes in all the revisions of the code.
I think just with these few examples you would like to start using a version control system. My advise is to use subversion (aka svn) there're huge explanation on the web about why to use it instead of CVS or whatever, so I'll not go into this.
The first thing we need to start using svn is to install a svn server. There're different ways to install it, one very simple is to download the subversion binaries and execute them and keep them running while using the repository. Its works good for local access and it's very easy and fast to get it working.
But as there're many tutorials on internet about this method, I'll explain another one more recommended for usability and security, but maybe harder to setup without help.
First of all I assume you're already installed an Apache2 server running up. So we just install the required packages for subversion:
$ apt-get install subversion $ apt-get install libapache2-svn
Next step is to tell Apache to use WebDAV for authentication using the mod_auth module:
$ a2enmod dav $ a2enmod dav_svn
Now we define one configuration file to include in the available sites of apache (In our case svn.conf):
DAV svn SVNParentPath /srv/svn/repositories AuthType Basic AuthName "Welcome to XYZ repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user
With this file we're saying to the server that we want to use a password file for the users (/etc/apache2/dav_svn.passwd), we need a valid user to access to the repository, and the repositories will be stored in /srv/svn/repositories.
Once that we've configured Apache2 to use svn we can start creating repositories in our server with the following command:
svnadmin create /srv/svn/repositories/NAME_REPOS
I strongly recommend creating the standard structure of main trunk, branches and tags folders right after the creation of the repository:
$ svn mkdir file:///srv/svn/repositories/NAME_REPOS/trunk \ file:///srv/svn/repositories/NAME_REPOS/branches \ file:///srv/svn/repositories/NAME_REPOS/tags \ -m "Inicial repository"And finally we should ensure that the Apache user will has access to these folders:
$ chown -R www-data:www-data /srv/svn/repositories/NAME_REPOS $ chmod -R g+ws /srv/svn/repositories/NAME_REPOS
Now we just need a user to access this repository so we'll add to the AuthUserFile that we've defined in the apache config file:
htpasswd -b /etc/apache2/dav_svn.passwd USER_NAME PASSWORD
And you're done, restart your Apache server to be sure it has applied all the changes we've made and try using any subversion client (I strongly recommend tortoisesvn) if its works typing: http://your_hostname/svn/NAME_REPOS and you'll get a login screen asking for username and password, enter it and enjoy.
You can download the scripts that I use to create and remove repositories and user. In next article I'll try to explain how to secure your connections using SSL.