Add new feature BUILD_EXCLUSIVE_CONFIG to jammy as well

Bug #2012612 reported by Roxana Nicolescu
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[SRU Justification]

Impact:
Some dkms modules (like evdi-dkms) have this rule BUILD_EXCLUSIVE_CONFIG which prevent it from building if a specific configuration is enabled/disabled.
This feature was released for kinetic but not for jammy.
This backports the patch to jammy as well.

[racb] This feature is required as the simplest way to deal with some of the HWE DKMS fixes needed in Jammy such as in bug 2012412.

Fix:
Backported BUILD_EXCLUSIVE_CONFIG.patch from kinetic.
In order to be applied, I had to slightly modify the first junk. Other than that, it was a clean backport.

[Testcase]

$ sudo apt install linux-image-kvm linux-headers-kvm
$ sudo apt install evdi-dkms

Before the fix, it will fail with this error:
DKMS make.log for evdi-1.12.0+dfsg for kernel 5.15.0-1029-kvm (x86_64)
Thu Mar 23 10:10:14 UTC 2023
make: Entering directory '/usr/src/linux-headers-5.15.0-1029-kvm'
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_platform_drv.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_platform_dev.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_sysfs.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_modeset.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_connector.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_encoder.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_drm_drv.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_fb.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_gem.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_painter.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_params.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_cursor.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_debug.o
  CC [M] /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.o
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c: In function ‘evdi_i2c_add’:
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c:49:16: error: implicit declaration of function ‘i2c_add_adapter’; did you mean ‘i2c_verify_adapter’? [-Werror=implicit-function-declaration]
   49 | return i2c_add_adapter(adapter);
      | ^~~~~~~~~~~~~~~
      | i2c_verify_adapter
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c: In function ‘evdi_i2c_remove’:
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c:54:9: error: implicit declaration of function ‘i2c_del_adapter’; did you mean ‘i2c_verify_adapter’? [-Werror=implicit-function-declaration]
   54 | i2c_del_adapter(adapter);
      | ^~~~~~~~~~~~~~~
      | i2c_verify_adapter
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.o] Error 1
make: *** [Makefile:1906: /var/lib/dkms/evdi/1.12.0+dfsg/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-1029-kvm'

This fails because CONFIG_I2C=n for a KVM kernel derivative.
Even though evdi has this build rule: BUILD_EXCLUSIVE_CONFIG="CONFIG_I2C CONFIG_DRM"

After the fix, it will not build:
Building initial module for 5.15.0-1029-kvm
Error! The /var/lib/dkms/evdi/1.12.0+dfsg/5.15.0-1029-kvm/x86_64/dkms.conf for module evdi includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
The /var/lib/dkms/evdi/1.12.0+dfsg/5.15.0-1029-kvm/x86_64/dkms.conf for module evdi includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Skipped.

[Regression potential]

Very low, this is just a simple feature to prevent building a module.

Revision history for this message
Roxana Nicolescu (roxanan) wrote :
tags: added: sru-20230227 sru-20230320
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "dkms.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Simon Chopin (schopin)
Changed in dkms (Ubuntu):
status: New → Fix Released
Changed in dkms (Ubuntu Kinetic):
status: New → Fix Released
Simon Chopin (schopin)
description: updated
Revision history for this message
Simon Chopin (schopin) wrote :

Hi,

This seems reasonable to me, especially since it also seems like it would be needed to address xnox's review in bug 2012412. Uploaded, and unsubscribed ubuntu-sponsors.

I also took the liberty to modify a bit the testplan to make it obvious to bystanders (e.g. me) how to reproduce the issue.

Changed in dkms (Ubuntu Jammy):
status: New → In Progress
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Roxana, or anyone else affected,

Accepted dkms into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dkms/2.8.7-2ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

description: updated
Changed in dkms (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Roxana Nicolescu (roxanan) wrote :
Download full text (3.1 KiB)

Tested evdi-dkms module that already has this rule BUILD_EXCLUSIVE_KERNEL="CONFIG_I2C CONFIG_DRM" with
jammy:linux-kvm(5.15.0-1033-kvm) that has these configs disabled.

Scenario 1:
old dkms version(2.8.7-2ubuntu2.1) without BUILD_EXCLUSIVE_KERNEL. Expectation: build is done and it fails because of missing config options.
$ sudo apt install evdi-dkms
Building for 5.15.0-1033-kvm
Building initial module for 5.15.0-1033-kvm
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/evdi-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.15.0-1033-kvm (x86_64)
Consult /var/lib/dkms/evdi/1.12.0+dfsg/build/make.log for more information.
...
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c: In function ‘evdi_i2c_add’:
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c:49:16: error: implicit declaration of function ‘i2c_add_adapter’; did you mean ‘i2c_verify_adapter’? [-Werror=implicit-function-declaration]
   49 | return i2c_add_adapter(adapter);
      | ^~~~~~~~~~~~~~~
      | i2c_verify_adapter
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c: In function ‘evdi_i2c_remove’:
/var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.c:54:9: error: implicit declaration of function ‘i2c_del_adapter’; did you mean ‘i2c_verify_adapter’? [-Werror=implicit-function-declaration]
   54 | i2c_del_adapter(adapter);
      | ^~~~~~~~~~~~~~~
      | i2c_verify_adapter
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/evdi/1.12.0+dfsg/build/evdi_i2c.o] Error 1
make: *** [Makefile:1907: /var/lib/dkms/evdi/1.12.0+dfsg/build] Error 2

Scenario 2:
new dkms version(2.8.7-2ubuntu2.2) with BUILD_EXCLUSIVE_KERNEL. Expectation: build is skipped because of missing config options:
$ uname -a
Linux jammy-kvm 5.15.0-1033-kvm #38-Ubuntu SMP Fri Apr 21 17:30:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ sudo apt install evdi-dkms
Loading new evdi-1.12.0+dfsg DKMS files...
Building for 5.15.0-1033-kvm
Building initial module for 5.15.0-1033-kvm
Error! The /var/lib/dkms/evdi/1.12.0+dfsg/5.15.0-1033-kvm/x86_64/dkms.conf for module evdi includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
The /var/lib/dkms/evdi/1.12.0+dfsg/5.15.0-1033-kvm/x86_64/dkms.conf for module evdi includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Skipped.

This new package works as...

Read more...

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (dkms/2.8.7-2ubuntu2.2)

All autopkgtests for the newly accepted dkms (2.8.7-2ubuntu2.2) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

openafs/1.8.8.1-3ubuntu2~22.04.1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#dkms

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 2.8.7-2ubuntu2.2

---------------
dkms (2.8.7-2ubuntu2.2) jammy; urgency=medium

  * Add new feature BUILD_EXCLUSIVE_CONFIG="CONFIG_FOO !CONFIG_BAR".
    Patch imported from kinetic (LP: #2012612)

 -- Roxana Nicolescu <email address hidden> Thu, 23 Mar 2023 09:47:36 +0000

Changed in dkms (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for dkms has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.