GNR on Debian Lenny: Difference between revisions

(first steps)
 
(next step, download, dependencies, compilation)
Line 5: Line 5:
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.  


First, create a zimbra user, and ensure that your user account (here "benjamin") can write to /opt/zimbra and /opt/public-src
 
== 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
<pre>
<pre>
  sudo adduser zimbra
  $ sudo adduser zimbra
  sudo mkdir -p  /opt/zimbra /opt/public-src
  $ sudo mkdir -p  /opt/zimbra /opt/public-src
  sudo chown -R benjamin.benjamin /opt/zimbra /opt/public-src
  $ sudo chown -R benjamin.benjamin /opt/zimbra /opt/public-src
</pre>
</pre>


Line 16: Line 19:
Add p4 binary to your path, example :  
Add p4 binary to your path, example :  
<pre>
<pre>
  sudo cp p4 /usr/local/bin/
  $ sudo cp p4 /usr/local/bin/
  sudo chmod a+x /usr/local/bin/p4
  $ sudo chmod a+x /usr/local/bin/p4
</pre>
</pre>


<pre>
<pre>
  export P4PORT=codes.zimbra.com:2666
  $ export P4PORT=codes.zimbra.com:2666
  p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-605/...
  $ p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-605/...
</pre>
</pre>
(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)
(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.
<pre>
$ 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
</pre>
'''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 :
<pre>
$ 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 *
</pre>
== 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.
<pre>
$ export JAVA_HOME=/usr/lib/jvm/java-6-sun
$ cd /opt/public-src/main/GNR-605/ZimbraBuild
$ ./buildZCS.sh -t
</pre>
This may take between 15 and 120 minutes depending on your machine computing power and disk I/O ...
== Next section ==
will follow soon ...

Revision as of 14:00, 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.


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

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