splitting courier-authlib into master+slave ports
Yarema
yds at CoolRat.org
Thu Apr 21 21:15:39 PDT 2005
--On Thursday, April 21, 2005 6:29 PM +0200 Oliver Lehmann
<lehmann at 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
More information about the freebsd-ports
mailing list