a another way to update your src

cvsup is popular, but i get a better idea from a China web site
to update your src:

Code:
1. directory to contains the src
# mkdir /home/xzz/src 
# cd /home/xzz/src
# wget -c -r -nd -np [url]ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.0-BETA4/src[/url]
2. backup the original src
# cd /usr
# mv src src.v7.2
# mkdir src
3. md5 the src
for file in `ls /home/xzz/src`
do
md5 $file > /home/xzz/check.md5
done
# diff check.md4 /home/xzz/src/CHECKSUM.MD5
4. install the src 
# chmod 755 /home/xzz/install.sh
# /home/xzz/install.sh all
5. done

i think it is more convenient than cvsup.
 
csup(1) is part of the base system and is written is C. It's a better alternative that net/cvsup.

Of course you can manually update src in numerous ways, ranging from csup, cvsup, install CD, svn, manually, ect. However I personally prefer csup ;).
 
netrookie said:
well, seems csup is better? i will try...

from /usr/share/examples/etc/make.conf:

Code:
# CVSup update flags.  Edit SUPFILE settings to reflect whichever distribution
# file(s) you use on your site (see /usr/share/examples/cvsup/README for more
# information on CVSup and these files).  To use, do "make update" in /usr/src.
#
#SUP_UPDATE=
#
#SUP=            /usr/bin/csup
#SUPFLAGS=       -g -L 2
#SUPHOST=        cvsup.uk.FreeBSD.org
#SUPFILE=        /usr/share/examples/cvsup/standard-supfile
#PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile
#DOCSUPFILE=     /usr/share/examples/cvsup/doc-supfile

(actually, the -g flag is a cvsup flag, useless in csup)
 
xzhayon said:
from /usr/share/examples/etc/make.conf:

Code:
# CVSup update flags.  Edit SUPFILE settings to reflect whichever distribution
# file(s) you use on your site (see /usr/share/examples/cvsup/README for more
# information on CVSup and these files).  To use, do "make update" in /usr/src.
#
#SUP_UPDATE=
#
#SUP=            /usr/bin/csup
#SUPFLAGS=       -g -L 2
#SUPHOST=        cvsup.uk.FreeBSD.org
#SUPFILE=        /usr/share/examples/cvsup/standard-supfile
#PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile
#DOCSUPFILE=     /usr/share/examples/cvsup/doc-supfile

(actually, the -g flag is a cvsup flag, useless in csup)
thank you, i just google from the web about the usage of csup,
i will recommend this idea to the China freebsd forum and discuss it.
 
I just got a new toy. It's much faster to update my source tree with this thanks.
Code:
Checkout src/usr.sbin/zzz/zzz.sh
Finished successfully

real	11m49.172s
user	0m53.226s
sys	0m58.389s
[root@daemon /daemon]#
I completely deleted /usr/src 11 minutes. oh my.
 
Was just about to post that. I've been using Subversion to manage my source trees for a couple of releases now.

You forgot on important item, though -- to update between versions:
Code:
# cd /usr/src
# svn switch svn://svn.freebsd.org/base/[stable|releng]/[version]

For example, if you are running releng/7.2 and want to move to stable/7, then use # svn switch [url=svn://svn.freebsd.org/base/stable/7]svn://svn.freebsd.org/base/stable/7[/url]. If you want to move to 8.0, then use # svn switch [url=svn://svn.freebsd.org/base/releng/8.0]svn://svn.freebsd.org/base/releng/8.0[/url]. And so on.

Support for using the SUP* variables in /etc/make.conf is coming, as well. Then you can edit /etc/make.conf to use either csup or svn, and updates to the source tree will be the same for both: make update
 
I usually use csup and upon reading this thread decide to try out svn to update my src.

My supfile define the RELENG_7_2 tag. So I ran [cmd=]mkdir /usr/src/7_2 ; svn co svn://svn.freebsd.org/base/releng/7.2 /usr/src/7[/cmd].

The svn tree is 1.1G while the csup is half that size.

Any hints on what's wrong?
 
The big advantage of csup is that it is already in the base; you can use it right after installing a -RELEASE, without needing to install any ports first.
 
svn is like genuine lunar selenium

tingo said:
The big advantage of csup is that it is already in the base; you can use it right after installing a -RELEASE, without needing to install any ports first.

csup is a fairly recent addition to the base (early 2006 it looks like), & I believe not as full-featured as net/cvsup-without-gui, to say nothing of cvs(1). It it pretty entrenched though, as the primary method for us rubes to get our sources caught up.

svn's license seems friendly enough, it wouldn't surprise me to see it being included in FreeBSD's base distribution some day, but most of us just need/want a straightforward way to pull the version we want down without keeping a multi-gigabyte (or some hydrocephalic wikipedian nonsense like gibbleblot) repository of atomic reversions going back to Ada Lovelace. That csup keeps some 18M here for its bookkeeping is quite enough, thank you.
 
tangram said:
Nope. That's only 346K.
Then its /usr/src/sys/.svn =) Etc. There is .svn directory in every dir, holding BASE copy while you have "working copy". So yes, it must near double disk usage...

But anyway i prefer svn =)
 
I'd love to use csup and I do when I'm at home. However, at work our Internet access is a bit limited - the default CVS port is 5999 and our corporate firewall blocks it. I'll try svn and if it fails I'll resort to manual.
 
ptankov said:
I'd love to use csup and I do when I'm at home. However, at work our Internet access is a bit limited - the default CVS port is 5999 and our corporate firewall blocks it. I'll try svn and if it fails I'll resort to manual.

if you have ssh access to a machine outside the firewall, you can tunnel csup through it (i don't remember how... you have to use the -l option in ssh, or similar)
 
I guess you could pack a tarball of /usr/src on a freshly csup'ed machine and bring it on a stick (or http/ftp it over if you can get to it).
 
Matty said:
nobody using SVN?

Code:
for the init:
svn co svn://svn.freebsd.org/base/stable/8 /usr/src

for the update:
cd /usr/src
svn up

Maybe use svn export to strip all the meta data and simply rerun the svn export command for the updates?
It may be more data that needs fetching but I do believe you will end up with less src data on disk (compared to the svn co method).
 
Back
Top