All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC [v2]: Make kernel upgrades via dnf work like on Red Hat
@ 2021-09-29  5:33 Zoltan Boszormenyi
  2021-09-29  5:33 ` [PATCH v2 1/2] kernel.bbclass: Add runtime dependency to subpackages on main package Zoltan Boszormenyi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Zoltan Boszormenyi @ 2021-09-29  5:33 UTC (permalink / raw)
  To: openembedded-core
  Cc: Zoltán Böszörményi, Bruce Ashfield,
	Richard Purdie, Khem Raj

I have observed two issues when upgrading to kernel versions
successively.

One is that when installonly_limit is reached in dnf, only the
main kernel package was removed. Patch 1 fixes this by adding
extra RDEPENDS to the kernel subpackages on the main kernel package.
This circular dependency helps dnf to remove all subpackages.

dnf.conf settings "installonlypkgs", "installonly_limit" and
others are documented at https://dnf.readthedocs.io/en/latest/conf_ref.html

The second issue is that when the oldest kernel version is
removed by dnf, the /boot/bzImage symlink is also gone.

Fix this by using update-alternatives instead of hardcoded ln -s
and rm -f. This is configurable via a new variable.

This is only an RFC at this point, because
1) The first fix is only applied in the KERNEL_SPLIT_MODULES=0 case,
   it may need its own knob or applied unconditionally.

2) There's an extra issue I found while implementing the second patch:
   instead of using KERNEL_VERSION, I had to resort to using PV
   because the former is dynamically set via a python function
   and it changes its value at some point between build phases.
   AFAIK, there are kernel recipes out there using only the major
   version with two numbers in PV instead of the full version triplet.
   I can live with this as my kernel recipe uses the version triplet.

3) The new knob name for patch #2 is KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES.
   It is admittedly too chatty, it can be renamed if someone suggests
   a better name.

Please advise how to fix and make it final so these fixes can be
accepted into openembedded-core.

Best regards,
Zoltán Böszörményi



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-29 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29  5:33 RFC [v2]: Make kernel upgrades via dnf work like on Red Hat Zoltan Boszormenyi
2021-09-29  5:33 ` [PATCH v2 1/2] kernel.bbclass: Add runtime dependency to subpackages on main package Zoltan Boszormenyi
2021-09-29  5:33 ` [PATCH v2 2/2] kernel.bbclass: Allow using update-alternatives for the kernel image Zoltan Boszormenyi
2021-09-29 16:07   ` Bruce Ashfield
2021-09-29 17:46     ` Zoltan Boszormenyi
2021-09-29 16:06 ` RFC [v2]: Make kernel upgrades via dnf work like on Red Hat Bruce Ashfield
2021-09-29 17:29   ` Zoltan Boszormenyi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.