diff options
| -rw-r--r-- | recipes-security/smack/files/run-ptest | 3 | ||||
| -rw-r--r-- | recipes-security/smack/files/smack_generator_make_fixup.patch | 18 | ||||
| -rw-r--r-- | recipes-security/smack/smack_1.3.0.bb | 54 |
3 files changed, 75 insertions, 0 deletions
diff --git a/recipes-security/smack/files/run-ptest b/recipes-security/smack/files/run-ptest new file mode 100644 index 0000000..049a9b4 --- /dev/null +++ b/recipes-security/smack/files/run-ptest | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | ./tests/make_policies.bash ./tests/generator | ||
| 3 | ./tests/make_policies.bash ./tests/generator labels | ||
diff --git a/recipes-security/smack/files/smack_generator_make_fixup.patch b/recipes-security/smack/files/smack_generator_make_fixup.patch new file mode 100644 index 0000000..4d677e7 --- /dev/null +++ b/recipes-security/smack/files/smack_generator_make_fixup.patch | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
| 4 | |||
| 5 | |||
| 6 | Index: git/tests/Makefile | ||
| 7 | =================================================================== | ||
| 8 | --- git.orig/tests/Makefile | ||
| 9 | +++ git/tests/Makefile | ||
| 10 | @@ -4,7 +4,7 @@ clean: | ||
| 11 | rm -rf ./out ./generator | ||
| 12 | |||
| 13 | generator: generator.c | ||
| 14 | - gcc -Wall -O3 generator.c -o ./generator | ||
| 15 | + ${CC} ${LDFLAGS} generator.c -o ./generator | ||
| 16 | |||
| 17 | policies: ./generator ./make_policies.bash | ||
| 18 | ./make_policies.bash ./generator | ||
diff --git a/recipes-security/smack/smack_1.3.0.bb b/recipes-security/smack/smack_1.3.0.bb new file mode 100644 index 0000000..4c41f6c --- /dev/null +++ b/recipes-security/smack/smack_1.3.0.bb | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | DESCRIPTION = "Selection of tools for developers working with Smack" | ||
| 2 | HOMEPAGE = "https://github.com/smack-team/smack" | ||
| 3 | SECTION = "Security/Access Control" | ||
| 4 | LICENSE = "LGPL-2.1" | ||
| 5 | |||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" | ||
| 7 | |||
| 8 | SRCREV = "478f68d182c5070f510482194d3e097b11c21907" | ||
| 9 | SRC_URI = " \ | ||
| 10 | git://github.com/smack-team/smack.git;branch=v1.3.x \ | ||
| 11 | file://smack_generator_make_fixup.patch \ | ||
| 12 | file://run-ptest" | ||
| 13 | |||
| 14 | PV = "1.3.0+git${SRCPV}" | ||
| 15 | |||
| 16 | inherit autotools update-rc.d pkgconfig ptest ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} | ||
| 17 | |||
| 18 | S = "${WORKDIR}/git" | ||
| 19 | |||
| 20 | PACKAGECONFIG ??= "" | ||
| 21 | PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
| 22 | |||
| 23 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd" | ||
| 24 | |||
| 25 | do_compile_append () { | ||
| 26 | oe_runmake -C ${S}/tests generator | ||
| 27 | } | ||
| 28 | |||
| 29 | do_install_append () { | ||
| 30 | install -d ${D}${sysconfdir}/init.d | ||
| 31 | install -d ${D}${sysconfdir}/smack | ||
| 32 | install -d ${D}${sysconfdir}/smack/accesses.d | ||
| 33 | install -d ${D}${sysconfdir}/smack/cipso.d | ||
| 34 | install ${S}/init/smack.rc ${D}/${sysconfdir}/init.d/smack | ||
| 35 | } | ||
| 36 | |||
| 37 | do_install_ptest () { | ||
| 38 | install -d ${D}${PTEST_PATH}/tests | ||
| 39 | install ${S}/tests/generator ${D}/${PTEST_PATH}/tests | ||
| 40 | install ${S}/tests/generate-rules.sh ${D}${PTEST_PATH}/tests | ||
| 41 | install ${S}/tests/make_policies.bash ${D}${PTEST_PATH}/tests | ||
| 42 | } | ||
| 43 | |||
| 44 | INITSCRIPT_PACKAGES = "${PN}" | ||
| 45 | INITSCRIPT_NAME = "smack" | ||
| 46 | INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ." | ||
| 47 | |||
| 48 | FILES_${PN} += "${sysconfdir}/init.d/smack" | ||
| 49 | FILES_${PN}-ptest += "generator" | ||
| 50 | |||
| 51 | RDEPENDS_${PN} += "coreutils" | ||
| 52 | RDEPENDS_${PN}-ptest += "make bash bc" | ||
| 53 | |||
| 54 | BBCLASSEXTEND = "native" | ||
