[Devel] Zimbra FreeBSD Build and Packages

Ray rs+zetalliance.org at trust64.com
Mon May 30 22:48:11 CEST 2016

Hello Malte,

thank you for your answers


> That cleanup of the build system is already in the works. It is not yet full
> up-to-date but you should start here to get an overview:
> https://wiki.zimbra.com/wiki/Building_Zimbra_using_Git#ZCS_8.7_and_later
> There's one thing you've got to keep in mind:  There are essentially two build
> systems:  One to build the required binary thirdparty packages, and one to
> build Zimbra itself.
> The former was totally revamped for 8.7, the latter will switch to Maven at
> some point. It is all a bit in a flux still.
OK. My first couple of steps where on 8.6. But it makes more sense to go 
the 8.7 route. I already checked out the packages and zimbra-stub repos 
for 8.7. First I will try to get everything to compile on FreeBSD. Then 
I'l check on how to get this stuff into ports, I am still not 100% clear 
on this point because the ports system differs on *how* packages are 
generated from the Linux distributions.
>> Now to my questions:
>> * I got the ZCS git repository, but I can not find either the 8.7 or the
>> 9.0 branch, what are their branch names?
> 8.7: judasprriest-870-foss
> 8.8: judaspriest-foss
> 9.0: main-foss
In muy git repo checkout I can not see judaspriest-870-foss, I only see:

Is it possible that judaspriest-foss is 8.7 and 8.8 still not tagged?
>> * Is it possible to use OpenJDK7 (or 6, 8)?
> Zimbra already depends on and ships OpenJDK 8 as the JRE in 8.6 (8.5?) and
> later. For building the Java parts AFAICR you still need JDK 7 where OpenJDK 7
> should be fine. It should be possible to build with OpenJDK 8 as well if you
> manage to feed the proper switches to javac.
OK. I guess OpenJDK 7 will do it.
>> * Is it OK to make all shellscripts portable and getting rid of all the
>> linux assumptions (use /bin/sh instead of /bin/bash, correct/detect
>> locations for perl etc.)
> It is not my decision but I am not a big fan of POSIX shell at all since you
> loose a lot of functionality for no real gain. Bash is a sensible dependency,
> especially build dependency, in my eyes.
What I would like at least that the she-bang use the environment to find 
bash. (eg. #! ENV bash) instead of hardcoding the path. On FreeBSD bash 
is installed as a pkg into /usr/local/bin/bash.

>> * Is it OK/Possible to make ZIMBRA_HOME defi nable? (In FreeBSD a
>> location like /usr/local/zimbra is what is expected from a port to
>> install into) . Would it be sufficient to change all the build
>> shell-scripts and makefiles, or are there more elaborate changes involed?
> Theoretically this should be possible already since there is a localconfig
> value for that. I'd be surprised if there wasn't /opt/zimbra hardcoded
> anywhere though and things will break in funny ways.
I may be willing to search the complete source-code for hardcoded 
references, maybe its something I could help to clean up over time. I 
will have to discuss with FreeBSD team about the policy on installing 
local packages into /opt

>> * When doing some cleanups in the thirdpart install scripts I saw that
>> the makefile defines MAKE=make. On GNU make, this variable is already
>> set on startup to the name of the specific make application which was
>> used. On FreeBSD GNU make is called gmake. Using gmake instead of make
>> in the shellscript is rather easy, and if one does not do MAKE=make, all
>> calls to $(MAKE) in the Makefile automatically use gmake when on
>> FreeBSD. Is there some reason this variable gets re-defined to make?
> I don't think this is still the case in the current thirdparty packaging code
> at https://github.com/Zimbra/packages
>> * The directory /ZimbraBuild/rpmconf/Build etc. contains build
>> definitions for RedHat, Debian, Ubuntu, etc. but RPM refers to the
>> redhat package manager, I guess this is something which just did not got
>> changed, or do you create the .deb packages from the .rpm's? Is it
>> correct to make changes needed for (Free)BSD in those directories? I
>> started to modify the /ZimbraBuild/rpmconf/Build/get_plat_tag.sh to
>> recognize FreeBSD and return the correct version. Should I just keep
>> modifiying those scripts?
> You should have a look at https://github.com/Zimbra/zimbra-package-stub and
> https://github.com/Zimbra/packages.
>> * How would you propose to work and / or incorporate the changes we do
>> on the repository, how can all the interested people help out at the
>> same time? is git.zimbra.com just a git-repository or is it a github
>> project? Do you have distributed work-flows defined?
> Cheers,
> Malte

More information about the Devel mailing list