From owner-freebsd-ports@FreeBSD.ORG Mon Mar 31 02:21:30 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 57ADC8A1 for ; Mon, 31 Mar 2014 02:21:30 +0000 (UTC) Received: from smtp.centurylink.net (mail.centurylink.net [205.219.233.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19B64874 for ; Mon, 31 Mar 2014 02:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; d=embarqmail.com; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@embarqmail.com; t=1396232488; h=From:Subject:Date:To:Mime-Version:Content-Type; bh=pNdkqDYxEE7V6O48rleKQl5Lnf0=; b=AJjhM2n9vfYD2NKFH/tNB/tdLDaU0Tid7OE87tXgN8+Nxt4/ccmcCF4GziGX7v7J BCg7adkrGAYpNP+DlGyrNxjKOw1aE1k8AQv9DGY3Nv7RVAC42HXUajKR7EBCShUL gmj3P4MDuu4Wqo37uamQBSb7iD5gIXdJiWNHcppIaIbCcwbqvKP8vQoSWW7L/577 rnWH23KN4+92Rv13apb6J7k96Kdw5QoCdlyzgmO8RB3jeMcKQlT8TTd5C2RLrvkX WoZhUsAN2CHwumcn7oO8h7T7XYjT9c7silucxUgeW8jtz2/zN+rnYYKkbcX25vTI BAPdoUFl/c6pt0z+Du+F8w==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.0 cv=euldP/VX c=1 sm=1 a=uqtdjkiiTCNe9/1U1l5pog==:17 a=fbREQctwBHMA:10 a=1poGYrevpj8A:10 a=kj9zAlcOel0A:10 a=1oqGTYSLAAAA:8 a=6HlT918aAAAA:8 a=6I5d2MoRAAAA:8 a=r34ybsB-2TDtBscumPkA:9 a=CjuIK1q_8ugA:10 a=gJ-NIfRE9hMA:10 a=uqtdjkiiTCNe9/1U1l5pog==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: YnNkLXVuaXhAZW1iYXJxbWFpbC5jb20= Authentication-Results: smtp01.agate.dfw.synacor.com header.from=bsd-unix@embarqmail.com; sender-id=neutral Authentication-Results: smtp01.agate.dfw.synacor.com smtp.mail=bsd-unix@embarqmail.com; spf=neutral; sender-id=neutral Authentication-Results: smtp01.agate.dfw.synacor.com smtp.user=bsd-unix@embarqmail.com; auth=pass (LOGIN) Received-SPF: neutral (smtp01.agate.dfw.synacor.com: 71.3.87.171 is neither permitted nor denied by domain of embarqmail.com) Received: from [71.3.87.171] ([71.3.87.171:26872] helo=earth.milkyway.net) by smtp.centurylink.net (envelope-from ) (ecelerity 3.5.1.37854 r(Momo-dev:3.5.1.0)) with ESMTPA id 1C/DA-12119-721D8335; Sun, 30 Mar 2014 22:21:28 -0400 Date: Sun, 30 Mar 2014 22:21:27 -0400 From: Randy Pratt To: "John W. O'Brien" Subject: Re: Discover stored options different from port defaults/defines Message-Id: <20140330222127.a9175c2b48147295ee06cb0a@embarqmail.com> In-Reply-To: <533888EB.2060503@saltant.com> References: <533888EB.2060503@saltant.com> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.22; i386-portbld-freebsd8.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 02:21:30 -0000 On Sun, 30 Mar 2014 17:13:15 -0400 "John W. O'Brien" wrote: > Hello ports@, > > In the bad old days before poudriere and various improvements to > OptionsNG came to town, when I was using portmaster* to handle upgrades, > I cobbled together a configuration management practice that involved > using rsync and git to store /var/db/ports in a repository. The usual > workflow looked roughly like this: > > svn up /usr/ports > portmaster -dga > # handle changes to OPTIONS_DEFINE and its brethren here > rsync -rpt --del --exclude distfiles /var/db/ports/ /path/to/repo > cd /path/to/repo > git commit -a -m "Store options that changed" > > A downside of this approach is that it couldn't distinguish between > options I care about ("Always do this" and "Never do this") and options > I don't care about ("Do what the maintainer thinks is best"). The only > upstream changes that would bubble to the surface of their own accord > were NEW_OPTIONS when OPTIONS_DEFINE changed. > > When I switched from portmaster to poudriere+pkgng, I migrated > /var/db/ports to /usr/local/etc/poudriere.d/$jail-$ports-$set-options > and that worked OK for a little while. However, this compounded the old > problem in that now even NEW_OPTIONS would arrive silently. > > 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 > > At this point, any option not configured by $jail-make.conf will be > allowed to vary according to the whims of the maintainer. The next part > of the problem that I would like to solve is learning about options that > I don't yet know I care about (OPTIONS_DEFINE gains a member), and > secondarily to learn when an option is past caring (OPTIONS_DEFINE loses > a member that I used to care about), so that I can update > $jail-make.conf in an orderly fashion. > > I welcome any comments on my approach so far, or suggestions about how I > might proceed. 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. HTH, Randy