Franklin README

From Zimbra :: Wiki

Jump to: navigation, search
   Article-alert.png  - This article is a Work in Progress, and may be unfinished or missing sections.


Contents

Perforce

Make sure that the p4 binary is in your path. You can download the Binary here for your platform. Knowledge of the Perforce development platform is strongly encouraged. You can find help documentation here

Settings

export P4EDITOR=vi
export P4PORT=codes.zimbra.com:2666

Getting the Source

Perforce uses relative paths to figure out what you want (unless specified). For example, the BUILD_HOME is /home/public/p4. That location (p4) is considered the root of the depot/public cache. To get the "FRANKLIN" aka 5.0.x sources, run:

p4 -u public -P public1234 -c public-view sync //depot/zcs/FRANKLIN/...

Syncing updates all of your local source files to match the files on the server. These files update regularly. If, for some reason, P4 is telling you the source is up to date, but you know it's not, then you can force a sync by running:

p4 -u public -P public1234 -c public-view sync -f //depot/zcs/FRANKLIN/...

Setting Up & Building Third Party

If this is a new platform, edit ZimbraBuild/rpmconf/Build/get_plat_tag.sh and add the appropriate function to add a new tag for your platform.

Edit the Makefiles in the ThirdParty/* directories as appropriate for build options for your new platform. If your platform already includes pcre, popt, and expat, make sure to add the appropriate lines so that building those pieces of software gets skipped.

If you have added a platform tag to get_plat_tag.sh, update the buildThirdParty.sh script appropriately for setting the Perl library paths.

Configuring and Installing Java (JDK)

JDK 1.5 Is required to install and build/compile Zimbra Collaboration Suite. Zimbra will build 1.6 for ZCS 5.0, but it must be compiled with JDK 1.5. You can download the latest version of JDK free from Sun here: http://java.sun.com/javase/downloads/index_jdk5.jsp

Once you have downloaded and extracted JDK, move the java installation to the correct location and make a symlink:

mv /path/to/extraction/(name) /usr/local/
ln -s /usr/local/(name)/  /usr/local/java

We use symlinks so that upgrades don't break it.

Now, add Java to your path by running:

export JAVA_HOME=/usr/local/java
export PATH=$PATH:$JAVA_HOME/bin

Configuring and Installing Apache Ant

Apache Ant is needed to build/compile Zimbra Collaboration Suite. You can download the latest version of Ant free from Apache here: http://ant.apache.org/bindownload.cgi

once you have downloaded and extracted Ant, move the Ant installation to the correct location and make a symlink:

mv /path/to/extraction/(name) /usr/local/
ln -s /usr/local/(name)/  /usr/local/ant

We use symlinks so that upgrades don't break it.

Now, add Ant to your path by running:

export ANT_HOME=/usr/local/ant
export PATH=${PATH}:${ANT_HOME}/bin

Configuring Postfix

Create a user account "postfix" with a user id and group id that are not used by any other user account. Preferably, this is an account that no-one can log into. The account does not need an executable login shell, and needs no existing home directory. Password and group file entries look like this:

   /etc/passwd:
       postfix:*:12345:12345:postfix:/no/where:/no/shell
   /etc/group:
       postfix:*:12345:

Create a group "postdrop" with a group id that is not used by any other user account. Not even by the postfix user account. The group file entry should look like:

   /etc/group:
       postdrop:*:54321:

Setting up Perl

By default, the CPAN mirror that Zimbra will use to build is depot.zimbra.com. This is an internal server which is not accessible to the general public. If unchanged, Perl will fail to build during the build process, and must be corrected before continuing.

To change this, find your closest CPAN mirror here, and edit the /home/public/p4/zcs/FRANKLIN/ThirdParty/Perl/MyConfig.pm.template file:

  'urllist' => [q[http://cpan.schatt.com/],],

General Dependency Information

A number of build utilities and libraries are required to build the 3rd Party software. Among them are:

gcc

automake

autoconf

libtoolize

libtool dynamic loader library (libltdl) development headers and libraries

zlib

flex

pcre development headers and libraries (Not necessary for MACOSX systems, as this will get built)

rpmbuilder (for RPM based systems)

dpkg (For deb based systems)

jdk 1.5+

ant

Build ZCS

After you've build all the third party components individually (or used ThirdParty/buildThirdParty.sh) navigate to Branch/ZimbraBuild and run make or by component:

make core

make proxy

make memcached

make mta

make store

make ldap

make snmp

make logger

make apache

make spell

make zcs_stage

zcs_stage is the final build stage that collects the built packages, forms the installer package framework and wraps it into a single compressed tarball in ZimbraBuild/Arch.

Make allclean is your friend here.


Back to: http://wiki.zimbra.com/index.php?title=Building_Zimbra_using_Perforce#Building_Zimbra_Collaboration_Suite:_.22FRANKLIN.22

Verified Against: unknown Date Created: 2/10/2008
Article ID: http://wiki.zimbra.com/index.php?title=Franklin_README Date Modified: 03/11/2009
Personal tools