# where is /root/cvsup/ports-sync.sh?



## osx-addict (Mar 18, 2009)

I've got the following in my /etc/crontab file :


```
# sync the ports and source tree periodically
0      6      *      *      *      root   /root/cvsup/ports-sync.sh
0      7      *      *      *      root   /root/cvsup/src-sync.sh
```

However, neither of these exist on my system.. Are they supposed to?

What's the best way to regularly update via cvsup via cron?


----------



## SirDice (Mar 18, 2009)

osx-addict said:
			
		

> However, neither of these exist on my system.. Are they supposed to?


Nope, they're not standard if that's what you mean.



> What's the best way to regularly update via cvsup via cron?


For ports it's best to use portsnap instead of cvsup. You can also use csup instead of cvsup. Cvsup will need to be installed from a port or package. Both csup and portsnap are part of the base OS.


----------



## osx-addict (Mar 18, 2009)

Thanks.. I guess I wasn't aware the cvsup was not the preferred way to do things.. I'll ditch the bogus entries in my crontab and move over to using Portsnap for that purpose (after reading the docs on it of course).


----------



## SirDice (Mar 18, 2009)

Do keep in mind (it's name sort of implies this) that portsnap is only for the ports tree. It doesn't update your src tree. Use csup for that.


----------



## Mel_Flynn (Mar 18, 2009)

SirDice said:
			
		

> For ports it's best to use portsnap instead of cvsup.



Best being for the casual user. If you don't hack your ports tree, this is the best way. Portsnap removes directories before installing the upgraded version.

If you add Makefile.local files to ports, so that settings you compiled them with don't get lost and /etc/make.conf doesn't get cluttered (like /usr/ports/databases/mysql*-server), then csup is best as it won't touch files it doesn't know about.

If you hack port files, it's best to use cvsup (until csup grows check-out mode support) with the /usr/share/examples/cvsup/cvs-supfile, and then check out the ports repository from there. You will have to watch for merge conflicts and resolve them.

I'm using all three methods (and portsnap for one machine, which is proving to be less and less maintainable, as I hack ports frequently) and am using 3 daily periodic scripts, which you can find attached.


----------



## osx-addict (Mar 19, 2009)

Just for clarity.. 


Use portsnap to ensure that the ports tree is kept up to date with latest patches,etc.  Only needs to be done on the 'host' OS -- not for jails probably
Use cvsup to update your /usr/src tree on a regular basis -- also only needed for the 'host' OS and not for jails (assuming the jails share those directories from the host os on an as-needed basis for updating ports,etc)
Use portaudit to ensure you are up-to-date for security fixes on the ports (and possibly /usr/src packages?) -- run on host os + jails

I think that's about it... Let me know if any of the above is horked up..


----------

