From owner-freebsd-bugs Sat Apr 18 17:30:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA08628 for freebsd-bugs-outgoing; Sat, 18 Apr 1998 17:30:13 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA08615; Sat, 18 Apr 1998 17:30:04 -0700 (PDT) (envelope-from gnats) Received: from shrimp.dataplex.net (shrimp.dataplex.net [208.2.87.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA08160 for ; Sun, 19 Apr 1998 00:27:54 GMT (envelope-from rkw@shrimp.dataplex.net) Received: (from root@localhost) by shrimp.dataplex.net (8.8.8/8.8.5) id TAA28547; Sat, 18 Apr 1998 19:27:49 -0500 (CDT) Message-Id: <199804190027.TAA28547@shrimp.dataplex.net> Date: Sat, 18 Apr 1998 19:27:49 -0500 (CDT) From: rkw@Dataplex.Net Reply-To: rkw@Dataplex.Net To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: conf/6346: Patch to HELP track source dates Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6346 >Category: conf >Synopsis: Kernel version strings need to relate to the source not the build >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 18 17:30:01 PDT 1998 >Last-Modified: >Originator: Richard Wackerbarth >Organization: The Digital Dataplex >Release: FreeBSD 3.0-CURRENT i386 >Environment: Anyone building from stale sources >Description: When someone reports a problem, there is always confusion because the date that they BUILD a kernel is not a reliable indicator of the version of the source tree from which they built it. >How-To-Repeat: Extract the sources from the CVS tree using some past date. Build a kernel. Note that the date in the version is the current date rather than the date of the sources. The kernel is actually much closer to matching one from many days ago rather than one produced from today's tree. >Fix: Place a file in the tree that represents the date of the source tree rather than the current date. Until this is done, each user can approximate that date by locally building the file at the time that he updates their source. For Example: (Assuming that the CVSup server is up-to-date) shrimp: {66} cat ~library/bin/do-CVSUP #!/bin/sh /usr/local/sbin/cvsup supfile.cvsup TODAY=`date +%C%y%m%d` cat >/usr/src/.timestamp < SNAPDATE="`sed "s/#define FreeBSD_Source_Timestamp //" RELEASE="${REVISION}-${SNAPDATE}" 85c85 < v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` --- > v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date +%D` 93c93 < \"${VERSION} #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" >>vers.c --- > \"$1 #${v}: ${t}\\n\";" >>vers.c Please note that I intentionally use the #define construct so that it is possible to #include the file in a "C" program. It is much easier to strip off the unneeded portion in the shell script than it would be to attempt to generate the #define version at compile time. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message