All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] nss: fix postinst script for nativesdk build
@ 2020-08-26  9:15 Mikko Rapeli
  2020-08-28 15:20 ` [oe] " Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Mikko Rapeli @ 2020-08-26  9:15 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Mikko Rapeli

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-oe/recipes-support/nss/nss_3.54.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-support/nss/nss_3.54.bb b/meta-oe/recipes-support/nss/nss_3.54.bb
index 4923f6868..dc5cafbf1 100644
--- a/meta-oe/recipes-support/nss/nss_3.54.bb
+++ b/meta-oe/recipes-support/nss/nss_3.54.bb
@@ -244,13 +244,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
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-oe][PATCH] nss: fix postinst script for nativesdk build
  2020-08-26  9:15 [meta-oe][PATCH] nss: fix postinst script for nativesdk build Mikko Rapeli
@ 2020-08-28 15:20 ` Martin Jansa
  2020-08-31  7:09   ` Mikko Rapeli
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2020-08-28 15:20 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

This breaks running postinst in do_rootfs, it tries to run
/usr/bin/shlibsign from host which fails when doesn't exist and then it
complains about exit 1 called after that:

WARNING: nss.postinst returned 127, marking as unpacked only, configuration
required on target.
ERROR: Postinstall scriptlets of ['nss'] have failed. If the intention is
to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.

On Wed, Aug 26, 2020 at 11:15 AM Mikko Rapeli <mikko.rapeli@bmw.de> 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
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
> ---
>  meta-oe/recipes-support/nss/nss_3.54.bb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-support/nss/nss_3.54.bb
> b/meta-oe/recipes-support/nss/nss_3.54.bb
> index 4923f6868..dc5cafbf1 100644
> --- a/meta-oe/recipes-support/nss/nss_3.54.bb
> +++ b/meta-oe/recipes-support/nss/nss_3.54.bb
> @@ -244,13 +244,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
>  }
>
> --
> 2.20.1
>
> 
>

[-- Attachment #2: Type: text/html, Size: 2606 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [oe] [meta-oe][PATCH] nss: fix postinst script for nativesdk build
  2020-08-28 15:20 ` [oe] " Martin Jansa
@ 2020-08-31  7:09   ` Mikko Rapeli
  0 siblings, 0 replies; 3+ messages in thread
From: Mikko Rapeli @ 2020-08-31  7:09 UTC (permalink / raw)
  To: martin.jansa; +Cc: openembedded-devel

On Fri, Aug 28, 2020 at 05:20:36PM +0200, Martin Jansa wrote:
> This breaks running postinst in do_rootfs, it tries to run
> /usr/bin/shlibsign from host which fails when doesn't exist and then it
> complains about exit 1 called after that:
> 
> WARNING: nss.postinst returned 127, marking as unpacked only, configuration
> required on target.
> ERROR: Postinstall scriptlets of ['nss'] have failed. If the intention is
> to defer them to first boot,
> then please place them into pkg_postinst_ontarget_${PN} ().
> Deferring to first boot via 'exit 1' is no longer supported.

Sorry, checking the failure now.

-Mikko

> On Wed, Aug 26, 2020 at 11:15 AM Mikko Rapeli <mikko.rapeli@bmw.de> 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
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
> > ---
> >  meta-oe/recipes-support/nss/nss_3.54.bb | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta-oe/recipes-support/nss/nss_3.54.bb
> > b/meta-oe/recipes-support/nss/nss_3.54.bb
> > index 4923f6868..dc5cafbf1 100644
> > --- a/meta-oe/recipes-support/nss/nss_3.54.bb
> > +++ b/meta-oe/recipes-support/nss/nss_3.54.bb
> > @@ -244,13 +244,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
> >  }
> >
> > --
> > 2.20.1
> >
> > 
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-31  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26  9:15 [meta-oe][PATCH] nss: fix postinst script for nativesdk build Mikko Rapeli
2020-08-28 15:20 ` [oe] " Martin Jansa
2020-08-31  7:09   ` Mikko Rapeli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.