Re: [exim] more dlopen'd facilities

2017-08-06 Thread Ian Zimmerman
On 2017-08-06 18:51, Jeremy Harris wrote:

> Actually, most (allegedly) lookups can be built for dynaminc linkage
> already.  Here's text from the Makefile:
> 
> # If set to "2" instead of "yes" then the corresponding lookup will be
> # built as a module and must be installed into LOOKUP_MODULE_DIR.

Hmm, maybe I overlooked that.  But maybe not because it seems one still
needs to make all the same changes to the source when adding a module.

What I'm asking is that

1. a module can be built on its own, without also rebuilding the main
binary

2. getting a module to be used is as simple as installing it in the
magic directory, plus maybe _one_ explicit mention in a _runtime_
config file.

Of course we would need to define a precise interface that modules must
provide; I don't think this is quite the case now.

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
Do obvious transformation on domain to reply privately _only_ on Usenet.

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] more dlopen'd facilities

2017-08-06 Thread Jeremy Harris
On 06/08/17 15:54, Ian Zimmerman wrote:
> Not really a compiler feature, but how about making lookups (and maybe
> other plugin like features) into real .so objects, to be loaded with
> dlopen() and linked with dlsym()?

Actually, most (allegedly) lookups can be built for dynaminc linkage
already.  Here's text from the Makefile:

# If set to "2" instead of "yes" then the corresponding lookup will be
# built as a module and must be installed into LOOKUP_MODULE_DIR. You
need to
# add -export-dynamic -rdynamic to EXTRALIBS. You may also need to add
-ldl to
# EXTRALIBS so that dlopen() is available to Exim. You need to define
# LOOKUP_MODULE_DIR above so the exim binary actually loads dynamic lookup
# modules.
# Also, instead of adding all the libraries/includes to LOOKUP_INCLUDE and
# LOOKUP_LIBS, add them to the respective LOOKUP_*_INCLUDE and LOOKUP_*_LIBS
# (where * is the name as given here in this list). That ensures that only
# the dynamic library and not the exim binary will be linked against the
# library.
# NOTE: LDAP cannot be built as a module!


... so you're "only" asking for all routers, transports, and
authenticators...  or, maybe, other things like all the
EXPERIMENTAL, SUPPORT and DISABLE features?

We should probably double up on buildfarm animals, one set testing
normal build and one testing all-dynamic builds.


I guess one benefit would be for distros, who could ship the baseline
exim binary as one package and all the dlopen-modules as separates;
only needed piecemeal depending on the exact usage made by the
config file (which is at least initially tuned by the admin, and
possibly custom-developed).  Versioning might be an issue.

-- 
Cheers,
  Jeremy

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/