Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Apr 2005 00:15:33 -0400
From:      Yarema <yds@CoolRat.org>
To:        Oliver Lehmann <lehmann@ans-netz.de>
Cc:        josemi@freebsd.jazztel.es
Subject:   Re: splitting courier-authlib into master+slave ports
Message-ID:  <B5F903EEF8C4F9F21ADC49DC@[192.168.1.73]>
In-Reply-To: <20050421182910.65218c5f.lehmann@ans-netz.de>
References:  <20050414111426.775f6afd.lehmann@ans-netz.de> <200504191258.53327.freebsd@redesjm.local> <20050419173039.4725638a.lehmann@ans-netz.de> <200504191827.05896.ports@dino.sk> <20050420121254.34c59e53.lehmann@ans-netz.de> <9F0C7E4FBA18BFD0B3946DFE@tuber.coolrat.org> <20050420205646.5c7b72df.lehmann@ans-netz.de> <FE915706A171A7D8FF1F0289@tuber.coolrat.org> <13A599297289B8FA39CA73DB@tuber.coolrat.org> <20050421182910.65218c5f.lehmann@ans-netz.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--On Thursday, April 21, 2005 6:29 PM +0200 Oliver Lehmann 
<lehmann@ans-netz.de> wrote:

> Hi Yarema,
>
> Yarema wrote:
>
>> I moved your Makefile to Makefile.opt and made it so that a port which
>> RUN_DEPENDS on courier-authlib can do:
>>
>> .include "${PORTSDIR}/security/courier-authlib/Makefile.opt
>>
>> As I proposed in my previous email (quoted below) this solves the
>> OPTIONS/meta-port issue for dependent ports and keeps courier-authlib
>> itself from having to deal with it.
>
> At first, setting OPTIONS= will override the OPTIONS which are defined in
> the Makefiles where Makefile.opt gets included. But of course this can be
> fixed easyly. But let me take the following case: I want to install
> courier-imap and sqwebmail. I have to select for both ports that I want
> vpopmail auth. support - but why? Wouldn't it be better to select it once
> when courier-authlib gets installed as a dependency? I think, those
> options are definitly part of courier-authlib and should be set/unset
> only with courier-authlib. The authentification stuff, which lib to use
> and so on is for my understandings none of courier-imap's or sqwebmail's
> concern (that's why it got seperated?)

You're right, it should be OPTIONS+= .. my fault..

Let me make a counter case..  For the sake of argument let's assume there's 
three ports with a RUN_DEPENDS of courier-authlib: courier (the all-in-one 
MTA port which I maintain), courier-imap and sqwebmail (both of which you 
maintain).  With the method I proposed each of the ports would include the 
Makefile.opt to allow for menu based OPTIONS.  The result of this is that 
one can select a courier-authlib plugin subport at install-time (from ports 
only, mind you, no selection possible via pkg_add) and have it recorded as 
a RUN_DEPENDS.

In your scenario if you happen to remember to pick courier-authlib-vchkpw 
plugin when installing courier-imap and forget to do so with sqwebmail, 
what's the harm? The RUN_DEPENDS of courier-authlib-vchkpw does not get 
recorded for sqwebmail.  Does that mean courier-authlib-vchkpw only works 
for one port and not the other? No, as long as you have 
courier-authlib-vchkpw installed and configured it will work for any port 
which RUN_DEPENDS on the base courier-authlib port.  Having a RUN_DEPENDS 
on courier-authlib-vchkpw is just a matter of convenience at install time, 
because it forces the install of a plugin.  One can add a WITH_VCHKPW to 
/etc/make.conf and the RUN_DEPENDS will be on by "default" in any port 
which includes Makefile.opt

How about a scenario where you install courier-imap and sqwebmail with only 
a RUN_DEPENDS on the base courier-authlib (which is minimum requirement for 
them both).  This alone allows you to authenticate against system accounts. 
You then decide you want courier-authlib-vchkpw so you install and 
configure it.  You later decide that courier-authlib-userdb might be better 
so you install and configure that.  After a while you no longer need 
courier-authlib-vchkpw so you decide to uninstall it.  Later you decide to 
try a client-server authlib plugin so you install courier-authlib-ldap or 
courier-authlib-mysql, etc. etc.  You're only free to install and uninstall 
authlib plugins if NOTHING records a RUN_DEPENDS on them.

Here's diagram of what I described.  Lines indicating RUN_DEPENDS

courier-------\
courier-imap----> courier-authlib <---------courier-authlib-userdb
sqwebmail-----/                     \-------courier-authlib-vchkpwd
                                     \------courier-authlib-ldap
                                      \-----courier-authlib-mysql
                                       \----courier-authlib-pgsql

Which is why I've maintained the idea of an OPTIONS meta-port just to 
enable setting RUN_DEPENDS on authlib plugin ports is NOT good.  The whole 
intent of splitting courier-authlib into a master and plugin subports is to 
allow the sort of flexibility where one only needs to install or uninstall 
a subport to enable or disable an authentication methods above and beyond 
system /etc/passwd accounts.  No reinstall or DEPENDS fixups for 
courier-authlib or any of its consumers [courier,courier-imap,sqwebmail] 
required.

Start adding RUN_DEPENDS on the courier-authlib- plugins and the 
simplicity, flexibility and any advantage of having plugin subports 
vanishes.

-- 
Yarema
http://yds.CoolRat.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B5F903EEF8C4F9F21ADC49DC>