aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2026-01-05 17:39:47 +0000
committerLexi Winter <ivy@FreeBSD.org>2026-02-22 00:57:41 +0000
commit235cb4b4970f8591d6c911f5ca64a3e62e19b161 (patch)
tree767f2a56348d134d7ef0795aba7dc416b7e95e1e /sys
parent03c9ad37b497bd59dc3fb9ec86310b95e5d1abbe (diff)
Makefile.inc1: Allow safe installkernel with pkgbase
Commit 74a6bb524e5b added a check to install{world,kernel} to avoid people accidentally running this on pkgbase systems and leaving their system broken. This had two issues: (1) The warning was not sufficiently scary, leading people to think this was safe to do as long as they set DESTDIR=/. (2) The installkernel check was too strict, and prevented installing kernels that don't conflict with packaged kernels. Fix (1) by rewording the warning to be scarier, and while here, add two new variables (ALLOW_PKGBASE_INSTALL{WORLD,KERNEL}) which could be set in /etc/make.conf for people who want to break their systems by default. Fix (2) by improving the installkernel check to see if the kernel(s) we're actually installing are packaged. This means a new kernel can be installed to /boot/kernel as long as there's no packaged kernel installed there. This check understands INSTKERNNAME, so if there is a packaged kernel in /boot/kernel, the new kernel can still be installed using INSTKERNNAME=testkernel (or whatever). MFC after: 2 weeks Reported by: christos, jhb, others Reviewed by: emaste, christos (previous version) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D54346 (cherry picked from commit 89c017d068704c2bc3da9cb22f43da17a9ce8c24)
Diffstat (limited to 'sys')
0 files changed, 0 insertions, 0 deletions