Bug 232380 - freebsd-update: fails to find mirror if nameserver converts update.FreeBSD.org to lowercase
Summary: freebsd-update: fails to find mirror if nameserver converts update.FreeBSD.or...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-18 12:40 UTC by Kurt Jaeger
Modified: 2018-10-18 19:23 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Jaeger freebsd_committer freebsd_triage 2018-10-18 12:40:22 UTC
This happens on FreeBSD-11.0-p16:                                               
                                                                                
# freebsd-update -r 11.2-RELEASE upgrade                                        
src component not installed, skipped                                            
Looking up update.FreeBSD.org mirrors... none found.                            
Fetching metadata signature for 11.0-RELEASE from update.FreeBSD.org... failed. 
No mirrors remaining, giving up.                                                
                                                                                
The reason is that per default, freebsd-update asks for update.FreeBSD.org,     
but the nameserver returns it in lower-case:                                    
                                                                                
host -t srv _http._tcp.update.FreeBSD.org                                       
                                                                                
returns:                                                                        
                                                                                
_http._tcp.update.freebsd.org has SRV record 1 50 80 update1.freebsd.org.       
_http._tcp.update.freebsd.org has SRV record 1 35 80 update4.freebsd.org.

The sed after the host-query only matches upper-case:                           
                                                                                
host -t srv _http._tcp.update.FreeBSD.org |                                     
sed -nE "s/_http._tcp.update.FreeBSD.org (has SRV record|server selection) //p"|
            cut -f 1,2,4 -d ' ' |                                               
            sed -e 's/\.$//' |                                                  
            sort                                                                
                                                                                
so it returns a empty list.
Comment 1 Colin Percival freebsd_committer freebsd_triage 2018-10-18 19:23:31 UTC
Fixed in HEAD (r307156).