You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Benoit Chesneau <bc...@gmail.com> on 2010/11/30 19:25:54 UTC

add plugin handling to the build system

Following some kind of discussion on IRC, I would like to propose that
we had plugin handling to our build system. By plugin, I mean :

- custom daemons
- handlers
- auth plugin,
...

It implys that we are abble to add them dynamically to the build (and
eventually handling their dependancies) and that we manage insertionin
ini files if it's needed. Anyone have some experience or example using
autotools for that ? The only page I've found for now is this one :

 - http://www.flameeyes.eu/autotools-mythbuster/libtool/plugins.html

Do we need to wait rebar integration ?

- benoit

Re: add plugin handling to the build system

Posted by Noah Slater <ns...@apache.org>.
Looks simple enough!

On 1 Dec 2010, at 15:15, Benoit Chesneau wrote:

> On Wed, Dec 1, 2010 at 4:11 PM, Noah Slater <ns...@apache.org> wrote:
>> I guess I'd need to see a patch or something before I understood what was being proposed.
>> 
> The change should be simple in built system if we go with pkg-config.
> It consists in filling a template:
> 
> http://lists.freedesktop.org/archives/pkg-config/2007-August/000218.html
> 
> 
> - benoît


Re: add plugin handling to the build system

Posted by Benoit Chesneau <bc...@gmail.com>.
On Wed, Dec 1, 2010 at 4:11 PM, Noah Slater <ns...@apache.org> wrote:
> I guess I'd need to see a patch or something before I understood what was being proposed.
>
The change should be simple in built system if we go with pkg-config.
It consists in filling a template:

http://lists.freedesktop.org/archives/pkg-config/2007-August/000218.html


- benoît

Re: add plugin handling to the build system

Posted by Noah Slater <ns...@apache.org>.
I guess I'd need to see a patch or something before I understood what was being proposed.

On 1 Dec 2010, at 15:07, Benoit Chesneau wrote:

> On Wed, Dec 1, 2010 at 4:03 PM, Noah Slater <ns...@apache.org> wrote:
>> Not really sure what this has to do with the build system though.
>> 
> because pkg-config or any tool like this one need some bits in the
> build system ?


Re: add plugin handling to the build system

Posted by Benoit Chesneau <bc...@gmail.com>.
On Wed, Dec 1, 2010 at 4:03 PM, Noah Slater <ns...@apache.org> wrote:
> Not really sure what this has to do with the build system though.
>
because pkg-config or any tool like this one need some bits in the
build system ?

Re: add plugin handling to the build system

Posted by Noah Slater <ns...@apache.org>.
Not really sure what this has to do with the build system though.

On 1 Dec 2010, at 15:00, Robert Dionne wrote:

> I think this would be really neat
> 
> 
> 
> 
> On Dec 1, 2010, at 9:49 AM, Benoit Chesneau wrote:
> 
>> On Wed, Dec 1, 2010 at 1:04 PM, Noah Slater <ns...@apache.org> wrote:
>>> I've read the whole thread, and I still don't understand what anyone is talking about.
>>> 
>> The goal is to provide an easy way to handle plugings in couchdb:
>> 
>> - how to build them against easily against couchdb
>> - how they can be handle directly in couchdb
>> 
>> Both are possible today, except build is really not intuitive. And
>> having to launch a plugin by setting ERL_FLAGS environment variable
>> manually isn't the best way. So this discussion is about finding a way
>> to register a plugin in couch, make couchdb launch it automatically if
>> enabled. Other part of the problem is to have a way to find couchdb
>> includes on the system to build the plugin againts them. That's part
>> may be handle by pkg-config.
>> 
>> - benoit
> 


Re: add plugin handling to the build system

Posted by Robert Dionne <di...@dionne-associates.com>.
I think this would be really neat




On Dec 1, 2010, at 9:49 AM, Benoit Chesneau wrote:

> On Wed, Dec 1, 2010 at 1:04 PM, Noah Slater <ns...@apache.org> wrote:
>> I've read the whole thread, and I still don't understand what anyone is talking about.
>> 
> The goal is to provide an easy way to handle plugings in couchdb:
> 
> - how to build them against easily against couchdb
> - how they can be handle directly in couchdb
> 
> Both are possible today, except build is really not intuitive. And
> having to launch a plugin by setting ERL_FLAGS environment variable
> manually isn't the best way. So this discussion is about finding a way
> to register a plugin in couch, make couchdb launch it automatically if
> enabled. Other part of the problem is to have a way to find couchdb
> includes on the system to build the plugin againts them. That's part
> may be handle by pkg-config.
> 
> - benoit


