Subversion Server on Mac OS X Leopard Server

Filed under Apple on Sunday, 7 March, 2010 12:13 pm

Subversion and Mac OS X Server image

Nayan Hajratwala over at Agile Shrugged managed to write a really great article describing how he got Subversion repos running on Mac OS X Server. Cheers Nayan!

I got mine working on Mac OS X 10.5.8 but had to make a few different changes in order to get things working. His doesn't deal with multiple SVN repositories, only with a single one. This isn't ideal and I highly doubt anyone would go to the trouble of installing a SVN server and only ever need ONE svn repository.

I prefer using /opt/repos/svn as the master path as the Open.collab.net developers recommend doing it this way on Mac OS X.

Step 1 - Create a root SVN folder

Open Terminal.app:

sudo mkdir -p /opt/repos/svn

Step 2 - Create your SVN repository

sudo svnadmin create /opt/repos/svn/test
sudo chown -R www:www /opt/repos/svn

The second line makes Apache own this path and everything inside it including your new repo.

Step 3 – Configure the Apache web server via Server Admin

Server Admin is located in /Applications/Server/Server Admin.

1. Click Web in the Sidebar
2. Click Settings in the top bar
3. Select the Modules tab
4. Check the following modules:

authz_svn_module
dav_module
dav_fs_module
dav_svn_module

Step 4 – Enable WebDAV on your site

Reading comments, it seems that some people don't think you need this step. However for my configuration I'm pretty sure you do need to do this.

1. Click Sites in the top bar
2. Select your site
3. Click the WebDAV checkbox

Step 5 - Create a Realm

This will set up the OpenDirectory based security. We will be using Basic authentication only.

1. Select the Realms tab
2. Click “+” under the Realms box and enter the following:

    Realm Name: svn_realm
    Authentication: Basic
    Location: /svn (Note: You have to change the dropdown to 'Location', not 'Folder').

3. Click “+” under the Users & Groups box, and drag/drop the users/groups that you want to give access to. Also be sure to give them read/write privileges...then press the Save button.

Step 6 – Tweak the Apache config file

There is no graphical UI to do this. So you need to use Terminal.app.
Edit the file under /etc/apache2/sites that corresponds to your site.
This should be a file starting with 000x.
In the <location "/svn"> section, add the following three lines:

DAV svn
SVNParentPath /opt/repos/svn
SVNListParentPath On

This is what mine looks like:

Step 7 – Restart the web server

You can do this from Server Admin ('Stop Web', then 'Start Web').

You should be able to access your repository at http://myserver/svn or locally at: http://localhost/svn

Be careful not to change any other settings in the Web portion of Server admin.
If you do it will change DAV svn to DAV Off again.

Free free to leave any comments and suggestions :)

Compile ODE 0.11.0 on Mac OS X 10.6

Filed under Apple on Wednesday, 30 December, 2009 10:54 am

The Official ODE instructions for compiling on Mac OS (even Linux) are pretty useless. Their wiki and instruction files included with the source code contains 'generic' instrcutions that list at what worked years ago. It frustrates me that their entire project becauses useless on one platform because it takes an inner knowledge of ODE's development process in order to get the damn thing to build.

Macports doesn't install ODE correctly either. Macports installs a PPC binary on your system (even if you have an Intel Mac). So here is the correct way to compile ODE on a Mac.

Download the ODE Source Code from Sourceforge.

Extract the source to a directory of your choosing (I use: /lib/ode-0.11.1)

Open a Terminal:

cd build
premake4 gmake --platform=universal32
cd gmake
make

At this point you need to add in some flags to the makefile in order to get this to build on Intel correctly. So open ode.make and change the following 2 lines:

cd ode-0.11.1/build/gmake
vim ode.make

