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, othersDetails
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 69452 Build 66335: arc lint + arc unit
Event Timeline
Comment Actions
suggest using INSTKERNNAME for installkernel
(but don't provide an example, because the user should probably read the
manual before adding this option without understanding what it does.)
Comment Actions
but don't provide an example
Yes, this makes sense. Mainly I hope it's a useful hint either for someone to find the right section in the documentation, or as a reminder for someone who has read the documentation but doesn't recall the variable name.
D54291 should improve the logic here
I'll try to take a look at that too but probably will be after the break.