IRONMAIDEN 8.0.3 ported to FreeBSD

Ask questions about your setup or get help installing ZCS server (ZD section below).
solko
Advanced member
Advanced member
Posts: 93
Joined: Sat Sep 13, 2014 12:22 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by solko »

[quote user="cnav"]solko, to satisfy my curiosity, please.

did you not think about creating a port in FreeBSD tree ?[/QUOTE]

yes. no. depends. i don't think it is a viable option in the long run. please, see my reply to your private message for more info.
mathiasp
Posts: 1
Joined: Sat Sep 13, 2014 3:22 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by mathiasp »

Hi Solko,
just a heartfelt thanks for this port. It saved me considerable time on setup and added features to my own small email service. Before I used postfix/archiveopteryx/roundcube.
Installation on 9.2/amd worked fine:



$ zmcontrol -v

Release 8.0.4_GA_5718.FreeBSD_amd64 FreeBSD_amd64 FOSS edition.

$ uname -a

FreeBSD somewhere.com 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64



The first installation hung for some not really identified reason, and to rerun I had to delete the zimbra user by hand, but otherwise this worked like a charm!
Thanks, Mathias
rmszaphod
Posts: 2
Joined: Sat Sep 13, 2014 3:23 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by rmszaphod »

Been running Release 7.2.0_GA_2678.FreeBSD_amd64 FreeBSD_amd64 FOSS edition (9.1-RELEASE-p2 FreeBSD 9.1-RELEASE-p2 #0: Sun Apr 21 00:02:52 PDT 2013 root@subspace2:/usr/obj/usr/src/sys/XENHVM amd64) for quite a while now.
Read the thread. No one has commented on UPGRADING from 7.2 to 8. I guess I'll give it a go. Might also do a test on FreeBSD 10 Beta1.
rmszaphod
Posts: 2
Joined: Sat Sep 13, 2014 3:23 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by rmszaphod »

Thanks much Solko.
Upgrade from 7.2 to 8.0.4 is successful.
FreeBSD subspace.tms3labs.com 9.1-RELEASE-p2 FreeBSD 9.1-RELEASE-p2 #0: Sun Apr 21 00:02:52 PDT 2013 root@subspace2:/usr/obj/usr/src/sys/XENHVM amd64

Release 8.0.4_GA_5718.FreeBSD_amd64 FreeBSD_amd64 FOSS edition.
Please DO NOT DO THIS if you run ANYTHING else on the server of importance for production. Uninstalling all the packages used for 7.2 will likely break something important. My server runs only zimbra and a few simple admin tools.
Shut down Zimbra.
Shut down VM.
ZFS Snapshotted the iscsi volume containing the Xen VDI. This was done on the FreeBSD storage server, natch.
(I ran pkg_delete -f build pkg for 7. Then ran pkg_add -r zimbra-builddeps-8.0.4--to see what packages needed to be removed and reinstalled. Sorted through the failures and came up with the following list)
Delete the listed packages. You need to delete the 7.2 run and build dep packages as well. Sorry, don't have the exact names on hand atm.
pkg_delete -f:
perl-5.12.4_4

pkg-config-0.25_1

pcre-8.30_2

libiconv-1.13.1_1

sudo-1.8.5.p2

libidn-1.22

p5-Net-SSLeay-1.48

javavmwrapper-2.3.5

png-1.4.8

freetype2-2.4.7

fontconfig-2.8.0_1,1

patch-2.6.1_1

libtool-2.4_1

libXt-1.0.9

libXi-1.4.3,1

libXaw-1.0.8,1

automake-1.12

p5-HTTP-Message-6.03_1

libiconv-1.13.1_1

open-motif-2.3.3

openjdk6-b24

apache-ant-1.8.3_1

gmake-3.82

bash-4.2.28

#zimbra-builddeps-8.0.4
Run

pkg_add -r zimbra-builddeps-8.0.4
Then:
"""zcs-8.0.4-FreeBSD-9.1_amd64 packages, r5718, just download, extract and run "./FreeBSD_amd64.install.sh"."""
Made some errors first time through and blew up the Zimbra install on the VM. Cloned the zfs snap and attached it to the VM and started again.
The second time through all went well, and I have 8.0.4 running.
Thanks again solko.
If you have time I'd be interested in your build manual.
Stay cool and Froody.
Nifril
Posts: 1
Joined: Sat Sep 13, 2014 3:24 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by Nifril »

I tryed install zimbra 8.04 from first post on FreeBSD 9.2 x64 and found a bug(?)



Starting apache...Shared object "libpcre.so.1" not found, required by "httpd" failed.

Starting mta...Failed.

Shared object "libpcre.so.1" not found, required by "postalias"

Shared object "libpcre.so.1" not found, required by "postfix"

postfix failed to start


Server with fresh install of FreeBSD(I installed only few ports: zfs+screen+mc+vim-lite) and I change pkg manager to pkgng.
I need previously install depending packages or setup script do this?

How can I setup depending packages via pkgng?
kosl
Posts: 2
Joined: Sat Sep 13, 2014 3:35 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by kosl »

I have successfuly installed 8.0.4 in a 9.2 jail. Benefits of jail are that we do not mix production server with many dependent packages that may broke zimbra during upgrades/changes and we can leave primary server untouched. For local communication in a jail we need 127.0.0.2 as we cannot bind to the usual 127.0.0.1. This is the main obstacle in a FreeBSD jail.
Below are some notes to mention:
Edit /etc/resolv.conf, /etc/hosts and enable sshd.



echo 'sshd_enable="YES"'>/etc/rc.conf


It is better to manually install packages provided within zcs-8.0.4-FreeBSD-9_amd64.tgz by

pkg_add -f perl-5.14.2_2.tbz
and
perl -MCPAN -e shell

install URI::Escape
pkg_add -f bash-4.2.37.tbz
After installation change hardcoded loopback zimbraLocalBindAddress with
grep -l 127.0.0.1 postfix/conf/* conf/* bin/* libexec/* zimbramon/pylibs/* |

xargs sed -i.old -e 's/127.0.0.1/127.0.0.2/g;s/::1/::2/g'
Into conf/amavisd.conf.in add

$inet_socket_bind = '%%zimbraLocalBindAddress%%';

@inet_acl = qw( %%zimbraMtaMyNetworks%% );


In principle this works in a small production environment with 20+ users. The only thing I cannot solve is missing symbol

mail postfix/dkimmilter/smtpd[32532]: unable to dlopen /opt/zimbra/cyrus-sasl-2.1.26.2z/lib/sasl2/libgssapiv2.so.3: /opt/zimbra/heimdal-1.5.2/lib/libroken.so.19: Undefined symbol "unvis"

This problem seems that it doesn't affecting us as we don't use gssapi.
Thanks for this "port". It would be even greater within ports as we may build it by our own without hassle.
kosl
Posts: 2
Joined: Sat Sep 13, 2014 3:35 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by kosl »

Althouh Solko verified and checked many versions that Zimbra is NOT affereted by the Heartbleed Bug bug one can use the following commands to upgrade OpenSSL just to be safe:



cd /tmp

fetch http://zimbra.imladris.sk/download/open ... 1.0.1g.tgz

cd /opt/zimbra/

tar xzf /tmp/openssl-1.0.1g.tgz

/usr/local/etc/rc.d/zimbra.sh stop

rm -rf openssl-1.0.1e

rm openssl

ln -s /opt/zimbra/openssl-1.0.1g openssl

/usr/local/etc/rc.d/zimbra.sh

rm -rf openssl-1.0.1e /tmp/openssl-1.0.1g.tgz


Thanks,

Leon.
solko
Advanced member
Advanced member
Posts: 93
Joined: Sat Sep 13, 2014 12:22 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by solko »

[quote user="kosl"]Althouh Solko verified and checked many versions that Zimbra is NOT affereted by the Heartbleed Bug bug one can use the following commands to upgrade OpenSSL just to be safe:



cd /tmp

fetch http://zimbra.imladris.sk/download/open ... 1.0.1g.tgz

cd /opt/zimbra/

tar xzf /tmp/openssl-1.0.1g.tgz

/usr/local/etc/rc.d/zimbra.sh stop

rm -rf openssl-1.0.1e

rm openssl

ln -s /opt/zimbra/openssl-1.0.1g openssl

/usr/local/etc/rc.d/zimbra.sh

rm -rf openssl-1.0.1e /tmp/openssl-1.0.1g.tgz


Thanks,

Leon.[/QUOTE]
unfortunately, solko was very wrong because he forgot about postfix and starttls :(. sorry about that.

to remedy this issue you can download the correct openssl version for your 8.0.x FreeBSD zimbra and just replace /opt/zimbra/openssl-version with that (the very same thing zimbra ssl updater does).

[URL=Downloads on Wiki - see patched OpenSSL versions[/URL]
please be sure to download CORRECT OpenSSL version to avoid linking problems!
thank you, Leon!
solko
Advanced member
Advanced member
Posts: 93
Joined: Sat Sep 13, 2014 12:22 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by solko »

so.. the good news:

- the latest zimbra (8.0.8) now works on FreeBSD-9.1 (the old box i used for 8.0.4 build process)



[zimbra@zimbra8 ~]$ zmcontrol -v

Release 8.0.8_GA_6038.FreeBSD_amd64 FreeBSD_amd64 FOSS edition.


Overcoming Sencha on FreeBSD was.. not fun.. but the Touch client is fully functional now. i spent ages fixing nonexisting bug while pulling my hairs out.. i have accidentaly compiled zimbra-native with openjdk8 (target 1.8) and some zimbra parts do not run with openjdk8 (ZimbraAdmin). reverting back to openjdk7 was only few seconds but decrypting "NoClassDefFoundError" instead of "Unsupported major.minor version 52.0" in zmprov almost killed me. remember, i am the Perl guy, not the Java guy.
now the bad news:

- nightmare to build for the first time (ant 1.9.3 does not work (nor does old 1.8.x branch), we need to mix openjdk7 and openjdk8 and fix some Perl issues)

- it does not work on clean FreeBSD-9.2-RELEASE install, Perl LDAP+SSL issues (even with proper versions), Perl issues, pkgng and STAGE/NO_STAGE in ports

- did i mention pkgng?
but just to be fair, i have to note that i do *love* pkgng. i just wish it existed 5 years ago.
the FreeBSD zimbra uses old pkg system so i guess we will have to stick to FreeBSD9 for now and once zimbra9 is out there.. we may try to run it in on FreeBSD10 (while reworking the build process to fully comply with pkgng). but if all of you wanted an easy zimbra life you would go with Linux, wouldn't you? :)
i am now recompiling packages and preparing for final test on new FreeBSD-9.2 installation.
EDIT: it does work on clean FreeBSD-9.2-RELEASE installation

EDIT2: 8.0.8 FreeBSD zimbra packages on zimbra wiki
Maed
Posts: 2
Joined: Sat Sep 13, 2014 3:36 am

IRONMAIDEN 8.0.3 ported to FreeBSD

Post by Maed »

Successfully installed Ironmaiden-808 on clean FreeBSD 9.2, but got same annoying issue with "unvis" as kosl:



slapd[68867]: unable to dlopen /opt/zimbra/cyrus-sasl-2.1.26.2z/lib/sasl2/libgs2.so.3: /opt/zimbra/heimdal-1.5.2/lib/libroken.so.19: Undefined symbol "unvis"



Is anyone got any luck fixing it?
Post Reply