From owner-freebsd-current@FreeBSD.ORG Thu Nov 15 14:08:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35733F1E for ; Thu, 15 Nov 2012 14:08:34 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AF4328FC1D for ; Thu, 15 Nov 2012 14:08:33 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id x43so718165wey.13 for ; Thu, 15 Nov 2012 06:08:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=ZUUQWJ8K7G/1XEu0H2VE9LEcygmUbHVpdKwVQ2m0p8A=; b=Kim/D9YuurbEZNH+1rSlv7SWOHFVZiQxhG+kGytZicvLfjfCohOo3O8jmasnjyvD5u m/IvX5TIpA/Qaop/FKBAMvdBTgTLP3LO4mx4BIXdSCP47xpWbtxbLtGhddfNli6JVDlr dDDRsJ1OqCQUmw3dnQvpPjubREHBbwRgVOgrbSOrVuGP0fakOXAz2Oo1CeWpL5o7tKvT siPThEsXK3Jc89aajRwrtINfGnPz5e7uOka0h/ZCmhrit+rnT5JARm4HuM5QRHd+zJP8 b1F90D/NwpQL5gk/LKWgN5ieThtuKv3N+LmpWtm9G8lpwpTZf6RTBCTPYo87VCHR/dlL 3xBA== Received: by 10.216.50.141 with SMTP id z13mr591136web.29.1352988512128; Thu, 15 Nov 2012 06:08:32 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id ey2sm7518534wib.9.2012.11.15.06.08.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 06:08:30 -0800 (PST) Date: Thu, 15 Nov 2012 15:08:24 +0100 From: Mateusz Guzik To: freebsd-current@freebsd.org Subject: Re: compiler info in kernel identification string Message-ID: <20121115140823.GA4476@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , freebsd-current@freebsd.org References: <20121113234303.GA15319@dft-labs.eu> <20121113235755.GE17755@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20121113235755.GE17755@albert.catwhisker.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 14:08:34 -0000 On Tue, Nov 13, 2012 at 03:57:55PM -0800, David Wolfskill wrote: > I like the idea, but I have long found the idea of putting this type of > logic (including VCS-awareness) in newvers.sh itself something that is > prone to turn what should be a rather simple script into a ... mess. I don't think newvers.sh is a mess (yet) and I find current features highly desirable. > What I have been using for several months has been a modified newvers.sh > that uses an externally-defined function (from a file that is sourced) > to handle whatever VCS-specific things I think are appropriate. (Thus, > folks who want to use one VCS don't need to have newvers.sh test for > VCSen they don't use; they could also provide a sample file that > provides the function. An installation could use a symlink to point to > the function definition of choice.... We could even have a "kitchen > sink" default, that goes through all the hoops & gyrations the current > code does, if folks want that.) newvers.sh definitely should continue to work without hints on cvs/svn/git. Moving checks to different files seems completely unnecessary for me as I don't find current checks expensive. But if you do the work I see nothing wrong with it. :) (but please note I'm in no position to accept your changes) Given that, low-cost support for custom version strings could look like this: after all standard values are filled, prepare complete version string, then source custom script if it exists. This way your script has access to everything that newvers.sh was able to determine and to complete version string, and you are free to change it however you want using detected revision/compiler/whatever or completely new data. -- Mateusz Guzik