From owner-freebsd-ports@FreeBSD.ORG Mon Mar 31 14:47:07 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61235BC1 for ; Mon, 31 Mar 2014 14:47:07 +0000 (UTC) Received: from homiemail-a96.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by mx1.freebsd.org (Postfix) with ESMTP id 385AB8B1 for ; Mon, 31 Mar 2014 14:47:06 +0000 (UTC) Received: from homiemail-a96.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a96.g.dreamhost.com (Postfix) with ESMTP id 184163B8069; Mon, 31 Mar 2014 07:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=saltant.com; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to: content-type; s=saltant.com; bh=43razS3vP/UZ80j9FQaecXIriGM=; b= h3khD2W+Rl6ali2TPncxiNABCwv+RMPhN1FXY/cvj8nPE6pMu0XicAzqgsHb4tFS fxwTx1CKsBJZsIg78XVa8TxpzrD0D+qsf3d5ucP+lRrq6C0H2WQLIGVTDygtM1NH tZhSo352YuFt+VSYpuCWT1Fr8pZStFkdFVc2DDlZWh4= Received: from omnific.local (unknown [128.91.196.251]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: john@saltant.com) by homiemail-a96.g.dreamhost.com (Postfix) with ESMTPSA id CF2F03B805C; Mon, 31 Mar 2014 07:47:05 -0700 (PDT) Message-ID: <53397FE5.3080902@saltant.com> Date: Mon, 31 Mar 2014 10:47:01 -0400 From: "John W. O'Brien" Organization: Saltant Solutions User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Randy Pratt Subject: Re: Discover stored options different from port defaults/defines References: <533888EB.2060503@saltant.com> <20140330222127.a9175c2b48147295ee06cb0a@embarqmail.com> In-Reply-To: <20140330222127.a9175c2b48147295ee06cb0a@embarqmail.com> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="poQVdaHAk18Ngl8mShosMQbmRxdKGsuJK" Cc: FreeBSD Ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 14:47:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --poQVdaHAk18Ngl8mShosMQbmRxdKGsuJK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 3/30/14 10:21 PM, Randy Pratt wrote: > On Sun, 30 Mar 2014 17:13:15 -0400 > "John W. O'Brien" wrote: >=20 >> [blah blah blah] >> [...] >> The first part of my solution to these problems is to store only the >> options that I know I care about. That is, I know I need to find out >> where a stored option disagrees with the default. >> >> I couldn't figure out how to use the stock tools to peel apart current= ly >> stored options from current default options, so I wrote a >> ``nondefaultconfig`` target for Mk/bsd.port.mk (see attached), set all= >> the common options (DOCS, IPv6, etc) explicitly in /etc/make.conf usin= g >> OPTIONS_SET/OPTIONS_UNSET, and ran the new target against all of my >> installed ports, replacing a subtree full of options files with a >> single, quite modest make.conf. To make this more generally-useful, it= >> would need to behave more like NEW_OPTIONS. >> >> cd /usr/ports >> pkg info -aoq | sort | xargs -n1 make nondefaultconfig -C \ >> >> /usr/local/etc/poudriere.d/$jail-make.conf >> rm -fr /usr/local/etc/poudriere.d/$jail-$ports-$set-options >> [...] >=20 > I found this posting useful to find OPTIONS: >=20 > http://docs.freebsd.org/cgi/mid.cgi?CAOjFWZ45ACYnaByYxxrGoyqTOeS7_EDV6M= woH98-GtDe-F3Yug >=20 > The mailing list archives seem to be missing for the past month PR18755= 7 > so here an excerpt from my notes: >=20 >> On 3/4/2014 9:40 AM, Thierry Thomas wrote: >> from within a port's directory, >> >> make showconfig >> >> will show you the current options set and >> >> make __MAKE_CONF=3D/dev/null PORT_DBDIR=3D/var/empty showconfig >> >> will show you the defaults. >=20 > See make(1)'s -C option for specifying ports pathname. >=20 > It shouldn't take too much to write a small script and find > the diff in the output for each command. Randy, I like that this approach doesn't muck with /usr/ports/Mk/. I doubt I would have discovered __MAKE_CONF on my own, but now that I know to look for it, I see that it's covered early in make(1): First of all, the initial list of specifications will be read from the system makefile, sys.mk, unless inhibited with the -r option. The standard sys.mk as shipped with FreeBSD also handles make.conf(5), the default path to which can be altered via the make variable __MAKE_CONF. -John --poQVdaHAk18Ngl8mShosMQbmRxdKGsuJK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBCgAGBQJTOX/pAAoJEORay8JGGICY/2gH/R8eujaHauFQUUHZSBraEoik IHnJS+MT9Y1yWbCSDSAVlqET9PDBtfMJmfUQe22qH4Lk2uqU+wZ7jOZD8raO0kXE QAy5gCOLFnuxTX5Q6NTZupYg6nMOtx2yKQ5eO8YJ1z5DoDz91q2z9niAb5cFzz9P nLSP2Deke/Y/HQiHVoQECsYzJLLcWOpFBvZEI01Y4MupTQurqKSaehizkXRb2JaP HFDUMlLyViUm96xGycgAvyUQsqUtD3FSySgzOZshPL0uLEvOR1cUItz42Fpm4Cjx O9pmIUvw89Qzry4JMNf7oNJDKeT8kCtJ/To2vCVRpbfQHu43auvRqU/ywaTWh1o= =VBw3 -----END PGP SIGNATURE----- --poQVdaHAk18Ngl8mShosMQbmRxdKGsuJK--