Purpose This page will eventually provide an “API Reference” for the macros used to build KMPs with the standard spec file on https://www.linux-foundation.org/en/Sample_KMP_spec_file . Process
Current Issues
Proposed Standard KMP Macros
Should evaluate to: Everything needed for “BuildRequires”.
SUSE needs to change kernel_module_package_buildreq to kernel_module_package_buildreqs and update “build” so that it can handle this macro. kernel_source() - Already Works on SUSE and Red Hat Should evaluate to: Directory containing top-level kernel Makefile (used in “make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor”) _kermoddir Should evaluate to: Directory for installed modules. I.e., SUSE would evaluate to “updates”, Red Hat would evaluate to “updates/%name”.
Suggested macro for SUSE to add to /usr/lib/rpm/macros:
%_kermoddir(n:) %{expand:%(echo "updates")}
Suggested macro for Red Hat to add to /usr/lib/rpm/redhat/macros:
%_kermoddir(n:) %{expand:%( \ EXTRADIR=%{-n*} \ echo "updates/$EXTRADIR")}
kernel_module_package TBD