diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2019-08-16 10:17:22 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2019-08-24 12:54:57 -0700 |
commit | 7fb8569f0bddb69ea9db311a6c0a13da005f181a (patch) | |
tree | 209a4be5612d34cdef02fdedf9bbd5a336ef0de9 | |
parent | ecb526ffab96675b5bd0e3a2984fde36a54431de (diff) | |
download | meta-security-7fb8569f0bddb69ea9db311a6c0a13da005f181a.tar.gz |
openscap: fix scap-security-guide build error
It would fail to build scap-security-guide when use openscap-native
sstate cache.
Steps to reproduce:
Create a new build project:
$ bitbake openscap-native
$ bitbake openscap-native -c clean
$ bitbake scap-security-guide
Error message:
OpenSCAP Error: Schema file 'xccdf/1.1/xccdf-schema.xsd' not found in path
'/buildarea/build/tmp/work-shared/openscap/oscap-build-artifacts/usr/share/openscap/schemas'
when trying to validate
'/buildarea/build/tmp/work/core2-64-poky-linux/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/build/chromium/xccdf-unlinked-resolved.xml'
[/buildarea/build/tmp/work/x86_64-linux/openscap-native/1.3.1+gitAUTOINC+4bbdb46ff6-r0/git/src/source/validate.c:104]
Invalid XCCDF Checklist (1.1) content in
/buildarea/build/tmp/work/core2-64-poky-linux/scap-security-guide/0.1.44+gitAUTOINC+5fdfdcb2e9-r0/git/build/chromium/xccdf-unlinked-resolved.xml.
[/buildarea/build/tmp/work/x86_64-linux/openscap-native/1.3.1+gitAUTOINC+4bbdb46ff6-r0/git/src/source/oscap_source.c:346]
chromium/CMakeFiles/generate-internal-chromium-xccdf-unlinked-resolved.xml.dir/build.make:63: recipe for target 'chromium/xccdf-unlinked-resolved.xml' failed
When using sstate cache, the openscap-native doesn't install the
artifacts to work-shared/openscap/oscap-build-artifacts when prepare
recipe sysroot for scap-security-guide.
Set do_install[nostamp] to 1 to ensure the openscap-native artifacts
are installed to work-shared/openscap/oscap-build-artifacts even if
using sstate cache.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-security-compliance/recipes-openscap/openscap/openscap.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-security-compliance/recipes-openscap/openscap/openscap.inc b/meta-security-compliance/recipes-openscap/openscap/openscap.inc index 53309e8..07d9700 100644 --- a/meta-security-compliance/recipes-openscap/openscap/openscap.inc +++ b/meta-security-compliance/recipes-openscap/openscap/openscap.inc | |||
@@ -41,6 +41,7 @@ do_configure_append_class-native () { | |||
41 | } | 41 | } |
42 | 42 | ||
43 | do_clean[cleandirs] += "${STAGING_OSCAP_BUILDDIR}" | 43 | do_clean[cleandirs] += "${STAGING_OSCAP_BUILDDIR}" |
44 | do_install[nostamp] = "1" | ||
44 | 45 | ||
45 | do_install_append_class-native () { | 46 | do_install_append_class-native () { |
46 | oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native} | 47 | oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native} |