Skip to content

Commit

Permalink
Add BUILD_EXCLUSIVE_CONFIG to dkms.conf
Browse files Browse the repository at this point in the history
Since version 3.0.11 <dell/dkms#269>, dkms
supports the [`BUILD_EXCLUSIVE_CONFIG`] option in dkms.conf to specify
kernel configuration options which must be enabled in the targeted
kernel.  Add this option with `CONFIG_HID`, `CONFIG_INPUT_FF_MEMLESS`,
and `CONFIG_POWER_SUPPLY`, since xpadneo will fail to modpost if any of
these are disabled.  If a user installs a kernel where these options are
disabled, the module will not be built and a warning similar to the
following is printed:

    Warning: The /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696-dirty/6.8.0-rc2/x86_64/dkms.conf
    for module hid-xpadneo includes a BUILD_EXCLUSIVE directive
    which does not match this kernel/arch/config.
    This indicates that it should not be built.
    dkms autoinstall on 6.8.0-rc2/x86_64 was skipped for hid-xpadneo

Without this option, the module build would fail and the kernel package
would fail to install, leaving the user with a partially installed
kernel package (on Debian, at least).

[`BUILD_EXCLUSIVE_CONFIG`]: https://github.com/dell/dkms/blob/782bd07641b957012f9b8d621bf9b51f82bfc728/dkms.8.in#L688-L696

Signed-off-by: Kevin Locke <[email protected]>
  • Loading branch information
kevinoid authored and kakra committed Feb 11, 2024
1 parent ce4db84 commit 95637c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hid-xpadneo/dkms.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PACKAGE_VERSION="@DO_NOT_CHANGE@"
BUILT_MODULE_NAME[0]="hid-xpadneo"
BUILT_MODULE_LOCATION[0]="src"
DEST_MODULE_LOCATION[0]="/kernel/drivers/hid"
BUILD_EXCLUSIVE_CONFIG="CONFIG_HID CONFIG_INPUT_FF_MEMLESS CONFIG_POWER_SUPPLY"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/src VERSION=$PACKAGE_VERSION modules"
CLEAN="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/src clean"
AUTOINSTALL="Y"
Expand Down

0 comments on commit 95637c9

Please sign in to comment.