From amuhametov@amuhametov.park.rambler.ru  Wed Oct  2 13:51:57 2013
Return-Path: <amuhametov@amuhametov.park.rambler.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 5FC76F59;
	Wed,  2 Oct 2013 13:51:57 +0000 (UTC)
	(envelope-from amuhametov@amuhametov.park.rambler.ru)
Received: from amuhametov.park.rambler.ru (amuhametov.park.rambler.ru [81.19.64.112])
	by mx1.freebsd.org (Postfix) with ESMTP id 13F6A2C94;
	Wed,  2 Oct 2013 13:51:56 +0000 (UTC)
Received: by amuhametov.park.rambler.ru (Postfix, from userid 502)
	id 5BB5F3C6974; Wed,  2 Oct 2013 17:42:58 +0400 (MSK)
Message-Id: <20131002134259.5BB5F3C6974@amuhametov.park.rambler.ru>
Date: Wed,  2 Oct 2013 17:42:58 +0400 (MSK)
From: Anes Mukhametov <anes@anes.su>
Reply-To: Anes Mukhametov <anes@anes.su>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Colin Percival <cperciva@FreeBSD.org>
Subject: freebsd-update can not update custom release with custom kernels 
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         182574
>Category:       bin
>Synopsis:       freebsd-update(8) can not update custom release with custom kernels
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    cperciva
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 02 14:00:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun Apr 13 23:27:41 UTC 2014
>Originator:     Anes Mukhametov
>Release:        FreeBSD 9.2-STABLE
>Organization:
>Environment:

	
>Description:
        I use custom FreeBSD releases which include more than one custom kernel.
        In my case I can't update with freebsd-update, it fails with fetch_metadata_bogus.

        The reason is custom kernel path /boot/kernel.CUSTOMKERNEL is invalid for freebsd-update.
        Attached patch fixes this behaviour.

>How-To-Repeat:
        Build your own release with more than one kernel (GENERIC+XENHVM for example). Set up freebsd-update server and try to update.

>Fix:

	

--- freebsd-update.sh.diff begins here ---
Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh	(revision 254897)
+++ usr.sbin/freebsd-update/freebsd-update.sh	(working copy)
@@ -1206,7 +1206,7 @@
 
 	# Check that the first four fields make sense.
 	if gunzip -c < files/$1.gz |
-	    grep -qvE "^[a-z]+\|[0-9a-z]+\|${P}+\|[fdL-]\|"; then
+	    grep -qvE "^[a-z]+\|[0-9a-zA-Z\.]+\|${P}+\|[fdL-]\|"; then
 		fetch_metadata_bogus ""
 		return 1
 	fi
--- freebsd-update.sh.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->cperciva 
Responsible-Changed-By: gjb 
Responsible-Changed-When: Wed Oct 2 14:03:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=182574 
>Unformatted:
