LWN.net Logo

2.6.x-rc0

By Jonathan Corbet
October 7, 2009
The mislabeling of 2.6.32-rc1 in the makefile might have been the cause of some confusion, though the skipping of -rc2 will have avoided the worst of it. But it seems that there is confusion with version numbers at other times, leading to a push for a change that Linus has absolutely no intention of making.

Responding to the 2.6.32-rc3 announcement, Len Brown noted that, as far as the version number is concerned, there is no difference between (say) 2.6.31 and a kernel checked out near the end of the 2.6.32 merge window, despite the fact that those two kernels differ significantly from each other. Len had a simple request:

This could be clarified if you update Makefile on the 1st commit after 2.6.X is frozen to simply be 2.6.Y-merge or 2.6.Y-rc0 or something. Anything but 2.6.X.

Others echoed this request, but Linus made it clear that he was not interested in this idea:

So no. I'm not going to do -rc0. Because doing that is _stupid_. And until you understand _why_ it's stupid, it's pointless talking about it, and when you _do_ understand that it's stupid, you'll agree with me.

So what is the problem with the -rc0 idea? It turns out there are a few, one of which being that there is already a much more flexible mechanism built into the kernel build system. If the LOCALVERSION_AUTO configuration option is set, the extra version information will be set in a more specific manner. Your editor, who has not been at home long enough to install a new kernel on his desktop for a bit, is currently running a kernel which reports its version as:

    2.6.31-rc5-00002-g3ce001e

It says that the kernel is the one found at git commit ID g3ce001e; the 00002 indicates that it is two commits after 2.6.31-rc5. This version number makes the exact kernel being run clear in a way that a simple makefile tweak would not. Even if -rc0 were really indicative, it would not really say which kernel was being run.

It gets worse than that, though, especially when developers start bisecting kernels to track down bugs. Consider this example: the two post-2.6.31-rc5 commits in your editor's kernel are a pair of BKL-removal patches which fell through the cracks and didn't make the 2.6.32 merge window. Assuming they make it into 2.6.33, the (simplified) git revision history will look something like this:

[Revisions diagram]

A developer trying to use bisection to find a problem in 2.6.33-rc1 might well end up at your editor's commit g3ce001e - as a stopping point, of course; that commit could not possibly be the cause of the problem. Should that developer look at the kernel version number at that point, they will not see 2.6.33-rc0 (even if Linus were to make that change) or even 2.6.32 - the version will be 2.6.31-rc5, the version that particular commit is based on. In the git era, kernel development is not a straight-line affair.

What this implies is that anybody who depends on the kernel version number as found in the Makefile is likely to end up confused. There is, of course, one important exception: that number is meaningful only for the actual release it represents. At any other time, it is an unreliable guide.

That doesn't change the fact that people are getting confused by running a kernel which identifies itself as 2.6.x, but which is really closer to 2.6.x+1. So it seems likely that a couple of things will be done to help. One of those is to make the LOCALVERSION_AUTO option enabled by default, and, possibly, difficult to disable. The other is to add some smarts to the build system which tries to check whether the kernel being built differs from the one which was tagged with the official release number. If that is the case, a simple "+" is appended to the version number. So a kernel checked out in the middle of the 2.6.33 merge window would identify itself as 2.6.32+.

Linus doesn't much like that last option (he sees it as losing a lot of information that the full LOCALVERSION_AUTO option provides), but he "doesn't hate" it either. He actually managed to not hate the idea enough to put together a patch implementing it. It has not been merged as of this writing; there is still some discussion happening about possible changes to the LOCALVERSION_AUTO format. But it seems likely that something along these lines will go in during the 2.6.33 merge window, if not before.


(Log in to post comments)

2.6.x-rc0

Posted Oct 8, 2009 14:42 UTC (Thu) by k3ninho (subscriber, #50375) [Link]

I want a 2.6.x-branch version number to differentiate between a release kernel and one which has been branched for the merge window - no matter how far through that window it is. It's sensible release management and removes any confusion should someone think they're running a stable release when instead they're using a merge-window nightmare (both of which would be labelled 2.6.x). Just imagine the bugs filed against 2.6.x when the regressions are introduced in the 2.6.(x+1) merge window. Linus is wrong.

2.6.x-rc0

Posted Oct 8, 2009 17:22 UTC (Thu) by iabervon (subscriber, #722) [Link]

The problem is that people want to base their development on kernels that don't have lots of instability in them, so they pick a tag from Linus's repository that is likely to be stable, and that tag has a version in the Makefile like "2.6.31". When they start their feature, it's completely unstable, but has a "2.6.x" version. When subsystem maintainers put together series, they pick up these topics, and they don't change the Makefile version themselves (since they don't maintain the Makefile), and the don't merge Linus's tree, especially not during the merge window (because that creates a lot of cross-merges and useless merge commits and cases where things from -system1 are broken because of a change in -system2 merged first into the merge window and them into -system1).

The end result is that, regardless of what Linus does, if there is a commit which builds a kernel that claims to be "2.6.x" in his tree, then most of the least stable commits in his tree will also claim to be "2.6.x".

One thing that might work would be for Linus to not put "2.6.x" in his tree, but instead put "2.6.x+1-rc0" in his tree and only put "2.6.x" in the 2.6.x-stable tree. This would have the nice side effect that string compare would start sorting tags within a tree correctly, and it's obviously equivalent to the current situation at a string-equality level within a given tree, but I don't know if Linus would like not having releases ever cut from his tree any more.

2.6.x-rc0

Posted Oct 8, 2009 17:38 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

so turn on LOCALVERSION_AUTO and have it set the version number at compile time instead of depending on the static value in the makefile.

2.6.x-rc0

Posted Oct 8, 2009 16:33 UTC (Thu) by djc (subscriber, #56880) [Link]

I think the tools (e.g. git/hg bisect) can deal with branchiness, and will solve that problem at least.

2.6.x-rc0

Posted Oct 8, 2009 19:07 UTC (Thu) by jimparis (subscriber, #38647) [Link]

I'm not a fan of the trailing plus.

Consider this discussion:
"I'm having a problem with ftdi_sio in 2.6.28"
"That's a known bug that's been fixed in 2.6.29+"

Does that mean "it's fixed in 2.6.29 and later" or "it was fixed after 2.6.29 was released"?

2.6.x-rc0

Posted Oct 8, 2009 23:38 UTC (Thu) by giraffedata (subscriber, #1954) [Link]

"I'm having a problem with ftdi_sio in 2.6.28"

"That's a known bug that's been fixed in 2.6.29+"

That would be a poor response even without the ambiguity you point out, because there are lots of code versions that report themselves as 2.6.29+, so the response neither tells the complainer where to get a fix or how to recognize a kernel that contains the fix. You'd have to say "will be fixed in 2.6.30" or actually get specific about where he can find the code today.

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds