diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-02-13 16:10:40 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2012-02-13 16:13:13 +0800 |
commit | aa356dbbe712d78860ae5fab330363c73aa7525a (patch) | |
tree | 0268728e1189dd863ae853dd23ab8dee6693d25e | |
parent | 396137be3a99adabef33c8a32e75017278fe439b (diff) | |
download | meta-selinux-aa356dbbe712d78860ae5fab330363c73aa7525a.tar.gz |
selinux: bb recipes for SELinux from git source.
Since commit 60b2092e, we have these:
checkpolicy v2.1.8
libselinux v2.1.9
libsemanage v2.1.6
libsepol v2.1.4
policycoreutils v2.1.10
sepolgen v1.1.5
-rw-r--r-- | recipes-security/selinux/checkpolicy_2.1.8.bb | 32 | ||||
-rw-r--r-- | recipes-security/selinux/libselinux_2.1.9.bb | 38 | ||||
-rw-r--r-- | recipes-security/selinux/libsemanage_2.1.6.bb | 42 | ||||
-rw-r--r-- | recipes-security/selinux/libsepol_2.1.4.bb | 18 | ||||
-rw-r--r-- | recipes-security/selinux/policycoreutils_2.1.10.bb | 55 | ||||
-rw-r--r-- | recipes-security/selinux/sepolgen_1.1.5.bb | 28 |
6 files changed, 213 insertions, 0 deletions
diff --git a/recipes-security/selinux/checkpolicy_2.1.8.bb b/recipes-security/selinux/checkpolicy_2.1.8.bb new file mode 100644 index 0000000..2ab24f6 --- /dev/null +++ b/recipes-security/selinux/checkpolicy_2.1.8.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "SELinux policy compiler" | ||
2 | DESCRIPTION = "SELinux policy compiler" | ||
3 | SECTION = "base" | ||
4 | PR = "r1" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
7 | |||
8 | include selinux_git.inc | ||
9 | |||
10 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
11 | S = "${WORKDIR}/git/checkpolicy" | ||
12 | DEPENDS += "libsepol libselinux flex-native" | ||
13 | |||
14 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
15 | EXTRA_OEMAKE += "LEX='flex'" | ||
16 | |||
17 | BBCLASSEXTEND = "native" | ||
18 | |||
19 | do_compile() { | ||
20 | oe_runmake checkpolicy checkmodule \ | ||
21 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
22 | LIBDIR='${STAGING_LIBDIR}' | ||
23 | oe_runmake -C test \ | ||
24 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
25 | LIBDIR='${STAGING_LIBDIR}' | ||
26 | } | ||
27 | |||
28 | do_install_append() { | ||
29 | install test/dismod ${D}/${bindir}/sedismod | ||
30 | install test/dispol ${D}/${bindir}/sedispol | ||
31 | } | ||
32 | |||
diff --git a/recipes-security/selinux/libselinux_2.1.9.bb b/recipes-security/selinux/libselinux_2.1.9.bb new file mode 100644 index 0000000..290b6bb --- /dev/null +++ b/recipes-security/selinux/libselinux_2.1.9.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | SUMMARY = "SELinux library and simple utilities" | ||
2 | DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \ | ||
3 | process and file security contexts and to obtain security policy \ | ||
4 | decisions. Required for any applications that use the SELinux API." | ||
5 | SECTION = "base" | ||
6 | PR = "r1" | ||
7 | LICENSE = "NSA-Public_Domain" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | ||
9 | |||
10 | include selinux_git.inc | ||
11 | inherit lib_package | ||
12 | |||
13 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
14 | S = "${WORKDIR}/git/libselinux" | ||
15 | DEPENDS += "libsepol python python-native swig-native" | ||
16 | |||
17 | PACKAGES += "${PN}-python" | ||
18 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" | ||
19 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" | ||
20 | |||
21 | do_compile_append() { | ||
22 | oe_runmake pywrap -j1 \ | ||
23 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
24 | LIBDIR='${STAGING_LIBDIR}' \ | ||
25 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
26 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
27 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
28 | PYTHONLIBDIR='${PYLIB}' | ||
29 | } | ||
30 | |||
31 | do_install_append() { | ||
32 | oe_runmake install-pywrap swigify \ | ||
33 | DESTDIR=${D} \ | ||
34 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
35 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
36 | } | ||
37 | |||
38 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libsemanage_2.1.6.bb b/recipes-security/selinux/libsemanage_2.1.6.bb new file mode 100644 index 0000000..28165f4 --- /dev/null +++ b/recipes-security/selinux/libsemanage_2.1.6.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "SELinux binary policy manipulation library" | ||
2 | DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ | ||
3 | It is used by checkpolicy (the policy compiler) and similar tools, as well \ | ||
4 | as by programs like load_policy that need to perform specific transformations \ | ||
5 | on binary policies such as customizing policy boolean settings." | ||
6 | SECTION = "base" | ||
7 | PR = "r1" | ||
8 | LICENSE = "LGPLv2.1+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
10 | |||
11 | include selinux_git.inc | ||
12 | inherit lib_package | ||
13 | |||
14 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
15 | S = "${WORKDIR}/git/libsemanage" | ||
16 | DEPENDS += "libsepol libselinux ustr bzip2 python" | ||
17 | |||
18 | PACKAGES += "${PN}-python" | ||
19 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
20 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" | ||
21 | |||
22 | do_compile_append() { | ||
23 | oe_runmake pywrap -j1 \ | ||
24 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
25 | LIBDIR='${STAGING_LIBDIR}' \ | ||
26 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
27 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
28 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
29 | PYTHONLIBDIR='${PYLIB}' | ||
30 | } | ||
31 | |||
32 | do_install_append() { | ||
33 | oe_runmake install-pywrap swigify \ | ||
34 | DESTDIR=${D} \ | ||
35 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
36 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
37 | cd ${D}${libdir} && \ | ||
38 | rm -f libsemanage.so && \ | ||
39 | ln -s ../../`basename ${libdir}`/libsemanage.so.1 libsemanage.so | ||
40 | } | ||
41 | |||
42 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libsepol_2.1.4.bb b/recipes-security/selinux/libsepol_2.1.4.bb new file mode 100644 index 0000000..ab49f41 --- /dev/null +++ b/recipes-security/selinux/libsepol_2.1.4.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "SELinux binary policy manipulation library" | ||
2 | DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \ | ||
3 | It is used by checkpolicy (the policy compiler) and similar tools, as well \ | ||
4 | as by programs like load_policy that need to perform specific transformations \ | ||
5 | on binary policies such as customizing policy boolean settings." | ||
6 | SECTION = "base" | ||
7 | PR = "r1" | ||
8 | LICENSE = "LGPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
10 | |||
11 | include selinux_git.inc | ||
12 | inherit lib_package | ||
13 | |||
14 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
15 | S = "${WORKDIR}/git/libsepol" | ||
16 | |||
17 | BBCLASSEXTEND = "native" | ||
18 | |||
diff --git a/recipes-security/selinux/policycoreutils_2.1.10.bb b/recipes-security/selinux/policycoreutils_2.1.10.bb new file mode 100644 index 0000000..fe5426f --- /dev/null +++ b/recipes-security/selinux/policycoreutils_2.1.10.bb | |||
@@ -0,0 +1,55 @@ | |||
1 | SUMMARY = "SELinux policy core utilities" | ||
2 | DESCRIPTION = "policycoreutils contains the policy core utilities that are required \ | ||
3 | for basic operation of a SELinux system. These utilities include \ | ||
4 | load_policy to load policies, setfiles to label filesystems, newrole \ | ||
5 | to switch roles, and run_init to run /etc/init.d scripts in the proper \ | ||
6 | context." | ||
7 | SECTION = "base" | ||
8 | PR = "r1" | ||
9 | LICENSE = "GPLv2+" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
11 | |||
12 | include selinux_git.inc | ||
13 | |||
14 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
15 | S = "${WORKDIR}/git/policycoreutils" | ||
16 | DEPENDS += "libsepol libselinux libsemanage libcap-ng libcgroup" | ||
17 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" | ||
18 | |||
19 | RDEPENDS_${PN} += "\ | ||
20 | libselinux-python \ | ||
21 | libsemanage-python \ | ||
22 | sepolgen \ | ||
23 | " | ||
24 | RDEPENDS_${PN} += "\ | ||
25 | python \ | ||
26 | python-unixadmin \ | ||
27 | python-shell \ | ||
28 | python-crypt \ | ||
29 | python-subprocess \ | ||
30 | python-syslog \ | ||
31 | python-textutils \ | ||
32 | python-IPy \ | ||
33 | " | ||
34 | #RDEPENDS_${PN} += "setools" | ||
35 | |||
36 | RDEPENDS_${PN}_virtclass-native = "python-native sepolgen-native" | ||
37 | |||
38 | |||
39 | PACKAGES =+ "${PN}-python ${PN}-sandbox" | ||
40 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
41 | FILES_${PN}-sandbox = "${datadir}/sandbox/*" | ||
42 | FILES_${PN}-sandbox += "${bindir}/sandbox" | ||
43 | FILES_${PN}-sandbox += "${sbindir}/seunshare" | ||
44 | |||
45 | CFLAGS_append = " -Wno-error=format-security" | ||
46 | EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=y AUDITH=y', '', d)}" | ||
47 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
48 | |||
49 | BBCLASSEXTEND = "native" | ||
50 | |||
51 | do_install_append_virtclass-native() { | ||
52 | for PYTHSCRIPT in `grep -rIl /usr/bin/python ${D}${bindir} ${D}${sbindir} ${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages/`; do | ||
53 | sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT | ||
54 | done | ||
55 | } | ||
diff --git a/recipes-security/selinux/sepolgen_1.1.5.bb b/recipes-security/selinux/sepolgen_1.1.5.bb new file mode 100644 index 0000000..56b1ddf --- /dev/null +++ b/recipes-security/selinux/sepolgen_1.1.5.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Python modules for supporting various SELinux utilities." | ||
2 | DESCRIPTION = "Python modules for supporting various SELinux utilities." | ||
3 | SECTION = "base" | ||
4 | PR = "r1" | ||
5 | LICENSE = "LGPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
7 | |||
8 | include selinux_git.inc | ||
9 | |||
10 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
11 | |||
12 | S = "${WORKDIR}/git/sepolgen" | ||
13 | |||
14 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
15 | |||
16 | DEPENDS += "python" | ||
17 | |||
18 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | ||
19 | /var/lib/sepolgen" | ||
20 | |||
21 | do_install() { | ||
22 | oe_runmake DESTDIR=${D} \ | ||
23 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
24 | install | ||
25 | } | ||
26 | |||
27 | BBCLASSEXTEND = "native" | ||
28 | |||