[PATCH] meta/recipes-kernel/linux/files: use debhelper-compat to generate compat file

67 views
Skip to first unread message

srinuv...@siemens.com

unread,
Aug 9, 2024, 2:52:07 AM8/9/24
to isar-...@googlegroups.com, jan.k...@siemens.com, Srinuvasan A
From: Srinuvasan A <srinuv...@siemens.com>

Now debhelper supports the versions debhelper-compat (= 9) till
debhelper-compat (= 13), hence set appropriate debian helper compatible version
in the debian/control file and remove the debian/compat file.

Signed-off-by: Srinuvasan A <srinuv...@siemens.com>
---
meta/recipes-kernel/linux/files/debian/compat | 1 -
meta/recipes-kernel/linux/files/debian/control.tmpl | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
delete mode 100644 meta/recipes-kernel/linux/files/debian/compat

diff --git a/meta/recipes-kernel/linux/files/debian/compat b/meta/recipes-kernel/linux/files/debian/compat
deleted file mode 100644
index f599e28b..00000000
--- a/meta/recipes-kernel/linux/files/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index 04ad0f4f..ae257b7c 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -2,7 +2,7 @@ Source: linux-${KERNEL_NAME_PROVIDED}
Section: kernel
Priority: optional
Maintainer: ${MAINTAINER}
-Build-Depends: bc, kmod, cpio, ${KBUILD_DEPENDS}
+Build-Depends: debhelper-compat (= 12), bc, kmod, cpio, ${KBUILD_DEPENDS}
Homepage: http://www.kernel.org/

Package: linux-image-${KERNEL_NAME_PROVIDED}
--
2.34.1

Jan Kiszka

unread,
Aug 9, 2024, 12:43:44 PM8/9/24
to srinuv...@siemens.com, isar-...@googlegroups.com
On 09.08.24 08:51, srinuv...@siemens.com wrote:
> From: Srinuvasan A <srinuv...@siemens.com>
>
> Now debhelper supports the versions debhelper-compat (= 9) till

What is "now" in this context? Which Debian releases are your referring
to? Keep in mind that we are still compiling down to buster with these
files. Doubt that this would still work...
Jan

--
Siemens AG, Technology
Linux Expert Center

Srinuvasan Arjunan

unread,
Aug 11, 2024, 10:20:15 AM8/11/24
to isar-users
On Friday, August 9, 2024 at 10:13:44 PM UTC+5:30 Jan Kiszka wrote:
On 09.08.24 08:51, srinuv...@siemens.com wrote:
> From: Srinuvasan A <srinuv...@siemens.com>
>
> Now debhelper supports the versions debhelper-compat (= 9) till

What is "now" in this context? Which Debian releases are your referring
to? Keep in mind that we are still compiling down to buster with these
files. Doubt that this would still work...

    yes am aware that one still we are supporting buster Debian release, i hope the default compatibility
    version for buster is 12, and already we had some discussion in the mailing list, please refer [1].

     Triggered the build for QEMU buster with this changes, it is getting passed, need to check any other real H/W buster build
      with compat 12 .

Uladzimir Bely

unread,
Aug 27, 2024, 11:45:37 AM8/27/24
to srinuv...@siemens.com, isar-...@googlegroups.com, jan.k...@siemens.com
Hello all.

The patch checked in CI and it passes OK, but it's not clear from a
discussion if it is worth applying.

--
Best regards,
Uladzimir.



Arjunan, Srinu

unread,
Aug 28, 2024, 1:05:01 AM8/28/24
to Uladzimir Bely, isar-...@googlegroups.com, Kiszka, Jan
Thanks Uladzimir, Will update the build status of real target ASAP from my end as well.
> http://www.k/
> ernel.org%2F&data=05%7C02%7Csrinuvasan.a%40siemens.com%7C7fa7950ce18d4
> 474a83408dcc6af4b00%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C63860
> 3703423305649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2lu
> MzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=iM4bLGTAYnfF1lOA
> %2FKpouvr3WOzgXjfLhwBxbomy%2BbM%3D&reserved=0

srinuv...@siemens.com

unread,
Sep 9, 2024, 1:51:14 AM9/9/24
to isar-...@googlegroups.com, jan.k...@siemens.com, ub...@ilbers.de, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

