Skip to content

Draft: WIP: redhat/kernel.spec.template: use python snippets

Jan Stancek requested to merge jstancek/kernel-ark:py_snippets_in_spec into os-build

DO NOT MERGE

Trying out the idea of replacing as many places which need to list variant macros with python snippets. Goal is to minimize number of locations that new variants needs to touch.

$ grep -e with_realtime  ./redhat/kernel.spec.template | wc -l
10
$ grep -e with_realtime  /tmp/kernel.spec.orig | wc -l
22

Compared to !2747 (closed) this is more user-friendly for debugging, and it can also generate pretty comments inside the spec file. To try it out:

$ make -C redhat setup-source
$ vim redhat/rpm/SOURCES/kernel.spec
# and look for "%dnl py:" lines

Signed-off-by: Jan Stancek jstancek@redhat.com

Merge request reports