ports/93901:

Auster Vl. yx at x.ua
Mon Feb 27 14:50:04 UTC 2006


>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:



More information about the freebsd-ports-bugs mailing list