Skip to content

Draft: dynamically generate rh_messages.c

Ghost User requested to merge (removed):rhel-depbuilds into main

This is only a draft. Treat as an upstream RFC, please provide feedback as appropriate.

Very rough but it dynamically generates rh_messages.c, preserves rh_messages.c when make clean is issued and includes rh_messages.c into the kernel tarball generated by make dist-sources. You can even build it individually by doing make kernel/rh_messages.o and the file will generate and compile.

As stated it is rather rough. Lots of cleanup to do just wanted to get something out to see if this kind of process is even acceptable before I go spending a lot of effort on it.

The idea would be we add the generator script into the kernel tree under the redhat directory as I assume this code will not change a lot.

Pros:

  • latest set of deprecations is always included into a kernel build
  • reduces management overhead and commit churn if the csv changes often

Cons:

  • no real ability to review what gets built unless you use the source rpm target
  • brew builds using a commit id will need internet access to generate rh_messages.c
  • currently a developer has to manually remove rh_messages.c to cause a rebuild of the file

An alternative is we just commit periodically a generated rh_messages.c into each kernel tree. Similar to how we update the linux-firmware package. This approach would be good if we expect a low volume of changes in the csv.

Pros:

  • what is built into the kernel is committed in the kernel tree
  • works for brew builds using git commit ids

Cons:

  • increases maintainer overhead; there needs to exist some method of periodically comparing what is currently committed to LTS trees and the latest generated file
  • increases maintainer overhead; some sort of sync algorithm needs to be selected.

Depends: !2241 (closed) Upstream: RHEL Only Signed-off-by: Jonathan Toppins jtoppins@redhat.com

Edited by Ghost User

Merge request reports