Subject: Re: *_OPTIONS for package options
To: Johnny C. Lam <jlam@NetBSD.org>
From: Juan RP <xtraeme@netbsd.org>
List: tech-pkg
Date: 07/24/2004 07:12:14
--Signature=_Sat__24_Jul_2004_07_12_14_+0200_119hn=6Qhv2iKUyg
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
On Sat, 24 Jul 2004 05:08:16 +0000
"Johnny C. Lam" <jlam@NetBSD.org> wrote:
> Lately, I've been going through some of the packages that I maintain
> and changing the way that build options are specified. The old way
> was checking the values of, e.g. USE_CUPS, USE_PAM, USE_OPENLDAP,
> KERBEROS, SASL_USE_GSSAPI, POSTFIX_USE_MYSQL, etc., and using those
> values to control which options are built into the package. I've been
> changing my packages so that they take a single option, e.g. MUTT_OPTIONS,
> POSTFIX_OPTIONS, OPENLDAP_OPTIONS, etc. that list several _optional_
> modules that may be built into the package. This one variable (per
> package) can override a whole slew of global variables for that package.
>
> In the new scheme, if you build pkgsrc/database/postfix, then if you
> have:
>
> USE_SASL2= YES
> USE_OPENLDAP= YES
>
> in your /etc/mk.conf, then Postfix will be built with SASLv2 and LDAP
> table support. However, suppose you don't want the LDAP support. Then
> you can do:
>
> # These stay untouched as they're used by other packages, e.g.
> # net/samba, databases/openldap, etc.
> #
> USE_SASL2= YES
> USE_OPENLDAP= YES
>
> # Explicitly list options for Postfix because we don't want all
> # of the global settings to apply.
> #
> POSTFIX_OPTIONS= sasl
>
> The benefit here is that you can still have global switches that apply
> to all packages, e.g. USE_SASL2, USE_CUPS, etc., but on a per-package
> basis, you can override them by setting a single variable.
>
> Clearly, in the above example, you can do the same thing with package
> variables like POSTFIX_USE_LDAP, POSTFIX_USE_SASL, etc., but I prefer
> the single variable POSTFIX_OPTIONS because it makes for less clutter
> in my /etc/mk.conf. This is, of course, entirely subjective.
>
> Any thoughts as to whether this is a worthwhile change?
Hi Johnny, I really agree with your suggestion.
Because with previous scheme (current), the mk.conf file is really large if you
use many packages, with *_OPTIONS would be one line per package.
Cheers.
--Signature=_Sat__24_Jul_2004_07_12_14_+0200_119hn=6Qhv2iKUyg
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD8DBQFBAe+uypkLYVDran0RAmdVAJ90KS6UPlvNWvITsnKqf8w4zQzQugCfbk7O
QcKwgFB2llR4Mdp+rsDMXfc=
=WPgi
-----END PGP SIGNATURE-----
--Signature=_Sat__24_Jul_2004_07_12_14_+0200_119hn=6Qhv2iKUyg--