You need to add -m32 to the CXXFLAGS, which you can do by adding it to the CPPFLAGS (which uses CXXFLAGS. Find the line starting with CPPFLAGS and change it to this:

CPPFLAGS  += -MMD -m32 $(DEFINES) $(INCLUDES)

You also need to add -m32 to LDFLAGS:

LDFLAGS   += -m32 -dynamiclib -flat_namespace -framework Carbon

Save and quit.

Build Release Libraries:

make config=releasesingledll

Build Debug Libraries:

make config=debugsingledll

This will build the libraries to here:

ode-0.11.1/lib/ReleaseSingleDLL/libode_single.dylib
ode-0.11.1/lib/DebugSingleDLL/libode_singled.dylib

So there you go. Enjoy using ODE!

Compiling PAL with Bullet Physics 2.75 (Linux)

Filed under Apple on Tuesday, 22 December, 2009 12:52 am

bullet_logo-210-86

Install Bullet (Download Link):

cd bullet-2.75/
cmake . -G "Unix Makefiles" -DBUILD_EXTRAS=on -DBUILD_DEMOS=on -DCMAKE_BUILD_TYPE=Debug
make

Pretty simple. The demos will be built to bullet-2.75/demos/ and the Bullet libs are built to bullet-2.75/src/

Compiling PAL with Bullet Physics 2.75 (Mac OS X)

Filed under Apple on Monday, 21 December, 2009 11:47 pm

pal_logo_web

1. Install Bullet (Download link):

You need to do a little bit of hackery on Mac OS X in order to get Bullet to build properly. (I'm running Snow Leopard 10.6). I have installed Bullet into /lib/bullet-2.75/

First, you need to get the CMakeLists.txt file here:

nano bullet-2.75/src/CMakeLists.txt

I originally got an error "ld: library not found for -lBulletMultiThreaded".
The solution (I found here) is to comment out the following lines using a pound symbol # like so:

#if (CMAKE_SIZEOF_VOID_P MATCHES "8")
#SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
#else (CMAKE_SIZEOF_VOID_P MATCHES "8")
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
#endif (CMAKE_SIZEOF_VOID_P MATCHES "8")

Download and Install CMake.

You can now run CMake on the /lib/bullet-2.75 directory. CMake, configure, generate. CMake will generate an Xcode Project for you to run:

/lib/bullet-2.75/BULLET_PHYSICS.xcodeproj

Build the release and debug libraries and demos using AppAllBulletDemos, Debug/Release, i386, ALL_BUILD

Xcode builds the libraries here:

/lib/bullet-2.75/src

The Bullet Demo applications get built to here:

/lib/bullet-2.75/Demos

So you should have something like:

/lib/bullet-2.75/src/BulletCollision/Debug/libBulletCollision.a
/lib/bullet-2.75/Demos/AllBulletDemos/Debug/AppAllBulletDemos // <--Run this in the terminal

Now that Bullet is compiled, we can install and run PAL.

2. ODE (Open Dynamics Engine):

It no longer runs on Snow Leopard due to the DrawStuff API being removed in Snow Leopard.
UPDATE
: I figure out how to compile ODE on OS X 10.6.

3. Install PAL:

PAL Configuration

When you run CMake on the PAL directory, you will find that it won't detect most of the Bullet library paths by itself. This requires some manual entries by yourself in order to get this to work. I will list my paths below, but note that I installed Bullet in a couple of places so these paths may not be right for you. Use this as a guideline only.

BULLET_LIBRARY_BulletDynamics_Debug
/lib/bullet-2.75/src/BulletDynamics/Debug/libBulletDynamics.a

One thing to note is that you will see BULLET_LIBRARY_BulletMath-NOTFOUND and BULLET_LIBRARY_BulletMath_DEBUG-NOTFOUND. I'm not sure why this happens but it didn't cause a problem for me, you can just ignore this.

Once you have setup all your paths, you can press Configure > Choose Xcode > then press Generate.
This will Generate the Xcode project file for you in /lib/PAL/PAL.xcodeproj

Screen shot 2009-12-22 at 1.14.16 AM

If you run the Xcode project, you can then build the libraries for PALBeginner binary I belive is Windows only as I get an error when I run it. Also, when you build you will need to change the build architecture to i386 as it doesn't seem that 64Bit is supported yet.

Next Page »