[01/13] debianize: services are named after BPN not PN

Message ID 20261002144936.246628-2-felix.moessbauer@siemens.com
State New
Headers show
Series More build time reductions | expand

Commit Message

Felix Moessbauer Oct. 2, 2026, 2:49 p.m. UTC
In 09f4698a logic was added to automatically copy triggers and service
files into the debian folder so that they are picked up by debhelper.
However, the services were only looked up under their
${PN}.{service,trigger}, which breaks on variant builds like -native and
-compat.

As the package variant suffix is a bitbake only thing, it must not end
up in the names of the services (neither on lookup, nor on copy-in),
as the debian package is named ${BPN} and the entries must match.

Along that, we fix an incorrect tabs vs. spaces indentation.

Fixes: 09f4698a ("debianize: add support for systemd unit files")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 .../recipes-bsp/optee-examples/files/debian/control.tmpl    | 2 +-
 meta/classes-recipe/debianize.bbclass                       | 6 +++---
 meta/recipes-bsp/optee-client/files/debian/control.tmpl     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl b/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
index 7533c34a..8b8e4eef 100644
--- a/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
+++ b/meta-isar/recipes-bsp/optee-examples/files/debian/control.tmpl
@@ -1,4 +1,4 @@ 
-Source: ${PN}
+Source: ${BPN}
 Section: admin
 Priority: optional
 Standards-Version: ${DEBIAN_STANDARDS_VERSION}
diff --git a/meta/classes-recipe/debianize.bbclass b/meta/classes-recipe/debianize.bbclass
index 6f6141b0..e483a52d 100644
--- a/meta/classes-recipe/debianize.bbclass
+++ b/meta/classes-recipe/debianize.bbclass
@@ -206,10 +206,10 @@  deb_debianize() {
 	for f in ${dh_installdeb_handled} \
 			 ${dh_installsystemd_handled} \
 			 ${dh_installsystemduser_handled} \
-	         ${dh_installtmpfiles_handled}
+			 ${dh_installtmpfiles_handled}
 	do
-		if [ -f ${WORKDIR}/${PN}${f} ]; then
-			install -v -m 644 ${WORKDIR}/${PN}${f} ${S}/debian/
+		if [ -f ${WORKDIR}/${BPN}${f} ]; then
+			install -v -m 644 ${WORKDIR}/${BPN}${f} ${S}/debian/
 		fi
 	done
 }
diff --git a/meta/recipes-bsp/optee-client/files/debian/control.tmpl b/meta/recipes-bsp/optee-client/files/debian/control.tmpl
index e3864407..0887c358 100644
--- a/meta/recipes-bsp/optee-client/files/debian/control.tmpl
+++ b/meta/recipes-bsp/optee-client/files/debian/control.tmpl
@@ -1,4 +1,4 @@ 
-Source: ${PN}
+Source: ${BPN}
 Priority: optional
 Maintainer: Unknown maintainer <unknown@example.com>
 Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}),