Date: Thu, 9 Aug 2012 14:43:38 GMT From: Wybe van der Ham <wybe@snth.eu> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/170503: freebsd-update mirror finding is case sensitive Message-ID: <201208091443.q79Ehc0l076195@red.freebsd.org> Resent-Message-ID: <201208091450.q79Eo1mH087742@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208091443.q79Ehc0l076195>
