All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Crowe <mac@mcrowe.com>
To: openembedded-core@lists.openembedded.org
Subject: nss postinst requires nss-native during rootfs generation
Date: Thu, 19 May 2016 17:50:20 +0100	[thread overview]
Message-ID: <20160519165020.GA4863@mcrowe.com> (raw)

We've recently added nss to our image and have started to see rootfs
generation anomalies. We use IMAGE_FEATURES = "read-only-rootfs" so
postinsts run at rootfs generation time.

nss's postinst calls shlibsign. Under normal circumstances with
read-only-rootfs, this appears to come from nss-native being in the native
sysroot during the build.

We're finding that nss-native isn't in the native sysroot at the time the
postinst runs if nss and nss-native come from the sstate cache.

I've simplied the problem enough to reproduce it with stock oe-core and
core-image-minimal. Add "nss" to IMAGE_INSTALL and "read-only-rootfs" to
IMAGE_FEATURES and then run:

 # First populate the sstate cache
 bitbake core-image-minimal

 # Then build again using the sstate cache
 rm -rf tmp-glibc
 bitbake -c rootfs core-image-minimal

I get:

 ERROR: core-image-minimal-1.0-r0 do_rootfs: The following packages could
 not be configured offline and rootfs is read-only: ['nss']

This could be because the image dependencies are incorrectly expressed.
task-depends.dot contains:

 "core-image-minimal.do_build" -> "nss-native.do_build"

Since I'm explicitly running do_rootfs this dependency is never taken into
account. I believe that a better dependency would be:

 "core-image-minimal.do_rootfs" -> "nss-native.do_build"

I can avoid the problem by running core-image-minimal.do_build rather than
core-image-minimal.do_rootfs but I'm worried that this opens the
possibility of a race since there's no guarantee that all of
core-image-minimal.do_build's dependencies have been satisfied before
core-image-minimal.do_rootfs runs.

Alternatively, perhaps nss's postinst isn't supposed to be relying on
nss-native at all in its postinst?

Any ideas?

Thanks.

Mike.


                 reply	other threads:[~2016-05-19 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160519165020.GA4863@mcrowe.com \
    --to=mac@mcrowe.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.