Bug#992491: Package acpi-call-dkms 1.1.0-6 believes that acpi is disabled on 5.10 kernel

2023-02-17 Thread Andreas Beckmann
Followup-For: Bug #992491
Control: tag -1 pending

In order to clean up all dkms packages for the upcoming release, I've
prepared a NMU fixing this issue and uploaded it to DELAYED/5.

The corresponding changes can again be found in

g...@salsa.debian.org:anbe/acpi-call.git branch dkms-updates

Andreas



Bug#992491: Package acpi-call-dkms 1.1.0-6 believes that acpi is disabled on 5.10 kernel

2022-07-10 Thread Andreas Beckmann

Control: tag -1 patch

On Thu, 19 Aug 2021 11:51:48 +0200 (CEST) p...@tutanota.de wrote:

The message comes from config file of the package 
(/usr/src/acpi-call-1.1.0/dkms.conf):
# Don't build module when ACPI is disabled
if ! grep -q "^CONFIG_ACPI=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; 
then
  echo "ACPI disabled in this kernel, not building module." >&2
  BUILD_EXCLUSIVE_ARCH="^do_not_build$"
fi


That code gets also executed for no longer installed kernels (because 
the dkms.conf gets loaded before the kernel gets ruled out - stupid idea 
of dkms). And removed kernels don't have a .config any longer and 
therefore also no CONFIG_ACPI=y ...



Andreas
From 353963e0d6422cb8e7f5101e20ba2c2243e01d14 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann 
Date: Sat, 18 Jun 2022 11:15:31 +0200
Subject: [PATCH] reduce noise about ACPI being disabled on no longer installed
 kernels

---
 debian/changelog | 3 +++
 debian/control   | 1 +
 debian/dkms  | 5 +
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a20a2db..f8c5fbb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ acpi-call (1.2.2-2) UNRELEASED; urgency=medium
 
   * Switch to dh-sequence-dkms.
   * Declare Testsuite: autopkgtest-pkg-dkms.
+  * Use experimental dkms feature BUILD_EXCLUSIVE_CONFIG="CONFIG_ACPI" and
+reduce noise about ACPI being disabled on no longer installed kernels.
+(Closes: #992491)
 
  -- Andreas Beckmann   Sun, 29 May 2022 15:56:07 +0200
 
diff --git a/debian/control b/debian/control
index 969446a..21eae18 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@ Priority: optional
 Maintainer: Raphaël Halimi 
 Build-Depends: debhelper-compat (= 13),
  dh-sequence-dkms,
+ dh-dkms (>= 3.0.3-4~),
 Standards-Version: 4.6.0
 Homepage: https://github.com/nix-community/acpi_call
 Vcs-Browser: https://salsa.debian.org/moonsweep/acpi-call
diff --git a/debian/dkms b/debian/dkms
index 9295372..2703ed7 100644
--- a/debian/dkms
+++ b/debian/dkms
@@ -7,7 +7,4 @@ DEST_MODULE_LOCATION[0]="/extra"
 AUTOINSTALL="yes"
 
 # Don't build module when ACPI is disabled
-if ! grep -q "^CONFIG_ACPI=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; then
-  echo "ACPI disabled in this kernel, not building module." >&2
-  BUILD_EXCLUSIVE_ARCH="^do_not_build$"
-fi
+BUILD_EXCLUSIVE_CONFIG="CONFIG_ACPI"
-- 
2.20.1



Bug#992491: Package acpi-call-dkms 1.1.0-6 believes that acpi is disabled on 5.10 kernel

2021-08-19 Thread pmn

Package: acpi-call-dkms
Version: 1.1.0-6

When trying to install the above version of acpi-call-dkms to a Bullseye 
installation (or, alternatively, to a Buster installation from Buster 
backports), installation fails as follows:

Setting up acpi-call-dkms (1.1.0-6) ...
Loading new acpi-call-1.1.0 DKMS files...
ACPI disabled in this kernel, not building module.

The message comes from config file of the package 
(/usr/src/acpi-call-1.1.0/dkms.conf):
# Don't build module when ACPI is disabled
if ! grep -q "^CONFIG_ACPI=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; 
then
  echo "ACPI disabled in this kernel, not building module." >&2
  BUILD_EXCLUSIVE_ARCH="^do_not_build$"
fi


However, the .config file (/usr/src/linux-headers-5.10.0-8-amd64/.config) 
contains the correct entry:

CONFIG_ACPI=y

and, as far as I'm able to judge, various acpi stuff works normally, so acpi is 
obviously enabled.

So why does the if clause fail? Does the variable $kernel_source_dir point to a 
wrong place???
Kernel:
Linux Bullseye 5.10.0-1-amd64 #1 SMP Debian 5.10.4-1 (2020-12-31) x86_64 
GNU/Linux

Hardware: Lenovo Thinkpad X1 5th gen.

With best regards,

pmn