From owner-freebsd-stable@FreeBSD.ORG Mon Jun 27 22:18:58 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6452316A41F for ; Mon, 27 Jun 2005 22:18:58 +0000 (GMT) (envelope-from billy@nlcc.us) Received: from natco8.natcotech.com (natco8.natcotech.com [205.167.142.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0824243D49 for ; Mon, 27 Jun 2005 22:18:57 +0000 (GMT) (envelope-from billy@nlcc.us) Received: from localhost (int9.natcotech.com [192.168.1.9]) by natco8.natcotech.com (Postfix) with ESMTP id 1D34B29804B for ; Mon, 27 Jun 2005 17:18:57 -0500 (CDT) Received: from natco8.natcotech.com ([192.168.1.8]) by localhost (natco9 [192.168.1.9]) (amavisd-new, port 10024) with LMTP id 23883-01-2 for ; Mon, 27 Jun 2005 17:18:56 -0500 (CDT) Received: from ibm.nlcc.us (ldhl-ras1-dial-12-28-24-182.natcotech.com [12.28.24.182]) by natco8.natcotech.com (Postfix) with ESMTP id D1C4D29801E for ; Mon, 27 Jun 2005 17:18:55 -0500 (CDT) Received: (qmail 51792 invoked by uid 89); 27 Jun 2005 22:18:55 -0000 Received: from unknown (HELO ?192.168.0.2?) (billy@192.168.0.2) by ibm.nlcc.us with SMTP; 27 Jun 2005 22:18:55 -0000 Message-ID: <42C07B4F.4010101@nlcc.us> Date: Mon, 27 Jun 2005 17:18:55 -0500 From: Billy Newsom User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maher Mohamed , freebsd-stable@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at natco9.natcotech.com Cc: Subject: Re: auto cvsup X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2005 22:18:58 -0000 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? >