- downgraded to lastest upstream stable (1.0.5)

This commit is contained in:
Tomas Janousek 2007-09-25 13:05:58 +00:00
parent 222d07ce72
commit 43686eca00
6 changed files with 755 additions and 57 deletions

View File

@ -1,3 +1,4 @@
dovecot-1.1.alpha3.tar.gz dovecot-1.0.5.tar.gz
dovecot-1.1.alpha3.tar.gz.sig dovecot-1.0.5.tar.gz.sig
dovecot-sieve-1.1-0367450c9382.tar.gz dovecot-sieve-1.0.2.tar.gz
dovecot-sieve-1.0.2.tar.gz.sig

View File

@ -0,0 +1,107 @@
--- dovecot-1.0.rc15/src/master/master-settings.c.default-settings 2006-11-12 18:56:07.000000000 +0100
+++ dovecot-1.0.rc15/src/master/master-settings.c 2006-11-21 09:47:40.000000000 +0100
@@ -269,8 +269,8 @@
MEMBER(syslog_facility) "mail",
/* general */
- MEMBER(protocols) "imap imaps",
- MEMBER(listen) "*",
+ MEMBER(protocols) "imap imaps pop3 pop3s",
+ MEMBER(listen) "[::]",
MEMBER(ssl_listen) "",
MEMBER(ssl_disable) FALSE,
@@ -281,7 +281,7 @@
MEMBER(ssl_parameters_regenerate) 168,
MEMBER(ssl_cipher_list) "",
MEMBER(ssl_verify_client_cert) FALSE,
- MEMBER(disable_plaintext_auth) TRUE,
+ MEMBER(disable_plaintext_auth) FALSE,
MEMBER(verbose_ssl) FALSE,
MEMBER(shutdown_clients) TRUE,
MEMBER(nfs_check) TRUE,
@@ -337,7 +337,7 @@
MEMBER(maildir_stat_dirs) FALSE,
MEMBER(maildir_copy_with_hardlinks) FALSE,
MEMBER(mbox_read_locks) "fcntl",
- MEMBER(mbox_write_locks) "dotlock fcntl",
+ MEMBER(mbox_write_locks) "fcntl",
MEMBER(mbox_lock_timeout) 300,
MEMBER(mbox_dotlock_change_timeout) 120,
MEMBER(mbox_min_index_size) 0,
@@ -366,7 +366,7 @@
MEMBER(pop3_enable_last) FALSE,
MEMBER(pop3_reuse_xuidl) FALSE,
MEMBER(pop3_lock_session) FALSE,
- MEMBER(pop3_uidl_format) "",
+ MEMBER(pop3_uidl_format) "%08Xu%08Xv",
MEMBER(pop3_client_workarounds) "",
MEMBER(pop3_logout_format) "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s",
--- dovecot-1.0.rc15/dovecot-example.conf.default-settings 2006-11-05 18:14:37.000000000 +0100
+++ dovecot-1.0.rc15/dovecot-example.conf 2006-11-21 09:49:06.000000000 +0100
@@ -7,17 +7,14 @@
# value inside quotes, eg.: key = "# char and trailing whitespace "
# Default values are shown for each setting, it's not required to uncomment
-# any of the lines. Exception to this are paths, they're just examples with
-# the real defaults being based on configure options. The paths listed here
-# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-# --with-ssldir=/etc/ssl
+# any of the lines.
# Base directory where to store runtime data.
#base_dir = /var/run/dovecot/
# Protocols we want to be serving: imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
-#protocols = imap imaps
+#protocols = imap imaps pop3 pop3s
# IP or host address where to listen in for connections. It's not currently
# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
@@ -36,13 +33,13 @@
# listen = *:10100
# ..
# }
-#listen = *
+#listen = [::]
# Disable LOGIN command and all other plaintext authentications unless
# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
# matches the local IP (ie. you're connecting from the same computer), the
# connection is considered secure and plaintext authentication is allowed.
-#disable_plaintext_auth = yes
+#disable_plaintext_auth = no
# Should all IMAP and POP3 processes be killed when Dovecot master process
# shuts down. Setting this to "no" means that Dovecot can be upgraded without
@@ -87,8 +84,8 @@
# dropping root privileges, so keep the key file unreadable by anyone but
# root. Included doc/mkcert.sh can be used to easily generate self-signed
# certificate, just make sure to update the domains in dovecot-openssl.cnf
-#ssl_cert_file = /etc/ssl/certs/dovecot.pem
-#ssl_key_file = /etc/ssl/private/dovecot.pem
+#ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
+#ssl_key_file = /etc/pki/dovecot/private/dovecot.pem
# If key file is password protected, give the password here. Alternatively
# give it when starting dovecot with -p parameter.
@@ -425,7 +422,7 @@
# locking methods as well. Some operating systems don't allow using some of
# them simultaneously.
#mbox_read_locks = fcntl
-#mbox_write_locks = dotlock fcntl
+#mbox_write_locks = fcntl
# Maximum time in seconds to wait for lock (all of them) before aborting.
#mbox_lock_timeout = 300
@@ -593,7 +590,7 @@
# installations. %08Xu%08Xv will be the new default, so use it for new
# installations.
#
- #pop3_uidl_format =
+ #pop3_uidl_format = %08Xu%08Xv
# POP3 logout format string:
# %t - number of TOP commands

