From owner-svn-ports-head@FreeBSD.ORG Sat Apr 12 14:11:47 2014 Return-Path: Delivered-To: svn-ports-head@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 DEE66E3B; Sat, 12 Apr 2014 14:11:47 +0000 (UTC) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6E5E1B08; Sat, 12 Apr 2014 14:11:47 +0000 (UTC) Received: from [192.168.2.1] (dhcp-108-170-169-46.cable.user.start.ca [108.170.169.46]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by apnoea.adamw.org (Postfix) with ESMTPSA id 6342911F826; Sat, 12 Apr 2014 10:11:46 -0400 (EDT) From: "Adam Weinberger" To: "Bryan Drewery" , ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: Commit logs for 2014/04/11 Date: Sat, 12 Apr 2014 10:11:44 -0400 Message-ID: In-Reply-To: <20140412035900.3C695121E45@apnoea.adamw.org> References: <20140412035900.3C695121E45@apnoea.adamw.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.7.2r4025) X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 14:11:48 -0000 > From: Bryan Drewery > Subject: svn commit: r351064 - in head: . Keywords Mk > > Author: bdrewery > Date: Sat Apr 12 03:39:02 2014 > New Revision: 351064 > URL: http://svnweb.freebsd.org/changeset/ports/351064 > QAT: https://qat.redports.org/buildarchive/r351064/ > > Log: > - Add a @sample plist keyword > > It accepts a file (must end in .sample, this is not configurable): > > @sample file.conf.sample > > This will install file.conf.sample and copy it to file.conf. The > file.conf > will be removed if it matches file.conf.sample on deinstall. > > This replaces older patterns of: > > @unexec if cmp -s %D/etc/pkgtools.conf %D/etc/pkgtools.conf.sample; > then rm -f %D/etc/pkgtools.conf; fi > etc/pkgtools.conf.sample > @exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf > > [1] This somewhat obsoletes work in ports/157168 which added > CONF_FILES, > but we have been moving towards more logic in pkg-plist where > possible > and less magical macros. Though this thinking does clash with > autoplist > ideas. We may still want CONF_FILES, which just drops a list of > @sample entries into the plist anyway. > - Add a Keywords/pkg_install.awk and hook it into generate-plist. This > is > for pkg_install compatibility since it does not know how to read > Keywords/sample.yaml. > This file gives us a strategy to implement more keywords before > pkg_install is EOL. > Keywords are documented here: > > https://github.com/freebsd/pkg/commit/bffc31420b1fd6146a43c9abcd45109dd901198a > - This needs to be documented in PH and portlint support added still. > > PR: ports/157168 [1] > Discussed with: bapt > Reviewed by: bapt > Requested by: many > With hat: portmgr First of all, thank you a thousand times for this. This, right here, this is the proof of the power of pkgNG. That said, I have a couple requests: * Please, please don't mandate .sample. Plenty of of ports install sample conf files with different extension. "-dist" is very common for php ports, for example. Let @sample take two arguments. Like @sample etc/pants.conf-dist pants.conf It is safe to assume that the target is in the same dir as the source. * Please document pkg stuff in the Porter's Handbook. There is no mention of the keywords in there (and the commit you referenced only documents the EXISTENCE of keywords, not enumerate them or show how to use them). Also there needs to be an explanation of the different aliases in pkg-create(1), %D and %P and such, because they're very confusing. # Adam -- Adam Weinberger adamw@adamw.org http://www.adamw.org