Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Mar 2010 11:51:56 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Damian Gerow <dgerow@afflictions.org>, Stanislav Sedov <stas@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/dns/c-ares Makefile distinfo pkg-plist ports/dns/c-ares/files ares-config-info.patch patch-Makefile.in
Message-ID:  <20100329085156.GB1315@straylight.m.ringlet.net>
In-Reply-To: <20100329012233.d7c2093a.stas@FreeBSD.org>
References:  <201003221056.o2MAu4D5001930@repoman.freebsd.org> <20100326192300.25171ab9.stas@FreeBSD.org> <20100329074634.GA1315@straylight.m.ringlet.net> <20100329012233.d7c2093a.stas@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--U+BazGySraz5kW0T
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 29, 2010 at 01:22:33AM -0700, Stanislav Sedov wrote:
> On Mon, 29 Mar 2010 10:46:34 +0300
> Peter Pentchev <roam@ringlet.net> mentioned:
>=20
> > Hmmm, apologies if I'm missing something here - and it would not be
> > a big surprise to me if I was, even about such an important thing
> > about the package building cluster :\  However, IMHO the need to
> > check for WITHOUT_* in the case of "default to on" is somewhat
> > a thing of the past - I think that the current options handling code
> > will define the WITH_* symbol if there is no options file and this is
> > an automated build.
> >=20
> > [roam@straylight /usr/ports/dns/c-ares]$ make -V OPTIONSFILE
> > /var/db/ports/c-ares/options
> > [roam@straylight /usr/ports/dns/c-ares]$ ls -l "`make -V OPTIONSFILE`"
> > ls: /var/db/ports/c-ares/options: No such file or directory
> > [roam@straylight /usr/ports/dns/c-ares]$ make -V WITH_HIDE_SYMBOLS
> > true
> > [roam@straylight /usr/ports/dns/c-ares]$ make BATCH=3Dyes -V WITH_HIDE_=
SYMBOLS
> > true
> > [roam@straylight /usr/ports/dns/c-ares]$ make PACKAGE_BUILDING=3Dyes -V=
 WITH_HIDE_SYMBOLS
> > true
> > [roam@straylight /usr/ports/dns/c-ares]$ make BATCH=3Dyes PACKAGE_BUILD=
ING=3Dyes -V WITH_HIDE_SYMBOLS
> > true
> > [roam@straylight /usr/ports/dns/c-ares]$ make BATCH=3Dyes PACKAGE_BUILD=
ING=3Dyes -V WITH_HIDE_SYMBOLS -V CONFIGURE_ARGS:M'*symbol*'
> > true
> > --enable-symbol-hiding
> > [roam@straylight /usr/ports/dns/c-ares]$
> >=20
> > Am I wrong in assuming that any automatically-built packages would
> > have BATCH and/or PACKAGE_BUILDING defined at build time, and that
> > the code in bsd.port(.pre).mk would use the default value for all
> > options in that case?  Or is there some defined symbol - or some other
> > combination of symbols - that would result in WITH_HIDE_SYMBOLS
> > *not* being defined, even though the option's default is "yes"?
> >=20
> > Of course, I could be missing something, in which case I'd be thankful
> > for a correction in my worldview :)
> >=20
>=20
> Sorry, my bad.
> It seems you're right and it works fine
> here.  Sorry for the noise.
>=20
> However, I noticed it doesn't work
> universally.  If you take a look at
> the security/openconnect port, for example,
> that has the same problem (and apparently
> was not tested at all), and try to look
> what LIB_DEPENDS contains (make -V LIB_DEPENDS)
> you will notice it always pulls gtk into depends
> regardless of the GUI option value.  It appears
> that we should be careful with options checking
> even in this century :-)
>=20
> Again, sorry for the noise. :-)

No problem about the noise - it's always good both to learn
something new and to examine one's assumptions critically :)

