# Synchronizing The Source Tree with rsync



## jnbek (Nov 24, 2012)

I am painfully aware of the deprecation of csup and I've asked this on Freenode and the one serious response I got, was one of not knowing. I run 2 FreeBSD systems, one is a router/firewall built with PF and the other is a multi jailed server, serving everything except potatoes au gratin. The router and the 'base' server (read: Jail Host) are brutally minimal, only running the software required to operate their dependent systems (ie PF or jails) and on the jailed system the each jail installs whatever is required to operate their services. Anyways, the point to all this, subversion, is just as crappy as cvs, in my opinion, AND it has alot of dependencies that I would rather not install to the pristine minimal base systems. Rsync, does not have any dependencies that aren't part of base. I've found very brief and rather unhelpful information here and here but neither actually provides enough information to use rsync to manage the source tree, they pretty much seem to be providing the information for the entire FTP site, which is some 850GBs. I'd really prefer not to download 850GBs of the entire FTP site. So my question is.... What is the FULL rsync url to the FreeBSD src tree for version 9.0-RELEASE ? I reallllly want to avoid svn, I would rather set myself on fire and punch newborn babies than install svn. Please advise.


----------



## break19 (Nov 24, 2012)

rsync? seriously?  tar+gunzip+fetch are also in base: source for FreeBSD amd64 9.0-RELEASE
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/9.0-RELEASE/src.txz

Then you can use freebsd-update to keep said source up to date.


----------



## jb_fvwm2 (Nov 24, 2012)

Are you *sure* you don't want to install svn? After all, it can be used for both the ports tree update *and* the /usr/src update. (I did the former...)

```
mv ports ports.bak
svn... /usr/ports
# later
mv ports.bak/distfiles /usr/ports/distfiles
mv ports.bak/packages /usr/ports/packages
cd ports.bak
find . -type f -name Makefile -delete
# etc
find . -type d -name work -exec /bin/rm -rf {} \;
# also [FILE]/files/[/FILE] ...
```


----------



## kpa (Nov 24, 2012)

You can't fetch a particular revision of the tree with net/rsync unless someone makes a pre-made snapshot for that purpose. It could be done for the release branches but it would be impractical for current and stable branches because the only identifications for particular versions for those are the SVN revision numbers.


----------



## jnbek (Nov 26, 2012)

ahem, well, fine.... I am not acquiescing to svn because I like it, agree with migration to it, anything regarding it's existence what-so-ever, only because things that make sense or work perfectly are being ignored or abandoned, and the acquiescing of the masters of systems to the establishments desire to infiltrate the greatest OS in the world, with inferior, bloated and offering nothing new, just a shiney shell over what was old; svn is still cvs with A BUTTLOAD more dependencies. One of the things that really impressed me with Perl and FreeBSD 13 years ago was the whole notion of TMTOWTDI, and it now seems FreeBSD has gulped the Python kool-aid and forcing everyone to use crap to manage their well oiled and finely tuned machines.. I am not happy about this, Abandoning csup, and keeping rsync crippled is one thing, but at least provide other methods with less (or none) dependencies. </pointless rant that will only result in flamingz>


----------



## wblock@ (Nov 26, 2012)

svn has more dependencies, but also years of improvements over cvs.  Note which tree was unaffected by the recent security problems.

freebsd-update(8) may be an option for downloading source.  See freebsd-update.conf(5).  Never having used it, I don't know if it can fetch arbitrary snapshots, or is limited to source for releases, but it can get source.


----------



## chatwizrd (Nov 26, 2012)

Is there any guide to checking out with svn yet?

I just did this:


```
svn co http://svn0.us-east.freebsd.org/base/releng/9.0/ /usr/src
```


----------



## break19 (Nov 26, 2012)

csup is not cvs.  Install cvs itself and see which has more dependencies.  csup is a small, read-only, sourcecode syncer that simply pulls from someone else's cvs repo.

Now, with that being said, I am sure that it won't be long before -someone- writes a small, self-contained read-only app that can do the same, but from an svn repo.


----------



## chatwizrd (Nov 26, 2012)

break19 said:
			
		

> csup is not cvs.  Install cvs itself and see which has more dependencies.  csup is a small, read-only, sourcecode syncer that simply pulls from someone else's cvs repo.
> 
> Now, with that being said, I am sure that it won't be long before -someone- writes a small, self-contained read-only app that can do the same, but from an svn repo.



Never knew that before. Good information.


----------



## jb_fvwm2 (Nov 26, 2012)

FWIW, with the discussion of svn, before install/using it one may wish to have ones' rsync backup take less time (not copying the .svn) so use..

```
rsync ...exclude-from="/usr/exclude.file" ... ...
# the exclude.file:
- /ports/.svn
- /src/.svn
- .svn
# The latter line in it is probably the one that works in all invocations; I'm not
# sure nor able to test enough.
```
Could be improved on though.


----------

