From nobody@FreeBSD.org  Tue Apr 30 01:34:32 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id EA51182E
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Apr 2013 01:34:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [69.147.83.34])
	by mx1.freebsd.org (Postfix) with ESMTP id C1A0212B5
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Apr 2013 01:34:32 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3U1YWPv076465
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 30 Apr 2013 01:34:32 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r3U1YWJS076450;
	Tue, 30 Apr 2013 01:34:32 GMT
	(envelope-from nobody)
Message-Id: <201304300134.r3U1YWJS076450@red.freebsd.org>
Date: Tue, 30 Apr 2013 01:34:32 GMT
From: Derek Buitenhuis <derek.buitenhuis@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: linker.hints erroneously included in 9.1-RELEASE-p3 binary update
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178247
>Category:       amd64
>Synopsis:       linker.hints erroneously included in 9.1-RELEASE-p3 binary update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    cperciva
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 30 01:40:01 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun Oct  6 22:40:00 UTC 2013
>Originator:     Derek Buitenhuis
>Release:        9.1-RELEASE-p3
>Organization:
>Environment:
FreeBSD bb-nas.bb-router 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
When running 'freebsd-update fetch' and 'freebsd-update install', it wil attempt to replace /boot/kernel/linker.hints infinitely.

Example:
----
root@bb-nas:/home/daemon404$ freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 9.1-RELEASE from update3.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files will be updated as part of updating to 9.1-RELEASE-p3:
/boot/kernel/linker.hints
$ freebsd-update install
Installing updates... done.
$ reboot
[...]
$ freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 9.1-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files will be updated as part of updating to 9.1-RELEASE-p3:
/boot/kernel/linker.hints
----

Repeat ad nauseum.

This is because linker.hints is generated by kldxref, and thus it will always differ from the one provided in the update, and should thus not be packaged.
>How-To-Repeat:
Have a FreeBSD 9.1 binary install (no sources installed at all) updated to 9.1-RELEASE-p2, and run 'freebsd-update fetch' and 'freebsd-update install'.
>Fix:
There is a hack workaround located here: http://forums.freebsd.org/showthread.php?t=1362

To quote jgh:
----
These are taken from /etc/defaults/rc.conf:

kldxref_enable="NO"	# Build linker.hints files with kldxref(8). (this should be set to YES)
kldxref_clobber="NO"	# Overwrite old linker.hints at boot. (this should be set to YES)
kldxref_module_path=""	# Override kern.module_path. A ';'-delimited list. (you can add both paths for /boot/kernel/;/boot/GENERIC)

After this, you want to add your two paths that are being updated to "IgnorePaths" in /etc/freebsd-update.conf.
----

This is very much not ideal.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->cperciva 
Responsible-Changed-By: mat 
Responsible-Changed-When: Tue Jul 30 14:22:56 UTC 2013 
Responsible-Changed-Why:  
Assign the right reponsible person :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178247 

From: Mathieu Arnold <mat@FreeBSD.org>
To: bug-followup@FreeBSD.org, derek.buitenhuis@gmail.com
Cc:  
Subject: Re: amd64/178247: linker.hints erroneously included in
 9.1-RELEASE-p3 binary update
Date: Tue, 30 Jul 2013 16:40:42 +0200

 Hi,
 
 I can add that the upgrade to 9.1-RELEASE-p5 did the same for me, my
 resolution was something less definitive, rm'ing the
 /boot/kernel/linkers.hint, which I had to do again this time, hopefully, I
 remembered having to do it, so I did not have to log into hundreds of
 machines again to do it :-)
 
 -- 
 Mathieu Arnold

From: Jilles Tjoelker <jilles@stack.nl>
To: bug-followup@FreeBSD.org, derek.buitenhuis@gmail.com
Cc:  
Subject: Re: amd64/178247: linker.hints erroneously included in
 9.1-RELEASE-p3 binary update
Date: Mon, 7 Oct 2013 00:38:09 +0200

 In PR amd64/178247, you wrote:
 > [freebsd-update constantly updates /boot/kernel/linker.hints]
 
 The problem of the inconsistent /boot/kernel/linker.hints was reported
 in PR bin/182098 and was fixed in head (MFC pending). This will not be
 in 9.2-RELEASE though.
 
 -- 
 Jilles Tjoelker
>Unformatted:
