Solved Strange svn version# question

Good evening,

Was on FreeBSD 10.0-x64. Saw that 10.1 was released.

So I have a batch file that somewhat automates getting new sources. It looks like:

Code:
#!/bin/sh
#
#
# This shell script nukes the current /usr/src dirtree, and fetches a new
# copy of the system sources, and installs it to /usr/src
#
#
echo
echo Removing existing /usr/src/ dirtree......
echo
sudo rm -rf /usr/src
echo

sudo svn checkout https://svn0.us-west.freebsd.org/base/release/10.1.0 /usr/src

echo

exit

When I manually peruse the SVN repo with a web browser, I see version 274417. But when the above gets done, it tells me I am at version 264538 and this revision increments every few minutes when another commit is made.

I am concerned that I'm really pulling sources from HEAD instead of RELEASE, even though release is clearly my target.

This is my first upgrade with FreeBSD. So if this behavior is normal for new releases, I would like to know that. Previously, when I would check for upgrades to FreeBSD 10.0. Calls to SVN to upgrade my source showed that the source code at a static version, and not incrementing.

Can someone please explain what I am seeing and why? I am not challenging nor complaining, I simply want to understand what is happening, and if that is normal.

Thank you!

Sincerely and respectfully,

Dave
 
There is more than one thing in the base repository. All of the various versions are there. The highest revision number is not necessarily in 10.1, someone might have just checked something in to 11, or one of the 9.x branches.

Incidentally, blowing away /usr/src and doing a fresh checkout should not be necessary very often. It is high overhead compared to an update.
 
Thanks wblock@,

I apologize, I still don't understand. If I am getting sources other than what I want <head>, with the above line as documented in the script, why am I getting sources for head when I specifically state release. Then how do I replace my /usr/src tree with 10.1 sources without having to do a reinstall of the OS itself?

I would appreciate the clarification!

So maybe I should ask: How to get the 10.1 sources into my /usr/src tree if not by the above? Sounds like I have an issue on my system that I need to revert.

Thanks again,

Sincerely and respectfully,

Dave
 
It looks like you did check out the latest from the 10.1-RELEASE branch. What wblock@ is saying is that the revision that is reported will increment when changes in other parts of the tree occur. If you do a svn info /usr/src you should see
Code:
Last Changed Rev: 274417

Also, when you want to update, there is no need to blow away /usr/src. Just do a svn up /usr/src.
 
BINGO!

That's what I wasn't understanding! So I was indeed getting the proper source, but the version increments regardless of the branch I pull down was throwing me off. I was assuming that svn would always report the highest version number, but specific to the particular branch I just obtained. It my simple mind, it sure would make more sense if SVN behaved this way. Otherwise, it can be misleading, as this thread attests.That's not intended to be taken as flames or discontent. It's just an observation.

As an explanation for nuking the /usr/src dirextory tree, I understand that toasting the /usr/src tree is draconian, especially so since I only "track" release, not stable nor current. In this case, I had been tracking the releng tree for 10.1 since RC-3. I was indeed taking some rather draconian measures to ensure no pollution between RC-3, RC-4, and RELEASE sources.

Thank you very much for the clarification. I do appreciate it!

Sincerely and respectfully,

Dave
 
I've found it useful to save svn hints in /usr ... such as
Code:
svn switch --relocate   # svn:// to/from https://
svn switch ^/base/releng/10.1   # switches to? from?
in the absence of ever learning enough of the commands to be proficient.
 
After svn checkout... it is enough to do svn update /usr/src. Also, the right way to checkout is svn checkout svn://svn.freebsd.org/base/stable/10 /usr/src. With the /base/release/10.1.0 branch you get an outdated copy.
 
After svn checkout... it enough to do svn update /usr/src

Yes. That will update the source tree with new changes to that branch. Note that it just updates the source, and still must be built to update the running system.

Also, right way to checkout is svn checkout svn://svn.freebsd.org/base/stable/10 /usr/src

That will work, but use of the more secure HTTPS protocol is recommended: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn.html#svn-mirrors-fingerprint

with /base/release/10.1.0 branch you get outdated copy.

Well, the RELEASE code does not change. stable gets all changes, and releng gets critical security updates and bug fixes.
 
Back
Top