Patchwork [1/1] nss:fix postinst failed at rootfs time

login
register
mail settings
Submitter Hongxu Jia
Date July 22, 2013, 5:45 a.m.
Message ID <ddc5bcdf8e55f13d76e2b0b256a4599912074496.1374470729.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/54145/
State Accepted
Commit 64e87fc6e99bc1d4807034166735034b1f92bad8
Headers show

Comments

Hongxu Jia - July 22, 2013, 5:45 a.m.
Create checksum file at rootfs time to support read-only rootfs.

[YOCTO #4879]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-support/nss/nss.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Ross Burton - July 23, 2013, 2:48 p.m.
On 22 July 2013 06:45, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> Create checksum file at rootfs time to support read-only rootfs.

Have you verified that the checksum files don't change depending on
the host architecture (big/little endian, 32/64 bit)?

Ross
Hongxu Jia - July 24, 2013, 5:31 a.m.
On 07/23/2013 10:48 PM, Burton, Ross wrote:
> On 22 July 2013 06:45, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> Create checksum file at rootfs time to support read-only rootfs.
> Have you verified that the checksum files don't change depending on
> the host architecture (big/little endian, 32/64 bit)?
Yes, I have verified.

*host
BUILD_SYS         = "x86_64-linux"

*target
TARGET_SYS        = "mips-poky-linux"
MACHINE           = "qemumips"
or
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"

Everything is ok.

Thanks,
Hongxu

> Ross

Patch

diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index e2f3891..11f1b7f 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -163,7 +163,13 @@  do_install_append_class-target() {
 
 pkg_postinst_${PN} () {
     if [ -n "$D" ]; then
-        exit 1
+        for I in $D/${libdir}/lib*.chk; do
+            DN=`dirname $I`
+            BN=`basename $I .chk`
+            FN=$DN/$BN.so
+            shlibsign -i $FN
+        done
+        exit 0
     fi
     signlibs.sh
 }