Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2006 16:42:18 +0200 (EET)
From:      "Auster Vl." <yx@x.ua>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/93901: 
Message-ID:  <200602271442.k1REgIn9050913@grannus.ixn.net.ua>
Resent-Message-ID: <200602271450.k1REo3Oc073662@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         93901
>Category:       ports
>Synopsis:       
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 27 14:50:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Auster Vl.
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
System: FreeBSD 4.11-STABLE i386

>Description:
 fbsd4 sysutils/portsnap-1.0:
 portsnap.FreeBSD.org mirrors... none found.


>How-To-Repeat:

 % uname -sr
 FreeBSD 4.11-STABLE

 % strings `which host` | grep '$Id: host.c'
 $Id: host.c,v 8.55.8.1 2003/06/02 09:24:38 marka Exp $

 # /usr/local/sbin/portsnap fetch
 Looking up portsnap.FreeBSD.org mirrors... none found.
 ...


>Fix:

--- /usr/local/sbin/portsnap
+++ /usr/local/sbin/portsnap.4example-only
@@ -351,9 +351,12 @@
 	echo -n "Looking up ${SERVERNAME} mirrors..."
 
 # Issue the SRV query and pull out the Priority, Weight, and Target fields.
-	host -t srv "_http._tcp.${SERVERNAME}" |
-	    grep -E "^_http._tcp.${SERVERNAME} has SRV record" |
-	    cut -f 5,6,8 -d ' ' > serverlist
+	b='[[:blank:]]+'
+	d='[[:digit:]]+'
+	a='[[:alnum:]]+'
+	s="_http._tcp.$SERVERNAME"
+	host -v -t srv "$s" |
+	sed -nE "s/^$s\.?$b$d${b}IN${b}SRV$b($d)$b($d)$b$d$b($a)/\1 \2 \3/w serverlist"
 
 # If no records, give up -- we'll just use the server name we were given.
 	if [ `wc -l < serverlist` -eq 0 ]; then


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602271442.k1REgIn9050913>