Bug 197047 - freebsd-update fails to parse mirror list
Summary: freebsd-update fails to parse mirror list
Status: Closed DUPLICATE of bug 170503
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Colin Percival
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-24 09:01 UTC by Andrey Kiryanov
Modified: 2015-05-20 16:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***