GNR on Debian Lenny: Difference between revisions

(→‎Install dependencies: adding libperl-dev)
(adding size instructions)
Line 3: Line 3:
Latest version: '''March 2010'''  
Latest version: '''March 2010'''  


a very simple vserver with minimal packages has been used to build it.  
A very simple vserver with minimal packages has been used to build it.
The source size is almost 500MB, and once compiled, the /opt/public-src folder will be at least 4GB large. More, you will need some MB in /tmp to be able to create the Debian packages.  





Revision as of 14:52, 26 February 2010

This document explains some tricks & tips on how to build ZCS on Debian Lenny (x86 or x86_64).

Latest version: March 2010

A very simple vserver with minimal packages has been used to build it. The source size is almost 500MB, and once compiled, the /opt/public-src folder will be at least 4GB large. More, you will need some MB in /tmp to be able to create the Debian packages.


Get the source

First, create a zimbra user, and ensure that your user account (here "Benjamin") can write to /opt/zimbra and /opt/public-src

 $ sudo adduser zimbra
 $ sudo mkdir -p  /opt/zimbra /opt/public-src
 $ sudo chown -R benjamin.benjamin /opt/zimbra /opt/public-src

Download the Perforce P4 command line client from here : http://www.perforce.com/perforce/downloads/platform.html use your platform (typically linux 32bits or linux 64bits)

Add p4 binary to your path, example :

 $ sudo cp p4 /usr/local/bin/
 $ sudo chmod a+x /usr/local/bin/p4
 $ export P4PORT=codes.zimbra.com:2666
 $ p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-605/...

(yes, the ... must be included in the command line, use this command as written. You may replace 605 by 606 or 607 if a new version of ZCS 6.x has been published)


Install dependencies

You have to install Java Sun 5 and 6 (don't really know which one is used, seems like both of them ...) You will also need some libraries and development packages as follow. LSB will install build-essential and other basic development libraries.

 $ sudo aptitude install lsb ant sun-java6-jdk sun-java6-jre sun-java5-jdk sun-java5-jre 
 $ sudo aptitude install autoconf locales libtool bison flex libncurses5-dev libpcre3-dev libexpat1-dev libpopt-dev libwww-perl libperl-dev

Notes:

libwww-perl presence is not checked by zcs compiler, but is required by curl.

libperl-dev presence is not checked by zcs compiler, but is required by openldap.

Create a tarball of Java

Now you need to create a tarball (.tgz file) of java installation, under debian, proceed as follow :

 $ cd /usr/lib/jvm/java-6-sun
 $ mkdir -p /opt/public-src/main/GNR-605/ThirdPartyBuilds/x86_64/java
 $ tar -czvf /opt/public-src/main/GNR-605/ThirdPartyBuilds/x86_64/java/jdk1.6.0_16.tgz *

Compile ZCS

Now you can launch the ZCS builder. The first time you launch it, you should add -t option (warning, this will erase all /opt/zimbra directory) to compile third party libraries and programs.

 $ export JAVA_HOME=/usr/lib/jvm/java-6-sun
 $ cd /opt/public-src/main/GNR-605/ZimbraBuild
 $ ./buildZCS.sh -t

This may take between 15 and 120 minutes depending on your machine computing power and disk I/O ...

Next section

will follow soon ...

Jump to: navigation, search