Re: auto cvsup
Here's a neat little script you can run from cron or commandline. I use it to update the ports tree and the source tree for 5-STABLE. Feel free to change the cvsup logging to suit (I don't log the ports, but I do log important STABLE src stuff). Also, use the correct country for mirrors. You need to install cvsup, portupgrade, fastest_cvsup, and if you want, try freebsd-update. The portupgrade line at the bottom may not be needed by many. But this way, I already have the latest ports distfiles, if I want, so when I am ready to run portupgrade, the download is already on my disk. Ensure you put your cvsup files in the right place (or edit the script below.) I run this every other day on FreeBSD 5.4. The logs help me see what needs to be updated. (Every time it runs, it will show you what ports could be updated. It will also show you what files were updated in the source tree.) my cron entry: 33 2 */2 * * /root/mydaily.sh 1>/dev/null 2>/dev/null Weekly is like this: 33 2 * * 3 /root/mydaily.sh 1>/dev/null 2>/dev/null ***/root/mydaily.sh* #!/bin/sh # # Billy saw something like this on 12/18/2004 at: #http://www.oreillynet.com/pub/wlg/6041?page=last&x-order=date # LOGF="/var/log/cvsup.log" exec >>${LOGF} 2>&1 echo "START @ `/bin/date`" #use fastest_cvsup to find fastest geographically #close mirror; I'll check Canada and the US if SERVER=`/usr/local/bin/fastest_cvsup -Q -c ca,us`; then echo "Using STABLE Server:" $SERVER /usr/local/bin/cvsup -L1 -h $SERVER -l /var/log/cvs-lock-s /root/stable-supfile echo "STABLE done @ `/bin/date`" else echo "cvsup-STABLE has a fastest_cvsup problem on...`/bin/date`" fi if SERVER=`/usr/local/bin/fastest_cvsup -Q -c ca,us`; then echo "Using PORTS Server:" $SERVER /usr/local/bin/cvsup -L0 -h $SERVER -l /var/log/cvs-lock-p /root/ports-supfile echo "PORTS done @ `/bin/date`" else echo "cvsup-PORTS has a fastest_cvsup problem on...`/bin/date`" fi #-U (which takes a long time to execute) isn't needed #with the fetchindex command cd /usr/ports make fetchindex /usr/local/sbin/portsdb -u ## # This program is nice, too. Remove two comments below to suit. # echo "Looking for security patches" # freebsd-update fetch ## echo "The following ports need upgrading" /usr/local/sbin/portversion -l "<" echo "" echo "Now downloading the new port distfiles" /usr/local/sbin/portupgrade -OaF |grep -v "Fetching" |grep -v "Skipping" echo "STOP at `/bin/date`." echo "" Maher Mohamed wrote: how can i upgrade my cvsup weekly with an auto way? ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: auto cvsup
There is another alternative to just doing the cvsup... Kövesdán Gábor wrote: Maher Mohamed wrote: how can i upgrade my cvsup weekly with an auto way? You should use crondaemon. Place the following line to the end of /etc/crontab: 15 4 * * 6 rootcvsup /some/path/to/supfile The number six represents the sixth day of the week, the 15 is the minute number and the second is the hour, thus this will run on every Friday (if I remember correctly, I'm not sure the numbering starts with Sunday) at 4:15. This is an essential part, but I decided to take the next step. Not only do I get the updated cvsup, but I check for changes... cvsup -l (as root) 0 21 * * * /usr/local/bin/getupdates > /var/log/updates.log 2> /tmp/updates.err This runs daily at 9pm with a log of the activity in /var/log/updates.log and an error report in /tmp/updates.err getupdates: (set this as executable chmod 755) #!/bin/sh # get the updated sources cd /usr/src /usr/local/bin/cvsup -g stable-supfile # get the updated ports tree cd /usr/ports /usr/local/bin/cvsup -g ports-supfile # get the updated ports index make fetchindex # rebuild the list of changes, i.e. ports that have updates available /usr/sbin/pkg_version -v | grep "<" > updates exit 0 In the morning I simply go to the ports directory and issue: more updates to find out which ports have been affected. I can then use portupgrade as required. As a bonus, I can also run getupdates at any time to recheck the updates. Cheers, Gábor Kövesdán ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: auto cvsup
Maher Mohamed wrote: how can i upgrade my cvsup weekly with an auto way? You should use crondaemon. Place the following line to the end of /etc/crontab: 15 4 * * 6 rootcvsup /some/path/to/supfile The number six represents the sixth day of the week, the 15 is the minute number and the second is the hour, thus this will run on every Friday (if I remember correctly, I'm not sure the numbering starts with Sunday) at 4:15. Cheers, Gábor Kövesdán ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: auto cvsup
just add this line to your /etc/crontab 0 0 * * 5 root/usr/local/bin/cvsup -g -L 0 /usr/share/examples/cvsup/your_Cvsupfile this will run every friday midnight and update your files. Maher Mohamed wrote: how can i upgrade my cvsup weekly with an auto way? ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: auto cvsup
On Sun, Jun 26, 2005 at 09:17:50PM +0300, Maher Mohamed wrote.. > how can i upgrade my cvsup weekly with an auto way? cron? -- Wilko Bulte [EMAIL PROTECTED] ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: auto cvsup
Hi! > > how can i upgrade my cvsup weekly with an auto way? > cron it. -- wbr, sergey v. spivak sergey#spivak.kiev.ua zlob-uanic/eunic/ripe ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: auto cvsup
Hi Maher, Sunday, June 26, 2005, 8:17:50 PM, you typed: > how can i upgrade my cvsup weekly with an auto way? use cron -- Best regards DanGer, ICQ: 261701668 | e-mail protecting at: http://www.2pu.net/ http://danger.rulez.sk | proxy list at:http://www.proxy-web.com/ | FreeBSD - The Power to Serve! [ I am being followed by a pair of boxer shorts. ] ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
auto cvsup
how can i upgrade my cvsup weekly with an auto way? -- Mohamed M. Maher ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"