Re: add plugin handling to the build system

Posted by Benoit Chesneau <bc...@gmail.com>.
On Wed, Dec 1, 2010 at 1:04 PM, Noah Slater <ns...@apache.org> wrote:
> I've read the whole thread, and I still don't understand what anyone is talking about.
>
The goal is to provide an easy way to handle plugings in couchdb:

- how to build them against easily against couchdb
- how they can be handle directly in couchdb

Both are possible today, except build is really not intuitive. And
having to launch a plugin by setting ERL_FLAGS environment variable
manually isn't the best way. So this discussion is about finding a way
to register a plugin in couch, make couchdb launch it automatically if
enabled. Other part of the problem is to have a way to find couchdb
includes on the system to build the plugin againts them. That's part
may be handle by pkg-config.

- benoit

Re: add plugin handling to the build system

Posted by Noah Slater <ns...@apache.org>.
I've read the whole thread, and I still don't understand what anyone is talking about.

On 30 Nov 2010, at 22:47, Benoit Chesneau wrote:

> On Tue, Nov 30, 2010 at 9:39 PM, Paul Davis <pa...@gmail.com> wrote:
>> 
>> Exactly. I think this is probably the route you want to take. This
>> should be fairly easy to implement based on how things like the
>> couchdb script are made.
>> 
> Ok, sound good, i will have a look on how to implement that. Thanks
> for the direction.
> 
> - benoit


Re: add plugin handling to the build system

Posted by Benoit Chesneau <bc...@gmail.com>.
On Tue, Nov 30, 2010 at 9:39 PM, Paul Davis <pa...@gmail.com> wrote:
>
> Exactly. I think this is probably the route you want to take. This
> should be fairly easy to implement based on how things like the
> couchdb script are made.
>
Ok, sound good, i will have a look on how to implement that. Thanks
for the direction.

- benoit

Re: add plugin handling to the build system

Posted by Paul Davis <pa...@gmail.com>.
On Tue, Nov 30, 2010 at 3:15 PM, Benoit Chesneau <bc...@gmail.com> wrote:
> On Tue, Nov 30, 2010 at 8:46 PM, Paul Davis <pa...@gmail.com> wrote:
>> On Tue, Nov 30, 2010 at 1:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
>>> Following some kind of discussion on IRC, I would like to propose that
>>> we had plugin handling to our build system. By plugin, I mean :
>>>
>>> - custom daemons
>>> - handlers
>>> - auth plugin,
>>> ...
>>>
>>> It implys that we are abble to add them dynamically to the build (and
>>> eventually handling their dependancies) and that we manage insertionin
>>> ini files if it's needed. Anyone have some experience or example using
>>> autotools for that ? The only page I've found for now is this one :
>>>
>>>  - http://www.flameeyes.eu/autotools-mythbuster/libtool/plugins.html
>>>
>>> Do we need to wait rebar integration ?
>>>
>>> - benoit
>>>
>>
>> Could you be a tad more specific on what your use cases might be? I
>> don't think that autotools is going to be too amenable to what you're
>> wanting to do. Also, why do you need to distribute your plugin source
>> as part of CouchDB?
>>
>> Something I could see is adding a couchdb-config script that allows
>> plugin build systems to place their code on the code path that gets
>> loaded and then they can just use the default.d and local.d
>> directories.
>>
>> Paul
>>
> I would like to mak e easy integration  of plugin like geocouch, or
> what any other kind of plugins like application server , or stuff like
> it.
>
> so yes maybe something like a pkg-config or stuff like it could work.
> In this case that would imply to distribute plugins as separate
> packages right ?  So the work would be to provide a common way to
> packages to find couchdb includes ?

Exactly. I think this is probably the route you want to take. This
should be fairly easy to implement based on how things like the
couchdb script are made.

> - benoit
>

Re: add plugin handling to the build system

