coreos/rpm-ostree

Kernel change detection excludes "boutique" kernels

Opened this issue · 1 comments

In certain circumstances (e.g. rpm-ostree compose, upgrades) rpm-ostree attempts to detect if the kernel has changed. This happens in rpmostree_context_assemble by way of rpmte_is_kernel which uses a hard-coded set of "Provides" entries to test if a package is sufficiently kernel:

/* Determine if a txn element contains vmlinuz via provides.
* There's also some hacks for this in libdnf.
*/
static gboolean
rpmte_is_kernel (rpmte te)
{
const char *kernel_names[] = { "kernel", "kernel-core", "kernel-rt", "kernel-rt-core", NULL };
rpmds provides = rpmdsInit (rpmteDS (te, RPMTAG_PROVIDENAME));
while (rpmdsNext (provides) >= 0)
{
const char *provname = rpmdsN (provides);
if (g_strv_contains (kernel_names, provname))
return TRUE;
}
return FALSE;
}

For an internal use-case we're using Oracle Linux's UEK kernel which is installed via the kernel-uek or kernel-uek-core package and has the relevant "Provides" entries of kernel-uek and kernel-uek-core but lacks any of the entries in the list built in to rpmte_is_kernel. This results in upgrades not creating new boot entries.

Would it be possible to either add kernel-uek and/or kernel-uek-core to this list, or to make the list configurable in some way?

This relates to #4726 - I think we can in theory do things consistently that way.