From owner-freebsd-bugs Wed Jan 30 16:19:42 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by hub.freebsd.org (Postfix) with ESMTP id F070337B404; Wed, 30 Jan 2002 16:19:24 -0800 (PST) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id DAA16945; Thu, 31 Jan 2002 03:26:31 +0300 (MSK) Message-Id: <200201310026.DAA16945@aaz.links.ru> Subject: Re: conf/6346: Kernel version strings need to relate to the source not the build In-Reply-To: from "Richard Wackerbarth" at "Jan 30, 2 05:12:33 pm" To: rkw@dataplex.net (Richard Wackerbarth) Date: Thu, 31 Jan 2002 03:26:31 +0300 (MSK) Cc: joe@tao.org.uk, sheldonh@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, bde@zeta.org.au From: "."@babolo.ru MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Richard Wackerbarth writes: > > On Wednesday, January 30, 2002, at 01:58 PM, Bruce Evans wrote: > > > On Wed, 30 Jan 2002, Josef Karthauser wrote: > > > >> On Wed, Jan 30, 2002 at 05:40:41PM +0000, Josef Karthauser wrote: > >>> Technically we could use the date in the latest $FreeBSD$ tag of the > >>> source code, and then put this into vers.c at kernel build time. > >>> > >>> The following patch would do it. > >>> > >>> Joe > >>> > >>> Index: newvers.sh > >>> =================================================================== > >>> RCS file: /home/ncvs/src/sys/conf/newvers.sh,v > >>> retrieving revision 1.47 > >>> diff -u -r1.47 newvers.sh > >>> --- newvers.sh 2 Mar 2001 16:52:13 -0000 1.47 > >>> +++ newvers.sh 30 Jan 2002 17:39:42 -0000 > >>> @@ -86,11 +86,15 @@ > >>> > >>> touch version > >>> v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` > >>> + > >>> +l=`find /usr/src/sys/conf | xargs grep '\$FreeBSD:.*$' | sed \ > >>> + 's/.*\$FreeBSD://' | awk '{ print $3 "-" $4 }' | sort -n | tail > >>> -1` > >>> + > >> > >> Oops: s/\/conf//. (That was my test). > > > > That slows it down enough to be annoying. Also, the path shouldn't be > > absolute. > > > > Bruce > > I think we could actually do it just once (at the time that we update > from the cvs?) and cache that result. > That would get rid of at least a part of the delay. > > It can also be done by playing games on a special file in the master cvs > archive (but not the copies thereof) Exactly. What about do date +'#define LAST_MOD "%Y-%m-%d %H:%M:%S"' > /path/last_mod_date.h on any CVS tree update? And #include > -- > Richard Wackerbarth The Digital Dataplex > (512) 346-5772 8801 Camelia Ln > rkw@dataplex.net Austin, TX 78759 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-bugs" in the body of the message > -- B @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message