Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337014 - Request to disable (broken) bzip2 support in =net-mail/dovecot-1*
Summary: Request to disable (broken) bzip2 support in =net-mail/dovecot-1*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-12 22:37 UTC by kfm
Modified: 2010-09-15 20:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2010-09-12 22:37:51 UTC
Upon trying to use the "zlib" plugin, which also encompasses support for the bzip2 compression format, I discovered that its heuristics for detecting bzip2 compressed messages in a maildir store are broken. This means that some messages will decompress without issue whereas others will not, leading to the following shenanigans:

Sep 12 23:24:06 server dovecot: IMAP(username): gzread() failed: UNEXPECTED_EOF
Sep 12 23:24:06 server dovecot: IMAP(username): zlib_istream.seek() failed: Invalid argument
Sep 12 23:24:06 server dovecot: IMAP(username): FETCH for mailbox Archives.2009 UID 1212 failed to read message input: Invalid argument
Sep 12 23:24:06 server dovecot: IMAP(username): Disconnected: BUG: Unknown internal error bytes=250/3142

Upstream says: "Yeah, bzip2 code is broken in v1.2. I fixed it in v2.0 by basically rewriting the whole thing. Maybe I should just disable bzip2 support in v1.2."

Source: http://www.mail-archive.com/dovecot@dovecot.org/msg26061.html

Because this renders it essentially useless for any production purpose, my request is basically that the bzip2 USE flag be masked for versions lower than 2.0.
Comment 1 Patrick Lauer gentoo-dev 2010-09-15 15:21:42 UTC
Fixed in net-mail/dovecot/dovecot-1.2.14. I wonder if we should disable it for all older versions too?
Comment 2 kfm 2010-09-15 15:33:06 UTC
Thanks, Patrick. Regarding the older versions, I would recommend it as you can be reasonably sure that it's no less broken in those cases. Timo Sirainen is an excellent programmer and it's pertinent that he just took a decision to fully rewrite this aspect of dovecot in order to fix it. However, as alluded to before, gzip support should be fine although I haven't heavily tested it (I went straight to dovecot-2.0.2 after this discovery because I badly needed the degree of compression that bz2 offers and its LDA has the ability to compress before storage).
Comment 3 Eray Aslan gentoo-dev 2010-09-15 18:03:39 UTC
Just stabilize 1.2.14 in 30 days?  (versus bumping old versions and waiting for 30 days anyway?)
Comment 4 kfm 2010-09-15 20:18:58 UTC
Re Comment 3: I would say just two things:

1) The feature is broken and my goal is to stop people building in the feature
   and potentially attempting to use it in production
2) I am asking for a USE flag to be masked with version scope. This does not
   entail any activity on the ebuilds whatsoever. It simply prevents the flag from
   being enabled while building the affected ebuilds (unless the user goes to
   some lengths to revert the use.mask policy in question).
Comment 5 kfm 2010-09-15 20:22:35 UTC
I should clarify my proposal. I'm suggesting that the following line be inserted into profiles/base/package.use.mask:

<net-mail/dovecot-2 bzip2
Comment 6 Patrick Lauer gentoo-dev 2010-09-15 20:38:31 UTC
(In reply to comment #5)
> I should clarify my proposal. I'm suggesting that the following line be
> inserted into profiles/base/package.use.mask:
> 
> <net-mail/dovecot-2 bzip2
> 

Good idea. Done :)
That should also conclude this bug.