pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/postfix-current Use the correct patch set for pos...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bad44b3c3be8
branches: trunk
changeset: 548453:bad44b3c3be8
user: martti <martti%pkgsrc.org@localhost>
date: Thu Oct 16 09:56:58 2008 +0000
description:
Use the correct patch set for postfix-2.6-xxxxxxxx.
diffstat:
mail/postfix-current/distinfo | 8 ++--
mail/postfix-current/patches/patch-as | 12 +++---
mail/postfix-current/patches/patch-at | 62 ++++++++++++++++++++++++----------
mail/postfix-current/patches/patch-av | 10 ++--
4 files changed, 58 insertions(+), 34 deletions(-)
diffs (240 lines):
diff -r 7ae2f1ba484b -r bad44b3c3be8 mail/postfix-current/distinfo
--- a/mail/postfix-current/distinfo Thu Oct 16 09:49:13 2008 +0000
+++ b/mail/postfix-current/distinfo Thu Oct 16 09:56:58 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.48 2008/10/16 09:45:12 martti Exp $
+$NetBSD: distinfo,v 1.49 2008/10/16 09:56:58 martti Exp $
SHA1 (postfix/postfix-2.6-20081012.tar.gz) = 7136abfd30557b3faf8bfa1ec754e304100fca91
RMD160 (postfix/postfix-2.6-20081012.tar.gz) = c7249bac4c21f29a11a7e9f46016e4ff7007f393
@@ -6,7 +6,7 @@
SHA1 (patch-aa) = 5b4923402c80957e47b8a4e16c897287b88544bb
SHA1 (patch-ag) = b77081a61bc2b95a40963fb1d3ac5818d55a778b
SHA1 (patch-ai) = aedee357d43321d2c3557679d796814455ae0ea6
-SHA1 (patch-as) = 531d372fd2e51781616202b9c704b621b96770c4
-SHA1 (patch-at) = b0abf2c49bfe94153f7a3845b5709ff8e0027a03
+SHA1 (patch-as) = b70ce22b253a011f4917ed170db29da2c92f675b
+SHA1 (patch-at) = cb8a292f56c985a68e112e7fad8b05b482886251
SHA1 (patch-au) = 60396f5f182e0f247b06974dc5cf912dbcf84bbf
-SHA1 (patch-av) = 98073186738e1a4fcd0f620096f4be83a9ff9e73
+SHA1 (patch-av) = b1569145f8ff0d81351ca6b94a1172260ba6b932
diff -r 7ae2f1ba484b -r bad44b3c3be8 mail/postfix-current/patches/patch-as
--- a/mail/postfix-current/patches/patch-as Thu Oct 16 09:49:13 2008 +0000
+++ b/mail/postfix-current/patches/patch-as Thu Oct 16 09:56:58 2008 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-as,v 1.3 2008/10/16 09:45:12 martti Exp $
+$NetBSD: patch-as,v 1.4 2008/10/16 09:56:58 martti Exp $
Support for sqlite.
--- src/global/Makefile.in.orig 2007-12-06 14:49:03.000000000 +0100
+++ src/global/Makefile.in
-@@ -4,7 +4,7 @@ SRCS = abounce.c anvil_clnt.c been_here.
+@@ -4,7 +4,7 @@
clnt_stream.c conv_time.c db_common.c debug_peer.c debug_process.c \
defer.c deliver_completed.c deliver_flock.c deliver_pass.c \
deliver_request.c dict_ldap.c dict_mysql.c dict_pgsql.c \
@@ -13,7 +13,7 @@
dsb_scan.c dsn.c dsn_buf.c dsn_mask.c dsn_print.c dsn_util.c \
ehlo_mask.c ext_prop.c file_id.c flush_clnt.c header_opts.c \
header_token.c input_transp.c int_filt.c is_header.c log_adhoc.c \
-@@ -34,7 +34,7 @@ OBJS = abounce.o anvil_clnt.o been_here.
+@@ -34,7 +34,7 @@
clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
defer.o deliver_completed.o deliver_flock.o deliver_pass.o \
deliver_request.o dict_ldap.o dict_mysql.o dict_pgsql.o \
@@ -22,7 +22,7 @@
dsb_scan.o dsn.o dsn_buf.o dsn_mask.o dsn_print.o dsn_util.o \
ehlo_mask.o ext_prop.o file_id.o flush_clnt.o header_opts.o \
header_token.o input_transp.o int_filt.o is_header.o log_adhoc.o \
-@@ -63,7 +63,7 @@ HDRS = abounce.h anvil_clnt.h been_here.
+@@ -63,7 +63,7 @@
canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h \
conv_time.h db_common.h debug_peer.h debug_process.h defer.h \
deliver_completed.h deliver_flock.h deliver_pass.h deliver_request.h \
@@ -31,7 +31,7 @@
dot_lockfile.h dot_lockfile_as.h dsb_scan.h dsn.h dsn_buf.h \
dsn_mask.h dsn_print.h dsn_util.h ehlo_mask.h ext_prop.h \
file_id.h flush_clnt.h header_opts.h header_token.h input_transp.h \
-@@ -860,6 +860,13 @@ dict_proxy.o: dict_proxy.c
+@@ -860,6 +860,13 @@
dict_proxy.o: dict_proxy.h
dict_proxy.o: mail_params.h
dict_proxy.o: mail_proto.h
@@ -45,7 +45,7 @@
domain_list.o: ../../include/match_list.h
domain_list.o: ../../include/match_ops.h
domain_list.o: ../../include/sys_defs.h
-@@ -1219,6 +1226,7 @@ mail_dict.o: dict_ldap.h
+@@ -1219,6 +1226,7 @@
mail_dict.o: dict_mysql.h
mail_dict.o: dict_pgsql.h
mail_dict.o: dict_proxy.h
diff -r 7ae2f1ba484b -r bad44b3c3be8 mail/postfix-current/patches/patch-at
--- a/mail/postfix-current/patches/patch-at Thu Oct 16 09:49:13 2008 +0000
+++ b/mail/postfix-current/patches/patch-at Thu Oct 16 09:56:58 2008 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-at,v 1.3 2008/10/16 09:45:12 martti Exp $
+$NetBSD: patch-at,v 1.4 2008/10/16 09:56:58 martti Exp $
Support for sqlite.
--- src/global/dict_sqlite.c.orig 2008-10-17 00:40:21.000000000 +0200
+++ src/global/dict_sqlite.c
-@@ -0,0 +1,254 @@
+@@ -0,0 +1,278 @@
+/*++
+/* NAME
+/* dict_sqlite 3
@@ -46,18 +46,15 @@
+/* Configuration parameters:
+/*
+/* The parameters encodes a number of pieces of information:
-+/* dbpath, query, table, select_field and where_field:
++/* dbpath, query, result_format and expansion_limit:
+/* .IP \fIdbpath\fR
+/* Path to SQLite database
+/* .IP \fIquery\fR
-+/* Query template, before the query is actually issued, variable
-+/* substitutions are performed. See sqlite_table(5) for details. If
-+/* No query is specified, the legacy variables \fItable\fR,
-+/* \fIselect_field\fR, \fIwhere_field\fR and \fIadditional_conditions\fR
-+/* are used to construct the query template.
++/* Query template, before the query is actually issued, variable
++/* substitutions are performed. See sqlite_table(5) for details.
+/* .IP \fIresult_format\fR
-+/* The format used to expand results from queries. Substitutions
-+/* are performed as described in sqlite_table(5). Defaults to returning
++/* The format used to expand results from queries. Substitutions
++/* are performed as described in sqlite_table(5). Defaults to returning
+/* the lookup result unchanged.
+/* .IP expansion_limit
+/* Limit (if any) on the total number of lookup result values. Lookups which
@@ -78,12 +75,17 @@
+#ifdef HAS_SQLITE
+#include <sqlite3.h>
+
++#if !defined(SQLITE_VERSION_NUMBER) || (SQLITE_VERSION_NUMBER < 3005004)
++#error "Your SQLite version is too old"
++#endif
++
+/* Utility library. */
+
+#include "msg.h"
+#include "dict.h"
+#include "vstring.h"
+#include "stringops.h"
++#include "mymalloc.h"
+
+/* Global library. */
+
@@ -114,6 +116,24 @@
+static void dict_sqlite_close(DICT *);
+static void sqlite_parse_config(DICT_SQLITE *, const char *);
+
++/* dict_sqlite_quote - escape SQL metacharacters in input string */
++
++static void dict_sqlite_quote(DICT *dict, const char *name, VSTRING *result) {
++ DICT_SQLITE *dict_sqlite = (DICT_SQLITE *) dict;
++ int len = strlen(name);
++ int buflen = 2*len + 1;
++ char *q;
++
++ if (buflen < len)
++ msg_panic("dict_sqlite_quote: integer overflow in 2*%d+1", len);
++
++ VSTRING_SPACE(result, buflen);
++ q = sqlite3_mprintf("%q",name);
++ vstring_strncat(result,q, strlen(q));
++ sqlite3_free(q);
++ VSTRING_SKIP(result);
++}
++
+
+/* dict_sqlite_close - close the database */
+
@@ -126,6 +146,11 @@
+ if (sqlite3_close(dict_sqlite->db) != SQLITE_OK)
+ msg_fatal("%s: DB close failed", myname);
+ cfg_parser_free(dict_sqlite->parser);
++ myfree(dict_sqlite->dbpath);
++ myfree(dict_sqlite->query);
++ myfree(dict_sqlite->result_format);
++ if (dict_sqlite->ctx)
++ db_common_free_ctx(dict_sqlite->ctx);
+ if (dict->fold_buf)
+ vstring_free(dict->fold_buf);
+ dict_free(dict);
@@ -147,7 +172,9 @@
+ /*
+ * Optionally fold the key.
+ */
-+ if (dict->fold_buf) {
++ if (dict->flags & DICT_FLAG_FOLD_FIX) {
++ if (dict->fold_buf == 0)
++ dict->fold_buf = vstring_alloc(10);
+ vstring_strcpy(dict->fold_buf, name);
+ name = lowercase(vstring_str(dict->fold_buf));
+ }
@@ -168,7 +195,7 @@
+ INIT_VSTR(query, 10);
+
+ if (!db_common_expand(dict_sqlite->ctx, dict_sqlite->query,
-+ name, 0, query, NULL))
++ name, 0, query, dict_sqlite_quote))
+ return (0);
+
+ if (msg_verbose)
@@ -224,14 +251,10 @@
+ (void) db_common_parse(0, &dict_sqlite->ctx, dict_sqlite->result_format, 0);
+
+ db_common_parse_domain(p, dict_sqlite->ctx);
++
++ if (dict_sqlite->dict.flags & DICT_FLAG_FOLD_FIX)
++ dict_sqlite->dict.fold_buf = vstring_alloc(10);
+
-+ if (db_common_dict_partial(dict_sqlite->ctx))
-+ dict_sqlite->dict.flags |= DICT_FLAG_PATTERN;
-+ else
-+ dict_sqlite->dict.flags |= DICT_FLAG_FIXED;
-+
-+ if (dict_sqlite->dict.flags & DICT_FLAG_FOLD_FIX)
-+ dict_sqlite->dict.fold_buf = vstring_alloc(10);
+}
+
+/* dict_sqlite_open - open sqlite database */
@@ -249,6 +272,7 @@
+ dict_sqlite->dict.lookup = dict_sqlite_lookup;
+ dict_sqlite->dict.close = dict_sqlite_close;
+ dict_sqlite->dict.flags = dict_flags;
++ dict_sqlite->dict.flags |= DICT_FLAG_FIXED;
+ sqlite_parse_config(dict_sqlite, name);
+
+ if (sqlite3_open(dict_sqlite->dbpath, &dict_sqlite->db)) {
diff -r 7ae2f1ba484b -r bad44b3c3be8 mail/postfix-current/patches/patch-av
--- a/mail/postfix-current/patches/patch-av Thu Oct 16 09:49:13 2008 +0000
+++ b/mail/postfix-current/patches/patch-av Thu Oct 16 09:56:58 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-av,v 1.3 2008/10/16 09:45:12 martti Exp $
+$NetBSD: patch-av,v 1.4 2008/10/16 09:56:58 martti Exp $
Support for sqlite.
@@ -12,13 +12,13 @@
#include <mail_dict.h>
typedef struct {
-@@ -54,6 +55,9 @@ static const DICT_OPEN_INFO dict_open_in
+@@ -53,6 +54,9 @@
+ #endif
#ifdef HAS_PGSQL
DICT_TYPE_PGSQL, dict_pgsql_open,
- #endif
++#endif
+#ifdef HAS_SQLITE
+ DICT_TYPE_SQLITE, dict_sqlite_open,
-+#endif
+ #endif
0,
};
-
Home |
Main Index |
Thread Index |
Old Index