View File

@ -0,0 +1,263 @@
http://dovecot.org/list/dovecot/2007-April/021429.html
diff -ru dovecot-1.0.rc27.orig/src/plugins/quota/quota-plugin.c dovecot-1.0.rc27/src/plugins/quota/quota-plugin.c
--- dovecot-1.0.rc27.orig/src/plugins/quota/quota-plugin.c 2007-03-06 17:34:47.000000000 +0100
+++ dovecot-1.0.rc27/src/plugins/quota/quota-plugin.c 2007-03-31 22:18:55.000000000 +0200
@@ -21,9 +21,24 @@
env = getenv("QUOTA");
if (env != NULL) {
+ struct quota_setup *setup;
+ const char *name;
+ unsigned int i;
quota_set = quota_init();
/* Currently we support only one quota setup */
- (void)quota_setup_init(quota_set, env, TRUE);
+ setup = quota_setup_init(quota_set, env, TRUE);
+
+ name = "QUOTA_WARNING";
+ env = getenv(name);
+ i = 1;
+ t_push();
+ while (env != NULL) {
+ (void)quota_warning_init(setup, env);
+
+ name = t_strdup_printf("QUOTA_WARNING%u", ++i);
+ env = getenv(name);
+ }
+ t_pop();
quota_next_hook_mail_storage_created =
hook_mail_storage_created;
diff -ru dovecot-1.0.rc27.orig/src/plugins/quota/quota-private.h dovecot-1.0.rc27/src/plugins/quota/quota-private.h
--- dovecot-1.0.rc27.orig/src/plugins/quota/quota-private.h 2007-03-12 21:34:50.000000000 +0100
+++ dovecot-1.0.rc27/src/plugins/quota/quota-private.h 2007-03-17 00:06:23.000000000 +0100
@@ -22,6 +22,9 @@
/* List of quota roots. It's array because there shouldn't be many. */
array_t ARRAY_DEFINE(roots, struct quota_root *);
+ /* List of quota warnings. There should probably be few. */
+ array_t ARRAY_DEFINE(warnings, struct quota_warning *);
+
unsigned int user_root:1;
};
@@ -86,6 +89,21 @@
unsigned int idx;
};
+enum quota_warning_limit_kind {
+ QUOTA_WARNING_NO_LIMIT,
+ QUOTA_WARNING_PERCENT_LIMIT,
+ QUOTA_WARNING_ABSOLUTE_LIMIT
+};
+
+struct quota_warning {
+ struct quota_setup *setup;
+ uint64_t storage_limit;
+ unsigned int count_limit;
+ enum quota_warning_limit_kind storage_limit_kind:2;
+ enum quota_warning_limit_kind count_limit_kind:2;
+ char *command;
+};
+
struct quota_transaction_context {
array_t ARRAY_DEFINE(root_transactions,
struct quota_root_transaction_context *);
diff -ru dovecot-1.0.rc27.orig/src/plugins/quota/quota.c dovecot-1.0.rc27/src/plugins/quota/quota.c
--- dovecot-1.0.rc27.orig/src/plugins/quota/quota.c 2007-03-06 17:34:47.000000000 +0100
+++ dovecot-1.0.rc27/src/plugins/quota/quota.c 2007-03-31 22:35:22.000000000 +0200
@@ -6,6 +6,8 @@
#include "quota-private.h"
#include "quota-fs.h"
+#include <stdlib.h>
+
unsigned int quota_module_id = 0;
extern struct quota_backend quota_backend_dict;
@@ -59,6 +61,7 @@
setup->data = i_strdup(data);
setup->user_root = user_root;
ARRAY_CREATE(&setup->roots, default_pool, struct quota_root *, 4);
+ ARRAY_CREATE(&setup->warnings, default_pool, struct quota_warning *, 4);
t_push();
p = strchr(setup->data, ':');
@@ -107,6 +110,16 @@
}
array_free(&setup->roots);
+
+ while (array_count(&setup->warnings) > 0) {
+ struct quota_warning *const *warning;
+
+ warning = array_idx(&setup->warnings, 0);
+ quota_warning_deinit(*warning);
+ }
+
+ array_free(&setup->warnings);
+
i_free(setup->data);
i_free(setup);
}
@@ -157,6 +170,82 @@
array_free(&module_contexts);
}
+struct quota_warning *
+quota_warning_init(struct quota_setup *setup, const char *data)
+{
+ const char *p;
+ char *q;
+ const char *const *args;
+ unsigned long long val;
+ struct quota_warning *warning;
+
+ warning = i_new(struct quota_warning, 1);
+ warning->setup = setup;
+
+ p = strchr(data, ' ');
+ if (p == NULL)
+ i_fatal("quota warning: No command specified: %s", data);
+ warning->command = i_strdup(p+1);
+
+ t_push();
+
+ args = t_strsplit(t_strdup_until(data, p), ":");
+ for (; *args != '\0'; args++) {
+ if (strncmp(*args, "storage=", 8) == 0) {
+ val = strtoull(*args + 8, &q, 10);
+ if (q && (strcmp(q, "%") == 0)) {
+ warning->storage_limit = val;
+ warning->storage_limit_kind =
+ QUOTA_WARNING_PERCENT_LIMIT;
+ } else if (q && (strcmp(q, "k") == 0)) {
+ warning->storage_limit = val * 1024;
+ warning->storage_limit_kind =
+ QUOTA_WARNING_ABSOLUTE_LIMIT;
+ } else
+ i_error("quota warning: Malformed setting: %s", *args);
+ } else if (strncmp(*args, "messages=", 9) == 0) {
+ val = strtoull(*args + 8, &q, 10);
+ if (q && (strcmp(q, "%") == 0)) {
+ warning->count_limit = val;
+ warning->count_limit_kind =
+ QUOTA_WARNING_PERCENT_LIMIT;
+ } else if (q && (strcmp(q, "") == 0)) {
+ warning->count_limit = val;
+ warning->count_limit_kind =
+ QUOTA_WARNING_ABSOLUTE_LIMIT;
+ } else
+ i_error("quota warning: Malformed setting: %s", *args);
+ } else {
+ i_error("quota warning: Unknown setting: %s", *args);
+ }
+ }
+
+ t_pop();
+
+ array_append(&setup->warnings, &warning, 1);
+
+ return warning;
+}
+
+void quota_warning_deinit(struct quota_warning *warning)
+{
+ struct quota_warning *const *warnings;
+ unsigned int i, count;
+
+ /* remove from setup */
+ warnings = array_get(&warning->setup->warnings, &count);
+ for (i = 0; i < count; i++) {
+ if (warnings[i] == warning) {
+ array_delete(&warning->setup->warnings, i, 1);
+ break;
+ }
+ }
+ i_assert(i != count);
+
+ i_free(warning->command);
+ i_free(warning);
+}
+
void quota_add_user_storage(struct quota *quota, struct mail_storage *storage)
{
struct quota_setup *const *setups;
@@ -388,15 +477,62 @@
i_free(ctx);
}
+#define CHECK_PERCENT(val, cur, diff, limit) \
+ (100 * ((limit) - (cur) - (diff)) > (val) * (limit))
+#define CHECK_ABSOLUTE(val, cur, diff, limit) \
+ ((limit) - (cur) - (diff) > (val))
+
+#define CHECK2_PERCENT(val, cur, diff, size, limit) \
+ (CHECK_PERCENT(val, cur, diff, limit) \
+ && !CHECK_PERCENT(val, cur, (diff)+(size), limit))
+#define CHECK2_ABSOLUTE(val, cur, diff, size, limit) \
+ (CHECK_ABSOLUTE(val, cur, diff, limit) \
+ && !CHECK_ABSOLUTE(val, cur, (diff)+(size), limit))
+
+#define CHECK(kind, val, cur, diff, size, limit) \
+ ((((kind) == QUOTA_WARNING_PERCENT_LIMIT) \
+ && (CHECK2_PERCENT(val, cur, diff, size, limit))) \
+ || (((kind) == QUOTA_WARNING_ABSOLUTE_LIMIT) \
+ && (CHECK2_ABSOLUTE(val, cur, diff, size, limit))))
+
int quota_default_try_alloc_bytes(struct quota_root_transaction_context *ctx,
uoff_t size, bool *too_large_r)
{
+ struct quota_warning *const * warnings;
+ unsigned int i, count;
int ret;
ret = quota_default_test_alloc_bytes(ctx, size, too_large_r);
if (ret <= 0 || ctx->disabled)
return ret;
+ warnings = array_get(&ctx->root->setup->warnings, &count);
+
+ for (i = 0; i < count; i++) {
+ struct quota_warning *warning = warnings[i];
+ bool run_command = FALSE;
+
+ if (CHECK(warning->storage_limit_kind,
+ warning->storage_limit,
+ ctx->bytes_current,
+ ctx->bytes_diff,
+ size,
+ ctx->bytes_limit))
+ run_command = TRUE;
+
+ if (CHECK(warning->count_limit_kind,
+ warning->count_limit,
+ ctx->count_current,
+ ctx->count_diff,
+ 1,
+ ctx->count_limit))
+ run_command = TRUE;
+
+ if (run_command)
+ system(warning->command);
+
+ }
+
ctx->count_diff++;
ctx->bytes_diff += size;
return 1;
diff -ru dovecot-1.0.rc27.orig/src/plugins/quota/quota.h dovecot-1.0.rc27/src/plugins/quota/quota.h
--- dovecot-1.0.rc27.orig/src/plugins/quota/quota.h 2007-03-06 17:34:47.000000000 +0100
+++ dovecot-1.0.rc27/src/plugins/quota/quota.h 2007-03-16 23:21:33.000000000 +0100
@@ -31,6 +31,10 @@
quota_root_init(struct quota_setup *setup, const char *name);
void quota_root_deinit(struct quota_root *root);
+struct quota_warning *
+quota_warning_init(struct quota_setup *setup, const char *data);
+void quota_warning_deinit(struct quota_warning *warning);
+
/* List all quota roots. Returned quota roots are freed by quota_deinit(). */
struct quota_root_iter *quota_root_iter_init(struct mailbox *box);
struct quota_root *quota_root_iter_next(struct quota_root_iter *iter);

View File

@ -0,0 +1,311 @@
--- dovecot-1.0.rc32/src/dict/main.c.split 2007-02-22 15:32:11.000000000 +0100
+++ dovecot-1.0.rc32/src/dict/main.c 2007-04-13 13:56:55.000000000 +0200
@@ -22,6 +22,7 @@
static struct io *log_io;
static struct module *modules;
+static struct module *sql_modules;
static struct dict_server *dict_server;
static void sig_die(int signo, void *context __attr_unused__)
@@ -50,6 +51,8 @@
/* Load built-in SQL drivers (if any) */
sql_drivers_init();
sql_drivers_register_all();
+ sql_modules = sql_drivers_modules_load();
+ module_dir_init(sql_modules);
restrict_access_by_env(FALSE);
}
@@ -100,6 +103,7 @@
dict_sql_unregister();
dict_client_unregister();
+ module_dir_unload(&sql_modules);
sql_drivers_deinit();
random_deinit();
lib_signals_deinit();
--- dovecot-1.0.rc32/src/lib-sql/Makefile.am.split 2007-02-22 22:09:16.000000000 +0100
+++ dovecot-1.0.rc32/src/lib-sql/Makefile.am 2007-04-13 15:11:18.000000000 +0200
@@ -1,21 +1,66 @@
noinst_LIBRARIES = libsql.a
+if DYNAMIC_SQL
+if BUILD_MYSQL
+MYSQL_LIB=libdriver_mysql.la
+endif
+if BUILD_PGSQL
+PGSQL_LIB=libdriver_pgsql.la
+endif
+if BUILD_SQLITE
+SQLITE_LIB=libdriver_sqlite.la
+endif
+
+sql_module_LTLIBRARIES = \
+ $(MYSQL_LIB) \
+ $(PGSQL_LIB) \
+ $(SQLITE_LIB)
+
+sql_moduledir = $(moduledir)/sql
+endif
+
sql_drivers = @sql_drivers@
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
+ -DMODULEDIR=\""$(moduledir)"\" \
$(SQL_CFLAGS)
dist_sources = \
+ sql-api.c
+
+if ! DYNAMIC_SQL
+driver_sources = \
driver-mysql.c \
driver-pgsql.c \
- driver-sqlite.c \
- sql-api.c
+ driver-sqlite.c
+endif
libsql_a_SOURCES = \
$(dist_sources) \
+ $(driver_sources) \
sql-drivers-register.c
+if DYNAMIC_SQL
+libdriver_mysql_la_LDFLAGS = -module -avoid-version
+libdriver_mysql_la_LIBADD = $(MYSQL_LIBS)
+libdriver_mysql_la_CPPFLAGS = -I$(top_srcdir)/src/lib $(MYSQL_CFLAGS)
+libdriver_mysql_la_SOURCES = \
+ driver-mysql.c
+
+libdriver_pgsql_la_LDFLAGS = -module -avoid-version
+libdriver_pgsql_la_LIBADD = $(PGSQL_LIBS)
+libdriver_pgsql_la_CPPFLAGS = -I$(top_srcdir)/src/lib $(PGSQL_CFLAGS)
+libdriver_pgsql_la_SOURCES = \
+ driver-pgsql.c
+
+libdriver_sqlite_la_LDFLAGS = -module -avoid-version
+libdriver_sqlite_la_LIBADD = $(SQLITE_LIBS)
+libdriver_sqlite_la_CPPFLAGS = -I$(top_srcdir)/src/lib $(SQLITE_CFLAGS)
+libdriver_sqlite_la_SOURCES = \
+ driver-sqlite.c
+endif
+
headers = \
sql-api.h \
sql-api-private.h
@@ -32,17 +77,21 @@
echo '/* this file automatically generated by Makefile */' >$@
echo '#include "lib.h"' >>$@
echo '#include "sql-api.h"' >>$@
+if ! DYNAMIC_SQL
for i in $(sql_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "extern struct sql_db driver_$${i}_db;" >>$@ ; \
fi \
done
+endif
echo 'void sql_drivers_register_all(void) {' >>$@
+if ! DYNAMIC_SQL
for i in $(sql_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "sql_driver_register(&driver_$${i}_db);" >>$@ ; \
fi \
done
+endif
echo '}' >>$@
DISTFILES = $(DIST_COMMON) $(dist_sources) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
--- dovecot-1.0.rc32/src/lib-sql/sql-api.h.split 2006-07-01 19:23:52.000000000 +0200
+++ dovecot-1.0.rc32/src/lib-sql/sql-api.h 2007-04-13 13:56:55.000000000 +0200
@@ -20,6 +20,8 @@
/* register all built-in SQL drivers */
void sql_drivers_register_all(void);
+struct module;
+struct module *sql_drivers_modules_load(void);
void sql_driver_register(const struct sql_db *driver);
void sql_driver_unregister(const struct sql_db *driver);
--- dovecot-1.0.rc32/src/lib-sql/sql-api.c.split 2006-07-01 19:23:52.000000000 +0200
+++ dovecot-1.0.rc32/src/lib-sql/sql-api.c 2007-04-13 13:56:55.000000000 +0200
@@ -2,6 +2,7 @@
#include "lib.h"
#include "array.h"
+#include "module-dir.h"
#include "sql-api-private.h"
array_t ARRAY_DEFINE(sql_drivers, const struct sql_db *);
@@ -16,6 +17,12 @@
array_free(&sql_drivers);
}
+struct module *sql_drivers_modules_load(void)
+{
+ return module_dir_load(MODULEDIR"/sql",
+ NULL, TRUE, PACKAGE_VERSION);
+}
+
void sql_driver_register(const struct sql_db *driver)
{
array_append(&sql_drivers, &driver, 1);
--- dovecot-1.0.rc32/src/auth/main.c.split 2007-03-15 16:48:13.000000000 +0100
+++ dovecot-1.0.rc32/src/auth/main.c 2007-04-13 13:56:55.000000000 +0200
@@ -10,6 +10,7 @@
#include "sql-api.h"
#include "randgen.h"
#include "password-scheme.h"
+#include "module-dir.h"
#include "mech.h"
#include "auth.h"
#include "auth-request-handler.h"
@@ -35,6 +36,8 @@
static struct auth *auth;
static struct auth_worker_client *worker_client;
+static struct module *sql_modules;
+
static void sig_die(int signo, void *context __attr_unused__)
{
/* warn about being killed because of some signal, except SIGINT (^C)
@@ -189,6 +192,8 @@
/* Load built-in SQL drivers (if any) */
sql_drivers_init();
sql_drivers_register_all();
+ sql_modules = sql_drivers_modules_load();
+ module_dir_init(sql_modules);
/* Initialize databases so their configuration files can be readable
only by root. Also load all modules here. */
@@ -287,6 +292,7 @@
mech_deinit();
password_schemes_deinit();
+ module_dir_unload(&sql_modules);
sql_drivers_deinit();
random_deinit();
--- dovecot-1.0.rc32/configure.in.split 2007-04-12 19:16:36.000000000 +0200
+++ dovecot-1.0.rc32/configure.in 2007-04-13 13:56:55.000000000 +0200
@@ -225,6 +225,15 @@
fi,
want_sqlite=no)
+AC_ARG_WITH(dynamic-sql,
+[ --with-dynamic-sql Build SQL modules as shared libs],
+ if test x$withval = xno; then
+ want_dynamic_sql=no
+ else
+ want_dynamic_sql=yes
+ fi,
+ want_dynamic_sql=no)
+
AC_ARG_WITH(ssl,
[ --with-ssl=[gnutls|openssl] Build with GNUTLS or OpenSSL (default)],
if test x$withval = xno; then
@@ -1559,12 +1568,12 @@
fi
AC_CHECK_HEADER(libpq-fe.h, [
if test "$PGSQL_INCLUDE" != ""; then
- SQL_CFLAGS="$SQL_CFLAGS -I$PGSQL_INCLUDE"
+ PGSQL_CFLAGS="$PGSQL_CFLAGS -I$PGSQL_INCLUDE"
fi
if test "$PGSQL_LIBDIR" != ""; then
- SQL_LIBS="$SQL_LIBS -L$PGSQL_LIBDIR"
+ PGSQL_LIBS="$PGSQL_LIBS -L$PGSQL_LIBDIR"
fi
- SQL_LIBS="$SQL_LIBS -lpq"
+ PGSQL_LIBS="$PGSQL_LIBS -lpq"
AC_DEFINE(HAVE_PGSQL,, Build with PostgreSQL support)
found_sql_drivers="$found_sql_drivers pgsql"
@@ -1610,12 +1619,12 @@
fi
AC_CHECK_HEADER(mysql.h, [
if test "$MYSQL_INCLUDE" != ""; then
- SQL_CFLAGS="$SQL_CFLAGS -I$MYSQL_INCLUDE"
+ MYSQL_CFLAGS="$MYSQL_CFLAGS -I$MYSQL_INCLUDE"
fi
if test "$MYSQL_LIBDIR" != ""; then
- SQL_LIBS="$SQL_LIBS -L$MYSQL_LIBDIR"
+ MYSQL_LIBS="$MYSQL_LIBS -L$MYSQL_LIBDIR"
fi
- SQL_LIBS="$SQL_LIBS $mysql_lib"
+ MYSQL_LIBS="$MYSQL_LIBS $mysql_lib"
AC_CHECK_LIB(mysqlclient, mysql_ssl_set, [
AC_DEFINE(HAVE_MYSQL_SSL,, Define if your MySQL library has SSL functions)
@@ -1646,13 +1655,18 @@
if test $want_sqlite = yes; then
AC_CHECK_LIB(sqlite3, sqlite3_open, [
AC_CHECK_HEADER(sqlite3.h, [
- SQL_LIBS="$SQL_LIBS -lsqlite3 -lz"
+ SQLITE_LIBS="$SQLITE_LIBS -lsqlite3 -lz"
AC_DEFINE(HAVE_SQLITE,, Build with SQLite3 support)
found_sql_drivers="$found_sql_drivers sqlite"
])
])
fi
+
+SQL_CFLAGS="$MYSQL_CFLAGS $PGSQL_CFLAGS $SQLITE_CFLAGS"
+if test "$want_dynamic_sql" = "no"; then
+ SQL_LIBS="$MYSQL_LIBS $PGSQL_LIBS $SQLITE_LIBS"
+fi
if test "$found_sql_drivers" != "" -o "$want_sql" = "yes"; then
if test "$all_sql_drivers" = "yes"; then
@@ -1716,6 +1730,12 @@
AC_SUBST(AUTH_LIBS)
AC_SUBST(SQL_CFLAGS)
AC_SUBST(SQL_LIBS)
+AC_SUBST(MYSQL_CFLAGS)
+AC_SUBST(MYSQL_LIBS)
+AC_SUBST(PGSQL_CFLAGS)
+AC_SUBST(PGSQL_LIBS)
+AC_SUBST(SQLITE_CFLAGS)
+AC_SUBST(SQLITE_LIBS)
dnl **
dnl ** Index file compatibility flags
@@ -1783,17 +1803,27 @@
dnl ** SQL drivers
dnl **
+build_pgsql=no
+build_mysql=no
+build_sqlite=no
for driver in $sql_drivers; do
if test "$driver" = "pgsql"; then
AC_DEFINE(BUILD_PGSQL,, Built-in PostgreSQL support)
+ build_pgsql=yes
elif test "$driver" = "mysql"; then
AC_DEFINE(BUILD_MYSQL,, Built-in MySQL support)
+ build_mysql=yes
elif test "$driver" = "sqlite"; then
AC_DEFINE(BUILD_SQLITE,, Built-in SQLite support)
+ build_sqlite=yes
fi
done
AC_SUBST(sql_drivers)
+AM_CONDITIONAL(BUILD_PGSQL, test "$build_pgsql" = "yes")
+AM_CONDITIONAL(BUILD_MYSQL, test "$build_mysql" = "yes")
+AM_CONDITIONAL(BUILD_SQLITE, test "$build_sqlite" = "yes")
+AM_CONDITIONAL(DYNAMIC_SQL, test "$want_dynamic_sql" = "yes")
dnl **
dnl ** Plugins
@@ -1873,4 +1903,8 @@
echo "Building with GSSAPI support ........ : $have_gssapi"
echo "Building with user database modules . :$userdb"
echo "Building with password lookup modules :$passdb"
-echo "Building with SQL drivers ............:$sql_drivers"
+if test "$want_dynamic_sql" = "yes"; then
+ echo "Building with SQL drivers ............:$sql_drivers (dynamic)"
+else
+ echo "Building with SQL drivers ............:$sql_drivers"
+fi

View File

@ -1,15 +1,16 @@
#%define dovecot_hg a744ae38a9e1 #%define dovecot_hg a744ae38a9e1
%define sieve_hg 0367450c9382 #%define sieve_hg 0367450c9382
%define upstream 1.1.alpha3 %define upstream 1.0.5
%define sieve_upstream 1.1-%{sieve_hg} %define sieve_upstream 1.0.2
%define pkg_version 1.1 %define pkg_version 1.0.5
%define my_release 16.1 %define my_release 1
%define pkg_release %{my_release}.alpha3%{?dist} %define pkg_release %{my_release}%{?dist}
%define pkg_sieve_version 1.1 %define pkg_sieve_version 1.0.2
%define pkg_sieve_release %{my_release}.hg.%{sieve_hg}%{?dist} %define pkg_sieve_release %{my_release}%{?dist}
Summary: Dovecot Secure imap server Summary: Dovecot Secure imap server
Name: dovecot Name: dovecot
Epoch: 1
Version: %{pkg_version} Version: %{pkg_version}
Release: %{pkg_release} Release: %{pkg_release}
License: MIT and LGPLv2 and BSD with advertising License: MIT and LGPLv2 and BSD with advertising
@ -33,12 +34,14 @@ Source5: migrate-users
Source6: perfect_maildir.pl Source6: perfect_maildir.pl
Source7: dovecot-REDHAT-FAQ.txt Source7: dovecot-REDHAT-FAQ.txt
Source8: http://dovecot.org/releases/sieve/%{sieve_name}-%{sieve_upstream}.tar.gz Source8: http://dovecot.org/releases/sieve/%{sieve_name}-%{sieve_upstream}.tar.gz
Patch100: dovecot-1.1.alpha1-default-settings.patch Patch100: dovecot-1.0.rc15-default-settings.patch
Patch102: dovecot-1.0.rc2-pam-setcred.patch Patch102: dovecot-1.0.rc2-pam-setcred.patch
Patch103: dovecot-1.0.beta2-mkcert-permissions.patch Patch103: dovecot-1.0.beta2-mkcert-permissions.patch
Patch105: dovecot-1.0.rc7-mkcert-paths.patch Patch105: dovecot-1.0.rc7-mkcert-paths.patch
Patch107: dovecot-1.1-unicodedata.patch Patch106: dovecot-1.0.rc27-quota-warning.patch
#Patch107: dovecot-1.1-unicodedata.patch
#Patch200: dovecot-%{dovecot_hg}.patch #Patch200: dovecot-%{dovecot_hg}.patch
Patch200: dovecot-1.0.rc32-split.patch
# XXX this patch needs review and forward porting # XXX this patch needs review and forward porting
#Patch105: dovecot-auth-log.patch #Patch105: dovecot-auth-log.patch
@ -100,7 +103,7 @@ The SQL drivers and authentication plugins are in their subpackages.
%if %{build_sieve} %if %{build_sieve}
%package sieve %package sieve
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: CMU Sieve plugin for dovecot LDA Summary: CMU Sieve plugin for dovecot LDA
Group: System Environment/Daemons Group: System Environment/Daemons
Version: %{pkg_sieve_version} Version: %{pkg_sieve_version}
@ -118,7 +121,7 @@ This package provides the CMU Sieve plugin for dovecot LDA.
%if %{build_postgres} %if %{build_postgres}
%package pgsql %package pgsql
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: Postgres SQL backend for dovecot Summary: Postgres SQL backend for dovecot
Group: System Environment/Daemons Group: System Environment/Daemons
%description pgsql %description pgsql
@ -127,7 +130,7 @@ This package provides the Postgres SQL backend for dovecot-auth etc.
%if %{build_mysql} %if %{build_mysql}
%package mysql %package mysql
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: MySQL backend for dovecot Summary: MySQL backend for dovecot
Group: System Environment/Daemons Group: System Environment/Daemons
%description mysql %description mysql
@ -136,30 +139,30 @@ This package provides the MySQL backend for dovecot-auth etc.
%if %{build_sqlite} %if %{build_sqlite}
%package sqlite %package sqlite
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: SQLite backend for dovecot Summary: SQLite backend for dovecot
Group: System Environment/Daemons Group: System Environment/Daemons
%description sqlite %description sqlite
This package provides the SQLite backend for dovecot-auth etc. This package provides the SQLite backend for dovecot-auth etc.
%endif %endif
%if %{build_ldap} #%if %{build_ldap}
%package ldap #%package ldap
Requires: %{name} = %{version}-%{release} #Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: LDAP auth plugin for dovecot #Summary: LDAP auth plugin for dovecot
Group: System Environment/Daemons #Group: System Environment/Daemons
%description ldap #%description ldap
This package provides the LDAP auth plugin for dovecot-auth etc. #This package provides the LDAP auth plugin for dovecot-auth etc.
%endif #%endif
%if %{build_gssapi} #%if %{build_gssapi}
%package gssapi #%package gssapi
Requires: %{name} = %{version}-%{release} #Requires: %{name} = %{epoch}:%{version}-%{release}
Summary: GSSAPI auth mechanism plugin for dovecot #Summary: GSSAPI auth mechanism plugin for dovecot
Group: System Environment/Daemons #Group: System Environment/Daemons
%description gssapi #%description gssapi
This package provides the GSSAPI auth mechanism plugin for dovecot-auth etc. #This package provides the GSSAPI auth mechanism plugin for dovecot-auth etc.
%endif #%endif
%prep %prep
@ -170,7 +173,9 @@ This package provides the GSSAPI auth mechanism plugin for dovecot-auth etc.
%patch102 -p1 -b .pam-setcred %patch102 -p1 -b .pam-setcred
%patch103 -p1 -b .mkcert-permissions %patch103 -p1 -b .mkcert-permissions
%patch105 -p1 -b .mkcert-paths %patch105 -p1 -b .mkcert-paths
%patch107 -p1 -b .unicodedata #%patch107 -p1 -b .unicodedata
%patch106 -p1 -b .quota-warning
%patch200 -p1 -b .split
#%patch200 -p1 -b .%{dovecot_hg} #%patch200 -p1 -b .%{dovecot_hg}
%if %{build_sieve} %if %{build_sieve}
@ -193,16 +198,23 @@ autoreconf -i
%if %{build_sqlite} %if %{build_sqlite}
--with-sqlite \ --with-sqlite \
%endif %endif
--with-sql=plugin \ --with-dynamic-sql \
--with-ssl=openssl \ --with-ssl=openssl \
--with-ssldir=%{ssldir} \ --with-ssldir=%{ssldir} \
%if %{build_ldap}
--with-ldap=plugin \
%endif
--with-inotify \ --with-inotify \
%if %{build_gssapi} %if %{build_ldap}
--with-gssapi=plugin --with-ldap \
%endif %endif
%if %{build_gssapi}
--with-gssapi \
%endif
# --with-sql=plugin \
#%if %{build_ldap}
# --with-ldap=plugin \
#%endif
#%if %{build_gssapi}
# --with-gssapi=plugin
#%endif
make make
@ -370,35 +382,38 @@ rm -rf $RPM_BUILD_ROOT
%if %{build_mysql} %if %{build_mysql}
%files mysql %files mysql
%{_libdir}/%{name}/sql/libdriver_mysql.so %{_libdir}/%{name}/sql/libdriver_mysql.so
%{_libdir}/%{name}/auth/libdriver_mysql.so #%{_libdir}/%{name}/auth/libdriver_mysql.so
%{_libdir}/%{name}/dict/libdriver_mysql.so #%{_libdir}/%{name}/dict/libdriver_mysql.so
%endif %endif
%if %{build_postgres} %if %{build_postgres}
%files pgsql %files pgsql
%{_libdir}/%{name}/sql/libdriver_pgsql.so %{_libdir}/%{name}/sql/libdriver_pgsql.so
%{_libdir}/%{name}/auth/libdriver_pgsql.so #%{_libdir}/%{name}/auth/libdriver_pgsql.so
%{_libdir}/%{name}/dict/libdriver_pgsql.so #%{_libdir}/%{name}/dict/libdriver_pgsql.so
%endif %endif
%if %{build_sqlite} %if %{build_sqlite}
%files sqlite %files sqlite
%{_libdir}/%{name}/sql/libdriver_sqlite.so %{_libdir}/%{name}/sql/libdriver_sqlite.so
%{_libdir}/%{name}/auth/libdriver_sqlite.so #%{_libdir}/%{name}/auth/libdriver_sqlite.so
%{_libdir}/%{name}/dict/libdriver_sqlite.so #%{_libdir}/%{name}/dict/libdriver_sqlite.so
%endif %endif
%if %{build_ldap} #%if %{build_ldap}
%files ldap #%files ldap
%{_libdir}/%{name}/auth/libauthdb_ldap.so #%{_libdir}/%{name}/auth/libauthdb_ldap.so
%endif #%endif
%if %{build_gssapi} #%if %{build_gssapi}
%files gssapi #%files gssapi
%{_libdir}/%{name}/auth/libmech_gssapi.so #%{_libdir}/%{name}/auth/libmech_gssapi.so
%endif #%endif
%changelog %changelog
* Tue Sep 25 2007 Tomas Janousek <tjanouse@redhat.com> - 1:1.0.5-1
- downgraded to lastest upstream stable (1.0.5)
* Wed Aug 22 2007 Tomas Janousek <tjanouse@redhat.com> - 1.1-16.1.alpha3 * Wed Aug 22 2007 Tomas Janousek <tjanouse@redhat.com> - 1.1-16.1.alpha3
- updated license tags - updated license tags

View File

@ -1,3 +1,4 @@
379894a74d6531e15b573250273f081b dovecot-1.1.alpha3.tar.gz 94b7d29cf44f63f89d538361afa05c40 dovecot-1.0.5.tar.gz
32e848aba1fa8c276918ea369b1d73f8 dovecot-1.1.alpha3.tar.gz.sig eacaec9e3502e9e0544e73846c3e9a09 dovecot-1.0.5.tar.gz.sig
14adc693f950696391b31d25d8e809dc dovecot-sieve-1.1-0367450c9382.tar.gz 508926fc9ff8e0f6e13506e237d4916b dovecot-sieve-1.0.2.tar.gz
fdb27eafe011a7a1ed92531f334e4f8c dovecot-sieve-1.0.2.tar.gz.sig