From 793601cb208af136960d5789aadf48cd89977345 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 21 May 2013 12:47:32 +0200 Subject: [PATCH] dovecot-pigeonhole: add latest upstream fixes for version 0.4.0 Note: The patch covers all fixes from the mercurial repository up to revision http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/d4e9ca7fddcf. --- ...pigeonhole-0.4.0-0100-upstream-fixes.patch | 230 ++++++++++++++++++ ...ecot-2.2-pigeonhole-0.4.0-doc-hotfix.patch | 99 -------- 2 files changed, 230 insertions(+), 99 deletions(-) create mode 100644 mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-0100-upstream-fixes.patch delete mode 100644 mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-doc-hotfix.patch diff --git a/mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-0100-upstream-fixes.patch b/mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-0100-upstream-fixes.patch new file mode 100644 index 000000000..ad15ba1d5 --- /dev/null +++ b/mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-0100-upstream-fixes.patch @@ -0,0 +1,230 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-0100-upstream-fixes.patch +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +From 72a02fd7203a5d3422e7eaa3ff3a517b619402ae Mon Sep 17 00:00:00 2001 +From: Stephan Bosch +Date: Thu, 9 May 2013 16:39:41 +0200 +Subject: [PATCH] Forgot to update Dovecot version in README and man pages. + + +diff --git a/README b/README +index 19263a1..d4e68b4 100644 +--- a/README ++++ b/README +@@ -1,4 +1,4 @@ +-Pigeonhole for Dovecot v2.1 ++Pigeonhole for Dovecot v2.2 + + Introduction + ============ +@@ -100,8 +100,7 @@ following list outlines the implementation status of each supported extension: + + copy (RFC 3894): fully supported. + body (RFC 5173): almost fully supported, but the text body-transform +- implementation is simple and some issues make it still not completely +- RFC compliant. ++ implementation is simple. + environment (RFC 5183): fully supported (v0.4.0+). + variables (RFC 5229): fully supported. + vacation (RFC 5230): fully supported. +diff --git a/doc/man/pigeonhole.7.in b/doc/man/pigeonhole.7.in +index f86d5e6..75db9ca 100644 +--- a/doc/man/pigeonhole.7.in ++++ b/doc/man/pigeonhole.7.in +@@ -1,5 +1,5 @@ +-.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file +-.TH "PIGEONHOLE" 7 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" ++.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file ++.TH "PIGEONHOLE" 7 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" + .\"------------------------------------------------------------------------ + .SH NAME + pigeonhole \- Overview of the Pigeonhole project\(aqs Sieve support for the +diff --git a/doc/man/sieve-dump.1.in b/doc/man/sieve-dump.1.in +index faf886f..3ea65f7 100644 +--- a/doc/man/sieve-dump.1.in ++++ b/doc/man/sieve-dump.1.in +@@ -1,5 +1,5 @@ +-.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file +-.TH "SIEVE\-DUMP" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" ++.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file ++.TH "SIEVE\-DUMP" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" + .\"------------------------------------------------------------------------ + .SH NAME + sieve\-dump \- Pigeonhole\(aqs Sieve script binary dump tool +diff --git a/doc/man/sieve-filter.1.in b/doc/man/sieve-filter.1.in +index 1566dfa..df3fc36 100644 +--- a/doc/man/sieve-filter.1.in ++++ b/doc/man/sieve-filter.1.in +@@ -1,5 +1,5 @@ +-.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file +-.TH "SIEVE\-FILTER" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" ++.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file ++.TH "SIEVE\-FILTER" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" + .SH NAME + sieve\-filter \- Pigeonhole\(aqs Sieve mailbox filter tool + +diff --git a/doc/man/sieve-test.1.in b/doc/man/sieve-test.1.in +index 946c5b7..4331250 100644 +--- a/doc/man/sieve-test.1.in ++++ b/doc/man/sieve-test.1.in +@@ -1,5 +1,5 @@ +-.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file +-.TH "SIEVE\-TEST" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" ++.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file ++.TH "SIEVE\-TEST" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" + .SH NAME + sieve\-test \- Pigeonhole\(aqs Sieve script tester + .\"------------------------------------------------------------------------ +diff --git a/doc/man/sievec.1.in b/doc/man/sievec.1.in +index 28ef9e3..9307800 100644 +--- a/doc/man/sievec.1.in ++++ b/doc/man/sievec.1.in +@@ -1,5 +1,5 @@ +-.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file +-.TH "SIEVEC" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" ++.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file ++.TH "SIEVEC" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" + .\"------------------------------------------------------------------------ + .SH NAME + sievec \- Pigeonhole\(aqs Sieve script compiler +-- +1.7.10.2 + + +From 32ee54152c032b9e6f90bce9a6787de29a42ac4b Mon Sep 17 00:00:00 2001 +From: Stephan Bosch +Date: Wed, 15 May 2013 21:59:32 +0200 +Subject: [PATCH] lib-sieve: Fixed datastack problem in message header + composition. + + +diff --git a/src/lib-sieve/rfc2822.c b/src/lib-sieve/rfc2822.c +index fc2bb36..27f94d4 100644 +--- a/src/lib-sieve/rfc2822.c ++++ b/src/lib-sieve/rfc2822.c +@@ -211,32 +211,26 @@ unsigned int rfc2822_header_append + void rfc2822_header_printf + (string_t *header, const char *name, const char *fmt, ...) + { ++ const char *body; + va_list args; + +- T_BEGIN { +- const char *body; ++ va_start(args, fmt); ++ body = t_strdup_vprintf(fmt, args); ++ va_end(args); + +- va_start(args, fmt); +- body = t_strdup_vprintf(fmt, args); +- va_end(args); +- +- rfc2822_header_write(header, name, body); +- } T_END; ++ rfc2822_header_write(header, name, body); + } + + void rfc2822_header_utf8_printf + (string_t *header, const char *name, const char *fmt, ...) + { ++ string_t *body = t_str_new(256); + va_list args; + +- T_BEGIN { +- string_t *body = t_str_new(256); +- +- va_start(args, fmt); +- message_header_encode(t_strdup_vprintf(fmt, args), body); +- va_end(args); ++ va_start(args, fmt); ++ message_header_encode(t_strdup_vprintf(fmt, args), body); ++ va_end(args); + +- rfc2822_header_write(header, name, str_c(body)); +- } T_END; ++ rfc2822_header_write(header, name, str_c(body)); + } + +-- +1.7.10.2 + + +From 5989f3dbb6dc5ad54d4d6e8fa5367e34b6cded34 Mon Sep 17 00:00:00 2001 +From: Stephan Bosch +Date: Mon, 20 May 2013 21:20:04 +0200 +Subject: [PATCH] Sieve extprograms plugin: Fixed interaction between pipe + command and remote script service. The output from the + script service was never read, causing a broken pipe error + at the script service. Apparently, this was broken since + the I/O handling for extprograms was last revised. + + +diff --git a/src/plugins/sieve-extprograms/script-client-remote.c b/src/plugins/sieve-extprograms/script-client-remote.c +index 54b8356..f437e04 100644 +--- a/src/plugins/sieve-extprograms/script-client-remote.c ++++ b/src/plugins/sieve-extprograms/script-client-remote.c +@@ -183,7 +183,7 @@ static void script_client_remote_connected(struct script_client *sclient) + io_remove(&sclient->io); + script_client_init_streams(sclient); + +- if ( sclient->output != NULL && !slclient->noreply ) { ++ if ( !slclient->noreply ) { + sclient->script_input = script_client_istream_create + (sclient, sclient->script_input); + } +diff --git a/src/plugins/sieve-extprograms/script-client.c b/src/plugins/sieve-extprograms/script-client.c +index 52832e8..06a5d5d 100644 +--- a/src/plugins/sieve-extprograms/script-client.c ++++ b/src/plugins/sieve-extprograms/script-client.c +@@ -145,7 +145,7 @@ static int script_client_script_output(struct script_client *sclient) + if ( input == NULL ) { + o_stream_unref(&sclient->script_output); + +- if ( sclient->output == NULL ) { ++ if ( sclient->script_input == NULL ) { + script_client_disconnect(sclient, FALSE); + } else { + sclient->close_output(sclient); +@@ -164,17 +164,19 @@ static void script_client_script_input(struct script_client *sclient) + size_t size; + int ret = 0; + +- if ( input != NULL && output != NULL ) { +- ++ if ( input != NULL ) { + while ( (ret=i_stream_read_data(input, &data, &size, 0)) > 0 ) { +- ssize_t sent; ++ if ( output != NULL ) { ++ ssize_t sent; + +- if ( (sent=o_stream_send(output, data, size)) < 0 ) { +- script_client_fail(sclient, SCRIPT_CLIENT_ERROR_IO); +- return; ++ if ( (sent=o_stream_send(output, data, size)) < 0 ) { ++ script_client_fail(sclient, SCRIPT_CLIENT_ERROR_IO); ++ return; ++ } ++ size = (size_t)sent; + } + +- i_stream_skip(input, sent); ++ i_stream_skip(input, size); + } + + if ( ret < 0 ) { +-- +1.7.10.2 + diff --git a/mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-doc-hotfix.patch b/mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-doc-hotfix.patch deleted file mode 100644 index f300981ad..000000000 --- a/mail/dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-doc-hotfix.patch +++ /dev/null @@ -1,99 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../dovecot-pigeonhole/dovecot-2.2-pigeonhole-0.4.0-doc-hotfix.patch -# Copyright (C) 2013 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - - -# HG changeset patch -# User Stephan Bosch -# Date 1368110381 -7200 -# Node ID a32b12ab5ea6c8fcc3f4971ddceb8e4454ee84e5 -# Parent 1e0a6a4f4634fe3559cef631dae46f52ec2bdf47 -Forgot to update Dovecot version in README and man pages. - -diff -r 1e0a6a4f4634 -r a32b12ab5ea6 README ---- a/README Thu May 09 15:41:42 2013 +0200 -+++ b/README Thu May 09 16:39:41 2013 +0200 -@@ -1,4 +1,4 @@ --Pigeonhole for Dovecot v2.1 -+Pigeonhole for Dovecot v2.2 - - Introduction - ============ -@@ -100,8 +100,7 @@ - - copy (RFC 3894): fully supported. - body (RFC 5173): almost fully supported, but the text body-transform -- implementation is simple and some issues make it still not completely -- RFC compliant. -+ implementation is simple. - environment (RFC 5183): fully supported (v0.4.0+). - variables (RFC 5229): fully supported. - vacation (RFC 5230): fully supported. -diff -r 1e0a6a4f4634 -r a32b12ab5ea6 doc/man/pigeonhole.7.in ---- a/doc/man/pigeonhole.7.in Thu May 09 15:41:42 2013 +0200 -+++ b/doc/man/pigeonhole.7.in Thu May 09 16:39:41 2013 +0200 -@@ -1,5 +1,5 @@ --.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file --.TH "PIGEONHOLE" 7 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" -+.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file -+.TH "PIGEONHOLE" 7 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" - .\"------------------------------------------------------------------------ - .SH NAME - pigeonhole \- Overview of the Pigeonhole project\(aqs Sieve support for the -diff -r 1e0a6a4f4634 -r a32b12ab5ea6 doc/man/sieve-dump.1.in ---- a/doc/man/sieve-dump.1.in Thu May 09 15:41:42 2013 +0200 -+++ b/doc/man/sieve-dump.1.in Thu May 09 16:39:41 2013 +0200 -@@ -1,5 +1,5 @@ --.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file --.TH "SIEVE\-DUMP" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" -+.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file -+.TH "SIEVE\-DUMP" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" - .\"------------------------------------------------------------------------ - .SH NAME - sieve\-dump \- Pigeonhole\(aqs Sieve script binary dump tool -diff -r 1e0a6a4f4634 -r a32b12ab5ea6 doc/man/sieve-filter.1.in ---- a/doc/man/sieve-filter.1.in Thu May 09 15:41:42 2013 +0200 -+++ b/doc/man/sieve-filter.1.in Thu May 09 16:39:41 2013 +0200 -@@ -1,5 +1,5 @@ --.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file --.TH "SIEVE\-FILTER" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" -+.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file -+.TH "SIEVE\-FILTER" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" - .SH NAME - sieve\-filter \- Pigeonhole\(aqs Sieve mailbox filter tool - -diff -r 1e0a6a4f4634 -r a32b12ab5ea6 doc/man/sieve-test.1.in ---- a/doc/man/sieve-test.1.in Thu May 09 15:41:42 2013 +0200 -+++ b/doc/man/sieve-test.1.in Thu May 09 16:39:41 2013 +0200 -@@ -1,5 +1,5 @@ --.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file --.TH "SIEVE\-TEST" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" -+.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file -+.TH "SIEVE\-TEST" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" - .SH NAME - sieve\-test \- Pigeonhole\(aqs Sieve script tester - .\"------------------------------------------------------------------------ -diff -r 1e0a6a4f4634 -r a32b12ab5ea6 doc/man/sievec.1.in ---- a/doc/man/sievec.1.in Thu May 09 15:41:42 2013 +0200 -+++ b/doc/man/sievec.1.in Thu May 09 16:39:41 2013 +0200 -@@ -1,5 +1,5 @@ --.\" Copyright (c) 2010-2012 Pigeonhole authors, see the included COPYING file --.TH "SIEVEC" 1 "2012-01-07" "Pigeonhole for Dovecot v2.1" "Pigeonhole" -+.\" Copyright (c) 2010-2013 Pigeonhole authors, see the included COPYING file -+.TH "SIEVEC" 1 "2013-05-09" "Pigeonhole for Dovecot v2.2" "Pigeonhole" - .\"------------------------------------------------------------------------ - .SH NAME - sievec \- Pigeonhole\(aqs Sieve script compiler -