From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>,
<richard.purdie@linuxfoundation.org>, <mark.hatle@windriver.com>
Subject: [PATCH V2 0/3] bbclass/sstate: only allowed sstate-cache objects are allowed in a build (read-only sstate-cache)
Date: Wed, 27 Aug 2014 15:53:22 +0800 [thread overview]
Message-ID: <cover.1409124921.git.hongxu.jia@windriver.com> (raw)
Changed in V2:
- add hook SSTATE_CHECK_FUNCTIONS for sstate checking, and
add a new bbclass/sstate_readonly, rather than directly
modify bbclass/sstate
- terminate build safely while RunQueueExecuteScenequeue
init failed, the previous bb.msg.fatal is too hack.
Test steps:
1) vim local.conf
INHERIT += 'sstate_readonly'
2) Create a sstate cache for testing
$ bitbake db-native
3) Remove tmp dir and build db-native from sstate-cache
$ mv tmp tmp-back && bitbake db-native
4) Add gzip to SSTATECACHE_WHITELIST, it enabled read-only sstate-cache,
vim local.conf
...
SSTATECACHE_WHITELIST = 'gzip'
...
5) Remove tmp dir and build db-native from sstate-cache
$ mv tmp tmp-back && bitbake db-native
6) tweak db's do_configure task by adding comments
--- a/meta/recipes-support/db/db_6.0.30.bb
+++ b/meta/recipes-support/db/db_6.0.30.bb
@@ -82,6 +82,7 @@ do_configure() {
gnu-configize --force ${S}
export STRIP="true"
oe_runconf
+ echo "hello"
}
7) build db-native and there is a build failure
$ bitbake db-native
...
NOTE: Preparing runqueue
ERROR: Read-only sstate-cache is enabled, the build of
"db-native"
did not come from sstate-cache. Only the recipe listed in
SSTATECACHE_WHITELIST is allowed to build from source
...
8) clean db-native failed
$ bitbake db-native -ccleansstate
...
ERROR: Read-only sstate-cache is enabled, the clean of
db-native is not allowed. Only the recipe listed in
SSTATECACHE_WHITELIST is allowed to clean sstate-cache
...
$ bitbake db-native -ccleanall
...
ERROR: Read-only sstate-cache is enabled, the clean of
db-native is not allowed. Only the recipe listed in
SSTATECACHE_WHITELIST is allowed to clean sstate-cache
...
9) Add db-native to SSTATECACHE_WHITELIST
vim local.conf
...
SSTATECACHE_WHITELIST = 'gzip db-native'
...
10) build/clean db-native succee
$ bitbake db-native
$ bitbake db-native -ccleansstate
$ bitbake db-native -ccleanall
//Hongxu
The following changes since commit 52b788c6df9201764130ab744bf67b770b24b896:
autogen-native: inherit pkgconfig to fix a build failure (2014-08-25 10:26:00 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/readonly-sstatecache
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/readonly-sstatecache
Hongxu Jia (3):
bitbake: runqueue: terminate build safely while
RunQueueExecuteScenequeue init failed
bbclass/sstate: add hook SSTATE_CHECK_FUNCTIONS for sstate checking
bbclass/sstate_readonly: only allowed sstate-cache objects are allowed
in a build (read-only sstate-cache)
bitbake/lib/bb/runqueue.py | 7 ++++-
meta/classes/sstate.bbclass | 26 ++++++++++++++++++
meta/classes/sstate_readonly.bbclass | 51 ++++++++++++++++++++++++++++++++++++
3 files changed, 83 insertions(+), 1 deletion(-)
create mode 100644 meta/classes/sstate_readonly.bbclass
--
1.9.1
next reply other threads:[~2014-08-27 7:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 7:53 Hongxu Jia [this message]
2014-08-27 7:53 ` [PATCH 1/3] bitbake: runqueue: terminate build safely while RunQueueExecuteScenequeue init failed Hongxu Jia
2014-08-27 10:23 ` Hongxu Jia
2014-08-27 7:53 ` [PATCH 2/3] bbclass/sstate: add hook SSTATE_CHECK_FUNCTIONS for sstate checking Hongxu Jia
2014-08-27 7:53 ` [PATCH 3/3] bbclass/sstate_readonly: only allowed sstate-cache objects are allowed in a build (read-only sstate-cache) Hongxu Jia
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=cover.1409124921.git.hongxu.jia@windriver.com \
--to=hongxu.jia@windriver.com \
--cc=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox