Skip to content

spec: rework filter-mods and mod-denylist (with filtermods.py)

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

Replace all the various shell scripts used for module filtering, which are a constant pain to keep updated.

Main issues with current scripts are:

  • filter-mods shell scripts don't take kmod dependencies into account. mod-denylist makes some checks, but it tends to move all kmods to modules-core. User has to fix any dependency issues manually.
  • package dependencies are not taken into account, e.g. modules depends on module-core
  • all filter-mods rules are hard rules - if there's any small conflict build fails and user has to resolve it. This has led to creation of 'overrides' variables (exceptions).
  • default bucket for kmods is modules-core, which leads to its bloat
  • arch overrides are getting stale/forgotten
  • config scattered across ~18 files (for fedora+eln), conflicting or duplicit requests in configs
  • hard to introduce new variants
  • inconsistency - some files list directories, some kmods with extension, some without extension

Main advantage of new script is that it takes kmod and package dependencies into account, so config doesn't require you to list every kmod (and its dependencies) explicitly. You can cover multiple kmods with a single rule. And finally the default bucket is 'modules' package.

mod-denylist is trimmed down to only generate blacklist files, and no longer does any kmod file moves or looks at dependencies.

rawhide scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=115787349 eln scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=115796084

More docs can be found at redhat/scripts/filtermods.adoc

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

Edited by Jan Stancek

Merge request reports