<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4879</bug_id>
          
          <creation_ts>2013-07-22 02:09:10 +0000</creation_ts>
          <short_desc>nss postinst cannot be configured offline</short_desc>
          <delta_ts>2013-07-30 02:11:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chen Qi">Qi.Chen</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>laurentiu.palcu</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>34731</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-07-22 02:09:10 +0000</bug_when>
    <thetext>Now the NSS recipe is added to OE-core, it has a postinst which cannot succeed at rootfs time.

pkg_postinst_${PN} () {
    if [ -n &quot;$D&quot; ]; then
        exit 1
    fi
    signlibs.sh
}

Please figure out a way to do this, or we should remove this postinst, as signlibs.sh is not a requirement for LSB.

//Chen Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34742</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-07-22 05:46:11 +0000</bug_when>
    <thetext>Create checksum file at rootfs time to support read-only rootfs.

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 &quot;$D&quot; ]; 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
 }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34743</commentid>
    <comment_count>2</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-07-22 05:58:57 +0000</bug_when>
    <thetext>Test Case:

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

*On target:
1) Search checksum file
root@qemuarm:~# find /usr/lib/ -name &quot;*.chk&quot;
/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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35136</commentid>
    <comment_count>3</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-07-30 02:11:00 +0000</bug_when>
    <thetext>Merged into master
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ee9bdf90ce68f206039720fa30d2b97b577c8057</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>