summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Torres2015-06-09 17:11:20 +0200
committerJavier Torres2015-06-09 17:11:20 +0200
commit3a222f4b0ff88f53dde066ce0110236113129206 (patch)
tree5b902a047cd972fbd7cf8f8a03ccf97d86c1e877
downloadaur-3a222f4b0ff88f53dde066ce0110236113129206.tar.gz
Initial import
-rw-r--r--.SRCINFO50
-rw-r--r--PKGBUILD90
-rw-r--r--kolabd.tmpfiles1
-rw-r--r--pykolab.install21
-rw-r--r--setup-script.patch251
-rw-r--r--systemd-services.patch47
-rw-r--r--templates.patch101
7 files changed, 561 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e19f8cb5efe0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,50 @@
+pkgbase = pykolab
+ pkgdesc = Kolab Python Utilities
+ pkgver = 0.7.11
+ pkgrel = 1
+ url = http://kolab.org
+ install = pykolab.install
+ arch = any
+ license = GPL3
+ makedepends = intltool
+ depends = python2
+ depends = python2-nose
+ depends = python2-ldap
+ depends = python2-augeas
+ depends = python2-cheetah
+ depends = python2-sqlalchemy
+ depends = python2-kolabformat
+ depends = python2-icalendar
+ depends = python2-mysql-connector
+ optdepends = cyrus-imapd-ldap: Only supported IMAP backend so far
+ optdepends = postfix: Mail Transfer Agent
+ optdepends = amavisd-new: Mail scanning
+ optdepends = perl-ldap: Amavis integration
+ optdepends = spamassassin: Spam detection
+ optdepends = clamav: Virus detection
+ optdepends = 389-ds-base: Prefered LDAP server
+ optdepends = mariadb: Mysql server backend
+ optdepends = roundcubemail: Default webclient used by Kolab
+ optdepends = roundcubemail-plugins-kolab: Roundcube plugin for Kolab integration
+ optdepends = roundcubemail-skin-chameleon: Recommended skin for Roundcube
+ optdepends = chwala: File Manager
+ optdepends = irony: Cal/Card/GroupDAV support
+ optdepends = kolab-freebusy: Free/Busy API
+ optdepends = kolab-syncroton: ActiveSync support
+ optdepends = kolab-webadmin: Administration tool
+ backup = etc/kolab/kolab.conf
+ source = http://mirror.kolabsys.com/pub/releases/pykolab-0.7.11.tar.gz
+ source = http://mirror.kolabsys.com/pub/releases/kolab-schema-3.2.tar.gz
+ source = systemd-services.patch
+ source = setup-script.patch
+ source = templates.patch
+ source = kolabd.tmpfiles
+ sha256sums = ef3c2d462f06e3d3a9206b611b77c11c8281dc7979283436edd587a8e6b83bad
+ sha256sums = 6995524d755ea3cbf3d36fc572667629716a141e7f757af1a970c2e85f8fa4de
+ sha256sums = a515f068b5fe12c858f327fa0558087e61b4d39070d67dfba9a2b6d19a83c2c6
+ sha256sums = 27c2505eed62ae3f74494d93aed7f0a4c5b72df1bf4cb797189be6d398459b7b
+ sha256sums = e88c3114f0803ac9dcf589b5e144df8e4b4932ada3347d1d46c05770a3efdefd
+ sha256sums = 4bbb72695b20b7a4c1c0348a93c62f048f0eef9f3bc7135fa2720c62e98e4634
+
+pkgname = pykolab
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..159b71c70f12
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,90 @@
+# Maintainer: Javier Torres <javitonino [at] gmail [dot] com>
+# Contributor: Jonas Heinrich <onny@project-insanity.org>
+
+pkgname=pykolab
+pkgver=0.7.11
+pkgrel=1
+pkgdesc='Kolab Python Utilities'
+arch=('any')
+license=('GPL3')
+makedepends=('intltool')
+depends=('python2' 'python2-nose' 'python2-ldap' 'python2-augeas' 'python2-cheetah' 'python2-sqlalchemy' 'python2-kolabformat' 'python2-icalendar' 'python2-mysql-connector')
+url='http://kolab.org'
+install=pykolab.install
+backup=('etc/kolab/kolab.conf')
+source=("http://mirror.kolabsys.com/pub/releases/${pkgname}-${pkgver}.tar.gz"
+ "http://mirror.kolabsys.com/pub/releases/kolab-schema-3.2.tar.gz"
+ "systemd-services.patch"
+ "setup-script.patch"
+ "templates.patch"
+ "kolabd.tmpfiles")
+optdepends=('cyrus-imapd-ldap: Only supported IMAP backend so far'
+ 'postfix: Mail Transfer Agent'
+ 'amavisd-new: Mail scanning'
+ 'perl-ldap: Amavis integration'
+ 'spamassassin: Spam detection'
+ 'clamav: Virus detection'
+ '389-ds-base: Prefered LDAP server'
+ 'mariadb: Mysql server backend'
+ 'roundcubemail: Default webclient used by Kolab'
+ 'roundcubemail-plugins-kolab: Roundcube plugin for Kolab integration'
+ 'roundcubemail-skin-chameleon: Recommended skin for Roundcube'
+ 'chwala: File Manager'
+ 'irony: Cal/Card/GroupDAV support'
+ 'kolab-freebusy: Free/Busy API'
+ 'kolab-syncroton: ActiveSync support'
+ 'kolab-webadmin: Administration tool')
+
+sha256sums=('ef3c2d462f06e3d3a9206b611b77c11c8281dc7979283436edd587a8e6b83bad'
+ '6995524d755ea3cbf3d36fc572667629716a141e7f757af1a970c2e85f8fa4de'
+ 'a515f068b5fe12c858f327fa0558087e61b4d39070d67dfba9a2b6d19a83c2c6'
+ '27c2505eed62ae3f74494d93aed7f0a4c5b72df1bf4cb797189be6d398459b7b'
+ 'e88c3114f0803ac9dcf589b5e144df8e4b4932ada3347d1d46c05770a3efdefd'
+ '4bbb72695b20b7a4c1c0348a93c62f048f0eef9f3bc7135fa2720c62e98e4634')
+
+
+prepare(){
+ cd "$srcdir/${pkgname}-${pkgver}"
+ find . -name "*.py" -exec sed -i "s|usr/bin/python|usr/bin/python2|" {} \;
+ patch -p1 < "${srcdir}/systemd-services.patch"
+ patch -p1 < "${srcdir}/setup-script.patch"
+ patch -p1 < "${srcdir}/templates.patch"
+}
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ autoreconf -vi
+ PYTHON=python2 ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ make DESTDIR=$pkgdir/ install
+
+ install -D "COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -Dm644 "kolabd/kolabd.systemd" "${pkgdir}/usr/lib/systemd/system/kolabd.service"
+ install -Dm644 "kolabd/kolabd.tmpfiles.d.conf" "${pkgdir}/usr/lib/tmpfiles.d/kolabd.conf"
+ install -Dm644 "kolabd/kolabd.sysconfig" "${pkgdir}/etc/conf.d/kolabd.conf"
+
+ install -Dm644 "saslauthd/kolab-saslauthd.systemd" "${pkgdir}/usr/lib/systemd/system/kolab-saslauthd.service"
+ install -Dm644 "saslauthd/kolab-saslauthd.sysconfig" "${pkgdir}/etc/conf.d/kolab-saslauthd.conf"
+
+ install -Dm644 "wallace/wallace.systemd" "${pkgdir}/usr/lib/systemd/system/wallace.service"
+ install -Dm644 "wallace/wallace.tmpfiles.d.conf" "${pkgdir}/usr/lib/tmpfiles.d/wallace.conf"
+ install -Dm644 "wallace/wallace.sysconfig" "${pkgdir}/etc/conf.d/wallace.conf"
+
+ install -Dm644 doc/kolab.1 "$pkgdir/usr/share/doc/kolab/kolab.1"
+
+ install -Dm0644 "${srcdir}/kolabd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/kolabd.conf"
+
+ cp ${srcdir}/kolab-schema-3.2/* "${pkgdir}/usr/share/doc/kolab/"
+
+ rm ${pkgdir}/var/run -r
+}
diff --git a/kolabd.tmpfiles b/kolabd.tmpfiles
new file mode 100644
index 000000000000..dcb615dda14f
--- /dev/null
+++ b/kolabd.tmpfiles
@@ -0,0 +1 @@
+d /run/kolabd 0750 kolab kolab
diff --git a/pykolab.install b/pykolab.install
new file mode 100644
index 000000000000..6231c98368e7
--- /dev/null
+++ b/pykolab.install
@@ -0,0 +1,21 @@
+post_install() {
+ getent group kolab >/dev/null 2>&1 || groupadd kolab &>/dev/null
+ getent passwd kolab >/dev/null 2>&1 || useradd -g kolab -d /var/lib/kolab -s /bin/false kolab &>/dev/null
+ chmod -R a+r+w /var/log/kolab
+
+ chown kolab:kolab /var/spool/pykolab/wallace
+ systemd-tmpfiles --create
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if getent passwd kolab >/dev/null 2>&1; then
+ userdel kolab
+ fi
+ if getent group kolab >/dev/null 2>&1; then
+ groupdel kolab
+ fi
+}
diff --git a/setup-script.patch b/setup-script.patch
new file mode 100644
index 000000000000..36343c35c4cd
--- /dev/null
+++ b/setup-script.patch
@@ -0,0 +1,251 @@
+diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
+index 947e1fb..55a3adc 100644
+--- a/pykolab/setup/setup_freebusy.py
++++ b/pykolab/setup/setup_freebusy.py
+@@ -47,12 +47,12 @@ def description():
+ return _("Setup Free/Busy.")
+
+ def execute(*args, **kw):
+- if not os.path.isfile('/etc/kolab-freebusy/config.ini') and not os.path.isfile('/etc/kolab-freebusy/config.ini.sample'):
++ if not os.path.isfile('/etc/webapps/kolab-freebusy/config/config.ini') and not os.path.isfile('/etc/webapps/kolab-freebusy/config/config.ini.sample'):
+ log.error(_("Free/Busy is not installed on this system"))
+ return
+
+- if not os.path.isfile('/etc/kolab-freebusy/config.ini'):
+- os.rename('/etc/kolab-freebusy/config.ini.sample', '/etc/kolab-freebusy/config.ini')
++ if not os.path.isfile('/etc/webapps/kolab-freebusy/config/config.ini'):
++ os.rename('/etc/webapps/kolab-freebusy/config/config.ini.sample', '/etc/webapps/kolab-freebusy/config/config.ini')
+
+ imap_backend = conf.get('kolab', 'imap_backend')
+ admin_login = conf.get(imap_backend, 'admin_login')
+@@ -162,7 +162,7 @@ def execute(*args, **kw):
+ }
+
+ cfg_parser = RawConfigParser()
+- cfg_parser.read('/etc/kolab-freebusy/config.ini')
++ cfg_parser.read('/etc/webapps/kolab-freebusy/config/config.ini')
+
+ for section in freebusy_settings.keys():
+ if len(freebusy_settings[section].keys()) < 1:
+@@ -175,7 +175,7 @@ def execute(*args, **kw):
+
+ cfg_parser.set(section, key, freebusy_settings[section][key])
+
+- fp = open('/etc/kolab-freebusy/config.ini', "w+")
++ fp = open('/etc/webapps/kolab-freebusy/config/config.ini', "w+")
+ cfg_parser.write(fp)
+ fp.close()
+
+diff --git a/pykolab/setup/setup_imap.py b/pykolab/setup/setup_imap.py
+index 57b4023..d967e8a 100644
+--- a/pykolab/setup/setup_imap.py
++++ b/pykolab/setup/setup_imap.py
+@@ -81,12 +81,12 @@ def execute(*args, **kw):
+ fp.close()
+
+ t = Template(template_definition, searchList=[imapd_settings])
+- fp = open('/etc/imapd.conf', 'w')
++ fp = open('/etc/cyrus/imapd.conf', 'w')
+ fp.write(t.__str__())
+ fp.close()
+
+ else:
+- log.error(_("Could not write out Cyrus IMAP configuration file /etc/imapd.conf"))
++ log.error(_("Could not write out Cyrus IMAP configuration file /etc/cyrus/imapd.conf"))
+ return
+
+ cyrus_settings = {}
+@@ -106,12 +106,12 @@ def execute(*args, **kw):
+ fp.close()
+
+ t = Template(template_definition, searchList=[cyrus_settings])
+- fp = open('/etc/cyrus.conf', 'w')
++ fp = open('/etc/cyrus/cyrus.conf', 'w')
+ fp.write(t.__str__())
+ fp.close()
+
+ else:
+- log.error(_("Could not write out Cyrus IMAP configuration file /etc/cyrus.conf"))
++ log.error(_("Could not write out Cyrus IMAP configuration file /etc/cyrus/cyrus.conf"))
+ return
+
+ annotations = [
+@@ -128,7 +128,7 @@ def execute(*args, **kw):
+ "/vendor/x-toltec/test,mailbox,string,backend,value.shared value.priv,a",
+ ]
+
+- fp = open('/etc/imapd.annotations.conf', 'w')
++ fp = open('/etc/cyrus/imapd.annotations.conf', 'w')
+ fp.write("\n".join(annotations))
+ fp.close()
+
+@@ -145,7 +145,7 @@ def execute(*args, **kw):
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'stop', 'saslauthd.service'])
+ subprocess.call(['systemctl', 'restart', 'kolab-saslauthd.service'])
+- subprocess.call(['systemctl', 'restart', 'cyrus-imapd.service'])
++ subprocess.call(['systemctl', 'restart', 'cyrus-master.service'])
+ elif os.path.isfile('/sbin/service'):
+ subprocess.call(['service', 'saslauthd', 'stop'])
+ subprocess.call(['service', 'kolab-saslauthd', 'restart'])
+@@ -160,7 +160,7 @@ def execute(*args, **kw):
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'disable', 'saslauthd.service'])
+ subprocess.call(['systemctl', 'enable', 'kolab-saslauthd.service'])
+- subprocess.call(['systemctl', 'enable', 'cyrus-imapd.service'])
++ subprocess.call(['systemctl', 'enable', 'cyrus-master.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['chkconfig', 'saslauthd', 'off'])
+ subprocess.call(['chkconfig', 'kolab-saslauthd', 'on'])
+diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
+index c805d20..1786438 100644
+--- a/pykolab/setup/setup_ldap.py
++++ b/pykolab/setup/setup_ldap.py
+@@ -321,6 +321,8 @@ ServerAdminPwd = %(admin_pass)s
+ setup_ds_admin = "/usr/sbin/setup-ds.pl"
+ elif os.path.isfile("/usr/sbin/setup-ds"):
+ setup_ds_admin = "/usr/sbin/setup-ds"
++ elif os.path.isfile("/usr/bin/setup-ds.pl"):
++ setup_ds_admin = "/usr/bin/setup-ds.pl"
+ else:
+ log.error(_("No directory server setup tool available."))
+ sys.exit(1)
+@@ -406,7 +408,7 @@ ServerAdminPwd = %(admin_pass)s
+ schema_error = True
+
+ if os.path.isfile('/bin/systemctl'):
+- subprocess.call(['/bin/systemctl', 'restart', 'dirsrv.target'])
++ subprocess.call(['/bin/systemctl', 'restart', '389-ds-base.target'])
+ elif os.path.isfile('/sbin/service'):
+ subprocess.call(['/sbin/service', 'dirsrv', 'restart'])
+ elif os.path.isfile('/usr/sbin/service'):
+@@ -417,7 +419,7 @@ ServerAdminPwd = %(admin_pass)s
+ log.error(_("Could not start the directory server service."))
+
+ if os.path.isfile('/bin/systemctl'):
+- subprocess.call(['/bin/systemctl', 'enable', 'dirsrv.target'])
++ subprocess.call(['/bin/systemctl', 'enable', '389-ds-base.target'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['/sbin/chkconfig', 'dirsrv', 'on'])
+ elif os.path.isfile('/usr/sbin/update-rc.d'):
+diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
+index 56109fe..b8f6485 100644
+--- a/pykolab/setup/setup_mta.py
++++ b/pykolab/setup/setup_mta.py
+@@ -274,9 +274,9 @@ result_format = "shared+%%s"
+ if os.path.isfile('/etc/pki/tls/certs/make-dummy-cert') and not os.path.isfile('/etc/pki/tls/private/localhost.pem'):
+ subprocess.call(['/etc/pki/tls/certs/make-dummy-cert', '/etc/pki/tls/private/localhost.pem'])
+
+- if os.path.isfile('/etc/pki/tls/private/localhost.pem'):
+- postfix_main_settings['smtpd_tls_cert_file'] = "/etc/pki/tls/private/localhost.pem"
+- postfix_main_settings['smtpd_tls_key_file'] = "/etc/pki/tls/private/localhost.pem"
++ if os.path.isfile('/etc/ssl/private/localhost.pem'):
++ postfix_main_settings['smtpd_tls_cert_file'] = "/etc/ssl/private/localhost.pem"
++ postfix_main_settings['smtpd_tls_key_file'] = "/etc/ssl/private/localhost.pem"
+
+ if not os.path.isfile('/etc/postfix/main.cf'):
+ if os.path.isfile('/usr/share/postfix/main.cf.debian'):
+@@ -363,7 +363,7 @@ result_format = "shared+%%s"
+ 'primary_domain': conf.get('kolab', 'primary_domain'),
+ 'ldap_filter': "(|(mail=%m)(alias=%m))",
+ 'ldap_base_dn': conf.get('ldap', 'base_dn'),
+- 'clamdsock': '/var/spool/amavisd/clamd.sock',
++ 'clamdsock': '/var/spool/amavis/clamd.sock',
+ }
+
+ template_file = None
+@@ -438,7 +438,7 @@ result_format = "shared+%%s"
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'restart', 'postfix.service'])
+ subprocess.call(['systemctl', 'restart', 'amavisd.service'])
+- subprocess.call(['systemctl', 'restart', 'clamd@amavisd.service'])
++ subprocess.call(['systemctl', 'restart', 'clamd.service'])
+ subprocess.call(['systemctl', 'restart', 'wallace.service'])
+ elif os.path.isfile('/sbin/service'):
+ subprocess.call(['service', 'postfix', 'restart'])
+@@ -456,7 +456,7 @@ result_format = "shared+%%s"
+ if os.path.isfile('/bin/systemctl'):
+ subprocess.call(['systemctl', 'enable', 'postfix.service'])
+ subprocess.call(['systemctl', 'enable', 'amavisd.service'])
+- subprocess.call(['systemctl', 'enable', 'clamd@amavisd.service'])
++ subprocess.call(['systemctl', 'enable', 'clamd.service'])
+ subprocess.call(['systemctl', 'enable', 'wallace.service'])
+ elif os.path.isfile('/sbin/chkconfig'):
+ subprocess.call(['chkconfig', 'postfix', 'on'])
+diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
+index 174cbc7..1e0d70f 100644
+--- a/pykolab/setup/setup_mysql.py
++++ b/pykolab/setup/setup_mysql.py
+@@ -170,7 +170,7 @@ password='%s'
+ p2.communicate()
+
+ conf.command_set('kolab_wap', 'sql_uri', 'mysql://kolab:%s@localhost/kolab' % (mysql_kolab_password))
+- conf.command_set('kolab_smtp_access_policy', 'cache_uri', 'mysql://kolab:%s@localhost/kolab' % (mysql_kolab_password))
++ conf.command_set('kolab_smtp_access_policy', 'cache_uri', 'mysql+mysqlconnector://kolab:%s@localhost/kolab' % (mysql_kolab_password))
+ else:
+ log.warning(_("Could not find the MySQL Kolab schema file"))
+
+diff --git a/pykolab/setup/setup_php.py b/pykolab/setup/setup_php.py
+index 7eed80d..5c61953 100644
+--- a/pykolab/setup/setup_php.py
++++ b/pykolab/setup/setup_php.py
+@@ -83,7 +83,7 @@ def execute(*args, **kw):
+
+ else:
+ # Search and destroy
+- php_ini = "/etc/php.ini"
++ php_ini = "/etc/php/php.ini"
+ if not os.path.isfile(php_ini):
+ php_ini = "/etc/php5/apache2/php.ini"
+
+@@ -92,6 +92,8 @@ def execute(*args, **kw):
+ return
+
+ myaugeas = Augeas()
++ myaugeas.set('/augeas/load/PHP/incl[last()]', php_ini)
++ myaugeas.load()
+
+ setting_base = '/files%s/' % (php_ini)
+
+diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
+index 6558989..fad35fa 100644
+--- a/pykolab/setup/setup_roundcube.py
++++ b/pykolab/setup/setup_roundcube.py
+@@ -88,9 +88,9 @@ def execute(*args, **kw):
+ 'conf': conf
+ }
+
+- if os.access('/usr/share/roundcubemail/skins/enterprise/', os.R_OK):
++ if os.access('/usr/share/webapps/roundcubemail/skins/enterprise/', os.R_OK):
+ rc_settings['skin'] = 'enterprise'
+- elif os.access('/usr/share/roundcubemail/skins/chameleon/', os.R_OK):
++ elif os.access('/usr/share/webapps/roundcubemail/skins/chameleon/', os.R_OK):
+ rc_settings['skin'] = 'chameleon'
+ else:
+ rc_settings['skin'] = 'larry'
+@@ -139,13 +139,15 @@ def execute(*args, **kw):
+ fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ elif os.path.isdir('/etc/roundcube'):
+ fp = open('/etc/roundcube/%s' % (want_file), 'w')
++ elif os.path.isdir('/etc/webapps/roundcubemail/config'):
++ fp = open('/etc/webapps/roundcubemail/config/%s' % (want_file), 'w')
+
+ if not fp == None:
+ fp.write(t.__str__())
+ fp.close()
+
+ schema_files = []
+- for root, directories, filenames in os.walk('/usr/share/doc/'):
++ for root, directories, filenames in os.walk('/usr/share/webapps/'):
+ directories.sort()
+ for directory in directories:
+ if directory.startswith("roundcubemail"):
+@@ -164,6 +166,8 @@ def execute(*args, **kw):
+ rcpath = '/usr/share/roundcubemail/'
+ elif os.path.isdir('/usr/share/roundcube'):
+ rcpath = '/usr/share/roundcube/'
++ elif os.path.isdir('/usr/share/webapps/roundcubemail'):
++ rcpath = '/usr/share/webapps/roundcubemail/'
+ else:
+ log.error(_("Roundcube installation path not found."))
+ return
diff --git a/systemd-services.patch b/systemd-services.patch
new file mode 100644
index 000000000000..e3620de15a36
--- /dev/null
+++ b/systemd-services.patch
@@ -0,0 +1,47 @@
+diff --git a/kolabd/kolabd.systemd b/kolabd/kolabd.systemd
+index 6d66334..b04a1bb 100644
+--- a/kolabd/kolabd.systemd
++++ b/kolabd/kolabd.systemd
+@@ -7,8 +7,8 @@ Type=forking
+ PIDFile=/run/kolabd/kolabd.pid
+ User=kolab
+ Group=kolab
+-EnvironmentFile=/etc/sysconfig/kolabd
+-ExecStart=/usr/sbin/kolabd $FLAGS --pid-file /run/kolabd/kolabd.pid
++EnvironmentFile=/etc/conf.d/kolabd.conf
++ExecStart=/usr/bin/kolabd $FLAGS --pid-file /run/kolabd/kolabd.pid
+ ExecReload=/bin/kill -HUP $MAINPID
+ ExecStop=/bin/kill -TERM $MAINPID
+
+diff --git a/saslauthd/kolab-saslauthd.systemd b/saslauthd/kolab-saslauthd.systemd
+index a39073c..7712b71 100644
+--- a/saslauthd/kolab-saslauthd.systemd
++++ b/saslauthd/kolab-saslauthd.systemd
+@@ -4,9 +4,9 @@ After=syslog.target network.target
+
+ [Service]
+ Type=forking
+-PIDFile=/var/run/kolab-saslauthd/kolab-saslauthd.pid
+-EnvironmentFile=/etc/sysconfig/kolab-saslauthd
+-ExecStart=/usr/sbin/kolab-saslauthd $FLAGS --socket /run/saslauthd/mux
++PIDFile=/run/kolab-saslauthd/kolab-saslauthd.pid
++EnvironmentFile=/etc/conf.d/kolab-saslauthd.conf
++ExecStart=/usr/bin/kolab-saslauthd $FLAGS --socket /run/saslauthd/mux
+ ExecReload=/bin/kill -HUP $MAINPID
+ ExecStop=/bin/kill -TERM $MAINPID
+
+diff --git a/wallace/wallace.systemd b/wallace/wallace.systemd
+index 38a6604..647822b 100644
+--- a/wallace/wallace.systemd
++++ b/wallace/wallace.systemd
+@@ -7,8 +7,8 @@
+ PIDFile=/run/wallaced/wallaced.pid
+ User=kolab
+ Group=kolab
+-EnvironmentFile=/etc/sysconfig/wallace
+-ExecStart=/usr/sbin/wallaced $FLAGS --pid-file /run/wallaced/wallaced.pid
++EnvironmentFile=/etc/conf.d/wallace.conf
++ExecStart=/usr/bin/wallaced $FLAGS --pid-file /run/wallaced/wallaced.pid
+ ExecReload=/bin/kill -HUP $MAINPID
+ ExecStop=/bin/kill -TERM $MAINPID
+
diff --git a/templates.patch b/templates.patch
new file mode 100644
index 000000000000..142d3626e214
--- /dev/null
+++ b/templates.patch
@@ -0,0 +1,101 @@
+diff --git a/share/templates/amavisd.conf.tpl b/share/templates/amavisd.conf.tpl
+index 1fa43fb..794292a 100644
+--- a/share/templates/amavisd.conf.tpl
++++ b/share/templates/amavisd.conf.tpl
+@@ -20,7 +20,7 @@ use strict;
+
+ \$mydomain = '$primary_domain'; # a convenient default for other settings
+
+-\$MYHOME = '/var/spool/amavisd'; # a convenient default for other settings, -H
++\$MYHOME = '/var/spool/amavis'; # a convenient default for other settings, -H
+ \$TEMPBASE = "\$MYHOME/tmp"; # working directory, needs to exist, -T
+ \$ENV{TMPDIR} = \$TEMPBASE; # environment variable TMPDIR, used by SA, etc.
+ \$QUARANTINEDIR = undef; # -Q
+@@ -32,8 +32,8 @@ use strict;
+
+ \$db_home = "\$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D
+ # \$helpers_home = "\$MYHOME/var"; # working directory for SpamAssassin, -S
+-\$lock_file = "/var/run/amavisd/amavisd.lock"; # -L
+-\$pid_file = "/var/run/amavisd/amavisd.pid"; # -P
++\$lock_file = "/var/run/amavis/amavisd.lock"; # -L
++\$pid_file = "/var/run/amavis/amavisd.pid"; # -P
+ #NOTE: create directories \$MYHOME/tmp, \$MYHOME/var, \$MYHOME/db manually
+
+ \$log_level = 9; # verbosity 0..5, -d
+diff --git a/share/templates/imapd.conf.tpl b/share/templates/imapd.conf.tpl
+index 194135e..2d397a7 100644
+--- a/share/templates/imapd.conf.tpl
++++ b/share/templates/imapd.conf.tpl
+@@ -6,8 +6,8 @@ sendmail: /usr/sbin/sendmail
+ sasl_pwcheck_method: auxprop saslauthd
+ sasl_mech_list: PLAIN LOGIN
+ allowplaintext: no
+-tls_server_cert: /etc/pki/cyrus-imapd/cyrus-imapd.pem
+-tls_server_key: /etc/pki/cyrus-imapd/cyrus-imapd.pem
++tls_server_cert: /etc/ssl/private/localhost.pem
++tls_server_key: /etc/ssl/private/localhost.pem
+ # uncomment this if you're operating in a DSCP environment (RFC-4594)
+ # qosmarking: af13
+ auth_mech: pts
+@@ -30,7 +30,7 @@ ldap_timeout: 10
+ ldap_time_limit: 10
+ unixhierarchysep: 1
+ virtdomains: userid
+-annotation_definitions: /etc/imapd.annotations.conf
++annotation_definitions: /etc/cyrus/imapd.annotations.conf
+ sieve_extensions: fileinto reject envelope body vacation imapflags notify include regex subaddress relational copy date index
+ allowallsubscribe: 0
+ allowusermoves: 1
+diff --git a/share/templates/master.cf.tpl b/share/templates/master.cf.tpl
+index 114dca1..2a9aa61 100644
+--- a/share/templates/master.cf.tpl
++++ b/share/templates/master.cf.tpl
+@@ -105,17 +105,17 @@ smtp-wallace unix - - n - 3 smtp
+ -o smtpd_authorized_xforward_hosts=127.0.0.0/8
+
+ recipient_policy unix - n n - - spawn
+- user=kolab-n argv=$kolab_sap_executable_path --verify-recipient
++ user=kolab argv=$kolab_sap_executable_path --verify-recipient
+
+ recipient_policy_incoming unix - n n - - spawn
+- user=kolab-n argv=$kolab_sap_executable_path --verify-recipient --allow-unauthenticated
++ user=kolab argv=$kolab_sap_executable_path --verify-recipient --allow-unauthenticated
+
+ sender_policy unix - n n - - spawn
+- user=kolab-n argv=$kolab_sap_executable_path --verify-sender
++ user=kolab argv=$kolab_sap_executable_path --verify-sender
+
+ sender_policy_incoming unix - n n - - spawn
+- user=kolab-n argv=$kolab_sap_executable_path --verify-sender --allow-unauthenticated
++ user=kolab argv=$kolab_sap_executable_path --verify-sender --allow-unauthenticated
+
+ submission_policy unix - n n - - spawn
+- user=kolab-n argv=$kolab_sap_executable_path --verify-sender --verify-recipient
++ user=kolab argv=$kolab_sap_executable_path --verify-sender --verify-recipient
+
+diff --git a/share/templates/roundcubemail/config.inc.php.tpl b/share/templates/roundcubemail/config.inc.php.tpl
+index 7206a09..b8505e0 100644
+--- a/share/templates/roundcubemail/config.inc.php.tpl
++++ b/share/templates/roundcubemail/config.inc.php.tpl
+@@ -7,8 +7,8 @@
+ \$config['des_key'] = "$des_key";
+ \$config['username_domain'] = '$primary_domain';
+ \$config['use_secure_urls'] = true;
+- \$config['assets_path'] = '/roundcubemail/assets/';
+- \$config['assets_dir'] = '/usr/share/roundcubemail/public_html/assets/';
++ \$config['assets_path'] = '.';
++ \$config['assets_dir'] = '/usr/share/webapps/roundcubemail/';
+
+ \$config['mail_domain'] = '';
+
+@@ -132,8 +132,8 @@
+ \$config['mime_magic'] = null;
+ \$config['im_identify_path'] = '/usr/bin/identify';
+ \$config['im_convert_path'] = '/usr/bin/convert';
+- \$config['log_dir'] = 'logs/';
+- \$config['temp_dir'] = '/var/lib/roundcubemail/';
++ \$config['log_dir'] = '/var/log/roundcubemail/';
++ \$config['temp_dir'] = '/var/cache/roundcubemail/';
+
+ // Some additional default folders (archive plugin)
+ \$config['archive_mbox'] = 'Archive';