debhelper supports the versions debhelper-compat (= 9) till
debhelper-compat (= 13), hence set appropriate debian helper compatible version
in the debian/control file and remove the debian/compat file.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta/recipes-kernel/linux/files/debian/compat | 1 -
meta/recipes-kernel/linux/files/debian/control.tmpl | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
delete mode 100644 meta/recipes-kernel/linux/files/debian/compat

diff --git a/meta/recipes-kernel/linux/files/debian/compat b/meta/recipes-kernel/linux/files/debian/compat
deleted file mode 100644
index f599e28b..00000000
--- a/meta/recipes-kernel/linux/files/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index 04ad0f4f..f4273ea9 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -2,7 +2,7 @@ Source: linux-${KERNEL_NAME_PROVIDED}
Section: kernel
Priority: optional
Maintainer: ${MAINTAINER}
-Build-Depends: bc, kmod, cpio, ${KBUILD_DEPENDS}
+Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), bc, kmod, cpio, ${KBUILD_DEPENDS}
Homepage: http://www.kernel.org/

Package: linux-image-${KERNEL_NAME_PROVIDED}
--
2.39.2

Arjunan, Srinu

unread,
Sep 9, 2024, 1:53:20 AM9/9/24
to isar-...@googlegroups.com, Kiszka, Jan, ub...@ilbers.de
Hi All,

With this change, tested few buster and bullseye and bookworm builds working fine, thanks
+${KBUILD_DEPENDS}

Uladzimir Bely

unread,
Sep 11, 2024, 7:29:04 AM9/11/24
to srinuv...@siemens.com, isar-...@googlegroups.com
This is not in TEMPLATE_VARS, so build fails with error like:

```
Filtered Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), bc,
kmod, cpio, build-essential:amd64, libelf-dev:amd64, libncurses-
dev:amd64, libssl-dev:amd64, bison, dwarves, flex, git, rsync, build-
essential:amd64, fakeroot:amd64, crossbuild-essential-armhf:amd64,
libc-dev:armhf, libstdc++-dev:armhf

dpkg-deb: error: parsing file '/<<RESOLVERDIR>>/sbuild-build-depends-
main-dummy/DEBIAN/control' near line 4 package 'sbuild-build-depends-
main-dummy:armhf':

'Depends' field, reference to 'debhelper-compat': version
'${DEBIAN_COMPAT}': version number does not start with digit
```

> cpio, ${KBUILD_DEPENDS}
>  Homepage: http://www.kernel.org/
>  
>  Package: linux-image-${KERNEL_NAME_PROVIDED}

--
Best regards,
Uladzimir.

srinuv...@siemens.com

unread,
Dec 16, 2024, 6:12:52 AM12/16/24
to isar-...@googlegroups.com, ub...@ilbers.de, srinuvasan
From: srinuvasan <srinuv...@siemens.com>

debhelper supports the versions debhelper-compat (= 9) till debhelper-compat (= 13),
hence set appropriate debian helper compatible version in the debian/control file and remove the debian/compat file.

Signed-off-by: srinuvasan <srinuv...@siemens.com>
---
meta/recipes-kernel/linux-module/files/debian/compat | 1 -
meta/recipes-kernel/linux-module/files/debian/control.tmpl | 2 +-
meta/recipes-kernel/linux-module/module.inc | 3 ++-
meta/recipes-kernel/linux/files/debian/compat | 1 -
meta/recipes-kernel/linux/files/debian/control.tmpl | 2 +-
meta/recipes-kernel/linux/linux-custom.inc | 1 +
6 files changed, 5 insertions(+), 5 deletions(-)
delete mode 100644 meta/recipes-kernel/linux-module/files/debian/compat
delete mode 100644 meta/recipes-kernel/linux/files/debian/compat

diff --git a/meta/recipes-kernel/linux-module/files/debian/compat b/meta/recipes-kernel/linux-module/files/debian/compat
deleted file mode 100644
index f599e28b..00000000
--- a/meta/recipes-kernel/linux-module/files/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/meta/recipes-kernel/linux-module/files/debian/control.tmpl b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
index 67b08244..3ec419f6 100644
--- a/meta/recipes-kernel/linux-module/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux-module/files/debian/control.tmpl
@@ -2,7 +2,7 @@ Source: ${PN}
Section: kernel
Priority: optional
Standards-Version: 3.9.6
-Build-Depends: ${DEBIAN_BUILD_DEPENDS}
+Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
Maintainer: ISAR project <isar-...@googlegroups.com>