Posted by Benoit Chesneau <bc...@gmail.com>.
On Tue, Nov 30, 2010 at 8:46 PM, Paul Davis <pa...@gmail.com> wrote:
> On Tue, Nov 30, 2010 at 1:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
>> Following some kind of discussion on IRC, I would like to propose that
>> we had plugin handling to our build system. By plugin, I mean :
>>
>> - custom daemons
>> - handlers
>> - auth plugin,
>> ...
>>
>> It implys that we are abble to add them dynamically to the build (and
>> eventually handling their dependancies) and that we manage insertionin
>> ini files if it's needed. Anyone have some experience or example using
>> autotools for that ? The only page I've found for now is this one :
>>
>>  - http://www.flameeyes.eu/autotools-mythbuster/libtool/plugins.html
>>
>> Do we need to wait rebar integration ?
>>
>> - benoit
>>
>
> Could you be a tad more specific on what your use cases might be? I
> don't think that autotools is going to be too amenable to what you're
> wanting to do. Also, why do you need to distribute your plugin source
> as part of CouchDB?
>
> Something I could see is adding a couchdb-config script that allows
> plugin build systems to place their code on the code path that gets
> loaded and then they can just use the default.d and local.d
> directories.
>
> Paul
>
I would like to mak e easy integration  of plugin like geocouch, or
what any other kind of plugins like application server , or stuff like
it.

so yes maybe something like a pkg-config or stuff like it could work.
In this case that would imply to distribute plugins as separate
packages right ?  So the work would be to provide a common way to
packages to find couchdb includes ?

- benoit

Re: add plugin handling to the build system

Posted by Paul Davis <pa...@gmail.com>.
On Tue, Nov 30, 2010 at 1:25 PM, Benoit Chesneau <bc...@gmail.com> wrote:
> Following some kind of discussion on IRC, I would like to propose that
> we had plugin handling to our build system. By plugin, I mean :
>
> - custom daemons
> - handlers
> - auth plugin,
> ...
>
> It implys that we are abble to add them dynamically to the build (and
> eventually handling their dependancies) and that we manage insertionin
> ini files if it's needed. Anyone have some experience or example using
> autotools for that ? The only page I've found for now is this one :
>
>  - http://www.flameeyes.eu/autotools-mythbuster/libtool/plugins.html
>
> Do we need to wait rebar integration ?
>
> - benoit
>

Could you be a tad more specific on what your use cases might be? I
don't think that autotools is going to be too amenable to what you're
wanting to do. Also, why do you need to distribute your plugin source
as part of CouchDB?

Something I could see is adding a couchdb-config script that allows
plugin build systems to place their code on the code path that gets
loaded and then they can just use the default.d and local.d
directories.

Paul

Re: add plugin handling to the build system

Posted by Benoit Chesneau <bc...@gmail.com>.
On Tue, Nov 30, 2010 at 7:30 PM, Randall Leeds <ra...@gmail.com> wrote:
> On Tue, Nov 30, 2010 at 13:25, Benoit Chesneau <bc...@gmail.com> wrote:
>> Following some kind of discussion on IRC, I would like to propose that
>> we had plugin handling to our build system. By plugin, I mean :
>>
>
> +1
>
>>
>> It implys that we are abble to add them dynamically to the build (and
>> eventually handling their dependancies) and that we manage insertionin
>> ini files if it's needed. Anyone have some experience or example using
>> autotools for that ? The only page I've found for now is this one :
>>
>>  - http://www.flameeyes.eu/autotools-mythbuster/libtool/plugins.html
>>
>> Do we need to wait rebar integration ?
>>
>
> Might be smart, just in case things change a bit.
>
I suppose that we should start that first yes.

> As for ini files, that's what the default.d is for. There's no need
> for strange insertion mechanics.
>
indeed.

Re: add plugin handling to the build system

Posted by Randall Leeds <ra...@gmail.com>.
On Tue, Nov 30, 2010 at 13:25, Benoit Chesneau <bc...@gmail.com> wrote:
> Following some kind of discussion on IRC, I would like to propose that
> we had plugin handling to our build system. By plugin, I mean :
>

+1

>
> It implys that we are abble to add them dynamically to the build (and
> eventually handling their dependancies) and that we manage insertionin
> ini files if it's needed. Anyone have some experience or example using
> autotools for that ? The only page I've found for now is this one :
>
>  - http://www.flameeyes.eu/autotools-mythbuster/libtool/plugins.html
>
> Do we need to wait rebar integration ?
>

Might be smart, just in case things change a bit.

As for ini files, that's what the default.d is for. There's no need
for strange insertion mechanics.