From owner-freebsd-questions@FreeBSD.ORG Thu Aug 26 20:48:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93DA716A4F5 for ; Thu, 26 Aug 2004 20:48:22 +0000 (GMT) Received: from smtp.owt.com (smtp.owt.com [204.118.6.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF7BB43D39 for ; Thu, 26 Aug 2004 20:48:21 +0000 (GMT) (envelope-from kstewart@owt.com) Received: from [207.41.94.233] (owt-207-41-94-233.owt.com [207.41.94.233]) by smtp.owt.com (8.12.8/8.12.8) with ESMTP id i7QKm9kG012714; Thu, 26 Aug 2004 13:48:10 -0700 From: kstewart To: FreeBSD-Questions@freebsd.org, krinklyfig@spymac.com Date: Thu, 26 Aug 2004 13:48:19 -0700 User-Agent: KMail/1.6.2 References: <200408260007.26659.krinklyfig@spymac.com> <200408260228.47205.kstewart@owt.com> <200408261315.24610.krinklyfig@spymac.com> In-Reply-To: <200408261315.24610.krinklyfig@spymac.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408261348.19808.kstewart@owt.com> Subject: Re: crontab question involving cvsup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 20:48:22 -0000 On Thursday 26 August 2004 01:15 pm, Joshua Tinnin wrote: > On Thursday 26 August 2004 02:28 am, kstewart wrote: > > On Thursday 26 August 2004 01:09 am, Joshua Tinnin wrote: > > > On Thursday 26 August 2004 12:42 am, epilogue > > > > > > > > > wrote: > > > > On Thu, 26 Aug 2004 00:07:26 -0700 > > > > > > > > Joshua Tinnin wrote: > > > > > OK, I have searched the archives, and I can't find that my > > > > > question has been answered previously, but please forgive me if > > > > > that's incorrect. > > > > > > > > > > I'm using (or rather trying to use) cron to update my ports > > > > > tree daily. I've tried several different combinations without > > > > > success, and lately this is what I have in my crontab file: > > > > > > > cd /usr/ports > > # > > # make bzip2 backup and save 4 old ones for the days when make index > > # is broken > > # > > rm INDEX.3.bz2 > > mv INDEX.2.bz2 INDEX.3.bz2 > > mv INDEX.1.bz2 INDEX.2.bz2 > > mv INDEX.0.bz2 INDEX.1.bz2 > > bzip2 -c INDEX > INDEX.0.bz2 > > # > > # get new INDEX > > #make index 2>&1 | tee /var/log/build/make-index-`date > > "+%Y%m%d-%H%M"`.log portindex 2>&1 | tee > > /var/log/build/make-index-`date "+%Y%m%d-%H%M"`.log # > > #fetch www.freebsd.org/ports/INDEX > > #chmod 644 INDEX > > portsdb -u > > Excellent. Thanks so much for sending this, as this is just the sort of > thing I need. I'll work on it a bit tonight to customize it for my > system. I'm glad you posted this, as in searching the archives I > noticed you've posted it before, but it's changed since the last time. > After I sent it, I noticed that in the past I had used fetch. I would now use "make fetchindex" instead. With fetchindex, you don't have to modify the permissions on INDEX to use it as a user. When index builds are dying, it is a kind of moot point because I would resort to one of my backed up versions and not fetch from FreeBSD anyway. The output from a cron job can be pretty verbose at times and it all ends up as an email. I typically run uports at 4am and 4pm. My cvsup mirror is updated on the odd hours. Until I started using portindex, I used a job that just did the cvsup section and created the html. I would fetch a local copy of INDEX and INDEX.db from my test machine. That way only one machine spent the time creating INDEX. At this point, the test machine is using xorg-* and I have dropped my normal machine back to using XFree86. So, I have to create INDEX on both machines. There is a situation when xorg and KDE loses track of what keyboard and layout you are using. KDE switched into using some form of Greek. At least the letters appear to be from the Greek alphabet :). Kent -- Kent Stewart Richland, WA http://users.owt.com/kstewart/index.html Support the Bison at http://www.buffalofieldcampaign.org/