[5/7] meta: optee-client: Update debianization to allow compat level increase

Message ID 20250314-flo-remove-compat-files-v1-5-fab2d8b18266@siemens.com
State Accepted, archived
Headers show
Series Replace debian/compat files by a build dependency to debhelper-compat | expand

Commit Message

Florian Bezdeka March 14, 2025, 7:33 p.m. UTC
The existing debianization was quite minimalistic to get tee-supplicant
up and running. A couple of packaging failures came to light after the
debian/compat had been lifted to 13:

| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libckteec.so.0 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libckteec.so.0.1 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libckteec.so.0.1.0 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libseteec.so.0 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libseteec.so.0.1 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libseteec.so.0.1.0 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libteeacl.so.0 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libteeacl.so.0.1 exists in debian/tmp but is not installed to anywhere
| dh_missing: warning: usr/lib/arm-linux-gnueabihf/libteeacl.so.0.1.0 exists in debian/tmp but is not installed to anywhere
| dh_missing: error: missing files, aborting
| 	The following debhelper tools have reported what they installed (with files per package)
| 	 * dh_install: libteec1 (3), optee-client-dev (15), tee-supplicant (1)
| 	 * dh_installdocs: libteec1 (0), optee-client-dev (0), tee-supplicant (0)
| 	If the missing files are installed by another tool, please file a bug against it.
| 	When filing the report, if the tool is not part of debhelper itself, please reference the
| 	"Logging helpers and dh_missing" section from the "PROGRAMMING" guide for debhelper (10.6.3+).
| 	  (in the debhelper package: /usr/share/doc/debhelper/PROGRAMMING.gz)
| 	Be sure to test with dpkg-buildpackage -A/-B as the results may vary when only a subset is built
| 	If the omission is intentional or no other helper can take care of this consider adding the
| 	paths to debian/not-installed.
|
| 	Remember to be careful with paths containing "arm-linux-gnueabihf", where you might need to
| 	use a wildcard or (assuming compat 13+) e.g. ${DEB_HOST_MULTIARCH} in debian/not-installed
| 	to ensure it works on all architectures (see #961104).
| make: *** [debian/rules:13: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

The debianization is now synchronized with upstream Debian 12,
additionally adding the libteeacl0.1.0 package to fix all remaining
reported packaging problems that upstream already fixed for
Debian 13 - where additional package renaming will take place.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 .../optee-client/files/debian/control.tmpl         | 59 ++++++++++++++++++++--
 .../optee-client/files/debian/libckteec0.install   |  1 +
 .../optee-client/files/debian/libseteec0.install   |  1 +
 .../files/debian/libteeacl0.1.0.install            |  1 +
 .../optee-client/files/debian/libteec1.install     |  1 +
 .../files/debian/optee-client-dev.install          |  2 +
 .../files/debian/tee-supplicant.install            |  1 +
 .../optee-client/optee-client-custom.inc           |  5 +-
 8 files changed, 66 insertions(+), 5 deletions(-)

Patch

diff --git a/meta/recipes-bsp/optee-client/files/debian/control.tmpl b/meta/recipes-bsp/optee-client/files/debian/control.tmpl
index 7cd121ee2f2796989348a73627224a9ab897056a..d3669d50627b3f88d475f38abebbd41070dd2b10 100644
--- a/meta/recipes-bsp/optee-client/files/debian/control.tmpl
+++ b/meta/recipes-bsp/optee-client/files/debian/control.tmpl
@@ -1,8 +1,13 @@ 
 Source: ${PN}
 Priority: optional
 Maintainer: Unknown maintainer <unknown@example.com>
-Build-Depends: pkg-config, uuid-dev
-Standards-Version: 4.1.3
+Build-Depends: debhelper-compat (= 12),
+               docbook-xml,
+               docbook-xsl,
+               pkg-config,
+               uuid-dev,
+               xsltproc
+Standards-Version: 4.5.1
 Section: libs
 Homepage: https://github.com/OP-TEE/optee_client
 Rules-Requires-Root: no
@@ -11,7 +16,10 @@  Package: optee-client-dev
 Section: libdevel
 Architecture: ${DISTRO_ARCH}
 Multi-Arch: same
-Depends: libteec1 (= ${binary:Version}),
+Depends: libckteec0 (= ${binary:Version}),
+         libseteec0 (= ${binary:Version}),
+         libteeacl0.1.0 (= ${binary:Version}),
+         libteec1 (= ${binary:Version}),
          ${misc:Depends}
 Description: normal world user space client APIs for OP-TEE (development)
  OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a
@@ -23,6 +31,21 @@  Description: normal world user space client APIs for OP-TEE (development)
  .
  This package contains the development files OpTEE Client API
 
+Package: libteeacl0.1.0
+Architecture: ${DISTRO_ARCH}
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: normal world user space client APIs for OP-TEE
+ OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a
+ non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone
+ technology. OP-TEE implements TEE Internal Core API v1.1.x which is the API
+ exposed to Trusted Applications and the TEE Client API v1.0, which is the
+ API describing how to communicate with a TEE. This package provides the TEE
+ Client API library.
+ .
+ This package contains libteeacl library.
+
+
 Package: libteec1
 Architecture: ${DISTRO_ARCH}
 Multi-Arch: same
@@ -37,6 +60,36 @@  Description: normal world user space client APIs for OP-TEE
  .
  This package contains libteec library.
 
+Package: libckteec0
+Architecture: ${DISTRO_ARCH}
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: normal world user space client APIs for OP-TEE
+ OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a
+ non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone
+ technology. OP-TEE implements TEE Internal Core API v1.1.x which is the API
+ exposed to Trusted Applications and the TEE Client API v1.0, which is the
+ API describing how to communicate with a TEE. This package provides the TEE
+ Client API library.
+ .
+ This package contains libckteec library.
+
+Package: libseteec0
+Architecture: ${DISTRO_ARCH}
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: normal world user space client APIs for OP-TEE
+ OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a
+ non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone
+ technology. OP-TEE implements TEE Internal Core API v1.1.x which is the API
+ exposed to Trusted Applications and the TEE Client API v1.0, which is the
+ API describing how to communicate with a TEE. This package provides the TEE
+ Client API library.
+ .
+ libseteec stands for secure element control.
+ .
+ This package contains libseteec library.
+
 Package: tee-supplicant
 Architecture: ${DISTRO_ARCH}
 Depends: systemd ${misc:Depends}, procps, ${shlibs:Depends}
diff --git a/meta/recipes-bsp/optee-client/files/debian/libckteec0.install b/meta/recipes-bsp/optee-client/files/debian/libckteec0.install
new file mode 100644
index 0000000000000000000000000000000000000000..419ccf86c3f827fd6a5c4ce5c8f6d773129f3425
--- /dev/null
+++ b/meta/recipes-bsp/optee-client/files/debian/libckteec0.install
@@ -0,0 +1 @@ 
+usr/lib/*/libckteec*.so.*
diff --git a/meta/recipes-bsp/optee-client/files/debian/libseteec0.install b/meta/recipes-bsp/optee-client/files/debian/libseteec0.install
new file mode 100644
index 0000000000000000000000000000000000000000..3e8b56191392e8a550f822596c188742a0374155
--- /dev/null
+++ b/meta/recipes-bsp/optee-client/files/debian/libseteec0.install
@@ -0,0 +1 @@ 
+usr/lib/*/libseteec*.so.*
diff --git a/meta/recipes-bsp/optee-client/files/debian/libteeacl0.1.0.install b/meta/recipes-bsp/optee-client/files/debian/libteeacl0.1.0.install
new file mode 100644
index 0000000000000000000000000000000000000000..1542252de5637bb53a0946b52ec0de5669d4bd90
--- /dev/null
+++ b/meta/recipes-bsp/optee-client/files/debian/libteeacl0.1.0.install
@@ -0,0 +1 @@ 
+usr/lib/*/libteeacl*.so.*
diff --git a/meta/recipes-bsp/optee-client/files/debian/libteec1.install b/meta/recipes-bsp/optee-client/files/debian/libteec1.install
new file mode 100644
index 0000000000000000000000000000000000000000..3670ad0a682ff9dc0aabd1d5cf72c1038c1b224b
--- /dev/null
+++ b/meta/recipes-bsp/optee-client/files/debian/libteec1.install
@@ -0,0 +1 @@ 
+usr/lib/*/libteec*.so.*
diff --git a/meta/recipes-bsp/optee-client/files/debian/optee-client-dev.install b/meta/recipes-bsp/optee-client/files/debian/optee-client-dev.install
new file mode 100644
index 0000000000000000000000000000000000000000..f3800aad52cb869fee2b088da83d22e96bd27dbb
--- /dev/null
+++ b/meta/recipes-bsp/optee-client/files/debian/optee-client-dev.install
@@ -0,0 +1,2 @@ 
+usr/include/*
+usr/lib/*/lib*.so
diff --git a/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.install b/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.install
new file mode 100644
index 0000000000000000000000000000000000000000..05a96f1e64c0a99961a38643b0b4bb5a97d19dcc
--- /dev/null
+++ b/meta/recipes-bsp/optee-client/files/debian/tee-supplicant.install
@@ -0,0 +1 @@ 
+/usr/sbin/*
diff --git a/meta/recipes-bsp/optee-client/optee-client-custom.inc b/meta/recipes-bsp/optee-client/optee-client-custom.inc
index f50ed007b17e6ce53477c9fa541e16335e35e814..a87863f90bd10f82c6e360288c97b00d83989c4c 100644
--- a/meta/recipes-bsp/optee-client/optee-client-custom.inc
+++ b/meta/recipes-bsp/optee-client/optee-client-custom.inc
@@ -1,5 +1,5 @@ 
 #
-# Copyright (c) Siemens AG, 2023
+# Copyright (c) Siemens AG, 2023-2025
 #
 # Authors:
 #  Su Bao Cheng <baocheng.su@siemens.com>
@@ -13,7 +13,8 @@  FILESPATH:append := ":${FILE_DIRNAME}/files"
 
 DESCRIPTION = "OPTee Client"
 
-PROVIDES = "libteec1 optee-client-dev tee-supplicant"
+PROVIDES = "libteec1 libckteec0 libseteec0 libteeacl0.1.0"
+PROVIDES += "optee-client-dev tee-supplicant"
 
 SRC_URI += "file://debian"