Projects
Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
pykolab.spec
Changed
@@ -28,18 +28,15 @@ Summary: Kolab Groupware Solution Name: pykolab -Version: 0.8.0 +Version: 0.8.1 Release: 1%{?dist} License: GPLv3+ Group: Applications/System URL: http://kolab.org/ -Source0: pykolab-0.8.0.tar.gz +Source0: pykolab-0.8.1.tar.gz Source1: pykolab.logrotate -Patch0001: 0001-Fix-mistake-in-manticore-configuration-template.patch -Patch0002: 0002-Fix-default-template-for-Guam.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch %if 0%{?suse_version} @@ -214,9 +211,6 @@ %prep %setup -q -%patch0001 -p1 -%patch0002 -p1 - %build autoreconf -v || automake --add-missing && autoreconf -v %configure
View file
0001-Fix-mistake-in-manticore-configuration-template.patch
Deleted
@@ -1,25 +0,0 @@ -From 6769c10da417e65698f71e0f34d0b15a597a3641 Mon Sep 17 00:00:00 2001 -From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> -Date: Tue, 19 Jan 2016 12:55:44 +0100 -Subject: [PATCH 1/2] Fix mistake in manticore configuration template - ---- - share/templates/manticore.js.tpl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/share/templates/manticore.js.tpl b/share/templates/manticore.js.tpl -index 90a75ec..c3a31bd 100644 ---- a/share/templates/manticore.js.tpl -+++ b/share/templates/manticore.js.tpl -@@ -17,7 +17,7 @@ module.exports = { - CHWALA_SERVER: 'http://$fqdn/chwala/api/document', - ROUNDCUBE_SERVER: 'http://$fqdn/roundcubemail', - -- AUTH_ENCRYPTION_KEY: '$auth_secret', -+ AUTH_ENCRYPTION_KEY: '$auth_key', - - LDAP_SERVER: 'ldap://$server_host:389', - LDAP_BASE: '$user_base_dn', --- -2.4.3 -
View file
0002-Fix-default-template-for-Guam.patch
Deleted
@@ -1,25 +0,0 @@ -From 19912492bdadb1f3c90d0ee06ba5119193ced726 Mon Sep 17 00:00:00 2001 -From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> -Date: Mon, 25 Jan 2016 13:58:17 +0100 -Subject: [PATCH 2/2] Fix default template for Guam - ---- - share/templates/guam.sys.config.tpl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/share/templates/guam.sys.config.tpl b/share/templates/guam.sys.config.tpl -index 2ad9456..955e17b 100644 ---- a/share/templates/guam.sys.config.tpl -+++ b/share/templates/guam.sys.config.tpl -@@ -18,7 +18,7 @@ - { - imap, [ - { port, 143 }, -- { imap_server, imap }, -+ { imap_server, imaps }, - { - rules, [ - { filter_groupware, [] } --- -2.4.3 -
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +pykolab (0.8.1-0~kolab1) unstable; urgency=low + + * Fix setup + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Tue, 23 Feb 2016 01:49:00 +0100 + pykolab (0.8.0-0~kolab2) unstable; urgency=low * Fix guam template
View file
pykolab-0.8.0.tar.gz/pykolab/auth/ldap/__init__.py -> pykolab-0.8.1.tar.gz/pykolab/auth/ldap/__init__.py
Changed
@@ -1195,7 +1195,7 @@ try: self.ldap.simple_bind_s(bind_dn, bind_pw) self.bind = True - except ldap.SERVER_DOWN: + except ldap.SERVER_DOWN, errmsg: log.error(_("LDAP server unavailable: %r") % (errmsg)) log.error(_("%s") % (traceback.format_exc())) except ldap.INVALID_CREDENTIALS:
View file
pykolab-0.8.0.tar.gz/pykolab/imap/__init__.py -> pykolab-0.8.1.tar.gz/pykolab/imap/__init__.py
Changed
@@ -522,6 +522,9 @@ if not hasattr(self, 'domain'): self.domain == None + if self.domain == None and len(mailbox_base_name.split('@')) > 1: + self.domain = mailbox_base_name.split('@')[1] + if not self.domain == None: if conf.has_option(self.domain, "autocreate_folders"): _additional_folders = conf.get_raw( @@ -529,6 +532,20 @@ "autocreate_folders" ) + else: + from pykolab.auth import Auth + auth = Auth() + auth.connect() + domains = auth._list_domains(self.domain) + auth.disconnect() + if len(domains) > 0: + (primary,secondaries) = domains[1] + if conf.has_option(primary, "autocreate_folders"): + _additional_folders = conf.get_raw( + primary, + "autocreate_folders" + ) + if _additional_folders == None: if conf.has_option('kolab', "autocreate_folders"): _additional_folders = conf.get_raw(
View file
pykolab-0.8.0.tar.gz/pykolab/setup/__init__.py -> pykolab-0.8.1.tar.gz/pykolab/setup/__init__.py
Changed
@@ -21,6 +21,7 @@ import sys import pykolab +from pykolab.translate import _ log = pykolab.getLogger('pykolab.setup') conf = pykolab.getConf() @@ -40,6 +41,36 @@ to_execute.append(sys.argv[arg_num].replace('-','_')) def run(self): + if os.path.isfile('/sys/fs/selinux/enforce'): + if os.access('/sys/fs/selinux/enforce', os.R_OK): + # Set a gentle default because strictly speaking, + # setup won't fail (run-time does) + enforce = "0" + + with open('/sys/fs/selinux/enforce', 'r') as f: + enforce = f.read() + + if enforce.strip() == "1": + log.fatal( + _("SELinux currently enforcing. Read " + \ + "https://git.kolab.org/u/1") + ) + + sys.exit(1) + + if os.path.isfile('/etc/selinux/config'): + if os.access('/etc/selinux/config', os.R_OK): + with open('/etc/selinux/config', 'r') as f: + for line in f: + if line.strip() == "SELINUX=enforcing": + log.fatal( + _("SELinux configured to enforce a " + \ + "policy on startup. Read " + \ + "https://git.kolab.org/u/1") + ) + + sys.exit(1) + components.execute('_'.join(to_execute)) if os.path.exists('/tmp/kolab-setup-my.cnf'):
View file
pykolab-0.8.0.tar.gz/pykolab/setup/setup_mta.py -> pykolab-0.8.1.tar.gz/pykolab/setup/setup_mta.py
Changed
@@ -442,6 +442,20 @@ myaugeas.save() myaugeas.close() + if os.path.isfile('/usr/lib/systemd/system/clamd@.service'): + from ConfigParser import SafeConfigParser + unitfile = SafeConfigParser() + unitfile.optionxform = str + unitfile.read('/usr/lib/systemd/system/clamd@.service') + if not unitfile.has_section('Install'): + unitfile.add_section('Install') + + if not unitfile.has_option('Install', 'WantedBy'): + unitfile.set('Install', 'WantedBy', 'multi-user.target') + + with open('/etc/systemd/system/clamd@.service', 'wb') as f: + unitfile.write(f) + amavisservice = 'amavisd.service' clamavservice = 'clamd@amavisd.service' if os.path.isfile('/usr/lib/systemd/system/amavis.service'):
View file
pykolab-0.8.0.tar.gz/pykolab/setup/setup_roundcube.py -> pykolab-0.8.1.tar.gz/pykolab/setup/setup_roundcube.py
Changed
@@ -176,7 +176,8 @@ if len(schema_files) > 0: break - break + if len(schema_files) > 0: + break for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'): for filename in filenames: @@ -192,6 +193,23 @@ if not schema_filepath in schema_files: schema_files.append(schema_filepath) + schema_files = [] + for root, directories, filenames in os.walk('/usr/share/doc/'): + directories.sort() + for directory in directories: + if directory.startswith("chwala"): + for nested_root, nested_directories, nested_filenames in os.walk(os.path.join(root, directory)): + for filename in nested_filenames: + if filename.startswith('mysql.initial') and filename.endswith('.sql'): + schema_filepath = os.path.join(nested_root,filename) + if not schema_filepath in schema_files: + schema_files.append(schema_filepath) + + if len(schema_files) > 0: + break + if len(schema_files) > 0: + break + if not os.path.isfile('/tmp/kolab-setup-my.cnf'): utils.multiline_message( """Please supply the MySQL root password"""
View file
pykolab-0.8.0.tar.gz/setup-kolab.py -> pykolab-0.8.1.tar.gz/setup-kolab.py
Changed
@@ -29,6 +29,7 @@ import pykolab from pykolab.setup import Setup +from pykolab.translate import _ try: from pykolab.constants import *
View file
pykolab-0.8.0.tar.gz/share/templates/guam.sys.config.tpl -> pykolab-0.8.1.tar.gz/share/templates/guam.sys.config.tpl
Changed
@@ -18,7 +18,7 @@ { imap, [ { port, 143 }, - { imap_server, imap }, + { imap_server, imaps }, { rules, [ { filter_groupware, [] }
View file
pykolab-0.8.0.tar.gz/share/templates/manticore.js.tpl -> pykolab-0.8.1.tar.gz/share/templates/manticore.js.tpl
Changed
@@ -17,7 +17,7 @@ CHWALA_SERVER: 'http://$fqdn/chwala/api/document', ROUNDCUBE_SERVER: 'http://$fqdn/roundcubemail', - AUTH_ENCRYPTION_KEY: '$auth_secret', + AUTH_ENCRYPTION_KEY: '$auth_key', LDAP_SERVER: 'ldap://$server_host:389', LDAP_BASE: '$user_base_dn',
View file
pykolab-0.8.0.tar.gz/wallace/module_gpgencrypt.py -> pykolab-0.8.1.tar.gz/wallace/module_gpgencrypt.py
Changed
@@ -28,6 +28,12 @@ from email.utils import formataddr from email.utils import getaddresses +import email.mime.application +import email.mime.multipart +import email.mime.text +import email.encoders +import gnupg + import modules import pykolab @@ -45,6 +51,40 @@ def description(): return """Encrypt messages to the recipient(s).""" +def pgp_mime(msg, recepients): + gpg = gnupg.GPG(gnupghome='/var/lib/kolab/.gnupg', verbose=conf.debuglevel > 8) + gpg.encoding = 'utf-8' + + msg = msg + + msg_boundary = str(msg.get_boundary()) + msg_content_type = str(msg.get_content_type()) + payload = msg.get_payload() + + content = "Content-Type: " + msg_content_type + ";" + "\n boundary=\"" + msg_boundary + "\"\n\n" + payload + encrypted_content = gpg.encrypt(content, recepients, always_trust=True) + msg.set_type("multipart/encrypted") + msg.set_param("protocol","application/pgp-encrypted") + + msg_boundary_gpg = "--boundary-gpg-encryption-42" + + msg_preamble = "This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)\n\ +" + msg_boundary_gpg + "\n\ +Content-Type: application/pgp-encrypted\n\ +Content-Description: PGP/MIME version identification\n\ +\n\ +Version: 1\n\ +\n\ +" + msg_boundary_gpg + "\n\ +Content-Type: application/octet-stream; name=\"encrypted.asc\"\n\ +Content-Description: OpenPGP encrypted message\n\ +Content-Disposition: inline; filename=\"encrypted.asc\"\n\n" + + msg.set_boundary(msg_boundary_gpg) + msg.set_payload(msg_preamble + str(encrypted_content) + "\n" + msg_boundary_gpg) + + return msg + def execute(*args, **kw): if not os.path.isdir(mybasepath): os.makedirs(mybasepath) @@ -175,7 +215,6 @@ nocrypt_rcpts = [] - import gnupg gpg = gnupg.GPG(gnupghome='/var/lib/kolab/.gnupg', verbose=conf.debuglevel > 8) gpg.encoding = 'utf-8' @@ -211,16 +250,29 @@ encrypt_rcpts.append(key_local) payload = message.get_payload() - print "payload:", payload + #print "payload:", payload if len(encrypt_rcpts) < 1: return filepath - encrypted_data = gpg.encrypt(payload, encrypt_rcpts, always_trust=True) - encrypted_string = str(encrypted_data) + if "multipart" in message.get_content_type(): + + log.debug(_("Mime Message - we need to build multipart/encrypted structure"), level=8) + + msg = message + enc_mime_message = pgp_mime(msg, encrypt_rcpts) + + message = enc_mime_message + + else: + + log.debug(_("No Mime Message - encypt plain"), level=8) + + encrypted_data = gpg.encrypt(payload, encrypt_rcpts, always_trust=True) + encrypted_string = str(encrypted_data) - print "encrypted string:", encrypted_string + message.set_payload(encrypted_string) - message.set_payload(encrypted_string) + message.add_header('X-wallace-gpg-encrypted', 'true') (fp, new_filepath) = tempfile.mkstemp(dir="/var/spool/pykolab/wallace/gpgencrypt/ACCEPT") os.write(fp, message.as_string())
View file
pykolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: pykolab Binary: pykolab, kolab-cli, kolab-conf, kolab-saslauthd, kolab-server, kolab-telemetry, kolab-xml, wallace Architecture: all -Version: 0.8.0-0~kolab2 +Version: 0.8.1-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org @@ -39,5 +39,5 @@ pykolab deb python optional wallace deb python optional Files: - 00000000000000000000000000000000 0 pykolab-0.8.0.tar.gz + 00000000000000000000000000000000 0 pykolab-0.8.1.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.