xtrx-dkms module should not try to build when CONFIG_PPS is disabled

Bug #2012412 reported by Roxana Nicolescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xtrx-dkms (Ubuntu)
Expired
Undecided
Unassigned
Jammy
Expired
Undecided
Unassigned

Bug Description

SRU justification:

[Impact]

This is encountered on linux kernel derivatives with fewer configuration options enabled.
First time seen on jammy:linux-kvm-1029.

During build, it fails with the following error:
...
make -j1 KERNELRELEASE=5.15.0-1030-kvm -C /lib/modules/5.15.0-1030-kvm/build M=/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.0-1030-kvm (x86_64)
Consult /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/make.log for more information.
E: xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1 failed to build for 5.15.0-1030-kvm
========== /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/make.log ==========
DKMS make.log for xtrx-0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1 for kernel 5.15.0-1030-kvm (x86_64)
Thu Mar 9 00:04:53 UTC 2023
make: Entering directory '/usr/src/linux-headers-5.15.0-1030-kvm'
  CC [M] /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/xtrx.o
  MODPOST /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/Module.symvers
ERROR: modpost: "pps_register_source" [/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/xtrx.ko] undefined!
ERROR: modpost: "pps_event" [/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/xtrx.ko] undefined!
ERROR: modpost: "pps_unregister_source" [/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/xtrx.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:133: /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/Module.symvers] Error 1
make[1]: *** Deleting file '/var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.1/build/Module.symvers'
make: *** [Makefile:1821: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-1030-kvm

because CONFIG_PPS=n

[Fix]
Add a rule to avoid building xtrx-dkms when CONFIG_PPS=n

[Test Plan]
Install a new version of jammy:linux-kvm (1029 for example).
apt install xtrx-dkms will fail as described above.
After the fix, it will not be built at all.

Once the package is in proposed, a new adt is triggered against proposed for jammy:linux-kvm.

[Where problems could occur]
Low possibility of new issues.

[Note]
This fix is not scalable in the sense that if configuration name changes, the module has to be changed as well.

tags: added: sru-20230227
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

Proposed fix is attached.

I put the rule in debian/dkms file, not in dkms.conf. dkms.conf is overridden by dkms file I noticed and the change has no affect.

tested on linux-kvm-1029

ubuntu@jammy-kvm:~/xtrx$ sudo dpkg -i xtrx-dkms_0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2_all.deb
(Reading database ... 142334 files and directories currently installed.)
Preparing to unpack xtrx-dkms_0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2_all.deb ...
Deleting module xtrx-0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2 completely from the DKMS tree.
Unpacking xtrx-dkms (0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2) over (0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2) ...
Setting up xtrx-dkms (0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2) ...
Loading new xtrx-0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2 DKMS files...
Building for 5.15.0-1029-kvm
Building initial module for 5.15.0-1029-kvm
Error! The /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3ubuntu1~22.04.2/5.15.0-1029-kvm/x86_64/dkms.conf for module xtrx includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.
Skipped.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "xtrx.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
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

this patch is incorrect.

BUILD_EXCLUSIVE_KERNEL greps on kernel abi version / stamp.

I think you want to use BUILD_EXCLUSIVE_CONFIG option here instead, which is a patch applied in ubuntu/debian & upstream.

We had to fix this up somewhere else already, so it seems like a persistent copy & past bug from the patches prepared around that time. Please fix this up.

Revision history for this message
Simon Chopin (schopin) wrote :

Hi,
Marking this as Incomplete until the patch worked on to be in an uploadable state. Unless the Kernel team would like to handle this internally?

Changed in xtrx-dkms (Ubuntu Jammy):
status: New → Incomplete
Changed in xtrx-dkms (Ubuntu):
status: New → Incomplete
Revision history for this message
Benjamin Drung (bdrung) wrote :

I unsubscribed ~ubuntu-sponsors. Please resubscribe ~ubuntu-sponsors once the patch is ready for upload.

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

[Expired for xtrx-dkms (Ubuntu) because there has been no activity for 60 days.]

Changed in xtrx-dkms (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xtrx-dkms (Ubuntu Jammy) because there has been no activity for 60 days.]

Changed in xtrx-dkms (Ubuntu Jammy):
status: Incomplete → Expired
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.