Subject: lintian: dkms updates

From: Andreas Beckmann <[email-masked]>
Date: Thu, 23 Jun 2022 10:58:13 +0200

Package: lintian
Version: 2.115.1
Severity: normal

Hi,

I recently split a dh-dkms package from the dkms binary package.
Please update lintian's suggestions for the respective B-D:

for 'dh --with dkms', there should be a B-D: dh-dkms (instead of
B-D: dkms)

for 'dh_dkms', there should be a B-D: dh-dkms (instead of B-D: dkms)
or (preferably) B-D: dh-sequence-dkms (lintian already knows about that).

And the I'd like to have all *-dkms binary packages to have
  Testsuite: autopkgtest-pkg-dkms
on their source package. Not sure how to model that in lintian.
Either on the source package: B-D: dh-dkms | B-D: dh-sequence-dkms
or on the binary package relationships: Depends: dkms
or on the binary package content: /usr/src/*/dkms.conf

Andreas

---

From: Axel Beckert <[email-masked]>
Date: Thu, 23 Jun 2022 12:12:04 +0200

Control: tag -1 + confirmed

Hi Andreas,

> Version: 2.115.1
[…]
> I recently split a dh-dkms package from the dkms binary package.

I'm aware of that. It is partially already supprted in Lintian since
commit cfafa44256133c458011e3f13440de6538dd6045 which is part of the
2.115.0 release already:

https://salsa.debian.org/lintian/lintian/-/commit/cfafa44256133c458011e3f13440de6538dd6045#78b2b372e63b40b17bfc9c37d820cbf5b2ebb24c_103_108

I'm just not sure if such a hard cut is a good way to actually handle
the old and new variant for a transition period. Then again, lintian
is probably the last place which should care about old packages. :-)

> B-D: dkms) for 'dh_dkms', there should be a B-D: dh-dkms (instead of
> B-D: dkms)

I thought that's already done by the change mentioned above, but then
again a quick git grep also found this as of the current git HEAD:

lib/Lintian/Check/Debhelper.pm:    dh_dkms => 'dkms:any | dh-sequence-dkms:any',

> or (preferably) B-D: dh-sequence-dkms (lintian already knows about that).

Looking for that is how I found the line above. :-)

> on their source package.

That's on my TODO list to figure out how it actually works for my own
dkms-based package. :-)

> Not sure how to model that in lintian.

I think I can figure out. :-)

> or on the binary package content: /usr/src/*/dkms.conf

Indeed, package name matches /-dkms$/ is probably not enough.

Will think about it.

Thanks!

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email-masked]>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

---

From: Andreas Beckmann <[email-masked]>
Date: Wed, 04 Jan 2023 11:02:51 +0100

Followup-For: Bug #1013417

Hi,

attached is a patch that fixes the lintian warning about a missing
dh-dkms dependency for using dh_dkms.

I'm not closing this bug since it does not address the
autopkgtest-pkg-dkms recommendation.

Andreas
>From f110d476826683d29c845828d37ae3d1de1ff9f3 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <[email-masked]>
Date: Wed, 4 Jan 2023 10:42:22 +0100
Subject: [PATCH] dh_dkms is now provided by dh-dkms instead of dkms

---
 debian/changelog               | 4 ++--
 lib/Lintian/Check/Debhelper.pm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 181f36586..f52953903 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -760,8 +760,8 @@ lintian (2.105.0) unstable; urgency=medium
   * Flag duplicates in d/py3dist-overrides. (Closes: #980987)
   * Flag PyPI homepages in source control files. (Closes: #981932)
   * Flag Rubygem homepages in source control files. (Closes: #981935)
-  * Accept the virtual package dh-sequence-dkms as B-D for 'dh
-    --with-dkms'. (Closes: #982834)
+  * Accept the virtual package dh-sequence-dkms as B-D for
+    'dh --with dkms'. (Closes: #982834)
   * Drop reference to archive keyring from package-installs-apt-sources.
     (Closes: #983598)
   * Read error message from Config::Tiny via the advertised mechanism.
diff --git a/lib/Lintian/Check/Debhelper.pm b/lib/Lintian/Check/Debhelper.pm
index 691c18362..62aec5252 100644
--- a/lib/Lintian/Check/Debhelper.pm
+++ b/lib/Lintian/Check/Debhelper.pm
@@ -81,7 +81,7 @@ my %DH_COMMAND_MANUAL_PREREQUISITES = (
 'dh-autoreconf:any | debhelper:any (>= 9.20160403~) | debhelper-compat:any',
     dh_autoreconf =>
 'dh-autoreconf:any | debhelper:any (>= 9.20160403~) | debhelper-compat:any',
-    dh_dkms => 'dkms:any | dh-sequence-dkms:any',
+    dh_dkms => 'dh-dkms:any | dh-sequence-dkms:any',
     dh_girepository => 'gobject-introspection:any | dh-sequence-gir:any',
     dh_gnome => 'gnome-pkg-tools:any | dh-sequence-gnome:any',
     dh_gnome_clean => 'gnome-pkg-tools:any | dh-sequence-gnome:any',
-- 
2.20.1

---

From: Axel Beckert <[email-masked]>
Date: Sun, 5 Feb 2023 12:00:26 +0100

Hi Andreas,

> dh-dkms dependency for using dh_dkms.

Applied without the (IMHO bogus) debian/changelog changes as
https://salsa.debian.org/lintian/lintian/-/commit/d50a732a00a7596d078a9e8f6919cb6362ca0067

> autopkgtest-pkg-dkms recommendation.

Ok. I've allowed myself to nevertheless add a reference to this bug
report as "(See #1013417)" in a way that it will also show up in the
later generated debian/changelog entry.

		Regards, Axel