blob: 88ae56cdebeedb86636dbb3c41beb6e67af5665d [file] [log] [blame]
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05301DESCRIPTION = "Selection of tools for developers working with Smack"
2HOMEPAGE = "https://github.com/smack-team/smack"
3SECTION = "Security/Access Control"
4LICENSE = "LGPL-2.1"
5
6LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
7
8SRCREV = "4a102c7584b39ce693995ffb65e0918a9df98dd8"
9SRC_URI = " \
10 git://github.com/smack-team/smack.git \
11 file://smack_generator_make_fixup.patch \
12 file://run-ptest"
13
14PV = "1.3.1"
15
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050016# CVE-2014-0363, CVE-2014-0364, CVE-2016-10027 is valnerble for other product.
17CVE_CHECK_WHITELIST += "CVE-2014-0363"
18CVE_CHECK_WHITELIST += "CVE-2014-0364"
19CVE_CHECK_WHITELIST += "CVE-2016-10027"
20
Brad Bishopa48c0142020-01-06 09:48:41 -050021inherit autotools update-rc.d pkgconfig ptest
22inherit ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
23inherit features_check
24
25REQUIRED_DISTRO_FEATURES = "smack"
26
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053027
28S = "${WORKDIR}/git"
29
30PACKAGECONFIG ??= ""
31PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
32
33PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd"
34
35do_compile_append () {
36 oe_runmake -C ${S}/tests generator
37}
38
39do_install_append () {
40 install -d ${D}${sysconfdir}/init.d
41 install -d ${D}${sysconfdir}/smack
42 install -d ${D}${sysconfdir}/smack/accesses.d
43 install -d ${D}${sysconfdir}/smack/cipso.d
44 install ${S}/init/smack.rc ${D}/${sysconfdir}/init.d/smack
45}
46
47do_install_ptest () {
48 install -d ${D}${PTEST_PATH}/tests
49 install ${S}/tests/generator ${D}/${PTEST_PATH}/tests
50 install ${S}/tests/generate-rules.sh ${D}${PTEST_PATH}/tests
51 install ${S}/tests/make_policies.bash ${D}${PTEST_PATH}/tests
52}
53
54INITSCRIPT_PACKAGES = "${PN}"
55INITSCRIPT_NAME = "smack"
56INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ."
57
58FILES_${PN} += "${sysconfdir}/init.d/smack"
59FILES_${PN}-ptest += "generator"
60
Brad Bishop36166cd2019-08-26 01:31:32 -040061RDEPENDS_${PN} += "coreutils python3-core"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053062RDEPENDS_${PN}-ptest += "make bash bc"
63
64BBCLASSEXTEND = "native"