Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 2003 22:00:09 -0500
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Tim Kientzle <kientzle@acm.org>
Subject:   Re: make release of CURRENT on 4.7 box
Message-ID:  <20030714220009.A21520@FreeBSD.org>
In-Reply-To: <20030714021543.O4685@gamplex.bde.org>; from bde@zeta.org.au on Mon, Jul 14, 2003 at 02:49:16AM %2B1000
References:  <20030712165749.GA14599@colocall.net> <3F104A71.7060906@acm.org> <3F105499.BC7768C0@mindspring.com> <3F10576E.3060904@acm.org> <20030713095642.B1771@gamplex.bde.org> <3F10B60C.3000106@acm.org> <20030713123229.A2435@gamplex.bde.org> <3F117C26.7080100@acm.org> <20030714021543.O4685@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Bruce Evans <bde@zeta.org.au> [ Date: 2003-07-13 ]
	[ w.r.t. Re: make release of CURRENT on 4.7 box ]
> On Sun, 13 Jul 2003, Tim Kientzle wrote:
> 
> > Bruce Evans wrote:
> > > I think splitting it or making it exit after just setting variables
> > > in the userland case is the right fix.  ...
> [it == newvers.sh]
> >
> > I think you're right, but don't see a very simple way to make that
> > work, especially given the surprising number of places
> > that newvers.sh is used.
> 
> I think there aren't so many -- only kernel Makefiles and
> src/include/Makefile.
> 
> There seems to be a simple way due to bitrot.  $1 in newvers.sh is
> not set when newvers.sh is invoked from src/include/Makefile, but
> it seems to always be set when newvers.sh is invoked from kernel
> Makefiles, due to garbage in the latter.  The garbage is now
> centralized in sys/conf/kern.post.mk:
> 
>         sh $S/conf/newvers.sh ${KERN_IDENT}
>                               ^^^^^^^^^^^^^
> 
> This passes an unused variable to newvers.sh.  Passing and use of
> this variable was removed in 4.4BSD-Lite1, but FreeBSD's kernel
> Makefiles are based on Net/2 and haven't caught up with this change
> yet, while FreeBSD's newvers.sh is based on the Lite1 so it has
> the change.  This variable became needed again in newvers.sh last
> month, but it wasn't used; the make -V hack was used instead.
> 
> Some relevant uses and non-uses of $1 in newvers.sh:
> 
> %%%
> FreeBSD rev.1.1 (same as Net/2?)
>   echo "char version[] = \"version: ${v} ($1) ${t}\";"
>                                          ^^^^
> 
> FreeBSD-1.1.5:
>   echo "const char version[] = \"${kernvers} ($1) #${v}: ${t}\\n  ${user}@${host}:${dir}\\n\";"
>                                              ^^^^
> 
> 4.4BSD-Lite1:
> echo "char version[] = \"4.4BSD-Lite #${v}: ${t}\\n    ${u}@${h}:${d}\\n\";" >>vers.c
> [No $1's here or elsewhere in newvers.sh]
> 
> -current:
> i=`make -V KERN_IDENT`
> ...
> char version[] = "${VERSION} #${v}: ${t}\\n    ${u}@${h}:${d}\\n";
> ...
> char kern_ident[] = "${i}";
> [No $1's here or elsewhere in newvers.sh, but I think $i is always the
> same as $1.]
> %%%
> 
> So removing the make -V line and just using $1 should fix the main problem
> and the bitrot.

Go for it.

Thanx,
juli.
-- 
juli mallett. email: jmallett@freebsd.org; efnet: juli; aim: bsdflata;
i have lost my way home early - i don't care cause i won't stay there.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030714220009.A21520>