Hello community,
here is the log from the commit of package offlineimap for openSUSE:Factory checked in at 2019-04-09 20:19:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/offlineimap (Old)
and /work/SRC/openSUSE:Factory/.offlineimap.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "offlineimap"
Tue Apr 9 20:19:17 2019 rev:47 rq:692582 version:7.2.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/offlineimap/offlineimap.changes 2018-07-07 22:02:01.547041957 +0200
+++ /work/SRC/openSUSE:Factory/.offlineimap.new.3908/offlineimap.changes 2019-04-09 20:19:18.697893601 +0200
@@ -1,0 +2,13 @@
+Tue Apr 9 11:00:26 UTC 2019 - Ondřej Súkup
+
+- update to 7.2.3
+ * add checks in curses ui for small windows
+ * Fix expired oauth2_access_token.
+ * Handle empty token with complete GSSAPI context
+ * maxage: always compute the remote cache list for min_uid
+ * offlineimap.conf: minor fixes
+ * Check if username is provided before trying plain authentication.
+ * print username instead of accountname when asking for password.
+ * Chain tls_level and ssl_version only if ssl is enabled.
+
+-------------------------------------------------------------------
@@ -4 +17 @@
-- update tp 7.2.1
+- update to 7.2.1
Old:
----
offlineimap-7.2.1.tar.gz
New:
----
offlineimap-7.2.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ offlineimap.spec ++++++
--- /var/tmp/diff_new_pack.BJBI87/_old 2019-04-09 20:19:19.329894462 +0200
+++ /var/tmp/diff_new_pack.BJBI87/_new 2019-04-09 20:19:19.333894468 +0200
@@ -1,7 +1,7 @@
#
# spec file for package offlineimap
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: offlineimap
-Version: 7.2.1
+Version: 7.2.3
Release: 0
Summary: IMAP/Maildir Synchronization Tool
License: GPL-2.0-or-later
++++++ offlineimap-7.2.1.tar.gz -> offlineimap-7.2.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/Changelog.md new/offlineimap-7.2.3/Changelog.md
--- old/offlineimap-7.2.1/Changelog.md 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/Changelog.md 2019-02-17 00:31:19.000000000 +0100
@@ -15,6 +15,79 @@
* The following excerpt is only usefull when rendered in the website.
{:toc}
+### OfflineIMAP v7.2.3 (2019-02-17)
+
+#### Notes
+
+A tiny release for one minor bug fix.
+
+This release was tested by:
+
+- Nicolas Sebrecht
+
+
+#### Authors
+
+- Mart Lubbers (1)
+
+
+#### Fixes
+
+- add checks in curses ui for small windows. [Mart Lubbers]
+
+
+### OfflineIMAP v7.2.2 (2018-12-22)
+
+#### Notes
+
+With this release offlineimap can renew the token for OAUTH2. There is better
+integration for ArchLinux and OSX. SSL configuration options are more
+consistent.
+
+There are bug fixes about maxage and GSSAPI.
+
+The imaplib2 library looks discontinued. I wonder we'll have no other choice
+than maintaining our own fork.
+
+This release was tested by:
+
+- Nicolas Sebrecht
+
+
+#### Authors
+
+- Nicolas Sebrecht (5)
+- Philippe Loctaux (4)
+- Benedikt Heine (2)
+- Carnë Draug (2)
+- Frode Aannevik (1)
+- Robbie Harwood (1)
+
+
+#### Features
+
+- 2890dec Added ssl certfile on osx for openssl pacakge on homebrew. [Philippe Loctaux]
+- 761e10e Add Archlinux to list of supported distros. [Philippe Loctaux]
+
+#### Fixes
+
+- 8692799 Fix expired oauth2_access_token. [Frode Aannevik]
+- 096aa07 Handle empty token with complete GSSAPI context. [Robbie Harwood]
+- a51064e maxage: always compute the remote cache list for min_uid. [Nicolas Sebrecht]
+- 698ec64 offlineimap.conf: minor fixes. [Nicolas Sebrecht]
+- af3a35a offlineimap/utilis/distro.py: indentation fix. [Philippe Loctaux]
+- d3ba837 Fix typo in exception message. [Benedikt Heine]
+- c9005cd Check if username is provided before trying plain authentication.. [Carnë Draug]
+
+#### Changes
+
+- 5f9474e Print username instead of accountname when asking for password. [Carnë Draug]
+- ce9a198 Chain tls_level and ssl_version only if ssl is enabled. [Benedikt Heine]
+- 6ef5937 docs/website-doc.sh: minor improvements in comments of versions.yml. [Nicolas Sebrecht]
+- 4544bb1 contrib/release.py: minor UI improvement. [Nicolas Sebrecht]
+- d930125 fix dates in copyright lines. [Nicolas Sebrecht]
+
+
### OfflineIMAP v7.2.1 (2018-06-16)
#### Notes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/contrib/release.py new/offlineimap-7.2.3/contrib/release.py
--- old/offlineimap-7.2.1/contrib/release.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/contrib/release.py 2019-02-17 00:31:19.000000000 +0100
@@ -261,8 +261,8 @@
class Website(object):
def updateUploads(self):
- req = ("update uploads/ of the website? "
- "(warning: checksums will change if they already exist)")
+ req = ("add new archive to uploads/ on the website? "
+ "(warning: checksums will change if it already exists)")
if User.yesNo(req, defaultToYes=True) is False:
return False
if check_call(shlex.split("./docs/build-uploads.sh")) != 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/docs/website-doc.sh new/offlineimap-7.2.3/docs/website-doc.sh
--- old/offlineimap-7.2.1/docs/website-doc.sh 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/docs/website-doc.sh 2019-02-17 00:31:19.000000000 +0100
@@ -55,9 +55,13 @@
# This let know the website about the available APIs documentations.
echo "Building Jekyll data: $VERSIONS_YML"
# Erase previous content.
- echo "$HEADER" > "$VERSIONS_YML"
- echo "# However, it's correct to /remove/ old API docs here."
- echo "# While at it, don't forget to adjust the _doc/versions directory."
+ echo > "$VERSIONS_YML" < 0:
+ # Reload the remote message list from min_uid. This avoid issues for
+ # old messages, which has been added from local on any previous run
+ # (IOW, message is older than maxage _and_ has high enough UID).
+ remotefolder.dropmessagelistcache()
+ remotefolder.cachemessagelist(min_uid=min(uids))
localfolder.cachemessagelist(min_uid=min(uids))
else:
# Remote folder UIDs list is empty for the given range. We still
@@ -523,6 +528,7 @@
uids = [uid for uid in uids if uid > 0]
if len(uids) > 0:
# Update the remote cache list for this new min(uids).
+ remotefolder.dropmessagelistcache()
remotefolder.cachemessagelist(min_uid=min(uids))
def cachemessagelists_startdate(new, partial, date):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap/imapserver.py new/offlineimap-7.2.3/offlineimap/imapserver.py
--- old/offlineimap-7.2.1/offlineimap/imapserver.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap/imapserver.py 2019-02-17 00:31:19.000000000 +0100
@@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import datetime
import hmac
import socket
import json
@@ -100,8 +101,10 @@
self.sslversion = repos.getsslversion()
self.starttls = repos.getstarttls()
- if self.tlslevel is not "tls_compat" and self.sslversion is None:
- raise Exception("When 'tls_version' is not 'tls_compat' "
+ if self.usessl \
+ and self.tlslevel is not "tls_compat" \
+ and self.sslversion is None:
+ raise Exception("When 'tls_level' is not 'tls_compat' "
"the 'ssl_version' must be set explicitly.")
self.oauth2_refresh_token = repos.getoauth2_refresh_token()
@@ -109,6 +112,7 @@
self.oauth2_client_id = repos.getoauth2_client_id()
self.oauth2_client_secret = repos.getoauth2_client_secret()
self.oauth2_request_url = repos.getoauth2_request_url()
+ self.oauth2_access_token_expires_at = None
self.delim = None
self.root = None
@@ -175,8 +179,7 @@
# get 1) configured password first 2) fall back to asking via UI
self.password = self.repos.getpassword() or \
- self.ui.getpass(self.repos.getname(), self.config,
- self.passworderror)
+ self.ui.getpass(self.username, self.config, self.passworderror)
self.passworderror = None
return self.password
@@ -200,6 +203,11 @@
http://tools.ietf.org/html/rfc4616"""
authc = self.username
+ if not authc:
+ raise OfflineImapError("No username provided for '%s'"
+ % self.repos.getname(),
+ OfflineImapError.ERROR.REPO)
+
passwd = self.__getpassword()
authz = b''
if self.user_identity != None:
@@ -213,6 +221,12 @@
return retval
def __xoauth2handler(self, response):
+ now = datetime.datetime.now()
+ if self.oauth2_access_token_expires_at \
+ and self.oauth2_access_token_expires_at < now:
+ self.oauth2_access_token = None
+ self.ui.debug('imap', 'xoauth2handler: oauth2_access_token expired')
+
if self.oauth2_access_token is None:
if self.oauth2_request_url is None:
raise OfflineImapError("No remote oauth2_request_url for "
@@ -250,9 +264,13 @@
raise OfflineImapError("xoauth2handler got: %s"% resp,
OfflineImapError.ERROR.REPO)
self.oauth2_access_token = resp['access_token']
+ if u'expires_in' in resp:
+ self.oauth2_access_token_expires_at = now + datetime.timedelta(
+ seconds=resp['expires_in']/2
+ )
- self.ui.debug('imap', 'xoauth2handler: access_token "%s"'%
- self.oauth2_access_token)
+ self.ui.debug('imap', 'xoauth2handler: access_token "%s expires %s"'% (
+ self.oauth2_access_token, self.oauth2_access_token_expires_at))
auth_string = 'user=%s\1auth=Bearer %s\1\1'% (
self.username, self.oauth2_access_token)
#auth_string = base64.b64encode(auth_string)
@@ -274,6 +292,13 @@
if not self.gss_vc.complete:
response = self.gss_vc.step(token)
return response if response else ""
+ elif token is None:
+ # uh... context is complete, so there's no negotiation we can
+ # do. But we also don't have a token, so we can't send any
+ # kind of response. Empirically, some (but not all) servers
+ # seem to put us in this state, and seem fine with getting no
+ # GSSAPI content in response, so give it to them.
+ return ""
# Don't bother checking qop because we're over a TLS channel
# already. But hey, if some server started encrypting tomorrow,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap/ui/Curses.py new/offlineimap-7.2.3/offlineimap/ui/Curses.py
--- old/offlineimap-7.2.1/offlineimap/ui/Curses.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap/ui/Curses.py 2019-02-17 00:31:19.000000000 +0100
@@ -1,5 +1,5 @@
# Curses-based interfaces
-# Copyright (C) 2003-2016 John Goerzen & contributors.
+# Copyright (C) 2003-2018 John Goerzen & contributors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -137,7 +137,13 @@
sleepstr = '%3d:%02d'% (secs // 60, secs % 60) if secs else 'active'
accstr = '%s: [%s] %12.12s: '% (self.acc_num, sleepstr, self.account)
- self.ui.exec_locked(self.window.addstr, 0, 0, accstr)
+ def addstr():
+ try:
+ self.window.addstr(0, 0, accstr)
+ except curses.error as e: # Occurs when the terminal is very small
+ pass
+ self.ui.exec_locked(addstr);
+
self.location = len(accstr)
def setwindow(self, curses_win, acc_num):
@@ -211,7 +217,10 @@
def display(self):
def locked_display():
- self.window.addch(self.y, self.x, '@', self.curses_color)
+ try:
+ self.window.addch(self.y, self.x, '@', self.curses_color)
+ except curses.error: # Occurs when the terminal is very small
+ pass
self.window.refresh()
# lock the curses IO while fudging stuff
self.ui.exec_locked(locked_display)
@@ -549,7 +558,7 @@
def mainException(self):
UIBase.mainException(self)
- def getpass(self, accountname, config, errmsg=None):
+ def getpass(self, username, config, errmsg=None):
# disable the hotkeys inputhandler
self.inputhandler.input_acquire()
@@ -558,8 +567,8 @@
try:
#s.gettf().setcolor('white')
self.warn(" *** Input Required")
- self.warn(" *** Please enter password for account %s: " % \
- accountname)
+ self.warn(" *** Please enter password for user '%s': " % \
+ username)
self.logwin.refresh()
password = self.logwin.getstr()
finally:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap/ui/Machine.py new/offlineimap-7.2.3/offlineimap/ui/Machine.py
--- old/offlineimap-7.2.1/offlineimap/ui/Machine.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap/ui/Machine.py 2019-02-17 00:31:19.000000000 +0100
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2016 John Goerzen & contributors.
+# Copyright (C) 2007-2018 John Goerzen & contributors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -182,15 +182,15 @@
return 0
- def getpass(s, accountname, config, errmsg=None):
+ def getpass(s, username, config, errmsg=None):
if errmsg:
s._printData(s.logger.warning,
- 'getpasserror', "%s\n%s"% (accountname, errmsg),
+ 'getpasserror', "%s\n%s"% (username, errmsg),
False)
s._log_con_handler.acquire() # lock the console output
try:
- s._printData(s.logger.info, 'getpass', accountname)
+ s._printData(s.logger.info, 'getpass', username)
return (sys.stdin.readline()[:-1])
finally:
s._log_con_handler.release()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap/ui/TTY.py new/offlineimap-7.2.3/offlineimap/ui/TTY.py
--- old/offlineimap-7.2.1/offlineimap/ui/TTY.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap/ui/TTY.py 2019-02-17 00:31:19.000000000 +0100
@@ -1,5 +1,5 @@
# TTY UI
-# Copyright (C) 2002-2015 John Goerzen & contributors
+# Copyright (C) 2002-2018 John Goerzen & contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -76,14 +76,14 @@
return sys.stdout.isatty() and sys.stdin.isatty()
- def getpass(self, accountname, config, errmsg=None):
+ def getpass(self, username, config, errmsg=None):
"""TTYUI backend is capable of querying the password."""
if errmsg:
- self.warn("%s: %s"% (accountname, errmsg))
+ self.warn("%s: %s"% (username, errmsg))
self._log_con_handler.acquire() # lock the console output
try:
- return getpass("Enter password for account '%s': " % accountname)
+ return getpass("Enter password for user '%s': " % username)
finally:
self._log_con_handler.release()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap/ui/UIBase.py new/offlineimap-7.2.3/offlineimap/ui/UIBase.py
--- old/offlineimap-7.2.1/offlineimap/ui/UIBase.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap/ui/UIBase.py 2019-02-17 00:31:19.000000000 +0100
@@ -1,5 +1,5 @@
# UI base class
-# Copyright (C) 2002-2016 John Goerzen & contributors.
+# Copyright (C) 2002-2018 John Goerzen & contributors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@
################################################## INPUT
- def getpass(self, accountname, config, errmsg = None):
+ def getpass(self, username, config, errmsg = None):
raise NotImplementedError("Prompting for a password is not supported"
" in this UI backend.")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap/utils/distro.py new/offlineimap-7.2.3/offlineimap/utils/distro.py
--- old/offlineimap-7.2.1/offlineimap/utils/distro.py 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap/utils/distro.py 2019-02-17 00:31:19.000000000 +0100
@@ -1,4 +1,4 @@
-# Copyright 2014-2006 Eygene A. Ryabinkin & contributors.
+# Copyright 2006-2018 Eygene A. Ryabinkin & contributors.
#
# Module that supports distribution-specific functions.
@@ -18,6 +18,8 @@
'darwin': [
# MacPorts, port curl-ca-bundle
'/opt/local/share/curl/curl-ca-bundle.crt',
+ # homebrew, package openssl
+ '/usr/local/etc/openssl/cert.pem',
],
'linux-ubuntu': '/etc/ssl/certs/ca-certificates.crt',
'linux-debian': '/etc/ssl/certs/ca-certificates.crt',
@@ -26,6 +28,7 @@
'linux-redhat': '/etc/pki/tls/certs/ca-bundle.crt',
'linux-suse': '/etc/ssl/ca-bundle.pem',
'linux-opensuse': '/etc/ssl/ca-bundle.pem',
+ 'linux-arch': '/etc/ssl/certs/ca-certificates.crt',
}
@@ -45,7 +48,9 @@
if OS.startswith('linux'):
DISTRO = platform.linux_distribution()[0]
if DISTRO:
- OS = OS + "-%s" % DISTRO.split()[0].lower()
+ OS = OS + "-%s" % DISTRO.split()[0].lower()
+ if os.path.exists('/etc/arch-release'):
+ OS = "linux-arch"
return OS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.2.1/offlineimap.conf new/offlineimap-7.2.3/offlineimap.conf
--- old/offlineimap-7.2.1/offlineimap.conf 2018-06-16 15:08:07.000000000 +0200
+++ new/offlineimap-7.2.3/offlineimap.conf 2019-02-17 00:31:19.000000000 +0100
@@ -589,20 +589,19 @@
# This option stands in the [Repository LocalExample] section.
#
-# This option is similar to "utime_from_header" and could be use as a
+# This option is similar to "utime_from_header" and could be used as a
# complementary feature to keep track of a message date. This option only
# makes sense for the Maildir type.
#
# By default each message is stored in a file which prefix is the fetch
# timestamp and an order rank such as "1446590057_0". In a multithreading
# environment message are fetched in a random order, then you can't trust
-# the file name to sort your boxes.
+# the filename to sort your boxes.
#
-# If set to "yes" the file name prefix if build on the message "Date" header
+# If set to "yes" the filename prefix is built from the message "Date" header
# (which should be present) or the "Received-date" if "Date" is not
# found. If neither "Received-date" nor "Date" is found, the current system
-# date is used. Now you can quickly sort your messages using their file
-# names.
+# date is used. Now you can quickly sort your messages using their filenames.
#
# Used in combination with "utime_from_header" all your message would be in
# order with the correct mtime attribute.
@@ -844,8 +843,8 @@
# - ssl3 (less desirable than tls1)
# - ssl23 (can fallback up to ssl3)
#
-# When tls_level is not set to tls_compat, the ssl_version configuration option
-# must be explicitly set.
+# When tls_level is not set to tls_compat and ssl is still enabled,
+# the ssl_version configuration option must be explicitly set.
#
#tls_level = tls_compat