- Add a bug fix from upstream via Brad:

mbox: Fields weren't being added to cache file during message saving.

- Knock out the sieve subpackage if building with another flavor.
The object code was ending up linked to db/ldap libraries and thus
producing bad packages in bulk builds. This is a nasty hack from me
to fix packages until we have time to fix the linking and has a
big fat XXX next to it. Ok Brad (maintainer).
This commit is contained in:
sthen 2010-07-30 20:22:24 +00:00
parent cf698d83cf
commit 6b062b8978
2 changed files with 64 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.143 2010/07/24 09:51:12 sthen Exp $
# $OpenBSD: Makefile,v 1.144 2010/07/30 20:22:24 sthen Exp $
SHARED_ONLY= Yes
@ -12,7 +12,9 @@ V_MANAGESIEVE= 0.11.11
PKGNAME= dovecot-${V_DOVECOT}
PKGNAME-server= dovecot-${V_DOVECOT}
REVISION-server= 0
FULLPKGNAME-sieve= dovecot-sieve-${V_SIEVE}
REVISION-sieve= 0
EPOCH-sieve= 0
FULLPKGPATH-sieve= ${PKGPATH},-sieve
@ -51,6 +53,15 @@ PSEUDO_FLAVORS= no_sieve
FLAVORS= bdb ldap mysql postgresql sqlite
FLAVOR?=
# XXX The produced dovecot-sieve package ends up linked to any
# other library (database/ldap) used in the build thus producing
# bad packages in bulk build. Temporarily work around this in a
# nasty way by knocking out the sieve subpackage if another
# flavor is used.
.if ! ${FLAVOR} == ""
FLAVOR+= no_sieve
.endif
CFLAGS+= -I/usr/include/kerberosV -I${LOCALBASE}/include
USE_LIBTOOL= Yes

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-src_lib-storage_index_mbox_mbox-save_c,v 1.3 2010/07/30 20:22:24 sthen Exp $
--- src/lib-storage/index/mbox/mbox-save.c.orig Wed Jul 14 08:53:24 2010
+++ src/lib-storage/index/mbox/mbox-save.c Fri Jul 30 14:11:15 2010
@@ -403,9 +403,10 @@ mbox_save_get_input_stream(struct mbox_save_context *c
i_stream_create_crlf(filter) : i_stream_create_lf(filter);
i_stream_unref(&filter);
- if (ctx->mail != NULL) {
+ if (ctx->ctx.dest_mail != NULL) {
/* caching creates a tee stream */
- cache_input = index_mail_cache_parse_init(ctx->mail, ret);
+ cache_input =
+ index_mail_cache_parse_init(ctx->ctx.dest_mail, ret);
i_stream_unref(&ret);
ret = cache_input;
}
@@ -529,10 +530,10 @@ static int mbox_save_body(struct mbox_save_context *ct
ssize_t ret;
while ((ret = i_stream_read(ctx->input)) != -1) {
- if (ctx->mail != NULL) {
+ if (ctx->ctx.dest_mail != NULL) {
/* i_stream_read() may have returned 0 at EOF
because of this parser */
- index_mail_cache_parse_continue(ctx->mail);
+ index_mail_cache_parse_continue(ctx->ctx.dest_mail);
}
if (ret == 0)
return 0;
@@ -585,8 +586,8 @@ int mbox_save_continue(struct mail_save_context *_ctx)
}
while ((ret = i_stream_read(ctx->input)) > 0) {
- if (ctx->mail != NULL)
- index_mail_cache_parse_continue(ctx->mail);
+ if (ctx->ctx.dest_mail != NULL)
+ index_mail_cache_parse_continue(ctx->ctx.dest_mail);
data = i_stream_get_data(ctx->input, &size);
for (i = 0; i < size; i++) {
@@ -675,8 +676,9 @@ int mbox_save_finish(struct mail_save_context *_ctx)
} T_END;
}
- if (ctx->mail != NULL) {
- index_mail_cache_parse_deinit(ctx->mail, ctx->ctx.received_date,
+ if (ctx->ctx.dest_mail != NULL) {
+ index_mail_cache_parse_deinit(ctx->ctx.dest_mail,
+ ctx->ctx.received_date,
!ctx->failed);
}
if (ctx->input != NULL)