From owner-freebsd-ports Thu Oct 31 11:40: 9 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64F1237B401 for ; Thu, 31 Oct 2002 11:40:06 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC4AA43E3B for ; Thu, 31 Oct 2002 11:40:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9VJe5x3058711 for ; Thu, 31 Oct 2002 11:40:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9VJe5nq058710; Thu, 31 Oct 2002 11:40:05 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E324F37B401 for ; Thu, 31 Oct 2002 11:39:08 -0800 (PST) Received: from c-450d73d5.09-71-6f736c2.cust.bredband.no (c-450d73d5.09-71-6f736c2.cust.bredband.no [213.115.13.69]) by mx1.FreeBSD.org (Postfix) with SMTP id 58DDD43E3B for ; Thu, 31 Oct 2002 11:39:06 -0800 (PST) (envelope-from are@communique.no) Received: (qmail 82907 invoked by uid 1000); 31 Oct 2002 19:20:22 -0000 Message-Id: <20021031192022.82906.qmail@david.i.communique.no> Date: 31 Oct 2002 19:20:22 -0000 From: Are Bryne Reply-To: Are Bryne To: FreeBSD-gnats-submit@FreeBSD.org Cc: Munish Chopra X-Send-Pr-Version: 3.113 Subject: ports/44789: Eliminates use of wget(1) and seq(1) in cddb-tool of abcde port Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44789 >Category: ports >Synopsis: Eliminates use of wget(1) and seq(1) in cddb-tool of abcde port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 31 11:40:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Are Bryne >Release: FreeBSD 4.6.2-RELEASE-p2 i386 >Organization: Communiqué DA >Environment: System: FreeBSD david.i.communique.no 4.6.2-RELEASE-p2 FreeBSD 4.6.2-RELEASE-p2 #0: Tue Oct 22 14:49:28 CEST 2002 are@david.i.communique.no:/usr/obj/usr/src/sys/DAVID i386 Up-to-date /usr/ports >Description: Munish Chopra, the abcde port maintainer, forgot to change the occurences of wget and seq in the cddb-tool shell script. >How-To-Repeat: Use any invocation of abcde (requiring CDDB-support) to see that you either need wget or the patch. Use abcde with a cd that has not been registered with the CDDB server (thereby invoking cddb-tool with the 'template' parameter) to see the use of seq. Neither wget nor seq are part of the base system (on FreeBSD 4.6.x) >Fix: I have followed Munish's lead (as in files/*) of swapping wget with fetch and seq with jot. The cddb-tool.1 man page should have wget replaced with fetch too. --- cddb-tool.patch begins here --- --- cddb-tool.orig Mon Jan 21 03:29:23 2002 +++ cddb-tool Thu Oct 31 19:41:23 2002 @@ -30,9 +30,9 @@ LOOKUP_ERR=13 # problem connecting to cddb server EMPTY_QUERY_RESPONSE=14 # query response = "", (probably no net connection) -# assume a reasonable default if $WGET is undefined -if [ "$WGET" = "" ]; then - WGET=wget +# assume a reasonable default if $FETCH is undefined +if [ "$FETCH" = "" ]; then + FETCH=fetch fi usage() { @@ -74,8 +74,8 @@ read server user host disc-id genre CDDB file is dumped to stdout. File will contain an extra #CATEGORY= line, which leaves it a valid CDDB file but which will - be recognized by parse and send commands. Uses wget, so if you - need to use a proxy then just configure wget to do so. user and + be recognized by parse and send commands. Uses fetch, so if you + need to use a proxy then just configure fetch to do so. user and host will be used for identifying ourselves to the CDDB server. help Display this. @@ -119,7 +119,7 @@ echo '#' echo '# Track frame offsets:' NUMTRACKS=$2 - for x in $(seq 3 $(expr $NUMTRACKS + 2)) + for x in $(jot $NUMTRACKS 3 $(expr $NUMTRACKS + 2)) do printf "#\t$(echo "$DISCID" | cut -f$x -d' ')\n" done @@ -135,13 +135,13 @@ echo DISCID="$DISCNUM" echo "DTITLE=Unknown Artist / Unknown Album" # TTITLE0 -- TTITLEn - for x in $(seq 1 $NUMTRACKS) + for x in $(jot $NUMTRACKS) do echo "TTITLE$(expr $x - 1)=Track $x" done echo "EXTD=" # EXTT0 -- EXTTn - for x in $(seq 1 $NUMTRACKS) + for x in $(jot $NUMTRACKS) do echo "EXTT$(expr $x - 1)=" done @@ -164,7 +164,7 @@ shift 3 TRACKINFO="$@" TRACKINFOPLUS=$(echo $TRACKINFO | tr ' ' '+') - RESULTS=$($WGET -q -O - "$SERVER?cmd=cddb+query+$TRACKINFOPLUS\&hello=$HELLOINFO\&proto=3") || exit $LOOKUP_ERR + RESULTS=$($FETCH -q -o - "$SERVER?cmd=cddb+query+$TRACKINFOPLUS\&hello=$HELLOINFO\&proto=3") || exit $LOOKUP_ERR echo $RESULTS | tr '\r' '\n' | tr -s '\n' | sed 's/^ //g' ;; @@ -175,7 +175,7 @@ CATEGORY="$4" DISCID="$5" HELLOINFO="$USER+$HOST+$NAME+$VERSION" - $WGET -q -O - $CDDBDATA "$SERVER?cmd=cddb+read+$CATEGORY+$DISCID\&hello=$HELLOINFO\&proto=3" 2>/dev/null + $FETCH -q -o - $CDDBDATA "$SERVER?cmd=cddb+read+$CATEGORY+$DISCID\&hello=$HELLOINFO\&proto=3" 2>/dev/null ;; help) help ;; --- cddb-tool.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message