Skip to contentSkip to conversation

nss:fix postinst failed at rootfs time

PATCH In review Hongxu Jia 2 participants 5 messages Jul 22, 2013 – Jul 24, 2013

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover nss:fix postinst failed at rootfs time

Test Case:

*On host:
1) In local.conf
IMAGE_INSTALL_append = " nss"
2) Build core-image-sato

*On target:
1) Search checksum file

root@qemuarm:~# find /usr/lib/ -name "*.chk"
/usr/lib/libfreebl3.chk
/usr/lib/libnssdbm3.chk
/usr/lib/libsoftokn3.chk

2) Test for valid checksum files.

root@qemuarm:~# chktest /usr/lib/libfreebl3.so
SUCCESS
root@qemuarm:~# chktest /usr/lib/libnssdbm3.so 
SUCCESS
root@qemuarm:~# chktest /usr/lib/libsoftokn3.so
SUCCESS

//Hongxu

The following changes since commit 3dee534f1e25109e0bdb681de0746c336f4b8840:

lib/oeqa: fix dependecy check (2013-07-16 10:04:17 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-nss-postinst
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-python-readlne

Hongxu Jia (1):
nss:fix postinst failed at rootfs time

 meta/recipes-support/nss/nss.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 1/1 nss:fix postinst failed at rootfs time

Create checksum file at rootfs time to support read-only rootfs.

[YOCTO #4879]

---
 meta/recipes-support/nss/nss.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-support/nss/nss.inc +7 -1
index e2f3891..11f1b7f 100644
@@ -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
 }
Signature · 1 line
1.8.1.2
#2 lore raw
Quoted 1 line · Hongxu Jia

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

author
#3 lore raw
Quoted 4 lines · Ross
Quoted 1 line · Hongxu Jia

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

Quoted 1 line

Ross

author
#4 lore raw
In reply to Hongxu Jia
Quoted 24 lines · Hongxu Jia

Test Case:

*On host:
1) In local.conf
IMAGE_INSTALL_append = " nss"
2) Build core-image-sato

*On target:
1) Search checksum file

root@qemuarm:~# find /usr/lib/ -name "*.chk"
/usr/lib/libfreebl3.chk
/usr/lib/libnssdbm3.chk
/usr/lib/libsoftokn3.chk

2) Test for valid checksum files.

root@qemuarm:~# chktest /usr/lib/libfreebl3.so
SUCCESS
root@qemuarm:~# chktest /usr/lib/libnssdbm3.so
SUCCESS
root@qemuarm:~# chktest /usr/lib/libsoftokn3.so
SUCCESS

//Hongxu

Quoted 8 lines

The following changes since commit 3dee534f1e25109e0bdb681de0746c336f4b8840:

   lib/oeqa: fix dependecy check (2013-07-16 10:04:17 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-nss-postinst
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-python-readlne

Fix typo:
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-nss-postinst

//Hongxu

Quoted 7 lines

Hongxu Jia (1):
nss:fix postinst failed at rootfs time

  meta/recipes-support/nss/nss.inc | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)