Projects
Kolab:3.4
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 58
View file
pykolab-0.6.11-unlink-cache-on-failure-to-get_entry.patch
Added
@@ -0,0 +1,46 @@ +diff --git a/pykolab/auth/ldap/cache.py b/pykolab/auth/ldap/cache.py +index 55a47c3..ad50e9b 100644 +--- a/pykolab/auth/ldap/cache.py ++++ b/pykolab/auth/ldap/cache.py +@@ -107,8 +107,17 @@ def delete_entry(domain, entry): + def get_entry(domain, entry, update=True): + result_attribute = conf.get('cyrus-sasl', 'result_attribute') + ++ _entry = None ++ + db = init_db(domain) +- _entry = db.query(Entry).filter_by(uniqueid=entry['id']).first() ++ try: ++ _entry = db.query(Entry).filter_by(uniqueid=entry['id']).first() ++ except sqlalchemy.exc.OperationalError, errmsg: ++ db = init_db(domain,reinit=True) ++ except sqlalchemy.exc.InvalidRequestError, errmsg: ++ db = init_db(domain,reinit=True) ++ finally: ++ _entry = db.query(Entry).filter_by(uniqueid=entry['id']).first() + + if not update: + return _entry +@@ -149,15 +158,20 @@ def get_entry(domain, entry, update=True): + + return _entry + +-def init_db(domain): ++def init_db(domain,reinit=False): + """ + Returns a SQLAlchemy Session() instance. + """ + global db + +- if not db == None: ++ if not db == None and not reinit: + return db + ++ if reinit: ++ import os ++ if os.path.isfile('sqlite:///%s/%s.db' % (KOLAB_LIB_PATH, domain)): ++ os.unlink('sqlite:///%s/%s.db' % (KOLAB_LIB_PATH, domain)) ++ + db_uri = 'sqlite:///%s/%s.db' % (KOLAB_LIB_PATH, domain) + echo = conf.debuglevel > 8 + engine = create_engine(db_uri, echo=echo)
View file
debian.changelog
Changed
@@ -1,7 +1,8 @@ -pykolab (0.6.11-0~kolab5) unstable; urgency=low +pykolab (0.6.11-0~kolab6) unstable; urgency=low * Ship Sieve management for UCS * Fix permissions on /etc/kolab/kolab.conf, /var/lib/kolab/, /var/log/kolab/ + * Allow caches rendered read-only or in the middle of a transaction to be re-initialized -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Mon, 10 Feb 2014 20:00:00 +0100
View file
debian.series
Changed
@@ -1,3 +1,4 @@ enable-kolabd.patch -p1 cyrus-imapd.conf-cert-paths.patch -p1 enable-wallace.patch -p1 +pykolab-0.6.11-unlink-cache-on-failure-to-get_entry.patch -p1
View file
debian.tar.gz/pykolab.postinst
Changed
@@ -35,12 +35,8 @@ # Re-base the POSIX permission set on to the reference platform chown root:root /etc/kolab chmod 755 /etc/kolab - chown kolab-n:kolab /etc/kolab/kolab.conf chmod 640 /etc/kolab/kolab.conf - chown -R kolab:kolab-n /var/lib/kolab /var/log/kolab - chmod 775 /var/lib/kolab /var/log/kolab - if dpkg-statoverride --list /var/lib/kolab >/dev/null; then dpkg-statoverride --remove /var/lib/kolab fi @@ -50,12 +46,17 @@ fi if [ -x "$(which univention-config-registry 2>/dev/null)" ]; then - gpasswd -a listener kolab >/dev/null 2>&1 || : + chown listener:nogroup /etc/kolab/kolab.conf dpkg-statoverride --update --add listener nogroup 770 /var/lib/kolab dpkg-statoverride --update --add listener nogroup 770 /var/log/kolab + chown -R listener:nogroup /var/lib/kolab /var/log/kolab + chmod 770 /var/lib/kolab /var/log/kolab else - dpkg-statoverride --update --add kolab kolab-n 775 /var/lib/kolab - dpkg-statoverride --update --add kolab kolab-n 775 /var/log/kolab + chown kolab-n:kolab /etc/kolab/kolab.conf + dpkg-statoverride --update --add kolab kolab-n 770 /var/lib/kolab + dpkg-statoverride --update --add kolab kolab-n 770 /var/log/kolab + chown -R kolab:kolab-n /var/lib/kolab /var/log/kolab + chmod 770 /var/lib/kolab /var/log/kolab fi ;; esac
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.6.11-0~kolab5 +Version: 0.6.11-0~kolab6 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org
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
.