Date: Mon, 22 May 2000 00:31:23 +0200 (CEST) From: Alexander Langer <alex@cichlids.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/18723: add checksum.sh for the Tools dir Message-ID: <200005212231.AAA06982@cichlids.cichlids.com>
next in thread | raw e-mail | index | archive | help
>Number: 18723 >Category: ports >Synopsis: add checksum.sh for the Tools dir >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 21 15:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Alexander Langer >Release: FreeBSD 5.0-CURRENT i386 >Organization: none >Environment: >Description: Hello. I've always wanted to write it, now I had time. Basic idea: bento only copies the files to the ftp.freebsd.org mastersite, if the checksum succeeds. That means, on ftp.freebsd.org there _should_ be always the distfile with the old checksum. Using that, next steps are easy: Fetch new and old distfiles and compare them with diff -rNu All checksum patches I sent over the last hour are verified with this script. I REALLY speeds up the work. >How-To-Repeat: >Fix: --- snip --- #!/bin/sh if [ -z $1 ]; then echo "Usage: $0 <portname>" exit 1 fi if [ -z $TMPDIR ]; then TMPDIR=/tmp fi if [ -z $PORTSDIR ]; then PORTSDIR=/usr/ports fi cd $PORTSDIR DIR=`grep $1 INDEX| cut -f2 -d\|` cd $DIR make fetch broken=`make checksum 2>&1 | grep "Checksum mismatch for" | awk '{print $5}' \ | sed -e 's:\.$::'` if [ -z $broken ]; then make checksum echo "Checksum ok, exiting..." exit 1 fi rm -rf $TMPDIR/checksum mkdir $TMPDIR/checksum cd $TMPDIR/checksum mkdir $TMPDIR/checksum/orig mkdir $TMPDIR/checksum/new echo Fetching $broken fetch ftp://ftp.FreeBSD.ORG/pub/FreeBSD/distfiles/$broken if [ ! -r $broken ]; then echo "File $broken not found, fetch error?" exit 1 fi if file $broken | grep "gzip compressed data" >/dev/null; then cd orig tar -zxf ../$broken cd ../new tar -zxf $PORTSDIR/distfiles/$broken cd .. elif file $broken | grep "zip archive file" >/dev/null ; then cd orig unzip ../$broken cd ../new unzip $PORTSDIR/distfiles/$broken cd .. else cp $broken orig/ cp $PORTSDIR/distfiles/$broken new/ fi echo Diff follows: diff -rNu orig new ---- snap ---- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005212231.AAA06982>