summaryrefslogtreecommitdiffstats
path: root/recipes-mac/smack
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2019-03-30 14:12:41 -0700
committerArmin Kuster <akuster808@gmail.com>2019-03-31 10:37:09 -0700
commit75e609f7b14b57b27143ec9e8d818fc5fab6d106 (patch)
tree7ac38794680a5f6eda5eb907aeac47ae5e173854 /recipes-mac/smack
parent00f00d28971355a1a5ce9d38b617adfd991104bd (diff)
downloadmeta-security-75e609f7b14b57b27143ec9e8d818fc5fab6d106.tar.gz
reorg: move mac recipes to recipes-mac
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-mac/smack')
-rw-r--r--recipes-mac/smack/files/run-ptest3
-rw-r--r--recipes-mac/smack/files/smack_generator_make_fixup.patch18
-rw-r--r--recipes-mac/smack/smack_1.3.1.bb54
3 files changed, 75 insertions, 0 deletions
diff --git a/recipes-mac/smack/files/run-ptest b/recipes-mac/smack/files/run-ptest
new file mode 100644
index 0000000..049a9b4
--- /dev/null
+++ b/recipes-mac/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-mac/smack/files/smack_generator_make_fixup.patch b/recipes-mac/smack/files/smack_generator_make_fixup.patch
new file mode 100644
index 0000000..4d677e7
--- /dev/null
+++ b/recipes-mac/smack/files/smack_generator_make_fixup.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Pending
2
3Signed-off-by: Armin Kuster <akuster808@gmail.com>
4
5
6Index: 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-mac/smack/smack_1.3.1.bb b/recipes-mac/smack/smack_1.3.1.bb
new file mode 100644
index 0000000..246562a
--- /dev/null
+++ b/recipes-mac/smack/smack_1.3.1.bb
@@ -0,0 +1,54 @@
1DESCRIPTION = "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
16inherit autotools update-rc.d pkgconfig ptest ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
17
18S = "${WORKDIR}/git"
19
20PACKAGECONFIG ??= ""
21PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
22
23PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir, systemd"
24
25do_compile_append () {
26 oe_runmake -C ${S}/tests generator
27}
28
29do_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
37do_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
44INITSCRIPT_PACKAGES = "${PN}"
45INITSCRIPT_NAME = "smack"
46INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ."
47
48FILES_${PN} += "${sysconfdir}/init.d/smack"
49FILES_${PN}-ptest += "generator"
50
51RDEPENDS_${PN} += "coreutils"
52RDEPENDS_${PN}-ptest += "make bash bc"
53
54BBCLASSEXTEND = "native"