blob: 6c523929088e571855574fc113ceac4900a39bb1 [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"
Patrick Williams03907ee2022-05-01 06:28:52 -05004LICENSE = "LGPL-2.1-only"
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +05305
6LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
7
8SRCREV = "4a102c7584b39ce693995ffb65e0918a9df98dd8"
9SRC_URI = " \
Patrick Williams53961c22022-01-20 11:06:23 -060010 git://github.com/smack-team/smack.git;branch=master;protocol=https \
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053011 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.
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000017CVE_CHECK_IGNORE += "CVE-2014-0363"
18CVE_CHECK_IGNORE += "CVE-2014-0364"
19CVE_CHECK_IGNORE += "CVE-2016-10027"
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050020
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"