Bug 197047

Summary: freebsd-update fails to parse mirror list
Product: Base System Reporter: Andrey Kiryanov <dronmbi>
Component: binAssignee: Colin Percival <cperciva>
Status: Closed DUPLICATE    
Severity: Affects Only Me CC: freebsd-bugs
Priority: ---    
Version: 10.1-RELEASE   
Hardware: Any   
OS: Any   

Description Andrey Kiryanov 2015-01-24 09:01:23 UTC
freebsd-update(8) uses case-sensitive regexp to parse mirror list, which causes it to find no mirrors if ServerName capitalization is different from the one returned by host(1). This bug is also present in 9.3-RELEASE and possibly others.

E.g.:

ServerName is "update.FreeBSD.org" (default)

`host -t srv host -t srv _http._tcp.update.FreeBSD.org' returns this:

_http._tcp.update.freebsd.org has SRV record 1 40 80 update6.freebsd.org.
_http._tcp.update.freebsd.org has SRV record 1 30 80 update2.freebsd.org.
_http._tcp.update.freebsd.org has SRV record 1 35 80 update4.freebsd.org.
_http._tcp.update.freebsd.org has SRV record 1 5 80 update3.freebsd.org.
_http._tcp.update.freebsd.org has SRV record 1 50 80 update5.freebsd.org.

freebsd-update uses sed(1) to parse this list:

sed -nE "s/${MLIST} (has SRV record|server selection) //p"

which returns nothing.
It should look like this instead, because domain names are not case-sensitive:

sed -nE "s/${MLIST} (has SRV record|server selection) //pi"
Comment 1 Joseph Mulloy 2015-05-20 16:15:00 UTC
I'm also seeing this on 10.1-RELEASE.

This is a duplicate of bug #170503
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2015-05-20 16:33:12 UTC

*** This bug has been marked as a duplicate of bug 170503 ***