HowTo:Building iFolder Enterprise Server on Dapper

From iFolder

These are my ongoing notes as I install the server on Ubuntu 6.06 (Dapper Drake). I am not covering Breezy because mod_mono for Apache 2 was too old and I didn't feel like going through that mess just yet. I am just starting these so they will be incomplete, please fill in if you have more information.

Table of contents

Assumptions

  • You have Apache 2 already installed and are familiar with it
  • You have a Mono build chain on the machine to build the software

Getting Ready for iFolder

First let's get mod_mono working on Apache2.

sudo apt-get install libapache2-mod-mono

This will install the proper Mono modules and restart your Apache 2 server for you. No other configuration should be necessary.

Install dependencies to build it

I had to install the following build dependencies in addition to the Mono stuff I already had installed. (Note: Find out all the real build-deps). Make sure mono-devel is installed also.

sudo apt-get install liblog4net-cil uuid-dev libxml2 libxml2-dev \
automake1.9 libncurses5-dev libcommoncpp2-1.3c2a libstdc++5 libtool \
pkg-config make g++

On Dapper 6.06LTS, when i installed mono its didn't pull in the c# dependencies So i had to run

sudo apt-get install mono-mcs

Note: I needed automake1.9 to get it to build. Also libstdc++5 needed for building ifolder-server

Build Flaim

Update 2006.11.09: flaim is now part of the universe repositories in Ubuntu Dapper. So to get flaim, just type in console :

sudo apt-get update
sudo apt-get install libflaim4 libflaim-dev

