summaryrefslogtreecommitdiffstats
path: root/recipes-security
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2016-10-25 12:21:15 -0700
committerArmin Kuster <akuster808@gmail.com>2016-11-10 13:34:46 -0800
commitd322b32a4ef7a19abae053edddf2dee9ae9d8e0a (patch)
tree6b84f2a978930296321ebf41a1015db5315f0a61 /recipes-security
parentb9f288581d094218c6d7ffc6cfa8986d1e44358c (diff)
downloadmeta-security-d322b32a4ef7a19abae053edddf2dee9ae9d8e0a.tar.gz
smack: Add new package
V2: Fix typo and add LDFLAG to makefile Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security')
-rw-r--r--recipes-security/smack/files/run-ptest3
-rw-r--r--recipes-security/smack/files/smack_generator_make_fixup.patch18
-rw-r--r--recipes-security/smack/smack_1.3.0.bb54
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 @@
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-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 @@
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 = "478f68d182c5070f510482194d3e097b11c21907"
9SRC_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
14PV = "1.3.0+git${SRCPV}"
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"