ticket to discuss bugs in ./redhat/scripts/mod/mod-denylist.sh and/or what it actually is supposed to do
Afaics ./redhat/scripts/mod/mod-denylist.sh is not doing what it's supposed to do; that leads to the module iforce.ko ending up in Fedora's kernel-modules-core package when in fact it afaics is meant to go into the kernel-modules-extras package. That is just one of the bugs around mod-denylist.sh I noticed, but let's start with that one, as something related to that behaviour is the reason why I looked into mod-denylist.sh in the first place.
Note the two "afaics" above: I have the strong feeling that I'm missing something obvious here, which makes me fail to understand what mod-denylist.sh is supposed to do. But I fail to see what I'm missing; I hope discussing things in this ticket can help me understand things so we can fix them. But back to the topic at hand.
I current think mod-denylist.sh among others is supposed to do what a comment the file outlines like this:
# Look through all of the modules, and throw any that have a dependency in
# our list into the list as well.
The script in redhat/kernel.spec.template among others (it's also used for mod-internal.list, but lets ignore this for simplicity) is used like this:
Source20: mod-denylist.sh
[…]
Source51: mod-extra.list.fedora
[…]
# Identify modules in the kernel-modules-extras package
%{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list)
My interpretation of all that is: mod-denylist.sh is meant to parse files like mod-extra.list.fedora (which becomes configs/mod-extra.list before the quoted "%{SOURCE20}…" call) and ensure that
- all the modules listed in that file
- all modules that depend on modules listed in that file
end up in the kernel-modules-extras package.
But that's not what it's doing when it notices modules that depend on a module listed in mod-extra.list.fedora. Take iforce.ko for example, which is listed in mod-extra.list.fedora. The script notices that iforce-serio.ko and iforce-usb.ko (neither of which are listed in mod-extra.list.fedora) depend on it and then mod-denylist.sh ignores all three of them -- and due to this all three modules end up in kernel-modules-core. That to me looks unwanted, as those are joystick drivers that I guess are not supposed to land there.
Something similar afaics happens with "mptsas" and related modules.
Furthermore, there are afaics 8 other modules listed in mod-extra.list.fedora that end up in the kernel-modules package: atm, ieee802154, l2tp_core, l2tp_ipnci, nfc, sctp, and wire