summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Ouyang <Xin.Ouyang@windriver.com>2012-02-13 16:10:40 +0800
committerXin Ouyang <Xin.Ouyang@windriver.com>2012-02-13 16:13:13 +0800
commitaa356dbbe712d78860ae5fab330363c73aa7525a (patch)
tree0268728e1189dd863ae853dd23ab8dee6693d25e
parent396137be3a99adabef33c8a32e75017278fe439b (diff)
downloadmeta-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.bb32
-rw-r--r--recipes-security/selinux/libselinux_2.1.9.bb38
-rw-r--r--recipes-security/selinux/libsemanage_2.1.6.bb42
-rw-r--r--recipes-security/selinux/libsepol_2.1.4.bb18
-rw-r--r--recipes-security/selinux/policycoreutils_2.1.10.bb55
-rw-r--r--recipes-security/selinux/sepolgen_1.1.5.bb28
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 @@
1SUMMARY = "SELinux policy compiler"
2DESCRIPTION = "SELinux policy compiler"
3SECTION = "base"
4PR = "r1"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
7
8include selinux_git.inc
9
10SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
11S = "${WORKDIR}/git/checkpolicy"
12DEPENDS += "libsepol libselinux flex-native"
13
14EXTRA_OEMAKE += "PREFIX=${D}"
15EXTRA_OEMAKE += "LEX='flex'"
16
17BBCLASSEXTEND = "native"
18
19do_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
28do_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 @@
1SUMMARY = "SELinux library and simple utilities"
2DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \
3process and file security contexts and to obtain security policy \
4decisions. Required for any applications that use the SELinux API."
5SECTION = "base"
6PR = "r1"
7LICENSE = "NSA-Public_Domain"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
9
10include selinux_git.inc
11inherit lib_package
12
13SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
14S = "${WORKDIR}/git/libselinux"
15DEPENDS += "libsepol python python-native swig-native"
16
17PACKAGES += "${PN}-python"
18FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
19FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
20
21do_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
31do_install_append() {
32 oe_runmake install-pywrap swigify \
33 DESTDIR=${D} \
34 PYLIBVER='python${PYTHON_BASEVERSION}' \
35 PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
36}
37
38BBCLASSEXTEND = "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 @@
1SUMMARY = "SELinux binary policy manipulation library"
2DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \
3It is used by checkpolicy (the policy compiler) and similar tools, as well \
4as by programs like load_policy that need to perform specific transformations \
5on binary policies such as customizing policy boolean settings."
6SECTION = "base"
7PR = "r1"
8LICENSE = "LGPLv2.1+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
10
11include selinux_git.inc
12inherit lib_package
13
14SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
15S = "${WORKDIR}/git/libsemanage"
16DEPENDS += "libsepol libselinux ustr bzip2 python"
17
18PACKAGES += "${PN}-python"
19FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
20FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
21
22do_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
32do_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
42BBCLASSEXTEND = "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 @@
1SUMMARY = "SELinux binary policy manipulation library"
2DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \
3It is used by checkpolicy (the policy compiler) and similar tools, as well \
4as by programs like load_policy that need to perform specific transformations \
5on binary policies such as customizing policy boolean settings."
6SECTION = "base"
7PR = "r1"
8LICENSE = "LGPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
10
11include selinux_git.inc
12inherit lib_package
13
14SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
15S = "${WORKDIR}/git/libsepol"
16
17BBCLASSEXTEND = "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 @@
1SUMMARY = "SELinux policy core utilities"
2DESCRIPTION = "policycoreutils contains the policy core utilities that are required \
3for basic operation of a SELinux system. These utilities include \
4load_policy to load policies, setfiles to label filesystems, newrole \
5to switch roles, and run_init to run /etc/init.d scripts in the proper \
6context."
7SECTION = "base"
8PR = "r1"
9LICENSE = "GPLv2+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
11
12include selinux_git.inc
13
14SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
15S = "${WORKDIR}/git/policycoreutils"
16DEPENDS += "libsepol libselinux libsemanage libcap-ng libcgroup"
17DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
18
19RDEPENDS_${PN} += "\
20 libselinux-python \
21 libsemanage-python \
22 sepolgen \
23 "
24RDEPENDS_${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
36RDEPENDS_${PN}_virtclass-native = "python-native sepolgen-native"
37
38
39PACKAGES =+ "${PN}-python ${PN}-sandbox"
40FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
41FILES_${PN}-sandbox = "${datadir}/sandbox/*"
42FILES_${PN}-sandbox += "${bindir}/sandbox"
43FILES_${PN}-sandbox += "${sbindir}/seunshare"
44
45CFLAGS_append = " -Wno-error=format-security"
46EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=y AUDITH=y', '', d)}"
47EXTRA_OEMAKE += "PREFIX=${D}"
48
49BBCLASSEXTEND = "native"
50
51do_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 @@
1SUMMARY = "Python modules for supporting various SELinux utilities."
2DESCRIPTION = "Python modules for supporting various SELinux utilities."
3SECTION = "base"
4PR = "r1"
5LICENSE = "LGPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
7
8include selinux_git.inc
9
10SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
11
12S = "${WORKDIR}/git/sepolgen"
13
14FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
15
16DEPENDS += "python"
17
18FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \
19 /var/lib/sepolgen"
20
21do_install() {
22 oe_runmake DESTDIR=${D} \
23 PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
24 install
25}
26
27BBCLASSEXTEND = "native"
28