packages: Remove the /boot hack from mtree-to-plist.awk

Currently, files in /boot (other than /boot/kernel) are assigned to the
bootloader package using a filename match in mtree-to-plist.awk.  This
causes some problems, most notably that debug info for userboot ends up
in the utilities-dbg package instead of bootloader-dbg.

Remove the path handling from mtree-to-plist and instead set PACKAGE
in the appropriate Makefiles to put these in the correct package.

While here, move userboot*.so from bootloader-dev to bootloader.

MFC after:	3 days
Reviewed by:	cperciva
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53179
This commit is contained in:
Lexi Winter 2025-10-25 18:18:46 +01:00
parent e93db9abc9
commit 842942be28
4 changed files with 8 additions and 6 deletions

View file

@ -40,12 +40,6 @@
for (i in a) {
if (a[i] ~ /^package=/) {
pkgname=a[i]
if ($1 ~ /^\/boot\//) {
if (kernel != "" && $1 ~ /^\/boot\/dtb\//)
pkgname="dtb"
else if ($1 !~ /^\/boot\/firmware\//)
pkgname="bootloader"
}
gsub(/package=/, "", pkgname)
} else if (a[i] == "config") {
type="config"

View file

@ -1,5 +1,7 @@
SUBDIR_PARALLEL= yes
PACKAGE= bootloader
# Firmware may not be able to handle branch protection failures
MK_BRANCH_PROTECTION= no

View file

@ -1 +1,5 @@
.include "../Makefile.inc"
# userboot.so should be installed in the base bootloader package,
# not bootloader-dev.
NO_DEV_PACKAGE=

View file

@ -31,6 +31,8 @@
.include "dtb.build.mk"
PACKAGE?= dtb
.if !target(install) && !target(realinstall)
all: ${DTB} ${DTBO}
realinstall: _dtbinstall