Skip to contentSkip to conversation

libcamera: Avoid build break in signature recalculation

PATCH In review Tom Hochstein 2 participants 4 messages Oct 2, 2023 – Oct 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libcamera: Avoid build break in signature recalculation

The signature recalculation task can fail:

```
/.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4-r0/temp/run.do_recalculate_ipa_signatures_package.937421: line 154: /.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4-r0/git/src/ipa/ipa-sign-install.sh: No such file or directory
```

This happens whenever ${S} is removed and packages are retrieved from sstate cache.

Instead of trying to fix the task, avoid the issue altogether by performing the signature recalculation directly in do_package.

---
 .../recipes-multimedia/libcamera/libcamera_0.1.0.bb        | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb +5 -2
index ece1be6f3..2a3c6473e 100644
@@ -50,8 +50,11 @@ do_install:append() {
     chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
 }
 
-addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
-do_recalculate_ipa_signatures_package() {
+do_package:append() {
+    bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
+}
+
+do_package_recalculate_ipa_signatures() {
     local modules
     for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
         module="${module%.sign}"
Signature · 1 line
2.25.1
#1 lore raw

Quoting Tom Hochstein (2023-10-02 18:36:44)

Quoted 10 lines

The signature recalculation task can fail:

```
/.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4-r0/temp/run.do_recalculate_ipa_signatures_package.937421: line 154: /.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4-r0/git/src/ipa/ipa-sign-install.sh: No such file or directory
```

This happens whenever ${S} is removed and packages are retrieved from sstate cache.

Instead of trying to fix the task, avoid the issue altogether by performing the signature recalculation directly in do_package.

Will this still happen after any calls to strip? (i.e. the binaries will not be modified after this step?)

--
Kieran

Quoted 28 lines
---
 .../recipes-multimedia/libcamera/libcamera_0.1.0.bb        | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb +5 -2
index ece1be6f3..2a3c6473e 100644
@@ -50,8 +50,11 @@ do_install:append() {
     chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
 }
 
-addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata
-do_recalculate_ipa_signatures_package() {
+do_package:append() {
+    bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
+}
+
+do_package_recalculate_ipa_signatures() {
     local modules
     for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
         module="${module%.sign}"
Signature · 1 line
2.25.1
#2 lore raw
Quoted 20 lines

-----Original Message-----
From: Kieran Bingham <[email protected]>
Sent: Tuesday, October 3, 2023 4:29 AM
To: Tom Hochstein <[email protected]>; openembedded- [email protected]
Cc: Tom Hochstein <[email protected]>
Subject: Re: [meta-multimedia][PATCH] libcamera: Avoid build break in signature recalculation

Quoting Tom Hochstein (2023-10-02 18:36:44)

Quoted 3 lines

The signature recalculation task can fail:
``` /.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4-

r0/temp/run.do_recalculate_ipa_signatures_package.937421: line 154:
/.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4- r0/git/src/ipa/ipa-sign-install.sh: No such file or directory

Quoted 2 lines

```

Quoted 8 lines
Quoted 5 lines

This happens whenever ${S} is removed and packages are retrieved from sstate cache.

Instead of trying to fix the task, avoid the issue altogether by performing the signature recalculation directly in do_package.

Will this still happen after any calls to strip? (i.e. the binaries will not be modified after this step?)

Yes. The run.do_package script does have the recalculation call as the final line in the do_package function, which is after the call to split_and_strip.

Quoted 36 lines

--
Kieran

Review

Quoted 7 lines
---
 .../recipes-multimedia/libcamera/libcamera_0.1.0.bb        | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

multimedia/libcamera/libcamera_0.1.0.bb b/meta-multimedia/recipes- multimedia/libcamera/libcamera_0.1.0.bb

meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb do_install:append() { · line 53

Quoted 8 lines

index ece1be6f3..2a3c6473e 100644

meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb +0 -1
@@ -50,8 +50,11 @@ do_install:append() {
     chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
 }
 
-addtask do_recalculate_ipa_signatures_package after do_package before

do_packagedata

Quoted 13 lines
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb +5 -2
-do_recalculate_ipa_signatures_package() {
+do_package:append() {
+    bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
+}
+
+do_package_recalculate_ipa_signatures() {
     local modules
     for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
         module="${module%.sign}"
--

2.25.1

#3 lore raw

Quoting Tom Hochstein (2023-10-03 14:38:41)

Quoted 26 lines
Quoted 26 lines

-----Original Message-----
From: Kieran Bingham <[email protected]>
Sent: Tuesday, October 3, 2023 4:29 AM
To: Tom Hochstein <[email protected]>; openembedded- [email protected]
Cc: Tom Hochstein <[email protected]>
Subject: Re: [meta-multimedia][PATCH] libcamera: Avoid build break in signature recalculation

Quoting Tom Hochstein (2023-10-02 18:36:44)

Quoted 3 lines

The signature recalculation task can fail:
``` /.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4-

r0/temp/run.do_recalculate_ipa_signatures_package.937421: line 154:
/.../build/tmp/work/armv8a-poky-linux/libcamera/1_0.0.4- r0/git/src/ipa/ipa-sign-install.sh: No such file or directory

Quoted 7 lines

```

This happens whenever ${S} is removed and packages are retrieved from sstate cache.

Instead of trying to fix the task, avoid the issue altogether by performing the signature recalculation directly in do_package.

Quoted 6 lines
Quoted 2 lines

Will this still happen after any calls to strip? (i.e. the binaries will not be modified after this step?)

Yes. The run.do_package script does have the recalculation call as the final line in the do_package function, which is after the call to split_and_strip.

That settles my worries then! - I'm not sure I'm expert enough on the rest of the yocto syntax, but from libcamera perspective:

Quoted 37 lines
Quoted 37 lines

--
Kieran

Review

Quoted 7 lines
---
 .../recipes-multimedia/libcamera/libcamera_0.1.0.bb        | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

multimedia/libcamera/libcamera_0.1.0.bb b/meta-multimedia/recipes- multimedia/libcamera/libcamera_0.1.0.bb

meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb do_install:append() { · line 53

Quoted 8 lines

index ece1be6f3..2a3c6473e 100644

meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb +0 -1
@@ -50,8 +50,11 @@ do_install:append() {
     chrpath -d ${D}${libexecdir}/libcamera/v4l2-compat.so
 }
 
-addtask do_recalculate_ipa_signatures_package after do_package before

do_packagedata

Quoted 13 lines
meta-multimedia/recipes-multimedia/libcamera/libcamera_0.1.0.bb +5 -2
-do_recalculate_ipa_signatures_package() {
+do_package:append() {
+    bb.build.exec_func("do_package_recalculate_ipa_signatures", d)
+}
+
+do_package_recalculate_ipa_signatures() {
     local modules
     for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do
         module="${module%.sign}"
--

2.25.1