6 commits - kolabd/__init__.py kolabd/process.py pykolab/auth pykolab/setup

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Fri May 18 11:21:17 CEST 2012


 kolabd/__init__.py               |    8 +++++++-
 kolabd/process.py                |    7 ++++++-
 pykolab/auth/ldap/__init__.py    |   10 ++++++++--
 pykolab/setup/setup_freebusy.py  |    3 +++
 pykolab/setup/setup_mta.py       |    2 +-
 pykolab/setup/setup_roundcube.py |    3 +++
 pykolab/setup/setup_zpush.py     |    3 +++
 7 files changed, 31 insertions(+), 5 deletions(-)

New commits:
commit 2b5984074d09e517b53b993206b93c1014351649
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Fri May 18 10:18:35 2012 +0100

    cache_entry is an object with attributes, not a dictionary (#784)

diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 20c5d65..a4b60be 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -949,7 +949,7 @@ class LDAP(pykolab.base.Base):
 
         cache_entry = cache.get_entry(self.domain, entry)
         if not cache_entry == None:
-            old_canon_attr = cache_entry['result_attribute']
+            old_canon_attr = cache_entry.result_attribute
 
         # See if we have to trigger the recipient policy. Only really applies to
         # situations in which the result_attribute is used in the old or in the


commit 8b8ce00d11d4b75e1d735864ff462627d257c462
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Fri May 18 10:17:30 2012 +0100

    Extra verbosity on the recipient policy in debug level 8
    Add type resource to be tested for
    Add _change_none_None() function to address traceback when attempting to find an entry type and failing

diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index d1ece6f..20c5d65 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -629,6 +629,9 @@ class LDAP(pykolab.base.Base):
 
                 secondary_mail_addresses.append(__secondary_mail)
 
+            log.debug(_("Recipient policy composed the following set of secondary " + \
+                    "email addresses: %r") % (secondary_mail_addresses), level=8)
+
             if not secondary_mail_addresses == None:
                 secondary_mail_addresses = list(set(secondary_mail_addresses))
                 # Avoid duplicates
@@ -1019,6 +1022,9 @@ class LDAP(pykolab.base.Base):
         """
         pass
 
+    def _change_none_None(self, entry, change):
+        pass
+
     def _change_none_role(self, entry, change):
         """
             A role entry as part of the initial search result set.
@@ -1283,7 +1289,7 @@ class LDAP(pykolab.base.Base):
             Compose a filter using the relevant settings from configuration.
         """
         _filter = "(|"
-        for _type in ['user', 'group', 'sharedfolder']:
+        for _type in ['user', 'group', 'resource', 'sharedfolder']:
             __filter = self.config_get('kolab_%s_filter' % (_type))
             if __filter == None:
                 __filter = self.config_get('%s_filter' % (_type))


commit c8db0733e61c63a298b918933eafae415833f798
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu May 17 13:24:51 2012 +0100

    Rename search_filter => query_filter (#782)

diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index c86e57c..c305267 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -170,7 +170,7 @@ domain = ldap:/etc/postfix/ldap/mydestination.cf
 bind_dn = %(service_bind_dn)s
 bind_pw = %(service_bind_pw)s
 
-search_filter = (&(|(mail=%%s)(alias=%%s))(objectclass=kolabinetorgperson))
+query_filter = (&(|(mail=%%s)(alias=%%s))(objectclass=kolabinetorgperson))
 result_attribute = mail
 """ % {
                         "base_dn": conf.get('ldap', 'base_dn'),


commit 050f1c8b89073b121d27ff90b885131b88e7c38e
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu May 17 12:59:54 2012 +0100

    Sleep 2 seconds before attempting to restart the httpd service (#773)

diff --git a/pykolab/setup/setup_freebusy.py b/pykolab/setup/setup_freebusy.py
index 3b522f1..22c74c4 100644
--- a/pykolab/setup/setup_freebusy.py
+++ b/pykolab/setup/setup_freebusy.py
@@ -21,6 +21,7 @@ from Cheetah.Template import Template
 import os
 import subprocess
 import sys
+import time
 
 import components
 
@@ -106,6 +107,8 @@ def execute(*args, **kw):
             fp.write(t.__str__())
             fp.close()
 
+    time.sleep(2)
+
     if os.path.isfile('/bin/systemctl'):
         subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
         subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index ad23d6c..5970a65 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -24,6 +24,7 @@ import random
 import re
 import subprocess
 import sys
+import time
 
 import components
 
@@ -170,6 +171,8 @@ def execute(*args, **kw):
     p1.stdout.close()
     p2.communicate()
 
+    time.sleep(2)
+
     if os.path.isfile('/bin/systemctl'):
         subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
         subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])
diff --git a/pykolab/setup/setup_zpush.py b/pykolab/setup/setup_zpush.py
index 01739c3..3aa7a0b 100644
--- a/pykolab/setup/setup_zpush.py
+++ b/pykolab/setup/setup_zpush.py
@@ -21,6 +21,7 @@ from Cheetah.Template import Template
 import os
 import subprocess
 import sys
+import time
 
 import components
 
@@ -85,6 +86,8 @@ def execute(*args, **kw):
             fp.write(t.__str__())
             fp.close()
 
+    time.sleep(2)
+
     if os.path.isfile('/bin/systemctl'):
         subprocess.call(['/bin/systemctl', 'restart', 'httpd.service'])
         subprocess.call(['/bin/systemctl', 'enable', 'httpd.service'])


commit 0061e2aab75c2509f4e0cd999723f9faa462fe94
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu May 17 10:25:12 2012 +0100

    Resolve pylint long lines issue

diff --git a/kolabd/__init__.py b/kolabd/__init__.py
index 12b2615..6939326 100644
--- a/kolabd/__init__.py
+++ b/kolabd/__init__.py
@@ -241,7 +241,13 @@ class KolabDaemon(object):
             if len(removed_domains) == 0 and len(added_domains) == 0:
                 time.sleep(600)
 
-            log.debug(_("added domains: %r, removed domains: %r") % (added_domains, removed_domains), level=8)
+            log.debug(
+                    _("added domains: %r, removed domains: %r") % (
+                            added_domains,
+                            removed_domains
+                        ),
+                    level=8
+                )
 
             for domain in added_domains:
                 domain_auth[domain] = Process(domain)


commit f79a60a70c8562e35033477d32c2ab70792be4b1
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu May 17 10:24:43 2012 +0100

    Update kolabd/process to set it's own name after the domain name being served

diff --git a/kolabd/process.py b/kolabd/process.py
index bf65623..9fe525d 100644
--- a/kolabd/process.py
+++ b/kolabd/process.py
@@ -29,7 +29,12 @@ conf = pykolab.getConf()
 class KolabdProcess(multiprocessing.Process):
     def __init__(self, domain):
         self.domain = domain
-        multiprocessing.Process.__init__(self, target=self.synchronize, args=(domain,))
+        multiprocessing.Process.__init__(
+                self,
+                target=self.synchronize,
+                args=(domain,),
+                name="Kolab(%s)" % domain
+            )
 
     def synchronize(self, domain):
         auth = Auth(domain)





More information about the commits mailing list