nss: fix postinst script for nativesdk build

Submitted by Mikko Rapeli on Aug. 24, 2018, 8:54 a.m. | Patch ID: 154230

Details

Message ID 1535100863-3331-1-git-send-email-mikko.rapeli@bmw.de
State Master Next
Commit 9938254e48bf4042b7a31efb7fcb6da8a8f48993
Headers show

Commit Message

Mikko Rapeli Aug. 24, 2018, 8:54 a.m.
It's better to refer to binaries in postinst script with
full path which also works on SDK when
/opt/nativesysroot/usr/bin is not in PATH.

Fixes install of nativesdk-nss:

Configuring nativesdk-nss.
/var/lib/opkg/info/nativesdk-nss.postinst: line 14: signlibs.sh: not found

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
---
 meta/recipes-support/nss/nss_3.38.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-support/nss/nss_3.38.bb b/meta/recipes-support/nss/nss_3.38.bb
index f3e5170..90b6933 100644
--- a/meta/recipes-support/nss/nss_3.38.bb
+++ b/meta/recipes-support/nss/nss_3.38.bb
@@ -227,13 +227,13 @@  pkg_postinst_${PN} () {
             DN=`dirname $I`
             BN=`basename $I .chk`
             FN=$DN/$BN.so
-            shlibsign -i $FN
+            ${bindir}/shlibsign -i $FN
             if [ $? -ne 0 ]; then
                 exit 1
             fi
         done
     else
-        signlibs.sh
+        ${bindir}/signlibs.sh
     fi
 }
 

Comments

Kang Kai Aug. 26, 2018, 1:12 p.m.
On 2018年08月24日 16:54, Mikko Rapeli wrote:
> It's better to refer to binaries in postinst script with
> full path which also works on SDK when
> /opt/nativesysroot/usr/bin is not in PATH.
>
> Fixes install of nativesdk-nss:
>
> Configuring nativesdk-nss.
> /var/lib/opkg/info/nativesdk-nss.postinst: line 14: signlibs.sh: not found

It causes QA warning:

WARNING: core-image-sato-1.0-r0 do_rootfs: Intentionally failing 
postinstall scriptlets of ['nss'] to defer them to first boot is 
deprecated. Please place them into pkg_postinst_ontarget_${PN} ().
If deferring to first boot wasn't the intent, then scriptlet failure may 
mean an issue in the recipe, or a regression elsewhere.
Details of the failure are in 
/buildarea/kkang/yocto/ml-Aug25/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs. 

WARNING: core-image-sato-1.0-r0 do_rootfs: [log_check] core-image-sato: 
found 2 warning messages in the logfile:
[log_check] warning: %post(nss-3.38-r0.core2_64) scriptlet failed, exit 
status 1
[log_check] WARNING: Intentionally failing postinstall scriptlets of 
['nss'] to defer them to first boot is deprecated. Please place them 
into pkg_postinst_ontarget_${PN} ().


Regards,
Kai

>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
> ---
>   meta/recipes-support/nss/nss_3.38.bb | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-support/nss/nss_3.38.bb b/meta/recipes-support/nss/nss_3.38.bb
> index f3e5170..90b6933 100644
> --- a/meta/recipes-support/nss/nss_3.38.bb
> +++ b/meta/recipes-support/nss/nss_3.38.bb
> @@ -227,13 +227,13 @@ pkg_postinst_${PN} () {
>               DN=`dirname $I`
>               BN=`basename $I .chk`
>               FN=$DN/$BN.so
> -            shlibsign -i $FN
> +            ${bindir}/shlibsign -i $FN
>               if [ $? -ne 0 ]; then
>                   exit 1
>               fi
>           done
>       else
> -        signlibs.sh
> +        ${bindir}/signlibs.sh
>       fi
>   }
>