(the rest of this is mainly addressed to Damian Gerow,
the maintainer of the security/openconnect port)

As to the security/openconnect port, IMHO there's a problem
with the options handling in the port's Makefile: I think that
it doesn't *need* to use bsd.port.options.mk, and it also
does not use it correctly - bsd.port.options.mk should be
included only *after* the OPTIONS variable is initialized.
The use case for bsd.port.options.mk is for the port's Makefile
to be able to examine options that will lead to changes that
must be specified before including bsd.port.pre.mk, thus
a Makefile using it should look like:

=2E..
OPTIONS=3D	...

=2Einclude <bsd.port.options.mk>

=2Eif defined(WITH_FOO)
USE_XORG=3D	foo
=2Eendif

=2Einclude <bsd.port.pre.mk>
=2E..
=2Einclude <bsd.port.post.mk>

In openconnect's case, there are no early dependences that should
depend on user-settable options (it's okay to specify LIB_DEPENDS
after including bsd.port.mk ;), so it doesn't really need to use
bsd.port.options.mk at all.  Even if it did, the OPTIONS=3D line
should have been placed before the bsd.port.options.mk inclusion :)

Damian, what do you think about the following patch which should
fix openconnect's dependency on GTK to, well, depend on the GUI
option?  If you have no objections, I could commit it.

Index: ports/security/openconnect/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/ports/security/openconnect/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- ports/security/openconnect/Makefile	28 Mar 2010 06:43:26 -0000	1.5
+++ ports/security/openconnect/Makefile	29 Mar 2010 08:47:34 -0000
@@ -25,8 +25,6 @@
 MAN8=3D		openconnect.8
 PORTDOCS=3D	README.*
=20
-.include <bsd.port.options.mk>
-
 OPTIONS=3D	GUI      "Enable the OpenConnect configuration GUI"   off
=20
 .include <bsd.port.pre.mk>

G'luck,
Peter
--=20
Peter Pentchev	roam@ringlet.net    roam@space.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
Nostalgia ain't what it used to be.

--U+BazGySraz5kW0T
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQIcBAEBCgAGBQJLsGorAAoJEGUe77AlJ98TB0UP/13JWpAYbKZQqurfmTyW6eEE
QKl4z7RZPogQslPS/iiHpefMhgy8OfeBRh32GPSSjSColE4Ajn4yk6iXvcKk/340
tADQKf+bbNTGEWA9BirXgqRbI9xfavkygg3dj+tR/tafX8/RtV1zV5tQ65krgQ2u
4dX0qyXDGQQ2/MiCNFYHCra7+BZqhZwTV7GPWcSOT5mi554eCUpCAKbIDirDgN7R
ucdQ2F/q64AaGimKyXjTml9qQKJMY9B2izT4IKr8BdPyp0a93L06STXHA2pNdhtj
h+o7WKSEIeTWn/OxyeNHb2DQkGlk/IFcZw439QRKPUEBdwjJls7kKpQYIYbRcKwW
xYNWnjRA9iaHbwdo5IlLCwfv4FOOvIXbnggLcETpeHCKNwwLm7+vaNdmVBE2zt9h
hKCJ/q8COolIc2cgJk98f3qvpQfQ9OhJKEVaPcGqkHWxNoDdQn+UZeCsPsRHM7bn
kG0y3weYtFsTROmAn0hr18yiZRzpkr9VtSHA2hlSVcRE2C5NdfLK2cVyr87WXjBQ
zd4jbB/6AVpLGtT1DgYDwqOfACQpY1XcQVXlf4h5yfVgDoOA/ePiAZdYR5+ySdrd
RKCNmYYuoiMsyAo6Tv9GyDYAyxI0MJXR/aXDiY8oj7TXFmzbsGh7vqun35G+KNAh
JR+daNzxpwIK4CoqD7Ir
=BS0m
-----END PGP SIGNATURE-----

--U+BazGySraz5kW0T--



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