GNR on Debian Lenny

Revision as of 20:44, 26 February 2010 by Cfremon (talk | contribs) (Adding article footer, categories, correcting date of most recent update)

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

Latest version: February 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 ...

End

As of now, I only managed to finish the compilation phase by :

cp -f /opt/public-src/main/GNR-605/ZimbraBuild/storebuild/opt/zimbra/jetty-6.1.22.z6/webapps/zimbra/downloads/* /opt/public-src/main/GNR-605/ZimbraBuild/amd64
cp: cannot evaluate `/opt/public-src/main/GNR-605/ZimbraBuild/storebuild/opt/zimbra/jetty-6.1.22.z6/webapps/zimbra/downloads/*': No such file or directory 
make: [zcs_stage] Error 1 (ignored)
*** BUILD COMPLETED ***

But the zcs_* folder contains a valid Zimbra install.sh and binaries...

have fun ;)


Verified Against: ZCS 6.0.5 Date Created: 02/26/2010
Article ID: https://wiki.zimbra.com/index.php?title=GNR_on_Debian_Lenny Date Modified: 2010-02-26



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search