Issue
I have created rpm package from our project. In this package there are only binaries and scripts, the binary is dependent on specific kernel version (3.10.0-327.el7). So I added this into rpm spec file:
Requires: kernel = 3.10.0-327.el7
now it works fine most of the time, but if there is kernel-3.10.0-327.4.4.el7 (note the 4.4.el7) installed on the target machine and not kernel-3.10.0-327.el7 then yum does not install kernel-3.10.0-327.el7 but instead install kernel-debug-3.10.0-327.el7 and this essentially break my package.
Is there a way to specify in the rpm spec file that I don't want the kernel-devel but I want exactly the specific kernel installed as dependency?
Thanks a lot.
Solution
I know this is old but I just stumbled on the same issue. Hope it can be helpful to someone else. I was able to format the line as follows to resolve the issue.
Requires: kernel-%{_target_cpu} = 3.10.0-693.el7
(Different versions, same problem.) I found this solution in the template for the kmods v1 standard. It is documented here: https://rpmfusion.org/Packaging/KernelModules/Kmods1
Answered By - Aaron Copley Answer Checked By - Timothy Miller (WPSolving Admin)