Projects
Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 30
View file
pykolab.spec
Changed
@@ -29,7 +29,7 @@ Summary: Kolab Groupware Solution Name: pykolab -Version: 0.8.4 +Version: 0.8.5 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -39,8 +39,6 @@ Source1: pykolab.logrotate Patch0001: pykolab-0.8-patch-out-manticore.patch -Patch0002: pykolab-0.8.4-patch-freshclam-subprocess.patch -Patch0003: pykolab-0.8.4-patch-LDAP-Timeout-T1414.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch @@ -247,9 +245,6 @@ %patch0001 -p1 %endif -%patch0002 -p1 -%patch0003 -p1 - %build autoreconf -v || automake --add-missing && autoreconf -v %configure @@ -585,6 +580,9 @@ %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace %changelog +* Thu Oct 06 2016 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.8.5-1 +- Release of version 0.8.5 + * Wed Oct 05 2016 Timotheus Pokorra <tp@tbits.net> - 0.8.4-3 - Add a patch for T1414: Set LDAP TIMEOUT option only on "immediate" connection
View file
pykolab-0.8.4-patch-LDAP-Timeout-T1414.patch
Deleted
@@ -1,22 +0,0 @@ -diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py ---- a/pykolab/auth/ldap/__init__.py -+++ b/pykolab/auth/ldap/__init__.py -@@ -404,7 +404,7 @@ - - return retval - -- def connect(self, priv=None, immediate=True): -+ def connect(self, priv=None, immediate=False): - """ - Connect to the LDAP server through the uri configured. - """ -@@ -441,7 +441,8 @@ - retry_delay=retry_delay - ) - -- conn.set_option(ldap.OPT_TIMEOUT, 10) -+ if immediate: -+ conn.set_option(ldap.OPT_TIMEOUT, 10) - - conn.protocol_version = 3 - conn.supported_controls = []
View file
pykolab-0.8.4-patch-freshclam-subprocess.patch
Deleted
@@ -1,18 +0,0 @@ -diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py -index 53293cf..0a13fc3 100644 ---- a/pykolab/setup/setup_mta.py -+++ b/pykolab/setup/setup_mta.py -@@ -472,11 +472,11 @@ result_format = "shared+%%s" - log.error(_("Could not find a ClamAV update configuration file")) - - if os.path.isfile('/etc/freshclam.conf'): -- subprocess.call( -+ subprocess.call([ - '/usr/bin/freshclam', - '--quiet', - '--datadir="/var/lib/clamav"' -- ) -+ ]) - - amavisservice = 'amavisd.service' - clamavservice = 'clamd@amavisd.service'
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +pykolab (0.8.5-0~kolab1) unstable; urgency=low + + * Upstream release of version 0.8.5 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Thu, 6 Oct 2016 01:49:00 +0100 + pykolab (0.8.4-0~kolab1) unstable; urgency=low * Upstream release of version 0.8.4
View file
debian.series
Changed
@@ -1,3 +1,1 @@ cyrus-imapd.conf-cert-paths.patch -p1 -pykolab-0.8.4-patch-freshclam-subprocess.patch -p1 -pykolab-0.8.4-patch-LDAP-Timeout-T1414.patch -p1
View file
pykolab-0.8.4.tar.gz/configure.ac -> pykolab-0.8.5.tar.gz/configure.ac
Changed
@@ -1,4 +1,4 @@ -AC_INIT([pykolab], 0.8.4) +AC_INIT([pykolab], 0.8.5) AC_SUBST([RELEASE], 1) AC_CONFIG_SRCDIR(pykolab/constants.py.in)
View file
pykolab-0.8.4.tar.gz/pykolab/auth/__init__.py -> pykolab-0.8.5.tar.gz/pykolab/auth/__init__.py
Changed
@@ -193,7 +193,7 @@ else: return result - def find_recipient(self, address, domain=None): + def find_recipient(self, address, domain=None, search_attrs=None): """ Find one or more entries corresponding to the recipient address. """ @@ -203,7 +203,7 @@ if not self._auth or self._auth == None: self.connect(domain=domain) - result = self._auth.find_recipient(address) + result = self._auth.find_recipient(address, search_attrs=search_attrs) if isinstance(result, list) and len(result) == 1: return result[0]
View file
pykolab-0.8.4.tar.gz/pykolab/auth/ldap/__init__.py -> pykolab-0.8.5.tar.gz/pykolab/auth/ldap/__init__.py
Changed
@@ -404,7 +404,7 @@ return retval - def connect(self, priv=None, immediate=True): + def connect(self, priv=None, immediate=False): """ Connect to the LDAP server through the uri configured. """ @@ -441,7 +441,8 @@ retry_delay=retry_delay ) - conn.set_option(ldap.OPT_TIMEOUT, 10) + if immediate: + conn.set_option(ldap.OPT_TIMEOUT, 10) conn.protocol_version = 3 conn.supported_controls = [] @@ -674,7 +675,7 @@ return _entry_dns - def find_recipient(self, address="*", exclude_entry_id=None): + def find_recipient(self, address="*", exclude_entry_id=None, search_attrs=None): """ Given an address string or list of addresses, find one or more valid recipients. @@ -684,6 +685,9 @@ Specify an additional entry_id to exclude to exclude matches against the current entry. + + In search_attrs you can specify list of search attributes. By default + mail_attributes are used. """ self._bind() @@ -700,13 +704,13 @@ __filter_suffix = "" kolab_filter = self._kolab_filter() - recipient_address_attrs = self.config_get_list("mail_attributes") - result_attributes = [] - - for recipient_address_attr in recipient_address_attrs: - result_attributes.append(recipient_address_attr) + if search_attrs is not None: + recipient_address_attrs = search_attrs + else: + recipient_address_attrs = self.config_get_list("mail_attributes") + result_attributes = recipient_address_attrs result_attributes.append(self.config_get('unique_attribute')) _filter = "(|"
View file
pykolab-0.8.4.tar.gz/pykolab/cli/cmd_sync_mailhost_attrs.py -> pykolab-0.8.5.tar.gz/pykolab/cli/cmd_sync_mailhost_attrs.py
Changed
@@ -71,8 +71,11 @@ auth = Auth() auth.connect() - domains = auth.list_domains() + result_attribute = conf.get('cyrus-sasl', 'result_attribute') + if result_attribute is None: + result_attribute = 'mail' + domains = auth.list_domains() folders = imap.lm() imap_domains_not_domains = [] @@ -140,7 +143,7 @@ recipient = auth.find_folder_resource(folder) else: r_folder = '/'.join(folder.split('/')[1:]) - recipient = auth.find_recipient(r_folder) + recipient = auth.find_recipient(r_folder, search_attrs=[result_attribute]) if (isinstance(recipient, list)): if len(recipient) > 1: @@ -188,6 +191,6 @@ if folder.startswith('shared/'): recipient = auth.find_folder_resource(folder) else: - recipient = auth.find_recipient('/'.join(folder.split('/')[1:])) + recipient = auth.find_recipient('/'.join(folder.split('/')[1:]), search_attrs=[result_attribute]) print folder, server, recipient
View file
pykolab-0.8.4.tar.gz/pykolab/imap/__init__.py -> pykolab-0.8.5.tar.gz/pykolab/imap/__init__.py
Changed
@@ -408,8 +408,6 @@ if metadata_path.startswith('/shared/'): shared = True - - if metadata_path.startswith('/shared/'): metadata_path = metadata_path.replace('/shared/', '/') elif metadata_path.startswith('/private/'): shared = False
View file
pykolab-0.8.4.tar.gz/pykolab/imap/dovecot.py -> pykolab-0.8.5.tar.gz/pykolab/imap/dovecot.py
Changed
@@ -78,20 +78,22 @@ entries = " /private%s" % pattern typ, dat = self._simple_command('GETMETADATA', options, mailbox, entries) + return self._untagged_response(typ, dat, 'METADATA') def imap_setmetadata(self, mailbox, desc, value, shared=False): if value: - value = quote(value) + value = value.join(['"', '"']) else: value = "NIL" if shared: typ, dat = self._simple_command('SETMETADATA', mailbox, - "(/shared/%s %s)" % (desc,value)) + "(/shared%s %s)" % (desc,value)) else: typ, dat = self._simple_command('SETMETADATA', mailbox, - "(/private/%s %s)" % (desc,value)) + "(/private%s %s)" % (desc,value)) + return self._untagged_response(typ, dat, 'METADATA') # Bind the new methods to the cyruslib IMAP4 and IMAP4_SSL objects
View file
pykolab-0.8.4.tar.gz/pykolab/itip/__init__.py -> pykolab-0.8.5.tar.gz/pykolab/itip/__init__.py
Changed
@@ -2,12 +2,14 @@ import pykolab import traceback import kolabformat +import re from pykolab.xml import to_dt from pykolab.xml import event_from_ical from pykolab.xml import todo_from_ical from pykolab.xml import participant_status_label from pykolab.translate import _ +from tzlocal import windows_tz log = pykolab.getLogger('pykolab.wallace') @@ -18,7 +20,6 @@ def todos_from_message(message, methods=None): return objects_from_message(message, ["VTODO"], methods) - def objects_from_message(message, objnames, methods=None): """ Obtain the iTip payload from email.message <message> @@ -51,6 +52,9 @@ log.debug(_("Raw iTip payload (%r): %r") % (part.get_param('charset'), itip_payload), level=9) + # Convert unsupported timezones, etc. + itip_payload = _convert_itip_payload(itip_payload) + # Python iCalendar prior to 3.0 uses "from_string". if hasattr(icalendar.Calendar, 'from_ical'): cal = icalendar.Calendar.from_ical(itip_payload) @@ -141,7 +145,6 @@ return itip_objects - def check_event_conflict(kolab_event, itip_event): """ Determine whether the given kolab event conflicts with the given itip event @@ -210,10 +213,35 @@ return conflict - def _is_transparent(event): return event.get_transparency() or event.get_status() == kolabformat.StatusCancelled +def _convert_itip_payload(itip): + matchlist = re.findall("^((DTSTART|DTEND|DUE|EXDATE|COMPLETED)[:;][^\n]+)$", itip, re.MULTILINE) + + for match in matchlist: + match = match[0] + search = re.search(";TZID=([^:;]+)", match) + + if search: + tzorig = tzdest = search.group(1).replace('"', '') + + # timezone in Olson-database format, nothing to convert + if re.match("[a-zA-Z]+/[a-zA-Z0-9_+-]+", tzorig): + continue + + # convert timezone from windows format to Olson + if tzorig in windows_tz.win_tz: + tzdest = windows_tz.win_tz[tzorig] + + # @TODO: Should be prefer server time if it has the same offset? + + # replace old with new timezone name + if tzorig != tzdest: + replace = match.replace(search.group(0), ";TZID=" + tzdest) + itip = itip.replace("\n" + match, "\n" + replace) + + return itip def check_date_conflict(_es, _ee, _is, _ie): """ @@ -238,7 +266,7 @@ conflict = True else: conflict = False - + return conflict
View file
pykolab-0.8.4.tar.gz/pykolab/setup/setup_mta.py -> pykolab-0.8.5.tar.gz/pykolab/setup/setup_mta.py
Changed
@@ -472,11 +472,11 @@ log.error(_("Could not find a ClamAV update configuration file")) if os.path.isfile('/etc/freshclam.conf'): - subprocess.call( + subprocess.call([ '/usr/bin/freshclam', '--quiet', '--datadir="/var/lib/clamav"' - ) + ]) amavisservice = 'amavisd.service' clamavservice = 'clamd@amavisd.service'
View file
pykolab-0.8.4.tar.gz/pykolab/xml/todo.py -> pykolab-0.8.5.tar.gz/pykolab/xml/todo.py
Changed
@@ -38,6 +38,9 @@ class Todo(Event): type = 'task' + # This have to be a copy (see T1221) + properties_map = Event.properties_map.copy() + def __init__(self, from_ical="", from_string=""): self._attendees = [] self._categories = []
View file
pykolab-0.8.4.tar.gz/share/templates/roundcubemail/calendar.inc.php.tpl -> pykolab-0.8.5.tar.gz/share/templates/roundcubemail/calendar.inc.php.tpl
Changed
@@ -13,6 +13,13 @@ \$config['calendar_itip_smtp_user'] = ''; \$config['calendar_itip_smtp_pass'] = ''; + \$config['calendar_itip_send_option'] = 3; + \$config['calendar_itip_after_action'] = 0; + + \$config['calendar_freebusy_trigger'] = false; + + \$config['kolab_invitation_calendars'] = false; + \$config['calendar_contact_birthdays'] = true; \$config['calendar_resources_driver'] = 'ldap';
View file
pykolab-0.8.4.tar.gz/share/templates/roundcubemail/config.inc.php.tpl -> pykolab-0.8.5.tar.gz/share/templates/roundcubemail/config.inc.php.tpl
Changed
@@ -19,6 +19,7 @@ \$config['imap_force_lsub'] = true; // IMAP Connection TLS settings, adjust for Production + // Required for PHP >= 5.6 \$config['imap_conn_options'] = Array( 'ssl' => Array( 'verify_peer_name' => false, @@ -42,6 +43,7 @@ \$config['smtp_helo_host'] = \$_SERVER["HTTP_HOST"]; // SMTP Connection TLS settings, adjust for Production + // Required for PHP >= 5.6 \$config['smtp_conn_options'] = Array( 'ssl' => Array( 'verify_peer_name' => false, @@ -229,23 +231,6 @@ 'ssl_verify_peer' => false, ); - # Required for PHP 5.6 - \$config['imap_conn_options'] = Array( - 'ssl' => Array( - 'verify_peer_name' => false, - 'verify_peer' => false, - 'allow_self_signed' => true - ) - ); - - \$config['smtp_conn_options'] = Array( - 'ssl' => Array( - 'verify_peer_name' => false, - 'verify_peer' => false, - 'allow_self_signed' => true - ) - ); - \$config['fileapi_manticore'] = 'http://' . \$_SERVER['HTTP_HOST'] . ':8080'; ?>
View file
pykolab-0.8.4.tar.gz/tests/unit/test-003-event.py -> pykolab-0.8.5.tar.gz/tests/unit/test-003-event.py
Changed
@@ -889,7 +889,7 @@ self.assertIsInstance(data, dict) self.assertIsInstance(data['start'], datetime.datetime) - # self.assertIsInstance(data['end'], datetime.datetime) + self.assertIsInstance(data['end'], datetime.datetime) self.assertIsInstance(data['created'], datetime.datetime) self.assertIsInstance(data['lastmodified-date'], datetime.datetime) self.assertEqual(data['uid'], '75c740bb-b3c6-442c-8021-ecbaeb0a025e') @@ -936,7 +936,7 @@ e2.set_lastmodified() diff = compute_diff(e1.to_dict(), e2.to_dict(), True) - self.assertEqual(len(diff), 4, "Diff: (length: %d):\r\n%r\r\n%r" % (len(diff), diff, e2.__str__())) + self.assertEqual(len(diff), 5, "Diff: (length: %d):\r\n%r\r\n%r" % (len(diff), diff, e2.__str__())) ps = self._find_prop_in_list(diff, 'summary') self.assertIsInstance(ps, OrderedDict)
View file
pykolab-0.8.4.tar.gz/tests/unit/test-011-itip.py -> pykolab-0.8.5.tar.gz/tests/unit/test-011-itip.py
Changed
@@ -286,7 +286,7 @@ BEGIN:VEVENT UID:eea25142-fb1c-4831-a02d-ac9fb4c16b70 DTSTAMP:20140213T125414Z -DTSTART;TZID=3DEurope/London:20140713T100000 +DTSTART;TZID=3D"W. Europe Standard Time":20140713T100000 DTEND;TZID=3DEurope/London:20140713T140000 SUMMARY:Testing =C3=9Cmlauts DESCRIPTION:Testing =C3=9Cmlauts @@ -375,6 +375,11 @@ self.assertEqual(xml.get_summary(), "Testing Ümlauts") self.assertEqual(xml.get_location(), "Rue the Genève") + # Timezone conversion + itips = itip.events_from_message(message_from_string(itip_unicode)) + xml = itips[0]['xml'] + self.assertEqual(xml.get_start().tzinfo.__str__(), "Europe/Berlin") + def test_002_check_date_conflict(self): astart = datetime.datetime(2014, 7, 13, 10, 0, 0) aend = astart + datetime.timedelta(hours=2)
View file
pykolab-0.8.4.tar.gz/tests/unit/test-017-diff.py -> pykolab-0.8.5.tar.gz/tests/unit/test-017-diff.py
Changed
@@ -190,18 +190,19 @@ self.assertEqual(diff[0]['old'], 0) self.assertEqual(diff[0]['new'], 1) - self.assertEqual(diff[1]['property'], 'description') - self.assertEqual(diff[1]['old'], '') + self.assertEqual(diff[1]['property'], 'summary') + self.assertEqual(diff[1]['old'], 'Old attachments') + self.assertEqual(diff[1]['new'], 'New attachments') - self.assertEqual(diff[2]['property'], 'summary') - self.assertEqual(diff[2]['old'], 'Old attachments') - self.assertEqual(diff[2]['new'], 'New attachments') + self.assertEqual(diff[2]['property'], 'attach') + self.assertEqual(diff[2]['new'], None) + self.assertEqual(diff[2]['old']['uri'], "cid:silhouette.1427297477.7514.png") - self.assertEqual(diff[3]['property'], 'attach') - self.assertEqual(diff[3]['new'], None) - self.assertEqual(diff[3]['old']['uri'], "cid:silhouette.1427297477.7514.png") + self.assertEqual(diff[3]['property'], 'lastmodified-date') + + self.assertEqual(diff[4]['property'], 'description') + self.assertEqual(diff[4]['old'], '') - self.assertEqual(diff[4]['property'], 'lastmodified-date') if __name__ == '__main__': unittest.main()
View file
pykolab-0.8.4.tar.gz/wallace/module_resources.py -> pykolab-0.8.5.tar.gz/wallace/module_resources.py
Changed
@@ -53,13 +53,15 @@ # define some contstants used in the code below COND_NOTIFY = 256 -ACT_MANUAL = 1 -ACT_ACCEPT = 2 +ACT_MANUAL = 1 +ACT_ACCEPT = 2 +ACT_REJECT = 8 ACT_ACCEPT_AND_NOTIFY = ACT_ACCEPT + COND_NOTIFY policy_name_map = { 'ACT_MANUAL': ACT_MANUAL, 'ACT_ACCEPT': ACT_ACCEPT, + 'ACT_REJECT': ACT_REJECT, 'ACT_ACCEPT_AND_NOTIFY': ACT_ACCEPT_AND_NOTIFY } @@ -355,18 +357,18 @@ # do the magic for the receiving attendee (available_resource, itip_event) = check_availability(itip_events, resource_dns, resources, receiving_attendee) + reject = False + resource = None + original_resource = None + # accept reservation if available_resource is not None: if available_resource['mail'] in [a.get_email() for a in itip_event['xml'].get_attendees()]: - log.debug(_("Accept invitation for individual resource %r / %r") % (available_resource['dn'], available_resource['mail']), level=8) - # check if reservation was delegated - original_resource = None if available_resource['mail'] != receiving_resource['mail'] and receiving_attendee.get_participant_status() == kolabformat.PartDelegated: original_resource = receiving_resource - accept_reservation_request(itip_event, available_resource, original_resource) - + resource = available_resource else: # This must have been a resource collection originally. # We have inserted the reference to the original resource @@ -388,11 +390,25 @@ delegator.set_rsvp(False) log.debug(_("Delegate invitation for resource collection %r to %r") % (original_resource['mail'], available_resource['mail']), level=8) - accept_reservation_request(itip_event, available_resource, original_resource) + resource = available_resource + + # Look for ACT_REJECT policy + if resource is not None: + invitationpolicy = get_resource_invitationpolicy(resource) + log.debug(_("Apply invitation policies %r") % (invitationpolicy), level=9) - # decline reservation + if invitationpolicy is not None: + for policy in invitationpolicy: + if policy & ACT_REJECT: + reject = True + break + + if resource is not None and not reject: + log.debug(_("Accept invitation for individual resource %r / %r") % (resource['dn'], resource['mail']), level=8) + accept_reservation_request(itip_event, resource, original_resource, False, invitationpolicy) else: resource = resources[resource_dns[0]] # this is the receiving resource record + log.debug(_("Decline invitation for individual resource %r / %r") % (resource['dn'], resource['mail']), level=8) decline_reservation_request(itip_event, resource) cleanup() @@ -771,7 +787,7 @@ return (event, master) -def accept_reservation_request(itip_event, resource, delegator=None, confirmed=False): +def accept_reservation_request(itip_event, resource, delegator=None, confirmed=False, invitationpolicy=None): """ Accepts the given iTip event by booking it into the resource's calendar. Then set the attendee status of the given resource to @@ -781,7 +797,8 @@ confirmation_required = False if not confirmed and owner: - invitationpolicy = get_resource_invitationpolicy(resource) + if invitationpolicy is None: + invitationpolicy = get_resource_invitationpolicy(resource) log.debug(_("Apply invitation policies %r") % (invitationpolicy), level=9) if invitationpolicy is not None: @@ -840,7 +857,7 @@ # send response and notification owner = get_resource_owner(resource) - send_response(resource['mail'], itip_event, get_resource_owner(resource)) + send_response(resource['mail'], itip_event, owner) if owner: send_owner_notification(resource, owner, itip_event, True)
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.4-0~kolab1 +Version: 0.8.5-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org @@ -40,5 +40,5 @@ pykolab deb python optional wallace deb python optional Files: - 00000000000000000000000000000000 0 pykolab-0.8.4.tar.gz + 00000000000000000000000000000000 0 pykolab-0.8.5.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
.