SVN: how to change a branch to -STABLE?

Hi, all. I installed an RC ISO of FreeBSD a few weeks ago and can since then run make update in the source tree from time to time to fetch updates from that branch. Is this branch the stable branch? I pulled it by running svn checkout in an empty /usr/src. I want to stick with the stable branch so when FreeBSD 10 becomes stable some time in October, I will continue fetching/rebuilding its updates until it becomes RELEASE, and not go beyond that! How can I do this easily? It was so much easier with cvsup, when you could specify the tag RELENG_10 and from then on you would be fetching errata updates only. How can I tell svn to wait until 10 becomes release, and stick with the errata branch after that?

Code:
  -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                             A revision argument can be one of:
                                NUMBER       revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'       latest in repository
                                'BASE'       base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'       revision just before COMMITTED

p.s.: I don't want to use freebsd-update.
 
There is more than one -STABLE branch. 9.x will not become 10.x, they are separate. Also, cvsup is only easier until you understand svn. In other words, familiarity is different from ease of use.

Use svn info /usr/src to see what version you checked out. It's probably stable/9.

If you want to switch to a release branch, remove the /usr/src directory and do a checkout of that branch. I think it is releng/9 for the release plus security updates. It may be possible to do an in-place switch to change the checkout version without deleting /usr/src first, but I have not tried that.
 
Thanks, @wblock@.
Code:
$ svn info 
Path: .
Working Copy Root Path: /usr/src
URL: http://svn0.us-west.freebsd.org/base/releng/9.2
Relative URL: ^/releng/9.2
Repository Root: http://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 255993
Node Kind: directory
Schedule: normal
Last Changed Author: gjb
Last Changed Rev: 255896
Last Changed Date: 2013-09-26 23:10:19 +0500 (Thu, 26 Sep 2013)

I don't get this. How did svn know that it should fetch from releng/9.2 if I never told it to? Which -r argument was it?

p.s.: I really would like to change to the stable branch in place, without removing /usr/src first. It was a snap with cvsup :(
 
Last edited by a moderator:
The SVN Book says that svn switch can do it (untested!):
svn switch [url=http://svn0.us-west.freebsd.org/base/stable/9]http://svn0.us-west.freebsd.org/base/stable/9[/url] /usr/src

This is equivalent to editing the supfile for csup, but with less hassle.

Possibly the magic make update has some built-in logic to decide which version is running. I suggest using the svn commands directly to be sure.
 
wblock@ said:
The SVN Book says that svn switch can do it (untested!):
svn switch [url=http://svn0.us-west.freebsd.org/base/stable/9]http://svn0.us-west.freebsd.org/base/stable/9[/url] /usr/src

This is equivalent to editing the supfile for csup, but with less hassle.

Possibly the magic make update has some built-in logic to decide which version is running. I suggest using the svn commands directly to be sure.

You can even do simpler:

svn switch '^/stable/9' in the existing /usr/src directory.
 
Thanks, guys. I did a switch to svn switch [url=http://svn0.us-west.freebsd.org/base/head]http://svn0.us-west.freebsd.org/base/head[/url] (I need to track the soon to appear 10-STABLE, not 9-STABLE, so tracking current for the time being seems more reasonable). Everything went fine, and I can now do svn up on the tree to track changes to CURRENT. Once 10 shows up in the listing here, I will switch to it the same way. The question remains: what if I miss the creation of 10-STABLE branch by a few days, will svn handle going back in time to it fine?

BTW, make update no longer works:
Code:
# make update
"Makefile.inc1", line 436: Malformed conditional (${MK_BIND_LIBS} != "no")
"Makefile.inc1", line 439: if-less endif
make: fatal errors encountered -- cannot continue
*** [update] Error code 1

Stop in /usr/src.

although make buildworld seems to start fine. Probably I need to first rebuild the world to current for make update to work.
 
Oops, make buildworld doesn't work either. After a few seconds of starting the build with an empty /usr/obj/usr/src/*:
Code:
sh /usr/src/tools/install.sh -s -o root -g wheel -m 555   make /usr/obj/usr/src/make.i386/make
"/usr/src/Makefile.inc1", line 436: Malformed conditional (${MK_BIND_LIBS} != "no")
"/usr/src/Makefile.inc1", line 439: if-less endif
make: fatal errors encountered -- cannot continue
*** [buildworld] Error code 1

Stop in /usr/src.

How is one supposed to source-upgrade from 9.2-RC3 to the current branch?
 
Well, if you're lucky just like this and otherwise you don't ;)

Not trying to be a smartass here (well, maybe just a little bit, no offense ;)) but don't forget that you're playing with some heavily unstable code here. CURRENT really means just that; I quote: "a purely experimental snapshot release of FreeBSD-CURRENT (AKA 10.0-CURRENT)"".

So, basically your only option is to either find the bug, repair it and then send a diff to the mailing list to inform the developers about it or wait until the source tree gets updated (which, as far as I know could happen at any moment) and hope that someone else fixed the problem.

Just check out this section in the handbook about tracking a development branch.

If you check out the getting FreeBSD page you'll notice that the official version name is actually FreeBSD 10.0-ALPHA4, which should say enough about it's stability.

I'd take this the other way if I were you. Pick up FreeBSD 9.2-RELEASE as your main FreeBSD playground. It's decently stable and you can be sure that it'll work. Then simply use Subversion to check out FreeBSD 10-CURRENT (so the developer snapshot) so that you can play with it (and keep track of it) without having to compromise stability.

This way you could even try building the world every now and then, optionally install it into a new jail.

You'll keep track of the development and still be able to use FreeBSD without issues.
 
Thanks, guys, I'll wait for current to stabilise (although not literally STABLE :D) a bit before attempting the upgrade. I'm usually not in the habit of tracking current, this time being the exception because it's approaching the release status, and I'll be needing to set up a production server in a month or so, so why not start with 10.
 
It's still on ALPHA status and there's going to be lots of work put into it before stable/10 gets branched from HEAD. That will be the first sign that thing have started to stabilize because creation of the stable/10 branch means that the so called ABI for FreeBSD 10 has been set to stone and can no longer be changed in the later 10.X releases.
 
@kpa, sure, but the schedule tells us that binary interface will not change any more until we hit stable.
KBI freeze begins 21 September 2013 29 September 2013 Release Engineers announce that all further commits to the head branch will require explicit approval. Additionally, there can be no changes to the KBI until head is branched to stable/10.

meaning that now there aren't expected to be any backwards incompatible changes made (as far as binary interface goes, anyway), and given relatively little time alloted between "KBI freeze" and BETA1, there aren't expected to be any major changes made generally (as I understand the schedule).
 
Last edited by a moderator:
rihad said:
@kpa, sure, but the schedule tells us that binary interface will not change any more until we hit stable.
I don't really keep up with the development at all, but it seems you're making a valid point here. When looking at the Release Engineering page you'll notice that the status for head (10-CURRENT) is set to frozen.
 
Last edited by a moderator:
Back
Top