A code for code

Continuous Integration and XCode

May 28, 2009 · 1 Comment

I have been involved with iPhone development now at work and have the responsibility to set up a continuous integration environment for this purpose.  Our main CI engine of choice within our company is Hudson.  

Typically, this does not play well with XCode, but I have found a script which will allow me to convert the OCUnit test results into JUnit format which Hudson will understand.  Yay.

→ 1 CommentCategories: Uncategorized
Tagged: , , ,

Something New

January 17, 2009 · 1 Comment

Well, here we are again.  A new year and a new start to blogging.  I have done so much since my last post that I know now that I should keep this more up to date.

I haven’t, however, updated my subversion installation, which I really need to do.  I should get it up to the latest version and keep it there.  But it is working well at the moment, so I’m not going to touch it while it is still working fine.

I am looking at automated deployment and testing to try to add that to our works Agile methodolodies.  I am currently looking at CruiseControl.net, which seems to do a lot of things quite well.  I have it installed on my laptop and up and running with some preliminary stuff.  It should be fine once I get to know it a bit better, but I will then be able to tell if it is able to do all the things I want it to do.

I need to rewrite the Martial Arts site that I run, but I can’t seem to get my head around that at the moment.  Maybe it is something to do with not training for the past year.  This has all been down to injury and illness.  I am currently feeling very well so it all looks good to start again.  I am returning today, infact.  I will also be looking to start Brazilian Ju-Jitsu at a club in London.  I am quite looking forward to that.

→ 1 CommentCategories: general

Subversion on OSX

July 3, 2008 · 2 Comments

So I have finally got around to re-installing Subversion so that I can now use it for my development work.  I like Subversion.  I use it at work, where no-one else seems to like it, but I do.  I should start using it at home now so that I can monitor all of the changes that I am making.

I have many projects, ideas and tasks that I work on simultaneously.  I hope that it will help me to maintain some kind of control on what I am doing.

I currently run OSX Leopard 10.5.4, which does come with Apache 2 installed, however, I like to have the most recent version of things installed where possible.  I also like things to be nice and neat, and I would rather not recompile the code if I can get away with it.

I have started using XAMPP as my main web development platform.  At the time of writing this, XAMPP 0.7.2 came supplied with

  • Apache 2.2.8
  • MySQL 5.0.51
  • PHP 4.4.8
  • PHP 5.2.5
  • Perl 5.10.0
  • ProFTPD 1.3.0a
  • phpMyAdmin 2.11.4
  • OpenSSL 0.9.8e
  • GD 2.0.35
  • Freetype 2.3.5
  • libjpeg 6b
  • libpng 1.2.18
  • libungif-4.1.4
  • zlib 1.2.3
  • expat 2.0.1
  • Ming 0.3
  • Webalizer 2.01-10
  • pdf class 009e
  • mod_perl 2.0.3
  • SQLite 3.4.0
  • phpSQLiteAdmin 0.2
  • libiconv-1.11
  • gdbm-1.8.3
  • libxml-2.6.29
  • libxslt-1.1.21
  • openldap-2.3.36
  • imap-2004g
  • gettext-0.16.1
  • libmcrypt-2.5.8
  • mhash-0.9.9
  • curl-7.16.4
  • zziplib-0.10.82
  • bzip2-1.0.3
  • freetds-0.64

Phew, what a list.

Installing Apache

I downloaded it from this link.  I also installed the Developer Package.  To install the main XAMPP double click on the downloaded file xampp-macosx-0.7.2.dmg and then launch “XAMPP for MacOS X.pkg”.  Follow the instructions and voila you have the enourmous list of items installed.  They are installed to the folder /Applications/xampp.  This means that when you are finished with it you can drop it in the bin to uninstall it.  To install the Developer Package I launched the terminal and changed directory to my download folder then expanded the file with tar xvfpz xampp-macosx-0.7.2-dev.tar.gz -C /Applications.

This gave me my basic development platform now.  I launched it and tested this.  Running the XAMPP Control Panel (/Applications/xampp/XAMPP Control Panel.app) I was able to start all of the processes and then opening a browser and visiting http://localhost/ I could see that everything was working as I expected.

At this point, they advise you to secure your installation by setting the passwords and stuff.  You can follow this information on the apachefriends site.

Installing Subversion

This installation does not come with Subversion installed.  I downloaded this from openCollabNet to download the Universal Binary installation for Subversion 1.50.  This includes the binaries for Apache 2.2.  Running the disk image Subversion 1.5.0 Universal.dmg and launching the contained Subversion-1.5.0.pkg.  This installs everything to the default location in /opt/subversion, backing up any version which was originally there.  This also links various executable files to /usr/local/bin folder.  Typing ‘svn --version‘ from the terminal will confirm that this is installed correctly.

Configure Subversion

The next step is to create the basic repository.  My repository is to be located at /Volumes/Data/Repository. Launch the terminal and type the following:

sudo su
svnadmin create /Volumes/Data/Repository
chown -R nobody:wheel /Volumes/Data/Repository
cd /tmp
svn co file:///Volumes/Data/Repository/
cd Repository
svn mkdir trunk branches tags
svn commit -m "initial import"
exit

This will create a basic Subversion structure for all of your future projects

Configuring Apache

As we are going to use Apache to run Subversion server we now need to configure Apache.  This requires the configuring of the Subversion modules within Apache.  These modules are mod_authz_svn.so and mod_dav_svn.so.  Apache would usually expect to find these within its modules directory.  This is currently located at /Applications/xampp/xamppfiles/modules.  The installation of Subversion puts these files at /opt/subversion/lib/svn-apache.  We can copy (or move) these files to the right location, but I would rather create a link.

sudo su
cd /Applications/xampp/xamppfiles/modules
ln -s /opt/subversion/lib/svn-apache/mod_authz_svn.so mod_authz_svn.so
ln -s /opt/subversion/lib/svn-apache/mod_dav_svn.so mod_dav_svn.so
exit

Next we add the libraries to Apache. Edit the httpd.conf and add the following lines to type LoadModules section of the file:

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

Also, I uncommented the following lines from the end of the file

Include /Applications/xampp/etc/extra/httpd-vhosts.conf
Include /Applications/xampp/etc/extra/httpd-dav.conf

This will allow us to store the DAV and Virtual Hosts settings in separate files. These files will be in the ‘extra’ subdirectory.

Add the following to your httpd-vhosts.conf file


<VirtualHost *:80>
	ServerName svn.xetius.local

	<Location />
		DAV svn
		SVNPath /Volumes/Data/Repository
	</Location>
</VirtualHost>

All that remains now is to add this entry to your hosts file (svn.xetius.local for me) and restart the apache server.  Now, if I go to http://svn.xetius.local/ I will see my repository.

Setting Security

If you need to add security to your Subversion configuration you will need to set an authorisation file.  To do this, go to the terminal and do the following:

sudo htpasswd -c /Applications/xampp/etc/svn-auth-file chris
Enter Password
Confirm Password

Now add the following lines to the Location section we added earlier to the httpd-vhosts.conf file
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile "/Applications/xampp/etc/svn-auth-file"
Require valid-user

We should now have Subversion working on Apache. I hope this helps someone. I am going to try to get this working over a secure connection (SSL) next to make this a little more secure.

→ 2 CommentsCategories: Development · Environment · Uncategorized
Tagged: , , , ,

A little about me.

June 3, 2008 · Leave a Comment

I have been developing for a number of years now (too many to mention), using a number of languages on a number of platform.  In the end, it is all just numbers of numbers.

At the moment, it is all about the Perl.  I am still developing in Perl 5.6, but am looking to get my company upgraded to 5.10 ASAP.  I want the support of the community and the support of support.  5.6 is no longer widely supported, especially on the Windows server platform.  I need access to the latest libraries, and 5.6 is no longer getting these.

Ideally, I would love them to switch to a Unix or Linux environment rather than sticking with Windows, but I doubt that I could make enough of an argument for them with regards to this.  However, I believe I can make a big enough noise regarding the version of Perl that we are currently using… Watch this space.

On another side line, I am also taking a quick look at both Python and Ruby.  I know they do a lot of the same things, but I want to know for my own peace of mind if I am choosing the correct technology.

→ Leave a CommentCategories: general
Tagged: