Hello community, here is the log from the commit of package offlineimap for openSUSE:Factory checked in at 2016-09-26 12:36:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/offlineimap (Old) and /work/SRC/openSUSE:Factory/.offlineimap.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "offlineimap" Changes: -------- --- /work/SRC/openSUSE:Factory/offlineimap/offlineimap.changes 2016-08-24 10:09:19.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.offlineimap.new/offlineimap.changes 2016-09-26 12:36:46.000000000 +0200 @@ -1,0 +2,17 @@ +Sun Sep 25 17:02:10 UTC 2016 - [email protected] + +- update to 7.0.7 +* Remove EXPERIMENTAL flag for the singlethreadperfolder configuration option. +* Ensure logs are in bytes for PLAIN authentication. +* Minor: utils: distro: fix copyright line. +* README: minor copy edits. +* IDLE: protect all calls to imapobj.noop() (coonection might be dropped). +* XOAUTH2: raise error if string 'error' is in the response. +* Set singlethreadperfolder configuration option when in idle mode. +* repository: IMAP: cache the idle folders in memory. +* mbnames: add info output messages in dry run mode. +* mbnames: remove non-required argument. +* offlineimap.conf: explain hooks in idle mode. +* Explain how to submit issues in more files. + +------------------------------------------------------------------- Old: ---- offlineimap-7.0.6.tar.gz New: ---- offlineimap-7.0.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ offlineimap.spec ++++++ --- /var/tmp/diff_new_pack.5tpRaY/_old 2016-09-26 12:36:47.000000000 +0200 +++ /var/tmp/diff_new_pack.5tpRaY/_new 2016-09-26 12:36:47.000000000 +0200 @@ -19,7 +19,7 @@ %{!?_userunitdir:%define _userunitdir /usr/lib/systemd/user} Name: offlineimap -Version: 7.0.6 +Version: 7.0.7 Release: 0 Summary: Powerful IMAP/Maildir Synchronization Tool License: GPL-2.0+ @@ -69,7 +69,7 @@ %build python setup.py build -make %{?_smp_mflags} -C docs docs +make %{?_smp_mflags} V=1 -C docs %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} \ ++++++ offlineimap-7.0.6.tar.gz -> offlineimap-7.0.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/CONTRIBUTING.rst new/offlineimap-7.0.7/CONTRIBUTING.rst --- old/offlineimap-7.0.6/CONTRIBUTING.rst 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/CONTRIBUTING.rst 2016-09-21 04:03:25.000000000 +0200 @@ -32,7 +32,16 @@ ============= Issues are welcome to both Github_ and the `mailing list`_, at your own -convenience. +convenience. Provide the following information: +- system/distribution (with version) +- offlineimap version (`offlineimap -V`) +- Python version +- server name or domain +- CLI options +- Configuration file (offlineimaprc) +- pythonfile (if any) +- Logs, error +- Steps to reproduce the error Worth the read: `How to fix a bug in open source software`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/Changelog.md new/offlineimap-7.0.7/Changelog.md --- old/offlineimap-7.0.6/Changelog.md 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/Changelog.md 2016-09-21 04:03:25.000000000 +0200 @@ -15,6 +15,47 @@ * The following excerpt is only usefull when rendered in the website. {:toc} +### OfflineIMAP v7.0.7 (2016-09-21) + +#### Notes + +With this release, IDLE mode is a bit improved regarding stability. Offlineimap +learns the default path to the certificate for Gentoo. + +There are few improvements for logs and documentation. Minor code refactoring, +too. + +#### Authors + +- Nicolas Sebrecht (12) +- Dan Loewenherz (1) +- Espen Henriksen (1) + +#### Features + +- Add gentoo cert path for OS-DEFAULT. [Espen Henriksen] +- Remove EXPERIMENTAL flag for the singlethreadperfolder configuration option. [Nicolas Sebrecht] + +#### Fixes + +- Ensure logs are in bytes for PLAIN authentication. [Nicolas Sebrecht] +- Minor: utils: distro: fix copyright line. [Nicolas Sebrecht] +- README: minor copy edits. [Dan Loewenherz] +- IDLE: protect all calls to imapobj.noop() (coonection might be dropped). [Nicolas Sebrecht] +- XOAUTH2: raise error if string 'error' is in the response. [Nicolas Sebrecht] + +#### Changes + +- Set singlethreadperfolder configuration option when in idle mode. [Nicolas Sebrecht] +- repository: IMAP: cache the idle folders in memory. [Nicolas Sebrecht] +- mbnames: add info output messages in dry run mode. [Nicolas Sebrecht] +- mbnames: remove non-required argument. [Nicolas Sebrecht] +- offlineimap.conf: explain hooks in idle mode. [Nicolas Sebrecht] +- Explain how to submit issues in more files. [Nicolas Sebrecht] +- README: explain the a2x dependency to build the man page. [Nicolas Sebrecht] + + + ### OfflineIMAP v7.0.6 (2016-08-21) #### Notes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/README.md new/offlineimap-7.0.7/README.md --- old/offlineimap-7.0.6/README.md 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/README.md 2016-09-21 04:03:25.000000000 +0200 @@ -9,33 +9,33 @@ [Official offlineimap][offlineimap]. + ## Description -OfflineIMAP is a software to dispose your e-mail mailbox(es) as a **local -Maildir**. OfflineIMAP will synchronize both sides via *IMAP*. +OfflineIMAP is software that downloads your email mailbox(es) as **local +Maildirs**. OfflineIMAP will synchronize both sides via *IMAP*. -The main downside about IMAP is that you have to **trust** your email provider to -not lose your mails. This is not something impossible while not very common. +IMAP's main downside is that you have to **trust** your email provider to +not lose your email. While certainly unlikely, it's not impossible. With OfflineIMAP, you can download your Mailboxes and make you own backups of -the [Maildir](https://en.wikipedia.org/wiki/Maildir). +your [Maildir](https://en.wikipedia.org/wiki/Maildir). -This allows reading your email while offline without the need for the mail -reader (MUA) to support IMAP disconnected operations. Need an attachment from a -message without internet connection? It's fine, the message is still there. +This allows reading your email offline without the need for your mail +reader (MUA) to support IMAP operations. Need an attachment from a +message without internet connection? No problem, the message is still there. ## Project status and future > As one of the maintainer of OfflineIMAP, I'd like to put my efforts into -> [imapfw](http://github.com/OfflineIMAP/imapfw). **imapfw** is a software in -> development that I intend to replace OfflineIMAP in the long term. +> [imapfw](http://github.com/OfflineIMAP/imapfw). **imapfw** is software in +> development that I intend to replace OfflineIMAP with in the long term. > -> That's why I'm not going to do development in OfflineIMAP. I continue to do -> the maintenance job in OfflineIMAP: fixing small bugs, (quick) -> reviewing/merging patches and rolling out new releases, but that's all. +> That's why I'm not going to continue OfflineIMAP development. I'll continue +> to maintain OfflineIMAP (fixing small bugs, reviewing patches and merging, +> and rolling out new releases), but that's all. > -> While I keep tracking issues for OfflineIMAP, you should not expect support -> much from me anymore. +> While I keep tracking issues for OfflineIMAP, you should not expect future support. > > You won't be left at the side. OfflineIMAP's community is large enough so > that > you'll find people for most of your issues. @@ -57,6 +57,7 @@ * It is **flexible**. * It is **safe**. + ## Downloads You should first check if your distribution already packages OfflineIMAP for you. @@ -70,7 +71,16 @@ [subscribe here](http://lists.alioth.debian.org/mailman/listinfo/offlineimap-project). Bugs, issues and contributions can be requested to both the mailing list or the -[official Github project][offlineimap]. +[official Github project][offlineimap]. Provide the following information: +- system/distribution (with version) +- offlineimap version (`offlineimap -V`) +- Python version +- server name or domain +- CLI options +- Configuration file (offlineimaprc) +- pythonfile (if any) +- Logs, error +- Steps to reproduce the error ## The community @@ -90,16 +100,18 @@ ## Documentation -All the current and updated documentation is at the [community's website][website]. +All current and updated documentation is on the [community's website][website]. + ### Read documentation locally You might want to read the documentation locally. Get the sources of the website. For the other documentation, run the appropriate make target: -``` + +```sh $ ./scripts/get-repository.sh website $ cd docs $ make html # Requires rst2html -$ make man # Requires a2x +$ make man # Requires a2x (http://asciidoc.org) $ make api # Requires sphinx ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap/__init__.py new/offlineimap-7.0.7/offlineimap/__init__.py --- old/offlineimap-7.0.6/offlineimap/__init__.py 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap/__init__.py 2016-09-21 04:03:25.000000000 +0200 @@ -2,7 +2,7 @@ __productname__ = 'OfflineIMAP' # Expecting trailing "-rcN" or "" for stable releases. -__version__ = "7.0.6" +__version__ = "7.0.7" __copyright__ = "Copyright 2002-2016 John Goerzen & contributors" __author__ = "John Goerzen" __author_email__= "[email protected]" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap/folder/IMAP.py new/offlineimap-7.0.7/offlineimap/folder/IMAP.py --- old/offlineimap-7.0.6/offlineimap/folder/IMAP.py 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap/folder/IMAP.py 2016-09-21 04:03:25.000000000 +0200 @@ -48,6 +48,7 @@ name = imaputil.dequote(name) self.sep = imapserver.delim super(IMAPFolder, self).__init__(name, repository) + self.idle_mode = False self.expunge = repository.getexpunge() self.root = None # imapserver.root self.imapserver = imapserver @@ -61,6 +62,8 @@ # self.copy_ignoreUIDs is used by BaseFolder. self.copy_ignoreUIDs = repository.get_copy_ignore_UIDs( self.getvisiblename()) + if self.repository.getidlefolders() > 0: + self.idle_mode = True def __selectro(self, imapobj, force=False): @@ -79,9 +82,13 @@ # Interface from BaseFolder def suggeststhreads(self): + singlethreadperfolder_default = False + if self.idle_mode is True: + singlethreadperfolder_default = True + onethread = self.config.getdefaultboolean( "Repository %s"% self.repository.getname(), - "singlethreadperfolder", False) + "singlethreadperfolder", singlethreadperfolder_default) if onethread is True: return False return not globals.options.singlethreading diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap/imapserver.py new/offlineimap-7.0.7/offlineimap/imapserver.py --- old/offlineimap-7.0.6/offlineimap/imapserver.py 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap/imapserver.py 2016-09-21 04:03:25.000000000 +0200 @@ -86,22 +86,22 @@ self.usessl = repos.getssl() self.useipv6 = repos.getipv6() - if self.useipv6 == True: + if self.useipv6 is True: self.af = socket.AF_INET6 - elif self.useipv6 == False: + elif self.useipv6 is False: self.af = socket.AF_INET else: self.af = socket.AF_UNSPEC - self.hostname = \ - None if self.preauth_tunnel else repos.gethost() + self.hostname = None if self.preauth_tunnel else repos.gethost() self.port = repos.getport() - if self.port == None: + if self.port is None: self.port = 993 if self.usessl else 143 self.sslclientcert = repos.getsslclientcert() self.sslclientkey = repos.getsslclientkey() self.sslcacertfile = repos.getsslcacertfile() if self.sslcacertfile is None: - self.__verifycert = None # disable cert verification + self.__verifycert = None # Disable cert verification. + # This way of working sucks hard... self.fingerprint = repos.get_ssl_fingerprint() self.tlslevel = repos.gettlslevel() self.sslversion = repos.getsslversion() @@ -221,7 +221,7 @@ # in UTF-8. NULL = b'\x00' retval = NULL.join((authz, authc, passwd)) - logsafe_retval = NULL.join((authz, authc, "(passwd hidden for log)")) + logsafe_retval = NULL.join((authz, authc, b'(passwd hidden for log)')) self.ui.debug('imap', '__plainhandler: returning %s'% logsafe_retval) return retval @@ -264,6 +264,9 @@ resp = json.loads(response) self.ui.debug('imap', 'xoauth2handler: response "%s"'% resp) + if u'error' in resp: + raise OfflineImapError("xoauth2handler got: %s"% resp, + OfflineImapError.ERROR.REPO) self.oauth2_access_token = resp['access_token'] self.ui.debug('imap', 'xoauth2handler: access_token "%s"'% @@ -668,7 +671,8 @@ threads = [] for i in range(numconnections): - self.ui.debug('imap', 'keepalive: processing connection %d of %d'% (i, numconnections)) + self.ui.debug('imap', 'keepalive: processing connection %d of %d'% + (i, numconnections)) if len(self.idlefolders) > i: # IDLE thread idler = IdleThread(self, self.idlefolders[i]) @@ -802,12 +806,27 @@ while in IDLE mode, b) we get an Exception (e.g. on dropped connections, or c) the standard imaplib IDLE timeout of 29 minutes kicks in.""" + result, cb_arg, exc_data = args if exc_data is None and not self.stop_sig.isSet(): # No Exception, and we are not supposed to stop: self.needsync = True self.stop_sig.set() # Continue to sync. + def noop(imapobj): + """Factorize the noop code.""" + + try: + # End IDLE mode with noop, imapobj can point to a dropped conn. + imapobj.noop() + except imapobj.abort: + self.ui.warn('Attempting NOOP on dropped connection %s'% + imapobj.identifier) + self.parent.releaseconnection(imapobj, True) + else: + self.parent.releaseconnection(imapobj) + + while not self.stop_sig.isSet(): self.needsync = False @@ -834,17 +853,9 @@ else: self.ui.warn("IMAP IDLE not supported on server '%s'." "Sleep until next refresh cycle."% imapobj.identifier) - imapobj.noop() + noop(imapobj) #XXX: why? self.stop_sig.wait() # self.stop() or IDLE callback are invoked. - try: - # End IDLE mode with noop, imapobj can point to a dropped conn. - imapobj.noop() - except imapobj.abort: - self.ui.warn('Attempting NOOP on dropped connection %s'% - imapobj.identifier) - self.parent.releaseconnection(imapobj, True) - else: - self.parent.releaseconnection(imapobj) + noop(imapobj) if self.needsync: # Here not via self.stop, but because IDLE responded. Do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap/mbnames.py new/offlineimap-7.0.7/offlineimap/mbnames.py --- old/offlineimap-7.0.6/offlineimap/mbnames.py 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap/mbnames.py 2016-09-21 04:03:25.000000000 +0200 @@ -51,7 +51,7 @@ if _mbnames.is_enabled() is True: _mbnames.prune(accounts) else: - _mbnames.pruneAll(accounts) + _mbnames.pruneAll() def write(): @@ -81,8 +81,9 @@ """mbnames data for one account.""" def __init__(self, accountname, folder_root, mbnamesdir, folderfilter, - dry_run): + dry_run, ui): + self.ui = ui self._foldernames = [] self._accountname = accountname self._folder_root = folder_root @@ -109,7 +110,9 @@ 'localfolders': self._folder_root, }) - if not self._dryrun: + if self._dryrun: + self.ui.info("mbnames would write %s"% self._path) + else: with open(self._path, "wt") as intermediateFD: json.dump(itemlist, intermediateFD) @@ -122,7 +125,7 @@ self._dryrun = dry_run self._enabled = None - # Keys: accountname, values: _IntermediateMbnames instance + # Keys: accountname, values: _IntermediateMbnames instance. self._intermediates = {} self._incremental = None self._mbnamesdir = None @@ -173,7 +176,7 @@ def _removeIntermediateFile(self, path): if self._dryrun: - self.ui.info("would remove %s"% path) + self.ui.info("mbnames would remove %s"% path) else: unlink(path) self.ui.info("removed %s"% path) @@ -188,6 +191,7 @@ self._mbnamesdir, self._folderfilter, self._dryrun, + self.ui, ) self._intermediates[accountname].add(foldername) @@ -214,7 +218,7 @@ if removals is False: self.ui.info("no cache file to remove") - def pruneAll(self, accounts): + def pruneAll(self): for intermediateFile in self._iterIntermediateFiles(): self._removeIntermediateFile(intermediateFile) @@ -240,7 +244,9 @@ itemlist.sort(key=self._func_sortkey) itemlist = [self._peritem % d for d in itemlist] - if not self._dryrun: + if self._dryrun: + self.ui.info("mbnames would write %s"% self._path) + else: try: with open(self._path, 'wt') as mbnamesFile: mbnamesFile.write(self._header) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap/repository/IMAP.py new/offlineimap-7.0.7/offlineimap/repository/IMAP.py --- old/offlineimap-7.0.6/offlineimap/repository/IMAP.py 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap/repository/IMAP.py 2016-09-21 04:03:25.000000000 +0200 @@ -33,6 +33,7 @@ class IMAPRepository(BaseRepository): def __init__(self, reposname, account): + self.idlefolders = None BaseRepository.__init__(self, reposname, account) # self.ui is being set by the BaseRepository self._host = None @@ -95,15 +96,14 @@ def getholdconnectionopen(self): if self.getidlefolders(): - return 1 + return True return self.getconfboolean("holdconnectionopen", False) def getkeepalive(self): num = self.getconfint("keepalive", 0) if num == 0 and self.getidlefolders(): return 29*60 - else: - return num + return num def getsep(self): """Return the folder separator for the IMAP repository @@ -358,7 +358,11 @@ return self.getconfboolean('decodefoldernames', False) def getidlefolders(self): - return self.localeval.eval(self.getconf('idlefolders', '[]')) + if self.idlefolders is None: + self.idlefolders = self.localeval.eval( + self.getconf('idlefolders', '[]') + ) + return self.idlefolders def getmaxconnections(self): num1 = len(self.getidlefolders()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap/utils/distro.py new/offlineimap-7.0.7/offlineimap/utils/distro.py --- old/offlineimap-7.0.6/offlineimap/utils/distro.py 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap/utils/distro.py 2016-09-21 04:03:25.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright 2014 Eygene A. Ryabinkin. +# Copyright 2014-2006 Eygene A. Ryabinkin & contributors. # # Module that supports distribution-specific functions. @@ -7,7 +7,7 @@ # Each dictionary value is either string or some iterable. -# +# # For the former we will just return the value, for an iterable # we will walk through the values and will return the first # one that corresponds to the existing file. @@ -21,6 +21,7 @@ ], 'linux-ubuntu': '/etc/ssl/certs/ca-certificates.crt', 'linux-debian': '/etc/ssl/certs/ca-certificates.crt', + 'linux-gentoo': '/etc/ssl/certs/ca-certificates.crt', 'linux-fedora': '/etc/pki/tls/certs/ca-bundle.crt', 'linux-redhat': '/etc/pki/tls/certs/ca-bundle.crt', 'linux-suse': '/etc/ssl/ca-bundle.pem', @@ -43,13 +44,13 @@ if OS.startswith('linux'): DISTRO = platform.linux_distribution()[0] if DISTRO: - OS = OS + "-%s" % DISTRO.lower() + OS = OS + "-%s" % DISTRO.split()[0].lower() return OS def get_os_sslcertfile_searchpath(): """Returns search path for CA bundle for the current OS. - + We will return an iterable even if configuration has just a single value: it is easier for our callers to be sure that they can iterate over result. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/offlineimap-7.0.6/offlineimap.conf new/offlineimap-7.0.7/offlineimap.conf --- old/offlineimap-7.0.6/offlineimap.conf 2016-08-21 20:43:03.000000000 +0200 +++ new/offlineimap-7.0.7/offlineimap.conf 2016-09-21 04:03:25.000000000 +0200 @@ -987,6 +987,10 @@ # - maxconnections: to be at least the number of folders you give # - holdconnectionopen: to be true # - keepalive: to be 29 minutes unless you specify otherwise +# - singlethreadperfolder: to be true +# +# The presynchook and postsynchook are executed for each new synchronisation per +# folder. # # This feature isn't complete and may well have problems. See the "Known Issues" # entry in the manual for more details. @@ -1027,8 +1031,6 @@ # If this is unset (the default), then up to maxconnections threads are used # across all currently syncing folders. # -# This option is EXPERIMENTAL. -# #singlethreadperfolder = no
