blob: 6c2f041084a8ec4c4b5e1c76a4348553ee95feb8 [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 ??= ""
Patrick Williams213cb262021-08-07 19:21:33 -050031PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053032
33PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd"
34
Patrick Williams213cb262021-08-07 19:21:33 -050035do_compile:append () {
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053036 oe_runmake -C ${S}/tests generator
37}
38
Patrick Williams213cb262021-08-07 19:21:33 -050039do_install:append () {
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053040 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
Patrick Williams213cb262021-08-07 19:21:33 -050058FILES:${PN} += "${sysconfdir}/init.d/smack"
59FILES:${PN}-ptest += "generator"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053060
Patrick Williams213cb262021-08-07 19:21:33 -050061RDEPENDS:${PN} += "coreutils python3-core"
62RDEPENDS:${PN}-ptest += "make bash bc"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053063
64BBCLASSEXTEND = "native"