Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2020 01:07:02 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359265 - in head: etc release/scripts
Message-ID:  <202003240107.02O172Al085879@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Tue Mar 24 01:07:01 2020
New Revision: 359265
URL: https://svnweb.freebsd.org/changeset/base/359265

Log:
  pkgbase: Move device.hints from the runtime to the bootloader package
  
  Also mark it as config file so if a user changes this file pkg will attempt
  to merge the new file upon an update.
  device.hints is neither related to runtime or loader but it make more sense
  to have it in loader in case some user delete /boot/ and wants to recreate it,
  now only two packages are required FreeBSD-bootloader and the kernel package.
  While here change where we override the package for files installed in /boot,
  this allow us to keep other tags (such as config).
  
  Reported by:	pizzamig
  Reviewed by:	bapt pizzamig emaste
  Differential Revision:	https://reviews.freebsd.org/D24159

Modified:
  head/etc/Makefile
  head/release/scripts/mtree-to-plist.awk

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile	Mon Mar 23 23:00:13 2020	(r359264)
+++ head/etc/Makefile	Tue Mar 24 01:07:01 2020	(r359265)
@@ -93,7 +93,7 @@ distribution:
 .if ${MK_BOOT} != "no"
 .if exists(${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints)
 	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
-	    -T "package=runtime" \
+	    -T "package=bootloader,config" \
 	    ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \
 	    ${DESTDIR}/boot/device.hints
 .endif

Modified: head/release/scripts/mtree-to-plist.awk
==============================================================================
--- head/release/scripts/mtree-to-plist.awk	Mon Mar 23 23:00:13 2020	(r359264)
+++ head/release/scripts/mtree-to-plist.awk	Tue Mar 24 01:07:01 2020	(r359265)
@@ -28,9 +28,6 @@
 			tags=tags""_kernconf
 		}
 	}
-	if ($1 ~ /^\/boot\//) {
-		tags="package=bootloader"
-	}
 	if (length(tags) == 0)
 		next
 	if (tags ~ /package=/) {
@@ -39,6 +36,8 @@
 		for (i in a) {
 			if (a[i] ~ /^package=/) {
 				pkgname=a[i]
+				if ($1 ~ /^\/boot\//)
+					pkgname="bootloader"
 				gsub(/package=/, "", pkgname)
 			} else if (a[i] == "config") {
 				type="config"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003240107.02O172Al085879>