[zarafa] - Added a workaround to really support MariaDB (#995870) - Re-added a patch to allow building withou
Robert Scheck
robert at fedoraproject.org
Thu Jul 10 22:33:59 UTC 2014
commit 815006aaf215bd94b47b4a0a73d9e958bee0c13d
Author: Robert Scheck <robert at fedoraproject.org>
Date: Fri Jul 11 00:34:10 2014 +0200
- Added a workaround to really support MariaDB (#995870)
- Re-added a patch to allow building without zarafa-search
zarafa-7.1.10-kyotocabinet.patch | 28 ++++++++++++++++++++++++++++
zarafa-7.1.10-mariadb.patch | 22 ++++++++++++++++++++++
zarafa.spec | 10 +++++++++-
3 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/zarafa-7.1.10-kyotocabinet.patch b/zarafa-7.1.10-kyotocabinet.patch
new file mode 100644
index 0000000..43e62a3
--- /dev/null
+++ b/zarafa-7.1.10-kyotocabinet.patch
@@ -0,0 +1,28 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for zarafa >= 7.1.10 which re-adds the ability to disable
+zarafa-search during build-time. This is e.g. required if CLucene and/or Kyotocabinet is unavailable or
+broken on the given system and/or architecture. Interestingly that patch is not new, I wrote these lines
+in 2012 the first time, proposed them as a patch to Zarafa and got merged. With a recent Zarafa release it
+seems they silently removed it again...
+
+--- zarafa-7.1.10/ECtools/zarafa-search/Makefile.am 2014-05-23 15:03:49.000000000 +0200
++++ zarafa-7.1.10/ECtools/zarafa-search/Makefile.am.kyotocabinet 2014-07-10 21:48:42.000000000 +0200
+@@ -1,4 +1,8 @@
++if WITH_CLUCENE
++if WITH_KYOTOCABINET
+ bin_PROGRAMS = zarafa-search
++endif
++endif
+
+ AM_CPPFLAGS = ${ZCPPFLAGS} \
+ -I${top_srcdir}/mapi4linux/include \
+--- zarafa-7.1.10/ECtools/zarafa-search/Makefile.in 2014-05-23 15:04:02.000000000 +0200
++++ zarafa-7.1.10/ECtools/zarafa-search/Makefile.in.kyotocabinet 2014-07-10 21:49:16.000000000 +0200
+@@ -34,7 +34,7 @@
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-bin_PROGRAMS = zarafa-search$(EXEEXT)
++ at WITH_CLUCENE_TRUE@@WITH_KYOTOCABINET_TRUE at bin_PROGRAMS = zarafa-search$(EXEEXT)
+ subdir = ECtools/zarafa-search
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff --git a/zarafa-7.1.10-mariadb.patch b/zarafa-7.1.10-mariadb.patch
new file mode 100644
index 0000000..419017a
--- /dev/null
+++ b/zarafa-7.1.10-mariadb.patch
@@ -0,0 +1,22 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for zarafa >= 7.1.10 which really (!) adds support for
+MariaDB. In theory, Zarafa 7.1.10 supports MariaDB, see https://jira.zarafa.com/browse/ZCP-11934 for some
+upstream details. However it poorly fails if really trying it with e.g. MariaDB 5.5.38:
+
+Jul 10 23:40:40 tux zarafa-server[24633]: SQL [00000002] result failed: BIGINT UNSIGNED value is out of range in '(`zarafa`.`properties`.`tag` - 0x8501)', Query: "SELECT 0,properties.tag,properties.type,properties.val_ulong,properties.val_string,properties.val_binary,properties.val_double,properties.val_longint,properties.val_hi,properties.val_lo, hierarchyid, names.nameid, names.namestring, names.guid FROM properties FORCE INDEX (PRIMARY) LEFT JOIN names ON (properties.tag-0x8501)=names.id WHERE hierarchyid=3 AND (tag <= 0x8500 OR names.id IS NOT NULL)"
+Jul 10 23:40:40 tux zarafa-server[24633]: SQL [00000004] result failed: BIGINT UNSIGNED value is out of range in '(`zarafa`.`properties`.`tag` - 0x8501)', Query: "SELECT 0,properties.tag,properties.type,properties.val_ulong,properties.val_string,properties.val_binary,properties.val_double,properties.val_longint,properties.val_hi,properties.val_lo, hierarchyid, names.nameid, names.namestring, names.guid FROM properties FORCE INDEX (PRIMARY) LEFT JOIN names ON (properties.tag-0x8501)=names.id WHERE hierarchyid=4 AND (tag <= 0x8500 OR names.id IS NOT NULL)"
+Jul 10 23:40:40 tux zarafa-server[24633]: SQL [00000006] result failed: BIGINT UNSIGNED value is out of range in '(`zarafa`.`properties`.`tag` - 0x8501)', Query: "SELECT 0,properties.tag,properties.type,properties.val_ulong,properties.val_string,properties.val_binary,properties.val_double,properties.val_longint,properties.val_hi,properties.val_lo, hierarchyid, names.nameid, names.namestring, names.guid FROM properties FORCE INDEX (PRIMARY) LEFT JOIN names ON (properties.tag-0x8501)=names.id WHERE hierarchyid=4 AND (tag <= 0x8500 OR names.id IS NOT NULL)"
+
+Even this might not be a clean solution it at least makes Zarafa usable with MariaDB - which is important
+nowadays as Red Hat Enterprise Linux and CentOS 7 are only shipping MariaDB by default rather MySQL.
+
+--- zarafa-7.1.10/provider/libserver/ECDatabaseMySQL.cpp 2014-05-23 15:56:38.000000000 +0200
++++ zarafa-7.1.10/provider/libserver/ECDatabaseMySQL.cpp.mariadb 2014-07-10 23:44:19.000000000 +0200
+@@ -628,7 +628,7 @@
+
+ if (m_lpMySQL.server_version && m_lpMySQL.server_version[0] >= '5') {
+ // this option was introduced in mysql 5.0, so let's not even try on 4.1 servers
+- strQuery = "SET SESSION sql_mode = 'STRICT_ALL_TABLES'";
++ strQuery = "SET SESSION sql_mode = 'STRICT_ALL_TABLES,NO_UNSIGNED_SUBTRACTION'";
+ Query(strQuery); // ignore error
+ }
+
diff --git a/zarafa.spec b/zarafa.spec
index 410e9f8..2f61640 100644
--- a/zarafa.spec
+++ b/zarafa.spec
@@ -1,5 +1,5 @@
%global beta_or_rc 0
-%global actual_release 1
+%global actual_release 2
%global svnrevision 44973
%global with_search 1
%global with_ldap 1
@@ -54,6 +54,8 @@ Source2: %{name}.logrotate
Source3: %{name}-webaccess.conf
Patch0: zarafa-7.0.9-rpath.patch
+Patch1: zarafa-7.1.10-kyotocabinet.patch
+Patch2: zarafa-7.1.10-mariadb.patch
BuildRequires: bison
BuildRequires: gcc-c++
@@ -375,6 +377,8 @@ to interact with Zarafa.
%setup -q
%patch0 -p1 -b .rpath
touch -c -r aclocal.m4.rpath aclocal.m4
+%patch1 -p1 -b .kyotocabinet
+%patch2 -p1 -b .mariadb
%build
%if 0%{?rhel}%{?fedora} < 6
@@ -912,6 +916,10 @@ fi
%{python_sitearch}/*
%changelog
+* Fri Jul 11 2014 Robert Scheck <robert at fedoraproject.org> 7.1.10-2
+- Added a workaround to really support MariaDB (#995870)
+- Re-added a patch to allow building without zarafa-search
+
* Sun Jun 29 2014 Robert Scheck <robert at fedoraproject.org> 7.1.10-1
- Upgrade to 7.1.10
More information about the scm-commits
mailing list