Date: Sun, 11 Aug 2002 13:20:25 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Tcowen <freebsd@tcowen.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: updating Message-ID: <20020811122025.GA2952@happy-idiot-talk.infracaninophi> In-Reply-To: <3D55C02D.5C2A5B26@tcowen.com> References: <3D55C02D.5C2A5B26@tcowen.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 10, 2002 at 09:38:53PM -0400, Tcowen wrote: > I have 4.1-release on a computer connected to the internet, I'd like to > update it to the latest stable. I'm not having an easy time with cvs. > The first step when updating is replacing everything in /usr/src/, > correct? I can log in with cvs, but then (with working directory > /usr/src/) do I use "cvs update -rRELENG_4" or the checkout command or > what? and with whatever command(s) I'm supposed to use, does it replace > the files in /usr/src/ or does it put things somewhere else by default? > Also, if I wanted to just download everything using the ftp would I > replace my /usr/src/ directory with everything in > ftp://ftp.FreeBSD.org/pub/FreeBSD/FreeBSD-stable/src/? thanks Appendix A of the handbook is all about how to obtain FreeBSD (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors.html). While it is possible to update your sources using Anonymous CVS (Section A4), the mechanism just about everyone uses is 'cvsup' (Section A6) --- this combines all the advantages of Anonymous CVS but is a lot more efficient in terms of network bandwidth, and there are a large number of cvsup servers around the world. The quickest way to get going is to install the cvsup package from one of the ftp sites: pkg_add -r cvsup (or if your machine doesn't have X-Windows installed) pkg_add -r cvsup-without-gui There are essentially 4 major collections of FreeBSD stuff you can download via cvsup: i) The entire FreeBSD CVS repository. This is probably not appropriate unless you are going to be doing heavyweight FreeBSD development, or you want to run your own private cvsup mirror to serve cvsup to your intranet. In which case, see the net/cvsup-mirror port. ii) The system sources, which usually live under /usr/src. iii) The ports tree, which usually lives under /usr/ports iv) The documentation, which usually lives under /usr/doc There are some other collections of stuff available, but those are the most important. Example configuration files for cvsup'ing any of these collections are available in /usr/share/examples/cvsup (or should be --- they were missed out of 4.6.1 release by mistake). To maintain an up to date source tree for 4-STABLE, you need to first run cvsup in a mode that lets it take over "ownership" of all of the files under /usr/src, and then set up things so you can update your source tree easily. The cvsup FAQ at http://www.polstra.com/projects/freeware/CVSup/faq.html has detailed instructions. Assuming you have the 4.1-RELEASE sources installed, and you're going to use your local cvsup server, which is cvsup3.freebsd.org, to adopt your current source tree into cvsup's control, you need to create a supfile containing the following, which you will use one time only: *default host=cvsup3.freebsd.org *default base=/usr *default prefix=/usr *default release=cvs *default delete use-rel-suffix src-all tag=RELENG_4_1_0_RELEASE list=cvs:RELENG_4 Save that to a file eg. /tmp/first.supfile, and then run: cvsup -g -L 2 /tmp/first.supfile That should bring your source tree up to the latest STABLE sources. Once you've done that, for subsequent updates you can use the /usr/share/examples/cvsup/stable-supfile. The cheats way of doing this is very simple. Add the following to your /etc/make.conf: SUP_UPDATE= yes # SUP= /usr/local/bin/cvsup SUPFLAGS= -g -L 2 SUPHOST= cvsup3.FreeBSD.org SUPFILE= /usr/share/examples/cvsup/stable-supfile #PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile #DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile Then to update your sources, simply do the following: cd /usr/src make update If you uncomment the PORTSSUPFILE and DOCSUPFILE lines as above, that command will also update your ports and docs trees, but remember to do the whole adoption thing for those trees first --- or simply delete everything under /usr/ports or /usr/docs and start with a clean sheet. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Tel: +44 1628 476614 Marlow Fax: +44 0870 0522645 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020811122025.GA2952>