misc/170503: freebsd-update mirror finding is case sensitive
Wybe van der Ham
wybe at snth.eu
Thu Aug 9 14:50:02 UTC 2012
>Number: 170503
>Category: misc
>Synopsis: freebsd-update mirror finding is case sensitive
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 09 14:50:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Wybe van der Ham
>Release: 8.3
>Organization:
none
>Environment:
FreeBSD testmachine 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:47:23 UTC 2012 root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The freebsd-update script tries to find mirrors using SRV records. My Mikrotik router with built-in nameserver gives the following output:
# host -t srv _http._tcp.update.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 50 80 update5.FreeBSD.org.
_http._tcp.update.freebsd.org has SRV record 1 5 80 update3.FreeBSD.org.
The first part is converted to lowercase. The freebsd-update script checks (with sed) for "_http._tcp.update.FreeBSD.org", but that does not match the lowercase output.
freebsd-update is unable to find the mirrors, and freebsd-update fails.
The workaround for this problem is to change the Servername in /etc/freebsd-update.conf to all lowercase.
>How-To-Repeat:
Use a mikrotik router as nameserver or any other nameserver that returns the requested hostname in lowercase instead of the original casing.
>Fix:
Make the regular expression - used to strip away the "_http._tcp.update.freebsd.org has SRV record " - case insensitive:
Change:
sed -nE "s/${MLIST} (has SRV record|server selection) //p"
to
sed -nE "s/${MLIST} (has SRV record|server selection) //Ip"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list