Package: ${PN}
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 1734816b..3e8e5e7a 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -57,7 +57,8 @@ TEMPLATE_VARS += " \
SIGNATURE_KEYFILE \
SIGNATURE_CERTFILE \
SIGNATURE_HASHFN \
- PN"
+ PN \
+ DEBIAN_COMPAT"

# Add custom cflags to the kernel build
KCFLAGS ?= "-fdebug-prefix-map=${CURDIR}=. -fmacro-prefix-map=${CURDIR}=."
diff --git a/meta/recipes-kernel/linux/files/debian/compat b/meta/recipes-kernel/linux/files/debian/compat
deleted file mode 100644
index f599e28b..00000000
--- a/meta/recipes-kernel/linux/files/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index 04ad0f4f..f4273ea9 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -2,7 +2,7 @@ Source: linux-${KERNEL_NAME_PROVIDED}
Section: kernel
Priority: optional
Maintainer: ${MAINTAINER}
-Build-Depends: bc, kmod, cpio, ${KBUILD_DEPENDS}
+Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), bc, kmod, cpio, ${KBUILD_DEPENDS}
Homepage: http://www.kernel.org/

Package: linux-image-${KERNEL_NAME_PROVIDED}
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index bcdacaa9..e825d29b 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -89,6 +89,7 @@ TEMPLATE_VARS += " \
HEADERS_INSTALL_EXTRA \
ISAR_ENABLE_COMPAT_ARCH \
COMPAT_DISTRO_ARCH \
+ DEBIAN_COMPAT \
"

inherit dpkg
--
2.39.5

Srinuvasan Arjunan

unread,
Dec 16, 2024, 6:15:07 AM12/16/24
to isar-users
Apologies for the delayed response, additionally added compat for linux-modules too, thanks!  

Uladzimir Bely

unread,
Dec 20, 2024, 2:48:41 AM12/20/24
to srinuv...@siemens.com, isar-...@googlegroups.com
Applied to next, thanks.

--
Best regards,
Uladzimir.



Jan Kiszka

unread,
Jan 31, 2025, 7:14:20 AMJan 31
to srinuv...@siemens.com, isar-...@googlegroups.com, ub...@ilbers.de
I /suspect/ (no time right now to dig into details) that this causes
some regression with buster builds. I've just bumped isar in
isar-cip-core, and this error shows up:

https://gitlab.com/cip-project/cip-core/isar-cip-core/-/jobs/9004463238

Does it ring some bell? Maybe this only reveals a sleeping issue, and
actually use the "right" compat version now, but that would still be a
regression.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

MOESSBAUER, Felix

unread,
Jan 31, 2025, 7:31:58 AMJan 31
to Bezdeka, Florian, isar-...@googlegroups.com, Kiszka, Jan, Arjunan, Srinu, ub...@ilbers.de
Hi, I remember Florian Bezdeka reported on issues w.r.t. compat level
changes, but on bookworm:arm64 [1].

What I noticed is that this patch changes the compat level: Prior to
the patch we had debian/compat = 10, now we use compat level 12 for
buster. By that we now automatically enable dh_dwz (which was disabled
before 12). For details, see [2]. We now basically have the following
options (choose at least one):

- set the compat-level for the linux-module to 10 on buster
- make the build compatible with dh_dwz
- disable dh_dwz in the rules files or via DEB_BUILD_OPTIONS=nostrip on
buster (which might also have side effects)

[1] https://groups.google.com/g/isar-users/c/6obXqgY0CC4/m/k6EU-N69AwAJ
[2]
https://manpages.debian.org/testing/debhelper/debhelper-compat-upgrade-checklist.7.en.html

Felix

>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
>

--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany


Jan Kiszka

unread,
Jan 31, 2025, 7:39:44 AMJan 31
to Moessbauer, Felix (FT RPD CED OES-DE), Bezdeka, Florian (FT RPD CED OES-DE), isar-...@googlegroups.com, Arjunan, Srinu (FT FDS CES LX PBU 2), ub...@ilbers.de
I tend to prefer this option, given that buster is already LTS, and we
don't want to bring in other, maybe more subtle surprises.

Jan
Reply all
Reply to author
Forward
0 new messages