Building Zimbra using Git: Difference between revisions

No edit summary
No edit summary
Line 134: Line 134:
==Building with Maven==
Starting with ZCS 9.0/KISS the Java projects are built using Maven.
See [[Building Zimbra with Maven]] for more details.

==Building Zimbra Desktop==
==Building Zimbra Desktop==

Revision as of 19:13, 9 February 2015

General Information

The git fusion server gives users access to download and build/modify Zimbra source code for Open Source products. Building Zimbra Collaboration Suite from Zimbra's git fusion server requires advanced knowledge of troubleshooting. It is not available for Network Edition components. Changes cannot be committed to the git fusion server.

By building Zimbra, you agree to Zimbra's licensing terms. Building from source is not covered under the ZEUL, unlike pre-compiled binaries, but rather the Open Source licenses as descrived on the licensing page. Please read the page on contributing if you plan to submit back any patches.

Technical support for source building can be found in the Zimbra Developers community.

By default, you will only be able to build "out of the box" with supported operating systems (see list on site or files in ZimbraBuild/defs). However, you may be able to modify the source to get Zimbra to build on your OS of choice.

Initial Setup

At it's simplest, to obtain the source you need to essentially:

  • Install git
    • yum install git (RHEL, SLES, etc)
    • aptitude install git (Ubuntu, etc)
  • Obtain the git ssh access keys
  mkdir -p /tmp/zimbra-git
  cd /tmp/zimbra-git
  tar xfz zimbra-git-ssh.tgz
  • Add the access keys to your own user account:
  cd ~/.ssh
  cp /tmp/zimbra-git/id_rsa_git* .
  • Add the following ~/.ssh/config. Create the file if it doesn't exist:
Host zimbra-git
  User public
  IdentityFile ~/.ssh/id_rsa_git
  IdentitiesOnly yes
  Port 1067
  • Ensure the permissions on the config file are correct
  chmod 600 ~/.ssh/config

Obtaining the source to Zimbra Collaboration Suite

The source code for ZCS is retrieved from as described above.

To obtain the source:

  mkdir -p ~/git
  cd ~/git
  git clone git@zimbra-git:zimbra-foss

Source for the "main" branch

  • main is the development branch.

The 'main' branch, (often referred to as mainline) contains the latest code - if your interested in seeing pre-release software check it out.

It is constantly in flux (for instance we might stagger spec files to avoid the need to always rebuild ThirdParty), if you're hitting a error in the Zimbra build side the first thing to do is re-sync, as we typically resolve these fast.

It is the default branch in use after doing a checkout of zimbra-foss

Listing available branches

The zimbra-foss repo contains all the available release branches. You can obtain a list of the branches via:

 git branch -a

Example output (abbreviated)

 * main-foss
   remotes/origin/HEAD -> origin/main-foss

The branch with a * in front of it is your active checkout.

Changing the active checkout

To change the active branch, you use the git checkout command, and supply the release you are interested in.

For example, to switch to the IRONMAIDEN 8.0.7 release branch, one would execute:

 git checkout ironmaiden-807-foss

Updating an existing clone

To update an already existing clone:

  cd ~/git/zimbra-foss
  git pull

Building Zimbra Collaboration Server

To build Zimbra Collaboration Server, the "" script can be used, that is located in the ZimbraBuild directory after the checkout completes.

The first time you go to build, it is recommended to execute

 cd ~/git/zimbra-foss/ZimbraBuild
 ./ -t -u

This will help you through adding Ant & JDK, check dependencies, build ThridParty using a public CPAN mirror for Perl, then start the ZCS build process. It requires sudo access to install the various required binaries and libraries for build (The -u option).

If the server already has the various required binaries and libraries installed, then:

 cd ~/git/zimbra-foss/ZimbraBuild
 ./ -t

Can be used to just build out Third Party and ZCS.

If Third Party has already been built, and simply rebuilding ZCS is desired, this can be achieved with:

 cd ~/git/zimbra-foss/ZimbraBuild

Building with Maven

Starting with ZCS 9.0/KISS the Java projects are built using Maven.

See Building Zimbra with Maven for more details.

Building Zimbra Desktop

Buiding Zimbra Mobile Edition

ZME (J2ME) Client: Building ZimbraME


Search the forums for any recent reports or create a new thread letting us know and we'll get right on it.

Verified Against: unknown Date Created: 7/7/2014
Article ID: Date Modified: 2015-02-09

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