csup: How do I know I have correct version?

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Oct 21 09:53:46 UTC 2011


On 21/10/2011 10:27, Thomas Mueller wrote:
> After I run 
> 
> csup /usr/share/examples/releng9-supfile
> 
> how do I know I have the correct version, like 9.0-BETA3 or 9.0-RC1?

So long as you're confident that you have actually downloaded the
sources from the RELENG_9 branch, then you can be confident that the
system version will be one of those -- at the moment, you'll get 9.0-RC1
but over time this will eventually change to 9.0-STABLE.

> I can't find any such information explicitly anywhere under /usr/src .

The file you want is /usr/src/sys/conf/newvers.sh  This is a script that
edits version information into various source code files.  The bit you
need is near the top of the file -- just following line 33:

    33	TYPE="FreeBSD"
    34	REVISION="9.0"
    35	BRANCH="RC1"
    36	if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
    37		BRANCH=${BRANCH_OVERRIDE}
    38	fi
    39	RELEASE="${REVISION}-${BRANCH}"
    40	VERSION="${TYPE} ${RELEASE}"
    41	SYSDIR=$(dirname $0)/..

Unfortunately the value want is RELEASE, which is assembled from parts,
so not trivially grep'able.  But you can easily see the REVISION is set
to 9.0 and BRANCH is RC1 so the whole things comes to 9.0-RC1.  Simple.

> This releng9-supfile was made from stable-supfile by changing RELENG_8 to RELENG_9 in the line
> 
> *default release=cvs tag=RELENG_8
> 
> I've been following the emailing lists current, questions and ports, 
> noticed the heads-up that HEAD was going to 10-current.
> 
> Maybe also I should put this releng9-supfile in a safer place where 
> it won't be deleted by the next installation/upgrade?

No -- you shouldn't need to worry about that.  The name
'releng9-supfile' you chose doesn't match anything produced by the
system, so it won't be overwritten.  (Not that you shouldn't keep a
backup somewhere -- that's only sensible.)

Hmmm.... actually you have highlighted a small omission in the
procedures for branching RELENG_9 and RELENG_9_0 -- the cvsup example
supfiles  /usr/src/share/examples/{stable,standard}-supfile should be
updated to match the branch they are installed from.  In your case both
of those files should use the RELENG_9 tag, but that hasn't been
commmitted yet.

	Cheers

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20111021/54146127/signature.pgp


More information about the freebsd-questions mailing list