Re: Versioning of tree

Linus Torvalds
2004-10-21T16:02:42Z

On Thu, 21 Oct 2004, Måns Rullgård wrote:
>
> Would it work to somewhere in the Makefile check for the existence of
> a BitKeeper directory, and if it exists run bk with the appropriate
> arguments and append something to EXTRAVERSION? I'm not quite sure
> which information is the best to add, though.

That's what I had in mind. But it should also check if the top-of-tree is
already tagged, and not do anything for that. And it should also hopefully
have a CVS/Subversion equivalent, just so that people don't feel left out.

I would _suggest_ just exporting the whole top-of-tree tag to some
/sys/kernel/version file (for full bug-reports), but in addition also
maybe have a small hash of it (just a few characters of noise) in "uname",
to make module versioning work.

So "uname -r" might print out "2.6.9-a$Uv", but then a

cat /sys/kernel/version/*

would print out something like

"kernel" file:
v2.6.9-a$Uv
"bk-key" file:
torvalds@ppc970.osdl.org|ChangeSet|20041021004441|21737
"date" file:
Wed Oct 20 22:29:23 PDT 2004

or something (one value per file as usual)

Linus