diff options
author | Armin Kuster <akuster808@gmail.com> | 2019-07-04 10:53:20 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2019-07-17 16:56:39 -0700 |
commit | a64348d0df2f6e3df805638020888c8286478e82 (patch) | |
tree | d35e5281004828de0ce712fd317ec014c670c532 /meta-security-compliance | |
parent | 90ccc8b4f5e8362c3436575e0ef60ec6e26bc2da (diff) | |
download | meta-security-a64348d0df2f6e3df805638020888c8286478e82.tar.gz |
scap-security-guide: update to 0.1.44
create a PV version to track upstream
git version includes OE changes
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-security-compliance')
3 files changed, 63 insertions, 55 deletions
diff --git a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc new file mode 100644 index 0000000..ed70c18 --- /dev/null +++ b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc | |||
@@ -0,0 +1,47 @@ | |||
1 | # Copyright (C) 2017 Armin Kuster <akuster808@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMARRY = "SCAP content for various platforms" | ||
5 | HOME_URL = "https://www.open-scap.org/security-policies/scap-security-guide/" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=97662e4486d9a1d09f358851d9f41a1a" | ||
7 | LICENSE = "LGPL-2.1" | ||
8 | |||
9 | DEPENDS = "openscap-native python3 python3-pyyaml-native python3-jinja2-native libxml2-native" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | inherit cmake pkgconfig python3native | ||
14 | |||
15 | #PARALLEL_MAKE = "" | ||
16 | |||
17 | STAGING_OSCAP_BUILDDIR = "${TMPDIR}/work-shared/openscap/oscap-build-artifacts" | ||
18 | |||
19 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
20 | |||
21 | EXTRA_OECMAKE += "-DENABLE_PYTHON_COVERAGE=OFF" | ||
22 | |||
23 | do_configure_prepend () { | ||
24 | sed -i -e 's:NAMES\ sed:NAMES\ ${HOSTTOOLS_DIR}/sed:g' ${S}/CMakeLists.txt | ||
25 | sed -i 's:/usr/share/openscap/:${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/:g' ${S}/cmake/SSGCommon.cmake | ||
26 | } | ||
27 | |||
28 | do_compile () { | ||
29 | cd ${S}/build | ||
30 | cmake ../ | ||
31 | # oddly rhel7 needs to build first | ||
32 | make rhel7 | ||
33 | } | ||
34 | |||
35 | do_install () { | ||
36 | cd ${S}/build | ||
37 | make DESTDIR=${D} install | ||
38 | } | ||
39 | |||
40 | localdatadir = "${prefix}/local/share" | ||
41 | localmandir = "${localdatadir}/man" | ||
42 | localdocdir = "${localdatadir}/doc" | ||
43 | localxmldir = "${localdatadir}/xml" | ||
44 | |||
45 | FILES_${PN} += "${localdatadir} ${localxmldir}" | ||
46 | FILES_${PN}-doc += "${localmandir} ${localdocdir}" | ||
47 | RDEPNEDS_${PN} = "openscap" | ||
diff --git a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_0.1.44.bb b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_0.1.44.bb new file mode 100644 index 0000000..d80ecd7 --- /dev/null +++ b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_0.1.44.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | SUMARRY = "SCAP content for various platforms, upstream version" | ||
2 | |||
3 | SRCREV = "8cb2d0f351faff5440742258782281164953b0a6" | ||
4 | SRC_URI = "git://github.com/ComplianceAsCode/content.git" | ||
5 | |||
6 | DEFAULT_PREFERENCE = "-1" | ||
7 | |||
8 | require scap-security-guide.inc | ||
diff --git a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb index 3f76038..cb21fed 100644 --- a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb +++ b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb | |||
@@ -1,60 +1,13 @@ | |||
1 | # Copyright (C) 2017 Armin Kuster <akuster808@gmail.com> | 1 | SUMARRY = "SCAP content for various platforms, OE changes" |
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | 2 | ||
4 | SUMARRY = "SCAP content for various platforms" | 3 | SRCREV = "5fdfdcb2e95afbd86ace555beca5d20cbf1043ed" |
5 | HOME_URL = "https://www.open-scap.org/security-policies/scap-security-guide/" | 4 | SRC_URI = "git://github.com/akuster/scap-security-guide.git;branch=oe-0.1.44;" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=236e81befc8154d18c93c848185d7e52" | 5 | PV = "v0.1.44+git${SRCPV}" |
7 | LICENSE = "LGPL-2.1" | ||
8 | 6 | ||
9 | DEPENDS = "openscap-native" | 7 | require scap-security-guide.inc |
10 | 8 | ||
11 | SRCREV = "423d9f40021a03abd018bef7818a3a9fe91a083c" | 9 | do_compile_append () { |
12 | SRC_URI = "git://github.com/akuster/scap-security-guide.git;branch=oe;" | 10 | make openembedded |
13 | PV = "v0.1.33+git${SRCPV}" | ||
14 | |||
15 | inherit cmake | ||
16 | |||
17 | PARALLEL_MAKE = "" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | STAGING_OSCAP_BUILDDIR = "${TMPDIR}/work-shared/openscap/oscap-build-artifacts" | ||
22 | |||
23 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
24 | |||
25 | EXTRA_OECMAKE += "-DSSG_PRODUCT_CHROMIUM:BOOL=OFF" | ||
26 | EXTRA_OECMAKE += "-DSSG_PRODUCT_DEBIAN8:BOOL=OFF" | ||
27 | EXTRA_OECMAKE += "-DSSG_PRODUCT_FEDORA:BOOL=OFF" | ||
28 | EXTRA_OECMAKE += "-DSSG_PRODUCT_FIREFOX:BOOL=OFF" | ||
29 | EXTRA_OECMAKE += "-DSSG_PRODUCT_JBOSS_EAP5:BOOL=OFF" | ||
30 | EXTRA_OECMAKE += "-DSSG_PRODUCT_JBOSS_FUSE6:BOOL=OFF" | ||
31 | EXTRA_OECMAKE += "-DSSG_PRODUCT_JRE:BOOL=OFF" | ||
32 | EXTRA_OECMAKE += "-DSSG_PRODUCT_OPENSUSE:BOOL=OFF" | ||
33 | EXTRA_OECMAKE += "-DSSG_PRODUCT_OSP7:BOOL=OFF" | ||
34 | EXTRA_OECMAKE += "-DSSG_PRODUCT_RHEL5:BOOL=OFF" | ||
35 | EXTRA_OECMAKE += "-DSSG_PRODUCT_RHEL6:BOOL=OFF" | ||
36 | EXTRA_OECMAKE += "-DSSG_PRODUCT_RHEL7:BOOL=OFF" | ||
37 | EXTRA_OECMAKE += "-DSSG_PRODUCT_RHEV3:BOOL=OFF" | ||
38 | EXTRA_OECMAKE += "-DSSG_PRODUCT_SUSE11:BOOL=OFF" | ||
39 | EXTRA_OECMAKE += "-DSSG_PRODUCT_SUSE12:BOOL=OFF" | ||
40 | EXTRA_OECMAKE += "-DSSG_PRODUCT_UBUNTU1404:BOOL=OFF" | ||
41 | EXTRA_OECMAKE += "-DSSG_PRODUCT_UBUNTU1604:BOOL=OFF" | ||
42 | EXTRA_OECMAKE += "-DSSG_PRODUCT_WRLINUX:BOOL=OFF" | ||
43 | EXTRA_OECMAKE += "-DSSG_PRODUCT_WEBMIN:BOOL=OFF" | ||
44 | |||
45 | do_configure_prepend () { | ||
46 | sed -i -e 's:NAMES\ sed:NAMES\ ${HOSTTOOLS_DIR}/sed:g' ${S}/CMakeLists.txt | ||
47 | sed -i 's:/usr/share/openscap/:${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/:g' ${S}/cmake/SSGCommon.cmake | ||
48 | } | 11 | } |
49 | 12 | ||
50 | do_compile () { | 13 | EXTRA_OECMAKE += "-DSSG_PRODUCT_OPENEMBEDDED=ON" |
51 | cd ${B} | ||
52 | make openembedded | ||
53 | } | ||
54 | |||
55 | do_install () { | ||
56 | cd ${B} | ||
57 | make DESTDIR=${D} install | ||
58 | } | ||
59 | FILES_${PN} += "${datadir}/xml" | ||
60 | RDEPNEDS_${PN} = "openscap" | ||