From owner-cvs-all@FreeBSD.ORG Sat Aug 20 18:52:04 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B52B716A433 for ; Sat, 20 Aug 2005 18:52:04 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mail24.sea5.speakeasy.net (mail24.sea5.speakeasy.net [69.17.117.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id C628843D46 for ; Sat, 20 Aug 2005 18:52:02 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4414 invoked from network); 20 Aug 2005 18:52:02 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender ) by mail24.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 20 Aug 2005 18:52:01 -0000 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j7KIppBP061000; Sat, 20 Aug 2005 14:51:57 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Colin Percival Date: Sat, 20 Aug 2005 14:37:34 -0400 User-Agent: KMail/1.8 References: <200508190356.j7J3uj5D095435@repoman.freebsd.org> <43059925.3090701@FreeBSD.org> <4305FD75.80501@freebsd.org> In-Reply-To: <4305FD75.80501@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200508201437.36296.jhb@FreeBSD.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx Cc: cvs-src@FreeBSD.org, Doug Barton , cvs-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/conf newvers.sh X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 18:52:05 -0000 On Friday 19 August 2005 11:40 am, Colin Percival wrote: > Doug Barton wrote: > > 1. A "better" way (IMO) to write: > > > > if [ "X${BRANCH_OVERRIDE}" !=3D "X" ]; then > > > > is > > > > case "${BRANCH_OVERRIDE}" in > > '') ;; > > *) BRANCH=3D${BRANCH_OVERRIDE} ;; > > esac > > > > The original reason for writing it this way was to avoid the call to > > test(1), because case is a shell builtin. This is a style issue, and not > > a "must have," but I thought I'd mention it. > > I couldn't see anything in style(9), so I just wrote it the way I've > seen most often in the FreeBSD tree; but it's good to now know _why_ I > keep on seeing it written that way. :-) > > > I like your override idea here, but I'd rather not have to keep track of > > what the current value of $BRANCH is so that I can include it in my own > > override variable. What would be more useful to me (and arguably more > > useful in general, although once again I will not press the point) would > > be some way to add a string to the BRANCH or RELEASE variables. > > That wouldn't be sufficient for the purpose I have in mind. When running > FreeBSD Update builds, I'll typically have a RELEASE-pX tree checked out > and a security patch (which is going to get committed to the tree later); > I want to be able to build tree + patch with a label of RELEASE-p{X + 1}. > > Of course, I could do this by applying an extra patch to the source tree > before building, but the whole idea is to get rid of the local patches > which I've been carrying around in FreeBSD Update. Note that 'make release' just overwrites the release name in newvers.sh. # Add version information to those things that need it. if [ ! -f ${CHROOTDIR}/tmp/.world_done ]; then \ cd ${CHROOTDIR}/usr/src/sys/conf && \ mv newvers.sh foo && \ sed "s/^RELEASE=3D.*/RELEASE=3D${BUILDNAME}/" foo > newvers= =2Esh &&=20 \ rm foo; \ fi If you used 'make release' to build your custom release (like a lot of othe= r=20 folks do) you would have had all this for free. :) =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org