Page MenuHomeFreeBSD

Makefile.inc1: Skip pkgbase installkernel check with INSTKERNNAME
AbandonedPublic

Authored by emaste on Dec 10 2025, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 18, 11:07 AM
Unknown Object (File)
Fri, Jan 16, 4:24 AM
Unknown Object (File)
Tue, Jan 13, 6:09 PM
Unknown Object (File)
Sat, Jan 10, 5:28 AM
Unknown Object (File)
Sat, Jan 10, 4:47 AM
Unknown Object (File)
Fri, Jan 9, 7:43 PM
Unknown Object (File)
Thu, Jan 8, 5:18 PM
Unknown Object (File)
Thu, Jan 8, 12:42 PM
Subscribers
None

Details

Reviewers
ivy
christos
Summary
Specifying a non-default kernel name with INSTKERNNAME means that the
user will not conflict with a pkgbase kernel, so skip the check.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

Specifying a non-default kernel name with INSTKERNNAME means that the
user will not conflict with a pkgbase kernel, so skip the check.

i'm fairly sure this isn't true: what stops me providing an INSTKERNNAME that matches a pkgbase kernel?

It's not guaranteed to be true in general, but this is just intended prevent foot-shooting in the default/common case, where DESTDIR and INSTKERNNAME are not set and default to / and kernel, respectively.

This revision is now accepted and ready to land.Dec 15 2025, 1:39 PM

but this suggests it's safe to use make installkernel if you're using INSTKERNNAME, which isn't true. it may be true, but it also may be safe to use it without INSTKERNNAME set at all - it depends on what you set it to and what pkgbase kernels you have installed.

i would rather add a variable to disable this check (other than DESTDIR), like DISABLE_INSTALLKERNEL_PKG_CHECK, which people could put in /etc/make.conf if they're sure they understand the implications of doing this. alternatively, perhaps we could check if /boot/${INSTKERNNAME} was installed by pkg.

In D54164#1239214, @ivy wrote:

but this suggests it's safe to use make installkernel if you're using INSTKERNNAME, which isn't true. it may be true, but it also may be safe to use it without INSTKERNNAME set at all - it depends on what you set it to and what pkgbase kernels you have installed.

i would rather add a variable to disable this check (other than DESTDIR), like DISABLE_INSTALLKERNEL_PKG_CHECK, which people could put in /etc/make.conf if they're sure they understand the implications of doing this. alternatively, perhaps we could check if /boot/${INSTKERNNAME} was installed by pkg.

I actually think the latter is a good idea, and probably more robust.

I actually think the latter is a good idea, and probably more robust.

D54346