[Dovecot] [PATCH] Split sql drivers from lib-sql to plugins
Hi,
in order to solve rhbz#170960 [1], I split the sql drivers to plugins so that they are loaded dynamically and can be split to separate packages.
[1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=170960
The patches are here: [2] http://people.redhat.com/tjanouse/dovecot/145241/dovecot-1.0-split.patch [3] http://people.redhat.com/tjanouse/dovecot/145241/dovecot-trunk-split.patch (mv src/lib-sql/driver-mysql.c src/plugins/sql-mysql/, etc., afterwards)
I'd like to ask for your comments and whether it's ok for inclusion or at least ok to use in the Fedora package.
Regards,
Tomas Janousek, SW Engineer, Red Hat, Inc.
On Fri, 2007-03-30 at 16:03 +0200, Tomas Janousek wrote:
in order to solve rhbz#170960 [1], I split the sql drivers to plugins so that they are loaded dynamically and can be split to separate packages.
[1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=170960
The patches are here: [2] http://people.redhat.com/tjanouse/dovecot/145241/dovecot-1.0-split.patch [3] http://people.redhat.com/tjanouse/dovecot/145241/dovecot-trunk-split.patch (mv src/lib-sql/driver-mysql.c src/plugins/sql-mysql/, etc., afterwards)
I'd like to ask for your comments and whether it's ok for inclusion or at least ok to use in the Fedora package.
I'd like to make it possible to use some configure option to decide what plugins should be compiled directly into binaries and what should be installed as plugins. So that's the long term plan. But for now, wouldn't it simply work if you did like http://wiki.dovecot.org/CompilingSource (last section) shows? It's a bit dirty though.
Hi,
On Fri, Mar 30, 2007 at 06:01:35PM +0300, Timo Sirainen wrote:
I'd like to make it possible to use some configure option to decide what plugins should be compiled directly into binaries and what should be installed as plugins. So that's the long term plan.
I think I may rework that patch to do this at least for the sql modules.
But for now, wouldn't it simply work if you did like http://wiki.dovecot.org/CompilingSource (last section) shows? It's a bit dirty though.
Does that really work? It doesn't work here unless I symlink those files to the sql subdir and apply the part of my patch that loads the modules. There's simply no code in dovecot-auth that would load the modules.
Regards,
Tomas Janousek, SW Engineer, Red Hat, Inc.
On Fri, 2007-03-30 at 18:05 +0200, Tomas Janousek wrote:
But for now, wouldn't it simply work if you did like http://wiki.dovecot.org/CompilingSource (last section) shows? It's a bit dirty though.
Does that really work? It doesn't work here unless I symlink those files to the sql subdir and apply the part of my patch that loads the modules. There's simply no code in dovecot-auth that would load the modules.
Yea, I forgot about that. Although it does load modules from auth/password/ directory. I think dovecot-auth's plugin handling could use some changes.
Anyway these should be removed:
+void sql_mysql_plugin_init(void) +{
- driver_mysql_init(); +}
Either change the plugin name to libdriver_mysql.so or rename driver_mysql_init() to sql_mysql_plugin_init().
Hi,
a new version of the sql split patch attached, should be smaller, cleaner, better.
-- Tomas Janousek, SW Engineer, Red Hat, Inc.
On Fri, 2007-04-13 at 15:27 +0200, Tomas Janousek wrote:
a new version of the sql split patch attached, should be smaller, cleaner, better.
I committed a modified version of this to v1.1 tree. It's now enabled with --with-sql=plugin.
I also added --with-ldap=plugin and --with-gssapi=plugin.
participants (2)
-
Timo Sirainen
-
Tomas Janousek