From be6c7582a0485e734e65f0afd0daf3cbef376540 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 14 Jul 2015 15:08:14 +0200 Subject: [PATCH 1/6] [FIX] package.py: search for prompt correctly. --- setup/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/package.py b/setup/package.py index edfdcab8b94..685e987f7cb 100755 --- a/setup/package.py +++ b/setup/package.py @@ -145,12 +145,12 @@ class OdooDocker(object): def __init__(self): self.log_file = NamedTemporaryFile(mode='w+b', prefix="bash", suffix=".txt", delete=False) self.port = 8069 # TODO sle: reliable way to get a free port? - self.prompt_re = '\[root@nightly-tests\] #' + self.prompt_re = '[root@nightly-tests] # ' self.timeout = 1000 def system(self, command): self.docker.sendline(command) - self.docker.expect(self.prompt_re) + self.docker.expect_exact(self.prompt_re) def start(self, docker_image, build_dir, pub_dir): self.build_dir = build_dir @@ -159,7 +159,8 @@ class OdooDocker(object): self.docker = pexpect.spawn( 'docker run -v %s:/opt/release -p 127.0.0.1:%s:8069' ' -t -i %s /bin/bash --noediting' % (self.build_dir, self.port, docker_image), - timeout=self.timeout + timeout=self.timeout, + searchwindowsize=len(self.prompt_re) + 1, ) time.sleep(2) # let the bash start self.docker.logfile_read = self.log_file From 94e2d9928397bb5d8cfd4d31a21903a15bf9cf27 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 14 Jul 2015 18:05:01 +0200 Subject: [PATCH 2/6] [FIX] packaging: remove policy-rc configuration It was preventing postgresql to generate a working cluster. --- setup/package.dfdebian | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup/package.dfdebian b/setup/package.dfdebian index bf9489a88c0..fefaa0123d5 100644 --- a/setup/package.dfdebian +++ b/setup/package.dfdebian @@ -3,9 +3,6 @@ FROM debian:stable MAINTAINER Odoo S.A. -# Change policy-rc.d so that services start automatically once installed -RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d - RUN apt-get update && \ apt-get install -y locales && \ rm -rf /var/lib/apt/lists/* From 5bbcc14d2f39a593a2b42719bbda82a2750208dc Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Wed, 15 Jul 2015 12:03:23 +0200 Subject: [PATCH 3/6] [FIX] packaging: tarball nightly test PIL is no more en pypi. Use the external provider. --- setup/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/package.py b/setup/package.py index 685e987f7cb..dfea3979be7 100755 --- a/setup/package.py +++ b/setup/package.py @@ -318,7 +318,7 @@ def test_tgz(o): with docker('openerp-%s-debian-nightly-tests' % version, o.build_dir, o.pub) as wheezy: wheezy.release = 'openerp.tar.gz' wheezy.system("service postgresql start") - wheezy.system('pip install /opt/release/%s' % wheezy.release) + wheezy.system('pip install --allow-external PIL --allow-unverified PIL /opt/release/%s' % wheezy.release) wheezy.system("useradd --system --no-create-home openerp") wheezy.system('su postgres -s /bin/bash -c "createuser -s openerp"') wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"') From 8ea4bf81f7c7e74cbe6c654051ae021e683417e5 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 15 Jul 2015 14:18:08 +0200 Subject: [PATCH 4/6] [FIX] fetchmail: workaround poplib line length bug In order to fix Python bug https://bugs.python.org/issue16041 a maximum line length was introduced in poplib when reading email contents from the POP3 server. That limit is set to prevent DoS attacks via malicious POP3 servers. The default limit (2048) seems to be too low for emails commonly found on the internet, retrieved via POP3 from popular mail services such as GMail, Hotmail, etc. (The POP3 servers might send back the lines verbatim without splitting them up) This is discussed in follow-up Python bug https://bugs.python.org/issue23906. Workaround implemented by forcing a higher default limit to accomodate POP3 responses with lines up to 64KB. --- addons/fetchmail/fetchmail.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 0a27a05b275..84e48c794fd 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -20,6 +20,7 @@ ############################################################################## import logging +import poplib import time from imaplib import IMAP4 from imaplib import IMAP4_SSL @@ -42,6 +43,9 @@ from openerp.tools.translate import _ _logger = logging.getLogger(__name__) MAX_POP_MESSAGES = 50 +# Workaround for Python 2.7.8 bug https://bugs.python.org/issue23906 +poplib._MAXLINE = 65536 + class fetchmail_server(osv.osv): """Incoming POP/IMAP mail server account""" _name = 'fetchmail.server' From e9403a7ab72e245ca9877a5babc2cd70beee2b12 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Wed, 15 Jul 2015 15:34:14 +0200 Subject: [PATCH 5/6] [FIX] packaging: tarball nightly test This reverts commit 5bbcc14d2f39a593a2b42719bbda82a2750208dc and allow to use the pil from debian's "python-pil" by telling pip to not install the dependencies --- setup/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/package.py b/setup/package.py index dfea3979be7..7bdb21f9d5d 100755 --- a/setup/package.py +++ b/setup/package.py @@ -318,7 +318,7 @@ def test_tgz(o): with docker('openerp-%s-debian-nightly-tests' % version, o.build_dir, o.pub) as wheezy: wheezy.release = 'openerp.tar.gz' wheezy.system("service postgresql start") - wheezy.system('pip install --allow-external PIL --allow-unverified PIL /opt/release/%s' % wheezy.release) + wheezy.system('pip install --no-deps /opt/release/%s' % wheezy.release) wheezy.system("useradd --system --no-create-home openerp") wheezy.system('su postgres -s /bin/bash -c "createuser -s openerp"') wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"') From e0c1f54fd78117e1a72bf3550f175cf848544515 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 16 Jul 2015 08:12:09 +0200 Subject: [PATCH 6/6] [FIX] mail: reload only in log after composer The commit 312b85e added a reloading of the chatter messages after closing the mail composer. But e.g in Messaging > Inbox a simple reload isn't enough. For now this commit restrict the reload to chatter logs (e.g the chatter of a quotation). related to PR #7596 --- addons/mail/static/src/js/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 1920d95c986..7b9f1467cd5 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -583,7 +583,7 @@ openerp.mail = function (session) { }; self.do_action(action, { - 'on_close': function(){ self.parent_thread.message_fetch() } + 'on_close': function(){ self.is_log && self.parent_thread.message_fetch() } }); self.on_cancel(); });