From owner-freebsd-ports@FreeBSD.ORG Mon Mar 31 19:47:30 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06834E94 for ; Mon, 31 Mar 2014 19:47:30 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEAE8CBA for ; Mon, 31 Mar 2014 19:47:29 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id ld10so8594023pab.26 for ; Mon, 31 Mar 2014 12:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=qwdB36SjxvuqtsyZ9HtuIHKObKvDo4r99d1rs2Y74vM=; b=F9Fc4coSEQK4+B6iscuiAMel39t7IvXVOSuT5USk+c2/g3jScu3oNL8flS9fMvy4ER 4kV4qTzJDYMXGexUpxMFC0X7buUG+qOhnxtDKeEIy+ikW/dF9bIVEZNrjM0fa+fT5GqG itB6aAI3x2jx+FP0v8HT5sSg/lXKixKc7R2d1nZsm9PRHSfDb8g3nmRGWgLjAm/2TxXm pyU8dv+ydoPh0lRrWe/S66boBL2FgAnS3kkA+nwNnybxq0i3sCPz3RRdbu+Tnra4ve+Q lbif2P35tHwBPHHb0jjDFiBc9QfXGTZ/n0HmB5ouVoQm5KSRR9jCOVZ52IVs2v7BEsGE DFQg== MIME-Version: 1.0 X-Received: by 10.68.237.99 with SMTP id vb3mr27010592pbc.76.1396295249328; Mon, 31 Mar 2014 12:47:29 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.66.0.164 with HTTP; Mon, 31 Mar 2014 12:47:29 -0700 (PDT) In-Reply-To: <53397FE5.3080902@saltant.com> References: <533888EB.2060503@saltant.com> <20140330222127.a9175c2b48147295ee06cb0a@embarqmail.com> <53397FE5.3080902@saltant.com> Date: Mon, 31 Mar 2014 12:47:29 -0700 X-Google-Sender-Auth: wZsEAdWKoltn3VRd1zaxLooG4yk Message-ID: Subject: Re: Discover stored options different from port defaults/defines From: Kevin Oberman To: "John W. O'Brien" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Randy Pratt , 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 19:47:30 -0000 On Mon, Mar 31, 2014 at 7:47 AM, John W. O'Brien wrote: > On 3/30/14 10:21 PM, Randy Pratt wrote: > > On Sun, 30 Mar 2014 17:13:15 -0400 > > "John W. O'Brien" wrote: > > > >> [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 currently > >> 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 using > >> 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 > >> > [...] > > > > I found this posting useful to find OPTIONS: > > > > > http://docs.freebsd.org/cgi/mid.cgi?CAOjFWZ45ACYnaByYxxrGoyqTOeS7_EDV6MwoH98-GtDe-F3Yug > > > > The mailing list archives seem to be missing for the past month PR187557 > > so here an excerpt from my notes: > > > >> 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=/dev/null PORT_DBDIR=/var/empty showconfig > >> > >> will show you the defaults. > > > > See make(1)'s -C option for specifying ports pathname. > > > > 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 > > This is something I've wanted to have for quite a while, but never enough to dig through the Makefiles. I think the proper way would be for "make showconfig" to print out the current config as it does now, but to tag default options (e.g. '+') so that it would be easy to note that some option that you never touched and probably don't really even understand had had the default changed and you probably want to match that change. A 'pkg info' option to provide a list of changed defaults in installed ports would be even nicer. Something equivalent to "pkg version -vl\<" perhaps. But just doing it in "make showconfig" would make a script that would parse 'pkg version' optput and do a "make showconfig", only printing out the tagged lines, when any changes are noted would be trivial. -- R. Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com