# Upgrading 8.3-RELEASE-p4 to 9.1-RELEASE using subversion.



## frijsdijk (Feb 17, 2013)

Hi,

Just wanted to verify that I'm doing things correctly. Since we're not supposed to use c(v)sup anymore, I checked the docs and followed instructions for using subversion to get the source tree, and build FreeBSD from that.

I know that I'd be able to use freebsd-update, but when jumping versions like this (7.x -> 8.x, 8.x -> 9.x) I still prefer mergemaster.

So, my current machine is running 8.3-RELEASE-p4, and I'd like to upgrade it to 9.1-RELEASE.

I did:


```
pkg install -y subversion (I've built my own repositories with poudriere)
cd /usr/src
rm -rf *
svn checkout http://svn0.us-west.FreeBSD.org/base/releng/9.1 /usr/src
make buildworld
make buildkernel
... and so on
```

And later on I'd be able to update /usr/src with the command:


```
svn update /usr/src
```

Is that correct?

I'm pulling the code to NL. I was wondering, aren't there any mirrors more close by? Could not find any on http://www.freebsd.org/doc/handbook/svn-mirrors.html


----------



## yom (Feb 17, 2013)

it seems correct to me, since I used this method on VMs for sometimes, never encountered problems.


----------



## kpa (Feb 17, 2013)

Your procedure is correct. I would add a couple of steps though:

Optionally use https protocol with svn(1):

`# svn checkout [url]https://svn0.us-west.FreeBSD.org/base/releng/9.1[/url] /usr/src`

You will be asked if you trust the self-signed certificate, answer yes.

Remove /usr/obj/* before compiling world and kernel:
`# rm -rf /usr/obj/*`


----------



## frijsdijk (Feb 17, 2013)

Thanks. What can be the consequence of not clearing /usr/obj first, btw?


----------



## wblock@ (Feb 17, 2013)

frijsdijk said:
			
		

> ```
> pkg install -y subversion (I've built my own repositories with poudriere)
> ```



Nice!



> ```
> cd /usr/src
> rm -rf *
> ```



Don't use rm -rf unqualified.  It can go very, very wrong way too easily.  Always qualify it: rm -rf /usr/src



> ```
> svn checkout http://svn0.us-west.FreeBSD.org/base/releng/9.1 /usr/src
> make buildworld
> make buildkernel
> ...



Yes, that's the correct procedure.  As kpa notes, HTTPS is the preferred protocol.  There are no other SVN mirrors yet, as far as I know.


----------



## kpa (Feb 17, 2013)

frijsdijk said:
			
		

> Thanks. What can be the consequence of not clearing /usr/obj first, btw?



When going to a higher major version the directory structure of /usr/obj may have changed and if you happen to have some old files there the compilation may fail because make(1) does not pick up correct dependencies.


----------



## frijsdijk (Feb 17, 2013)

Ok. In my case, everything has built correctly. So no worries there, right?


----------