Note : you may have to fix the file /usr/lib/pkgconfig/libflaim.pc if this bug (https://launchpad.net/distros/ubuntu/+source/libflaim/+bug/66944) isn't solved already. Update the line that reads :

name: libflaim

to (mind the capital letter):

Name: libflaim


Old method follows:

First, get libflaim

wget -r -nH -nd -np --accept=libflaim-4*.tar.gz http://forgeftp.novell.com/ifolder/server/3.5/current/src/

Untar it, and build it:

tar zxf libflaim-4*.tar.gz
cd libflaim-4*
make OSTYPE=Linux HOSTTYPE=i386 all
sudo make OSTYPE=Linux HOSTTYPE=i386 install

Alternatively, if you do not want to build libflaim, add the following to /etc/apt/sources.list

deb http://trunks.whiprush.org/~jorge/ifolder dapper main

Then:

sudo apt-get update
sudo apt-get install libflaim4 libflaim-dev

Then modify /usr/lib/pkgconfig/libflaim.pc to the following:

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=x11
Name: libflaim
Description: An extensible, flexible, adaptable, embeddable database engine
Version: 4.8.0
Libs: -lpthread -lncurses -lrt -lstdc++ -ldl -lflaim -L${libdir}

Build ifolder-server

wget -r -nH -nd -np --accept=ifolder3-server*.tar.gz http://forgeftp.novell.com/ifolder/server/3.5/current/src/ 

--Prometheon123 22:27, 26 Apr 2006 (EDT)

Untar it, and build it:

tar zxf ifolder3-server*.tar.gz  

--Prometheon123 22:27, 26 Apr 2006 (EDT)

cd ifolder3-server-*
./autogen.sh --prefix=/usr --with-simiasdatadir=/var/lib/simias --sysconfdir=/etc  --with-runasserver
make

[Dapper pre-release as of 4.10.2006 (Dapper release 6.06 LTS as of 06/15/06 also requires this edit)] If you receive namespace errors for 'Stat' during the make, change line 105 in configure.in to read:

CSCFLAGS='/d:MONO /d:MONONATIVE /warn:4 /d:TRACE'

...and comment out lines 112-115. Re-run the autogen.sh line from above, then try the make and make install.

Alternatively, make the following changes Diff against simias CVS 12 Apr 2006 22:23:20:


Index: src/Simias.Web/SharedCollection.cs
===================================================================
RCS file: /cvsroot/ifolder/simias/src/Simias.Web/SharedCollection.cs,v
retrieving revision 1.68
diff -u -r1.68 SharedCollection.cs
--- src/Simias.Web/SharedCollection.cs  1 Dec 2005 15:06:20 -0000       1.68
+++ src/Simias.Web/SharedCollection.cs  12 Apr 2006 22:23:20 -0000
@@ -682,7 +682,7 @@
                                                        // verify it's a device on this box
                                                        if(mntLine.StartsWith("/dev"))
                                                        {
-                                                               Stat stat;
+                                                               Mono.Posix.Stat stat;
                                                                string[] entries;

                                                                entries = mntLine.Split(' ');
Index: src/Sync/FileMonitor.cs
===================================================================
RCS file: /cvsroot/ifolder/simias/src/Sync/FileMonitor.cs,v
retrieving revision 1.53
diff -u -r1.53 FileMonitor.cs
--- src/Sync/FileMonitor.cs     27 Oct 2005 17:25:21 -0000      1.53
+++ src/Sync/FileMonitor.cs     12 Apr 2006 22:23:20 -0000
@@ -232,10 +232,10 @@
                        if (MyEnvironment.Unix)
                        {
                                // Get the posix access flags for owner.
-                               Mono.Unix.Stat sStat;
-                               if (Mono.Unix.Syscall.stat(path, out sStat) == 0)
+                               Mono.Unix.Native.Stat sStat;
+                               if (Mono.Unix.Native.Syscall.stat(path, out sStat) == 0)
                                {
-                                       if ((sStat.st_mode & Mono.Unix.FilePermissions.S_IXUSR) != 0)
+                                       if ((sStat.st_mode & Mono.Unix.Native.FilePermissions.S_IXUSR) != 0)
                                        {
                                                return true;
                                        }
Index: src/Sync/SyncFile.cs
===================================================================
RCS file: /cvsroot/ifolder/simias/src/Sync/SyncFile.cs,v
retrieving revision 1.56
diff -u -r1.56 SyncFile.cs
--- src/Sync/SyncFile.cs        25 Oct 2005 13:45:50 -0000      1.56
+++ src/Sync/SyncFile.cs        12 Apr 2006 22:23:20 -0000
@@ -384,12 +384,12 @@
                                        if (node.Properties.GetSingleProperty(SyncFile.ModeProperty) != null)
                                        {
                                                // Get the posix mode flags for the file.
-                                               Mono.Unix.Stat sStat;
-                                               if (Mono.Unix.Syscall.stat(createName, out sStat) == 0)
+                                               Mono.Unix.Native.Stat sStat;
+                                               if (Mono.Unix.Native.Syscall.stat(createName, out sStat) == 0)
                                                {
                                                        // Now or in the execute bit and set it on the file.
-                                                       Mono.Unix.FilePermissions fp = sStat.st_mode | Mono.Unix.FilePermissions.S_IXUSR;
-                                                       Mono.Unix.Syscall.chmod(createName, fp);
+                                                       Mono.Unix.Native.FilePermissions fp = sStat.st_mode | Mono.Unix.Native.FilePermissions.S_IXUSR;
+                                                       Mono.Unix.Native.Syscall.chmod(createName, fp);
                                                }
                                        }
                                }

I also had to build simias-server-setup (needed during configuration) as follows:

cd src/server/setup/
make
sudo make install
cd ../../..

--Oli 22:39, 23 Aug 2006 (EDT)


Then, either:

sudo make install

Or, alternatively, if you want to install ifolder3-server as a .deb package

sudo apt-get install checkinstall
sudo checkinstall --exclude=/usr/share/automake-1.9

(about the --exclude param : if you don't specify it, the file /usr/share/automake-1.9/INSTALL is packaged within the .deb and will conflict with automake-1.9 package) --Msi 9 Nov 2006

A .deb package will be created in the current directory. If simias, libsimas0 or libsimias-dev are installed from the above repository, a dpkg --force-overwrite will be required to install the created .deb package.


See: Configuring iFolder Enterprise Server on Ubuntu Dapper for configuration howto.