From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 9 14:50:02 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EE54106564A for ; Thu, 9 Aug 2012 14:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C9DEB8FC0C for ; Thu, 9 Aug 2012 14:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q79Eo1dE087743 for ; Thu, 9 Aug 2012 14:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q79Eo1mH087742; Thu, 9 Aug 2012 14:50:01 GMT (envelope-from gnats) Resent-Date: Thu, 9 Aug 2012 14:50:01 GMT Resent-Message-Id: <201208091450.q79Eo1mH087742@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Wybe van der Ham Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 360BC106566C for ; Thu, 9 Aug 2012 14:43:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 218938FC0C for ; Thu, 9 Aug 2012 14:43:39 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q79Ehcgw076196 for ; Thu, 9 Aug 2012 14:43:38 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q79Ehc0l076195; Thu, 9 Aug 2012 14:43:38 GMT (envelope-from nobody) Message-Id: <201208091443.q79Ehc0l076195@red.freebsd.org> Date: Thu, 9 Aug 2012 14:43:38 GMT From: Wybe van der Ham To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/170503: freebsd-update mirror finding is case sensitive X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2012 14:50:02 -0000 >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: