summaryrefslogtreecommitdiff
path: root/pcr/openchange
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/openchange')
-rw-r--r--pcr/openchange/PKGBUILD79
-rw-r--r--pcr/openchange/ocsmanager.service12
-rw-r--r--pcr/openchange/openchange-issue-249.patch34
-rw-r--r--pcr/openchange/openchange-provision-type-error.patch33
4 files changed, 134 insertions, 24 deletions
diff --git a/pcr/openchange/PKGBUILD b/pcr/openchange/PKGBUILD
index 8ed9d2e90..ea84ecd57 100644
--- a/pcr/openchange/PKGBUILD
+++ b/pcr/openchange/PKGBUILD
@@ -1,35 +1,45 @@
-# Maintainer: Michael Hansen <zrax0111 gmail com>
-# Contributor: DJ Lucas <dj@linuxfromscratch.org>
-# Contributor: ngoonee <ngoonee.talk@gmail.com>
-# Contributor: Adam Russell <adamlr6+arch@gmail.com>
+# Maintainer (Arch): Michael Hansen <zrax0111 gmail com>
+# Maintainer (Arch): DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+# Contributor (Arch): ngoonee <ngoonee.talk@gmail.com>
+# Contributor (Arch): Adam Russell <adamlr6+arch@gmail.com>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=openchange
-_codename=NANOPROBE
-_dlid=246
-pkgver=2.2
-pkgrel=4
+_codename=VULCAN
+pkgver=2.3
+pkgrel=2
pkgdesc="A portable, open source implementation of Microsoft Exchange server \
-and Exchange protocols. This package was originally created to support \
-evolution-mapi and may not work for any other purpose."
+and Exchange protocols."
arch=('i686' 'x86_64')
url="http://www.openchange.org"
license=('GPL3')
-depends=('samba>=4.2' 'libical' 'sqlite3' 'file' 'boost' 'python2' 'libmariadbclient')
-makedepends=('ccache' 'python2' 'docbook-xsl' 'libxslt')
+depends=('samba>=4.2.2' 'libical' 'sqlite3' 'file' 'boost' 'python2'
+ 'libmariadbclient' 'nanomsg>=0.5' 'libmemcached>=1.0.18')
+makedepends=('ccache' 'docbook-xsl' 'libxslt' 'python2-setuptools'
+ 'python2-pylons')
+optdepends=('python2-pylons: Needed for OCSManager')
options=(!makeflags)
# Releases are mirrored at http://tracker.openchange.org/projects/openchange/files
-source=("http://tracker.openchange.org/attachments/download/${_dlid}/${pkgname}-${pkgver}-${_codename}.tar.gz"
- "openchange-samba42.patch")
+source=("https://github.com/openchange/openchange/archive/${pkgname}-${pkgver}-${_codename}.tar.gz"
+ "ocsmanager.service"
+ "openchange-provision-type-error.patch"
+ "openchange-issue-249.patch")
-sha256sums=('f15eb26d16370e85f01649300dd6722c31f0750437a4b60acd604a79439cf688'
- '8e4c2afede896e16a74be87323412bdcad8173d6943107a0aab38c6b77860887')
+sha256sums=('46ffdc779bb7bf6a823f6d1a78c5ca3f5548b981ad90164214a68279b403a05e'
+ '45bd19e2a5725a94692ae606086be6d57423375c9b1c0eb5322c6e09ef2b5fb3'
+ '067d25b0442ab233f47fbfd32a56042fa161b3d0aa65081f222fddde3648c439'
+ 'e3cfd2455a52d4b68153b3d546c70edbde5cf024ebcec1088a923aedaa938834')
+
+# Used to be pkgname-pkgver-codename, but now we have two openchanges. WAT
+_srcsubdir="${pkgname}-${pkgname}-${pkgver}-${_codename}"
build() {
- cd "${srcdir}/${pkgname}-${pkgver}-${_codename}"
+ cd "${srcdir}/${_srcsubdir}"
- patch -p1 < "${srcdir}/openchange-samba42.patch"
+ patch -p1 < "${srcdir}/openchange-provision-type-error.patch"
+ patch -p1 < "${srcdir}/openchange-issue-249.patch"
- PYTHON_CALLERS="$(find ${srcdir}/${pkgname}-${pkgver}-${_codename} -name '*.py')
- $(find ${srcdir}/${pkgname}-${pkgver}-${_codename} -name 'configure.ac')
+ PYTHON_CALLERS="$(find ${srcdir}/${_srcsubdir} -name '*.py')
+ $(find ${srcdir}/${_srcsubdir} -name 'configure.ac')
setup/openchange_newuser setup/openchange_provision
mapiproxy/services/web/rpcproxy/rpcproxy.wsgi"
sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
@@ -50,16 +60,16 @@ build() {
--datadir=/usr/share/samba \
--enable-pyopenchange \
--with-modulesdir=/usr/lib/samba/modules
- rm mapiproxy/libmapi{proxy,store}/backends/*.po
- rm mapiproxy/util/*.po
+
make FLEX=/usr/bin/flex BISON=/usr/bin/bison || return 1
}
package() {
_pyver=`python2 -c 'import sys; print(sys.version[:3])'`
- cd "${srcdir}/${pkgname}-${pkgver}-${_codename}"
- make DESTDIR="$pkgdir/" install
+ cd "${srcdir}/${_srcsubdir}"
+ make DESTDIR="${pkgdir}" install
+ make DESTDIR="${pkgdir}" pyopenchange-install
# NOTE: Not using `make installman' because that generates a bunch
# of doxygen-based manpages which may have conflicting names with
@@ -71,6 +81,27 @@ package() {
ln -s libmapi.so libmapi.so.0
ln -s libocpf.so libocpf.so.0
+ # Install OCSManager
+ cd "${srcdir}/${_srcsubdir}"
+ make srcdir="${srcdir}/${_srcsubdir}" DESTDIR="${pkgdir}" ocsmanager-install
+ install -vdm700 -o http -g http "${pkgdir}/var/cache/ntlmauthhandler"
+ install -vDm644 "${srcdir}/ocsmanager.service" \
+ "${pkgdir}/usr/lib/systemd/system/ocsmanager.service"
+ install -vDm644 "${srcdir}/${_srcsubdir}/mapiproxy/services/ocsmanager/ocsmanager.ini" \
+ "${pkgdir}/etc/ocsmanager/ocsmanager.ini"
+ install -vDm644 "${srcdir}/${_srcsubdir}/mapiproxy/services/ocsmanager/ocsmanager-apache.conf" \
+ "${pkgdir}/etc/httpd/conf/extra/ocsmanager.conf"
+
+ # Install RPC Proxy
+ cd "${srcdir}/${_srcsubdir}/mapiproxy/services/web/rpcproxy"
+ install -vdm755 "${pkgdir}/usr/lib/openchange/web/rpcproxy"
+ install -vm644 "${srcdir}/${_srcsubdir}/mapiproxy/services/web/rpcproxy/rpcproxy.conf" \
+ "${pkgdir}/etc/httpd/conf/extra/rpcproxy.conf"
+ python2 setup.py install \
+ --root="${pkgdir}" \
+ --install-lib=/usr/lib/openchange/web/rpcproxy \
+ --install-scripts=/usr/lib/openchange/web/rpcproxy
+
find "${pkgdir}/usr/lib/python${_pyver}/site-packages" -name '*.py' | \
xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
}
diff --git a/pcr/openchange/ocsmanager.service b/pcr/openchange/ocsmanager.service
new file mode 100644
index 000000000..6b049eb75
--- /dev/null
+++ b/pcr/openchange/ocsmanager.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenChange OCSManager
+After=samba.service
+
+[Service]
+Type=simple
+PIDFile=/var/run/ocsmanager.pid
+ExecStart=/usr/sbin/paster serve /etc/ocsmanager/ocsmanager.ini --pid-file=/run/ocsmanager.pid --log-file=/var/log/ocsmanager.log
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/openchange/openchange-issue-249.patch b/pcr/openchange/openchange-issue-249.patch
new file mode 100644
index 000000000..5f57cebf2
--- /dev/null
+++ b/pcr/openchange/openchange-issue-249.patch
@@ -0,0 +1,34 @@
+diff -rupN a/mapiproxy/dcesrv_mapiproxy.c b/mapiproxy/dcesrv_mapiproxy.c
+--- a/mapiproxy/dcesrv_mapiproxy.c 2015-06-16 15:41:56.599106174 -0700
++++ b/mapiproxy/dcesrv_mapiproxy.c 2015-06-16 15:43:29.597211031 -0700
+@@ -134,10 +134,10 @@ static NTSTATUS mapiproxy_op_connect(str
+
+ switch (dce_call->pkt.ptype) {
+ case DCERPC_PKT_BIND:
+- b->assoc_group_id = dce_call->pkt.u.bind.assoc_group_id;
++ status = dcerpc_binding_set_assoc_group_id(b, dce_call->pkt.u.bind.assoc_group_id);
+ break;
+ case DCERPC_PKT_ALTER:
+- b->assoc_group_id = dce_call->pkt.u.alter.assoc_group_id;
++ status = dcerpc_binding_set_assoc_group_id(b, dce_call->pkt.u.alter.assoc_group_id);
+ break;
+ default:
+ break;
+@@ -154,7 +154,7 @@ static NTSTATUS mapiproxy_op_connect(str
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+- dce_call->context->assoc_group->id = private->c_pipe->assoc_group_id;
++ dce_call->context->assoc_group->id = dcerpc_binding_get_assoc_group_id(private->c_pipe->binding);
+
+ } else {
+ status = dcerpc_pipe_connect(dce_call->context,
+@@ -169,7 +169,7 @@ static NTSTATUS mapiproxy_op_connect(str
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+- dce_call->context->assoc_group->id = private->c_pipe->assoc_group_id;
++ dce_call->context->assoc_group->id = dcerpc_binding_get_assoc_group_id(private->c_pipe->binding);
+ }
+
+ private->connected = true;
diff --git a/pcr/openchange/openchange-provision-type-error.patch b/pcr/openchange/openchange-provision-type-error.patch
new file mode 100644
index 000000000..a7a2f7bad
--- /dev/null
+++ b/pcr/openchange/openchange-provision-type-error.patch
@@ -0,0 +1,33 @@
+diff -Naurp openchange-openchange-2.3-VULCAN-org/python/openchange/mailbox.py openchange-openchange-2.3-VULCAN/python/openchange/mailbox.py
+--- openchange-openchange-2.3-VULCAN-org/python/openchange/mailbox.py 2015-05-16 10:22:04.000000000 -0500
++++ openchange-openchange-2.3-VULCAN/python/openchange/mailbox.py 2015-07-17 18:48:13.929579900 -0500
+@@ -498,7 +498,7 @@ class OpenChangeDBWithMysqlBackend(Mysql
+ def change_number(self):
+ if self._change_number is None:
+ cur = self._execute("SELECT change_number FROM servers WHERE id = %s",
+- self.server_id)
++ (self.server_id,))
+ data = cur.fetchone()
+ if data:
+ self._change_number = data[0]
+diff -Naurp openchange-openchange-2.3-VULCAN-org/python/openchange/migration/__init__.py openchange-openchange-2.3-VULCAN/python/openchange/migration/__init__.py
+--- openchange-openchange-2.3-VULCAN-org/python/openchange/migration/__init__.py 2015-05-16 10:22:04.000000000 -0500
++++ openchange-openchange-2.3-VULCAN/python/openchange/migration/__init__.py 2015-07-17 18:49:02.877532654 -0500
+@@ -65,7 +65,7 @@ class MigrationManager(object):
+ """Create the table_name table if not exists
+ """
+ cur = self.db.cursor()
+- cur.execute("""SHOW TABLES LIKE %s""", self.table_name)
++ cur.execute("""SHOW TABLES LIKE %s""", (self.table_name,))
+ row = cur.fetchone()
+ if row is None or row[0] is None:
+ cur.execute("""CREATE TABLE IF NOT EXISTS `{0}` (
+@@ -87,7 +87,7 @@ class MigrationManager(object):
+ if self._version[app] is None:
+ cur = self.db.cursor()
+ cur.execute('SELECT MAX(version) FROM {0} WHERE app = %s'.format(self.table_name),
+- app)
++ (app,))
+ row = cur.fetchone()
+ if row and row[0]:
+ self._version[app] = int(row[0])