diff options
author | Xin Ouyang <Xin.Ouyang@windriver.com> | 2013-01-04 15:12:42 +0800 |
---|---|---|
committer | Xin Ouyang <Xin.Ouyang@windriver.com> | 2013-01-05 13:12:57 +0800 |
commit | 17335d322c10f2b741bdca5d49a02d557e634736 (patch) | |
tree | fe3aa008194d9d04916bd9231abfabc714d9ef1e | |
parent | 1f3b70427ca5a729f0a8e5969825abbcc4964a20 (diff) | |
download | meta-selinux-17335d322c10f2b741bdca5d49a02d557e634736.tar.gz |
selinux packages: create include files.
Create include files for selinux userspace packages:
* checkpolicy.inc
* libselinux.inc
* libsemanage.inc
* libsepol.inc
* policycoreutils.inc
* sepolgen.inc
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
19 files changed, 285 insertions, 485 deletions
diff --git a/recipes-security/selinux/checkpolicy.inc b/recipes-security/selinux/checkpolicy.inc new file mode 100644 index 0000000..096f938 --- /dev/null +++ b/recipes-security/selinux/checkpolicy.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | PRINC = "1" | ||
2 | |||
3 | SUMMARY = "SELinux policy compiler" | ||
4 | DESCRIPTION = "\ | ||
5 | This package contains checkpolicy, the SELinux policy compiler. Only \ | ||
6 | required for building policies. It uses libsepol to generate the \ | ||
7 | binary policy. checkpolicy uses the static libsepol since it deals \ | ||
8 | with low level details of the policy that have not been \ | ||
9 | encapsulated/abstracted by a proper shared library interface." | ||
10 | |||
11 | SECTION = "base" | ||
12 | LICENSE = "GPLv2+" | ||
13 | |||
14 | DEPENDS += "libsepol libselinux bison-native flex-native" | ||
15 | |||
16 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
17 | EXTRA_OEMAKE += "LEX='flex'" | ||
18 | |||
19 | do_install_append() { | ||
20 | install test/dismod ${D}/${bindir}/sedismod | ||
21 | install test/dispol ${D}/${bindir}/sedispol | ||
22 | } | ||
23 | |||
24 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/checkpolicy_2.1.8.bb b/recipes-security/selinux/checkpolicy_2.1.8.bb index e2b9f67..d0fd759 100644 --- a/recipes-security/selinux/checkpolicy_2.1.8.bb +++ b/recipes-security/selinux/checkpolicy_2.1.8.bb | |||
@@ -1,30 +1,9 @@ | |||
1 | SUMMARY = "SELinux policy compiler" | ||
2 | DESCRIPTION = "\ | ||
3 | This package contains checkpolicy, the SELinux policy compiler. Only \ | ||
4 | required for building policies. It uses libsepol to generate the \ | ||
5 | binary policy. checkpolicy uses the static libsepol since it deals \ | ||
6 | with low level details of the policy that have not been \ | ||
7 | encapsulated/abstracted by a proper shared library interface." | ||
8 | |||
9 | SECTION = "base" | ||
10 | PR = "r2" | 1 | PR = "r2" |
11 | LICENSE = "GPLv2+" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
13 | 2 | ||
14 | include selinux_20120216.inc | 3 | include selinux_20120216.inc |
4 | include ${BPN}.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
15 | 7 | ||
16 | SRC_URI[md5sum] = "e7b5d62873d4efc8a502b75f042f6735" | 8 | SRC_URI[md5sum] = "e7b5d62873d4efc8a502b75f042f6735" |
17 | SRC_URI[sha256sum] = "8ed586fd2ccf9900f86e38b72af4aa5cc3bade35d0fa19c53ac1a3d59fe0013a" | 9 | SRC_URI[sha256sum] = "8ed586fd2ccf9900f86e38b72af4aa5cc3bade35d0fa19c53ac1a3d59fe0013a" |
18 | |||
19 | DEPENDS += "libsepol libselinux bison-native flex-native" | ||
20 | |||
21 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
22 | EXTRA_OEMAKE += "LEX='flex'" | ||
23 | |||
24 | BBCLASSEXTEND = "native" | ||
25 | |||
26 | do_install_append() { | ||
27 | install test/dismod ${D}/${bindir}/sedismod | ||
28 | install test/dispol ${D}/${bindir}/sedispol | ||
29 | } | ||
30 | |||
diff --git a/recipes-security/selinux/checkpolicy_git.bb b/recipes-security/selinux/checkpolicy_git.bb index be4f335..32240c1 100644 --- a/recipes-security/selinux/checkpolicy_git.bb +++ b/recipes-security/selinux/checkpolicy_git.bb | |||
@@ -1,31 +1,7 @@ | |||
1 | SUMMARY = "SELinux policy compiler" | ||
2 | DESCRIPTION = "\ | ||
3 | This package contains checkpolicy, the SELinux policy compiler. Only \ | ||
4 | required for building policies. It uses libsepol to generate the \ | ||
5 | binary policy. checkpolicy uses the static libsepol since it deals \ | ||
6 | with low level details of the policy that have not been \ | ||
7 | encapsulated/abstracted by a proper shared library interface." | ||
8 | |||
9 | SECTION = "base" | ||
10 | PR = "r2" | 1 | PR = "r2" |
11 | LICENSE = "GPLv2+" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
13 | DEFAULT_PREFERENCE = "-1" | ||
14 | |||
15 | include selinux_git.inc | ||
16 | |||
17 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
18 | PV = "2.1.8+git${SRCPV}" | 2 | PV = "2.1.8+git${SRCPV}" |
19 | 3 | ||
20 | DEPENDS += "libsepol libselinux bison-native flex-native" | 4 | include selinux_git.inc |
21 | 5 | include ${BPN}.inc | |
22 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
23 | EXTRA_OEMAKE += "LEX='flex'" | ||
24 | |||
25 | BBCLASSEXTEND = "native" | ||
26 | |||
27 | do_install_append() { | ||
28 | install test/dismod ${D}/${bindir}/sedismod | ||
29 | install test/dispol ${D}/${bindir}/sedispol | ||
30 | } | ||
31 | 6 | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
diff --git a/recipes-security/selinux/libselinux.inc b/recipes-security/selinux/libselinux.inc new file mode 100644 index 0000000..575ebbc --- /dev/null +++ b/recipes-security/selinux/libselinux.inc | |||
@@ -0,0 +1,43 @@ | |||
1 | PRINC = "1" | ||
2 | |||
3 | SUMMARY = "SELinux library and simple utilities" | ||
4 | DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \ | ||
5 | process and file security contexts and to obtain security policy \ | ||
6 | decisions. Required for any applications that use the SELinux API." | ||
7 | SECTION = "base" | ||
8 | LICENSE = "PD" | ||
9 | |||
10 | inherit lib_package pythonnative | ||
11 | |||
12 | DEPENDS += "libsepol python swig-native" | ||
13 | |||
14 | PACKAGES += "${PN}-python" | ||
15 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" | ||
16 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" | ||
17 | |||
18 | def get_policyconfigarch(d): | ||
19 | import re | ||
20 | target = d.getVar('TARGET_ARCH', True) | ||
21 | p = re.compile('i.86') | ||
22 | target = p.sub('i386',target) | ||
23 | return "ARCH=%s" % (target) | ||
24 | EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" | ||
25 | |||
26 | do_compile_append() { | ||
27 | oe_runmake pywrap -j1 \ | ||
28 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
29 | LIBDIR='${STAGING_LIBDIR}' \ | ||
30 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
31 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
32 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
33 | PYTHONLIBDIR='${PYLIB}' | ||
34 | } | ||
35 | |||
36 | do_install_append() { | ||
37 | oe_runmake install-pywrap swigify \ | ||
38 | DESTDIR=${D} \ | ||
39 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
40 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
41 | } | ||
42 | |||
43 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libselinux_2.1.9.bb b/recipes-security/selinux/libselinux_2.1.9.bb index 40fbf10..8d4fc3f 100644 --- a/recipes-security/selinux/libselinux_2.1.9.bb +++ b/recipes-security/selinux/libselinux_2.1.9.bb | |||
@@ -1,49 +1,11 @@ | |||
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 = "r3" | 1 | PR = "r3" |
7 | LICENSE = "PD" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | ||
9 | 2 | ||
10 | include selinux_20120216.inc | 3 | include selinux_20120216.inc |
11 | inherit lib_package pythonnative | 4 | include ${BPN}.inc |
5 | |||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | ||
12 | 7 | ||
13 | SRC_URI[md5sum] = "8ea0548dd65e9479b357ba1447f89221" | 8 | SRC_URI[md5sum] = "8ea0548dd65e9479b357ba1447f89221" |
14 | SRC_URI[sha256sum] = "749d4b39c80aa9df8247b8b3187ab72442c0dbad6e70bf312e25052bd4e7063f" | 9 | SRC_URI[sha256sum] = "749d4b39c80aa9df8247b8b3187ab72442c0dbad6e70bf312e25052bd4e7063f" |
15 | 10 | ||
16 | SRC_URI += "file://libselinux-fix-init-load-policy.patch" | 11 | SRC_URI += "file://libselinux-fix-init-load-policy.patch" |
17 | |||
18 | DEPENDS += "libsepol python swig-native" | ||
19 | |||
20 | PACKAGES += "${PN}-python" | ||
21 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" | ||
22 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" | ||
23 | |||
24 | def get_policyconfigarch(d): | ||
25 | import re | ||
26 | target = d.getVar('TARGET_ARCH', True) | ||
27 | p = re.compile('i.86') | ||
28 | target = p.sub('i386',target) | ||
29 | return "ARCH=%s" % (target) | ||
30 | EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" | ||
31 | |||
32 | do_compile_append() { | ||
33 | oe_runmake pywrap -j1 \ | ||
34 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
35 | LIBDIR='${STAGING_LIBDIR}' \ | ||
36 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
37 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
38 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
39 | PYTHONLIBDIR='${PYLIB}' | ||
40 | } | ||
41 | |||
42 | do_install_append() { | ||
43 | oe_runmake install-pywrap swigify \ | ||
44 | DESTDIR=${D} \ | ||
45 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
46 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
47 | } | ||
48 | |||
49 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libselinux_git.bb b/recipes-security/selinux/libselinux_git.bb index 893fac5..902e859 100644 --- a/recipes-security/selinux/libselinux_git.bb +++ b/recipes-security/selinux/libselinux_git.bb | |||
@@ -1,48 +1,9 @@ | |||
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 = "r3" | 1 | PR = "r3" |
7 | LICENSE = "PD" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" | ||
9 | DEFAULT_PREFERENCE = "-1" | ||
10 | |||
11 | include selinux_git.inc | ||
12 | inherit lib_package pythonnative | ||
13 | |||
14 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
15 | PV = "2.1.9+git${SRCPV}" | 2 | PV = "2.1.9+git${SRCPV}" |
16 | 3 | ||
17 | DEPENDS += "libsepol python swig-native" | 4 | include selinux_git.inc |
18 | 5 | include ${BPN}.inc | |
19 | PACKAGES += "${PN}-python" | ||
20 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*" | ||
21 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*" | ||
22 | |||
23 | def get_git_policyconfigarch(d): | ||
24 | import re | ||
25 | target = d.getVar('TARGET_ARCH', True) | ||
26 | p = re.compile('i.86') | ||
27 | target = p.sub('i386',target) | ||
28 | return "ARCH=%s" % (target) | ||
29 | EXTRA_OEMAKE += "${@get_git_policyconfigarch(d)}" | ||
30 | |||
31 | do_compile_append() { | ||
32 | oe_runmake pywrap -j1 \ | ||
33 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
34 | LIBDIR='${STAGING_LIBDIR}' \ | ||
35 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
36 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
37 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
38 | PYTHONLIBDIR='${PYLIB}' | ||
39 | } | ||
40 | 6 | ||
41 | do_install_append() { | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0" |
42 | oe_runmake install-pywrap swigify \ | ||
43 | DESTDIR=${D} \ | ||
44 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
45 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
46 | } | ||
47 | 8 | ||
48 | BBCLASSEXTEND = "native" | 9 | SRC_URI += "file://libselinux-fix-init-load-policy.patch" |
diff --git a/recipes-security/selinux/libsemanage.inc b/recipes-security/selinux/libsemanage.inc new file mode 100644 index 0000000..dfc3006 --- /dev/null +++ b/recipes-security/selinux/libsemanage.inc | |||
@@ -0,0 +1,43 @@ | |||
1 | PRINC = "1" | ||
2 | |||
3 | SUMMARY = "SELinux binary policy manipulation library" | ||
4 | DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \ | ||
5 | It is used by checkpolicy (the policy compiler) and similar tools, as well \ | ||
6 | as by programs like load_policy that need to perform specific transformations \ | ||
7 | on binary policies such as customizing policy boolean settings." | ||
8 | SECTION = "base" | ||
9 | LICENSE = "LGPLv2.1+" | ||
10 | |||
11 | inherit lib_package | ||
12 | |||
13 | DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native" | ||
14 | |||
15 | PACKAGES += "${PN}-python" | ||
16 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
17 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" | ||
18 | |||
19 | do_compile_append() { | ||
20 | oe_runmake pywrap \ | ||
21 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
22 | LIBDIR='${STAGING_LIBDIR}' \ | ||
23 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
24 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
25 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
26 | PYTHONLIBDIR='${PYLIB}' | ||
27 | } | ||
28 | |||
29 | do_install() { | ||
30 | oe_runmake install \ | ||
31 | DESTDIR="${D}" \ | ||
32 | PREFIX="${D}/${prefix}" \ | ||
33 | INCLUDEDIR="${D}/${includedir}" \ | ||
34 | LIBDIR="${D}/${libdir}" \ | ||
35 | SHLIBDIR="${D}/${libdir}" | ||
36 | |||
37 | oe_runmake install-pywrap swigify \ | ||
38 | DESTDIR=${D} \ | ||
39 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
40 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
41 | } | ||
42 | |||
43 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libsemanage_2.1.6.bb b/recipes-security/selinux/libsemanage_2.1.6.bb index b808b68..a6825ff 100644 --- a/recipes-security/selinux/libsemanage_2.1.6.bb +++ b/recipes-security/selinux/libsemanage_2.1.6.bb | |||
@@ -1,52 +1,14 @@ | |||
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 = "r3" | 1 | PR = "r3" |
8 | LICENSE = "LGPLv2.1+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
10 | 2 | ||
11 | include selinux_20120216.inc | 3 | include selinux_20120216.inc |
12 | inherit lib_package | 4 | include ${BPN}.inc |
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
13 | 7 | ||
14 | SRC_URI[md5sum] = "b49d75602432d8cfad8a3e5a0a966f07" | 8 | SRC_URI[md5sum] = "b49d75602432d8cfad8a3e5a0a966f07" |
15 | SRC_URI[sha256sum] = "64e6849fe50fb463ec0ba24653a26e3452fa4aaa7d7e192213d5c5a7c525aebb" | 9 | SRC_URI[sha256sum] = "64e6849fe50fb463ec0ba24653a26e3452fa4aaa7d7e192213d5c5a7c525aebb" |
16 | 10 | ||
17 | DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native" | ||
18 | |||
19 | SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ | 11 | SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ |
20 | file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ | 12 | file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ |
21 | file://libsemanage-semanage.conf-for-cross-compile.patch \ | 13 | file://libsemanage-semanage.conf-for-cross-compile.patch \ |
22 | file://libsemanage-fix-path-len-limit.patch" | 14 | file://libsemanage-fix-path-len-limit.patch" |
23 | |||
24 | PACKAGES += "${PN}-python" | ||
25 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
26 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" | ||
27 | |||
28 | do_compile_append() { | ||
29 | oe_runmake pywrap \ | ||
30 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
31 | LIBDIR='${STAGING_LIBDIR}' \ | ||
32 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
33 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
34 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
35 | PYTHONLIBDIR='${PYLIB}' | ||
36 | } | ||
37 | |||
38 | do_install() { | ||
39 | oe_runmake install \ | ||
40 | DESTDIR="${D}" \ | ||
41 | PREFIX="${D}/${prefix}" \ | ||
42 | INCLUDEDIR="${D}/${includedir}" \ | ||
43 | LIBDIR="${D}/${libdir}" \ | ||
44 | SHLIBDIR="${D}/${libdir}" | ||
45 | |||
46 | oe_runmake install-pywrap swigify \ | ||
47 | DESTDIR=${D} \ | ||
48 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
49 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
50 | } | ||
51 | |||
52 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libsemanage_git.bb b/recipes-security/selinux/libsemanage_git.bb index 71cb1ab..be4623d 100644 --- a/recipes-security/selinux/libsemanage_git.bb +++ b/recipes-security/selinux/libsemanage_git.bb | |||
@@ -1,53 +1,12 @@ | |||
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 = "r3" | 1 | PR = "r3" |
8 | LICENSE = "LGPLv2.1+" | 2 | PV = "2.1.6+git${SRCPV}" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
10 | DEFAULT_PREFERENCE = "-1" | ||
11 | 3 | ||
12 | include selinux_git.inc | 4 | include selinux_git.inc |
13 | inherit lib_package | 5 | include ${BPN}.inc |
14 | 6 | ||
15 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" |
16 | PV = "2.1.6+git${SRCPV}" | ||
17 | |||
18 | DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native" | ||
19 | 8 | ||
20 | SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ | 9 | SRC_URI += "file://Fix-segfault-for-standard-policy.patch \ |
21 | file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ | 10 | file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ |
22 | file://libsemanage-semanage.conf-for-cross-compile.patch \ | 11 | file://libsemanage-semanage.conf-for-cross-compile.patch \ |
23 | file://libsemanage-fix-path-len-limit.patch" | 12 | file://libsemanage-fix-path-len-limit.patch" |
24 | |||
25 | PACKAGES += "${PN}-python" | ||
26 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
27 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" | ||
28 | |||
29 | do_compile_append() { | ||
30 | oe_runmake pywrap \ | ||
31 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
32 | LIBDIR='${STAGING_LIBDIR}' \ | ||
33 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
34 | PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \ | ||
35 | PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \ | ||
36 | PYTHONLIBDIR='${PYLIB}' | ||
37 | } | ||
38 | |||
39 | do_install() { | ||
40 | oe_runmake install \ | ||
41 | DESTDIR="${D}" \ | ||
42 | PREFIX="${D}/${prefix}" \ | ||
43 | INCLUDEDIR="${D}/${includedir}" \ | ||
44 | LIBDIR="${D}/${libdir}" \ | ||
45 | SHLIBDIR="${D}/${libdir}" | ||
46 | |||
47 | oe_runmake install-pywrap swigify \ | ||
48 | DESTDIR=${D} \ | ||
49 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | ||
50 | PYLIBDIR='${D}/${libdir}/$(PYLIBVER)' | ||
51 | } | ||
52 | |||
53 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-security/selinux/libsepol.inc b/recipes-security/selinux/libsepol.inc new file mode 100644 index 0000000..8f0dc33 --- /dev/null +++ b/recipes-security/selinux/libsepol.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | PRINC = "1" | ||
2 | |||
3 | SUMMARY = "SELinux binary policy manipulation library" | ||
4 | DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \ | ||
5 | It is used by checkpolicy (the policy compiler) and similar tools, as well \ | ||
6 | as by programs like load_policy that need to perform specific transformations \ | ||
7 | on binary policies such as customizing policy boolean settings." | ||
8 | SECTION = "base" | ||
9 | LICENSE = "LGPLv2+" | ||
10 | |||
11 | inherit lib_package | ||
12 | |||
13 | BBCLASSEXTEND = "native" | ||
14 | |||
diff --git a/recipes-security/selinux/libsepol_2.1.4.bb b/recipes-security/selinux/libsepol_2.1.4.bb index 4e795a2..eac1ed1 100644 --- a/recipes-security/selinux/libsepol_2.1.4.bb +++ b/recipes-security/selinux/libsepol_2.1.4.bb | |||
@@ -1,20 +1,11 @@ | |||
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" | 1 | PR = "r1" |
8 | LICENSE = "LGPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
10 | 2 | ||
11 | include selinux_20120216.inc | 3 | include selinux_20120216.inc |
12 | inherit lib_package | 4 | include ${BPN}.inc |
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
13 | 7 | ||
14 | SRC_URI[md5sum] = "909dae553edb34ea2224002a0c529cb0" | 8 | SRC_URI[md5sum] = "909dae553edb34ea2224002a0c529cb0" |
15 | SRC_URI[sha256sum] = "8f5ea42ae6cc00b21f0e5f31f354d19fcce3edfe9328971d266245718714b1e8" | 9 | SRC_URI[sha256sum] = "8f5ea42ae6cc00b21f0e5f31f354d19fcce3edfe9328971d266245718714b1e8" |
16 | 10 | ||
17 | SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch" | 11 | SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch" |
18 | |||
19 | BBCLASSEXTEND = "native" | ||
20 | |||
diff --git a/recipes-security/selinux/libsepol_git.bb b/recipes-security/selinux/libsepol_git.bb index cb6e62e..f7d801c 100644 --- a/recipes-security/selinux/libsepol_git.bb +++ b/recipes-security/selinux/libsepol_git.bb | |||
@@ -1,21 +1,9 @@ | |||
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" | 1 | PR = "r1" |
8 | LICENSE = "LGPLv2+" | 2 | PV = "2.1.4+git${SRCPV}" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" | ||
10 | DEFAULT_PREFERENCE = "-1" | ||
11 | 3 | ||
12 | include selinux_git.inc | 4 | include selinux_git.inc |
13 | inherit lib_package | 5 | include ${BPN}.inc |
14 | 6 | ||
15 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" |
16 | PV = "2.1.4+git${SRCPV}" | ||
17 | 8 | ||
18 | SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch" | 9 | SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch" |
19 | |||
20 | BBCLASSEXTEND = "native" | ||
21 | |||
diff --git a/recipes-security/selinux/policycoreutils.inc b/recipes-security/selinux/policycoreutils.inc new file mode 100644 index 0000000..e105db2 --- /dev/null +++ b/recipes-security/selinux/policycoreutils.inc | |||
@@ -0,0 +1,86 @@ | |||
1 | PRINC = "1" | ||
2 | |||
3 | SUMMARY = "SELinux policy core utilities" | ||
4 | DESCRIPTION = "policycoreutils contains the policy core utilities that are required \ | ||
5 | for basic operation of a SELinux system. These utilities include \ | ||
6 | load_policy to load policies, setfiles to label filesystems, newrole \ | ||
7 | to switch roles, and run_init to run /etc/init.d scripts in the proper \ | ||
8 | context." | ||
9 | SECTION = "base" | ||
10 | LICENSE = "GPLv2+" | ||
11 | |||
12 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
13 | |||
14 | PAM_SRC_URI = "file://pam.d/newrole \ | ||
15 | file://pam.d/run_init \ | ||
16 | " | ||
17 | |||
18 | DEPENDS += "libsepol libselinux libsemanage" | ||
19 | DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" | ||
20 | EXTRA_DEPENDS = "libcap-ng libcgroup" | ||
21 | EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" | ||
22 | |||
23 | RDEPENDS_${BPN} += "\ | ||
24 | libselinux-python \ | ||
25 | libsemanage-python \ | ||
26 | sepolgen \ | ||
27 | " | ||
28 | RDEPENDS_${BPN} += "\ | ||
29 | python \ | ||
30 | python-unixadmin \ | ||
31 | python-shell \ | ||
32 | python-crypt \ | ||
33 | python-subprocess \ | ||
34 | python-syslog \ | ||
35 | python-textutils \ | ||
36 | python-ipy \ | ||
37 | " | ||
38 | |||
39 | RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python" | ||
40 | |||
41 | WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}" | ||
42 | ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}" | ||
43 | |||
44 | PACKAGES =+ "${PN}-python ${PN}-sandbox" | ||
45 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
46 | FILES_${PN}-sandbox = "${datadir}/sandbox/*" | ||
47 | FILES_${PN}-sandbox += "${bindir}/sandbox" | ||
48 | FILES_${PN}-sandbox += "${sbindir}/seunshare" | ||
49 | |||
50 | inherit pythonnative | ||
51 | |||
52 | AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `" | ||
53 | PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `" | ||
54 | EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=${PAMH} AUDITH=${AUDITH}', 'PAMH= AUDITH= ', d)} INOTIFYH=n" | ||
55 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
56 | EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d" | ||
57 | |||
58 | BBCLASSEXTEND = "native" | ||
59 | |||
60 | PCU_NATIVE_CMDS = "setfiles semodule_package semodule semodule_link semodule_expand semodule_deps" | ||
61 | |||
62 | do_compile_virtclass-native() { | ||
63 | for PCU_CMD in ${PCU_NATIVE_CMDS} ; do | ||
64 | oe_runmake -C $PCU_CMD \ | ||
65 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
66 | LIBDIR='${STAGING_LIBDIR}' | ||
67 | done | ||
68 | } | ||
69 | |||
70 | do_install_virtclass-native() { | ||
71 | for PCU_CMD in ${PCU_NATIVE_CMDS} ; do | ||
72 | oe_runmake -C $PCU_CMD install \ | ||
73 | DESTDIR="${D}" \ | ||
74 | PREFIX="${D}/${prefix}" \ | ||
75 | SBINDIR="${D}/${base_sbindir}" | ||
76 | done | ||
77 | } | ||
78 | |||
79 | do_install_append() { | ||
80 | test "${CLASSOVERRIDE}" = "class-native" && return 0 | ||
81 | |||
82 | if [ -e ${WORKDIR}/pam.d ]; then | ||
83 | install -d ${D}${sysconfdir}/pam.d/ | ||
84 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
85 | fi | ||
86 | } | ||
diff --git a/recipes-security/selinux/policycoreutils_2.1.10.bb b/recipes-security/selinux/policycoreutils_2.1.10.bb index 44f5ee8..6feb3cb 100644 --- a/recipes-security/selinux/policycoreutils_2.1.10.bb +++ b/recipes-security/selinux/policycoreutils_2.1.10.bb | |||
@@ -1,94 +1,13 @@ | |||
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 = "r7" | 1 | PR = "r7" |
9 | LICENSE = "GPLv2+" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
11 | 2 | ||
12 | include selinux_20120216.inc | 3 | include selinux_20120216.inc |
4 | include ${BPN}.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
13 | 7 | ||
14 | SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257" | 8 | SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257" |
15 | SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1" | 9 | SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1" |
16 | 10 | ||
17 | SRC_URI += "file://policycoreutils-fix-format-security.patch \ | 11 | SRC_URI += "file://policycoreutils-fix-format-security.patch \ |
18 | file://policycoreutils-remove-empty-po-files.patch \ | 12 | file://policycoreutils-remove-empty-po-files.patch \ |
19 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
20 | " | 13 | " |
21 | |||
22 | PAM_SRC_URI = "file://pam.d/newrole \ | ||
23 | file://pam.d/run_init \ | ||
24 | " | ||
25 | |||
26 | DEPENDS += "libsepol libselinux libsemanage" | ||
27 | DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" | ||
28 | EXTRA_DEPENDS = "libcap-ng libcgroup" | ||
29 | EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" | ||
30 | |||
31 | RDEPENDS_${BPN} += "\ | ||
32 | libselinux-python \ | ||
33 | libsemanage-python \ | ||
34 | sepolgen \ | ||
35 | " | ||
36 | RDEPENDS_${BPN} += "\ | ||
37 | python \ | ||
38 | python-unixadmin \ | ||
39 | python-shell \ | ||
40 | python-crypt \ | ||
41 | python-subprocess \ | ||
42 | python-syslog \ | ||
43 | python-textutils \ | ||
44 | python-ipy \ | ||
45 | " | ||
46 | |||
47 | RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python" | ||
48 | |||
49 | WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}" | ||
50 | ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}" | ||
51 | |||
52 | PACKAGES =+ "${PN}-python ${PN}-sandbox" | ||
53 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
54 | FILES_${PN}-sandbox = "${datadir}/sandbox/*" | ||
55 | FILES_${PN}-sandbox += "${bindir}/sandbox" | ||
56 | FILES_${PN}-sandbox += "${sbindir}/seunshare" | ||
57 | |||
58 | inherit pythonnative | ||
59 | |||
60 | AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `" | ||
61 | PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `" | ||
62 | EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=${PAMH} AUDITH=${AUDITH}', 'PAMH= AUDITH= ', d)} INOTIFYH=n" | ||
63 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
64 | EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d" | ||
65 | |||
66 | BBCLASSEXTEND = "native" | ||
67 | |||
68 | PCU_NATIVE_CMDS = "setfiles semodule_package semodule semodule_link semodule_expand semodule_deps" | ||
69 | |||
70 | do_compile_virtclass-native() { | ||
71 | for PCU_CMD in ${PCU_NATIVE_CMDS} ; do | ||
72 | oe_runmake -C $PCU_CMD \ | ||
73 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
74 | LIBDIR='${STAGING_LIBDIR}' | ||
75 | done | ||
76 | } | ||
77 | |||
78 | do_install_virtclass-native() { | ||
79 | for PCU_CMD in ${PCU_NATIVE_CMDS} ; do | ||
80 | oe_runmake -C $PCU_CMD install \ | ||
81 | DESTDIR="${D}" \ | ||
82 | PREFIX="${D}/${prefix}" \ | ||
83 | SBINDIR="${D}/${base_sbindir}" | ||
84 | done | ||
85 | } | ||
86 | |||
87 | do_install_append() { | ||
88 | test "${CLASSOVERRIDE}" = "class-native" && return 0 | ||
89 | |||
90 | if [ -e ${WORKDIR}/pam.d ]; then | ||
91 | install -d ${D}${sysconfdir}/pam.d/ | ||
92 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
93 | fi | ||
94 | } | ||
diff --git a/recipes-security/selinux/policycoreutils_git.bb b/recipes-security/selinux/policycoreutils_git.bb index 1d7ad5c..cef84f1 100644 --- a/recipes-security/selinux/policycoreutils_git.bb +++ b/recipes-security/selinux/policycoreutils_git.bb | |||
@@ -1,94 +1,11 @@ | |||
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 = "r7" | 1 | PR = "r7" |
9 | LICENSE = "GPLv2+" | 2 | PV = "2.1.10+git${SRCPV}" |
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
11 | DEFAULT_PREFERENCE = "-1" | ||
12 | 3 | ||
13 | include selinux_git.inc | 4 | include selinux_git.inc |
5 | include ${BPN}.inc | ||
14 | 6 | ||
15 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" |
16 | PV = "2.1.10+git${SRCPV}" | ||
17 | 8 | ||
18 | SRC_URI += "file://policycoreutils-fix-format-security.patch \ | 9 | SRC_URI += "file://policycoreutils-fix-format-security.patch \ |
19 | file://policycoreutils-remove-empty-po-files.patch \ | 10 | file://policycoreutils-remove-empty-po-files.patch \ |
20 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
21 | " | 11 | " |
22 | |||
23 | PAM_SRC_URI = "file://pam.d/newrole \ | ||
24 | file://pam.d/run_init \ | ||
25 | " | ||
26 | |||
27 | DEPENDS += "libsepol libselinux libsemanage" | ||
28 | DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}" | ||
29 | EXTRA_DEPENDS = "libcap-ng libcgroup" | ||
30 | EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}" | ||
31 | |||
32 | RDEPENDS_${BPN} += "\ | ||
33 | libselinux-python \ | ||
34 | libsemanage-python \ | ||
35 | sepolgen \ | ||
36 | " | ||
37 | RDEPENDS_${BPN} += "\ | ||
38 | python \ | ||
39 | python-unixadmin \ | ||
40 | python-shell \ | ||
41 | python-crypt \ | ||
42 | python-subprocess \ | ||
43 | python-syslog \ | ||
44 | python-textutils \ | ||
45 | python-ipy \ | ||
46 | " | ||
47 | RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python" | ||
48 | |||
49 | WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}" | ||
50 | ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}" | ||
51 | |||
52 | PACKAGES =+ "${PN}-python ${PN}-sandbox" | ||
53 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
54 | FILES_${PN}-sandbox = "${datadir}/sandbox/*" | ||
55 | FILES_${PN}-sandbox += "${bindir}/sandbox" | ||
56 | FILES_${PN}-sandbox += "${sbindir}/seunshare" | ||
57 | |||
58 | inherit pythonnative | ||
59 | |||
60 | AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `" | ||
61 | PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `" | ||
62 | EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=${PAMH} AUDITH=${AUDITH}', 'PAMH= AUDITH= ', d)} INOTIFYH=n" | ||
63 | EXTRA_OEMAKE += "PREFIX=${D}" | ||
64 | EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d" | ||
65 | |||
66 | BBCLASSEXTEND = "native" | ||
67 | |||
68 | PCU_NATIVE_CMDS = "setfiles semodule_package semodule semodule_link semodule_expand semodule_deps" | ||
69 | |||
70 | do_compile_virtclass-native() { | ||
71 | for PCU_CMD in ${PCU_NATIVE_CMDS} ; do | ||
72 | oe_runmake -C $PCU_CMD \ | ||
73 | INCLUDEDIR='${STAGING_INCDIR}' \ | ||
74 | LIBDIR='${STAGING_LIBDIR}' | ||
75 | done | ||
76 | } | ||
77 | |||
78 | do_install_virtclass-native() { | ||
79 | for PCU_CMD in ${PCU_NATIVE_CMDS} ; do | ||
80 | oe_runmake -C $PCU_CMD install \ | ||
81 | DESTDIR="${D}" \ | ||
82 | PREFIX="${D}/${prefix}" \ | ||
83 | SBINDIR="${D}/${base_sbindir}" | ||
84 | done | ||
85 | } | ||
86 | |||
87 | do_install_append() { | ||
88 | test "${CLASSOVERRIDE}" = "class-native" && return 0 | ||
89 | |||
90 | if [ -e ${WORKDIR}/pam.d ]; then | ||
91 | install -d ${D}${sysconfdir}/pam.d/ | ||
92 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
93 | fi | ||
94 | } | ||
diff --git a/recipes-security/selinux/selinux_git.inc b/recipes-security/selinux/selinux_git.inc index 1301d6f..5dd1aad 100644 --- a/recipes-security/selinux/selinux_git.inc +++ b/recipes-security/selinux/selinux_git.inc | |||
@@ -1,3 +1,5 @@ | |||
1 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
2 | |||
1 | SRC_URI = "git://oss.tresys.com/git/selinux.git;protocol=http" | 3 | SRC_URI = "git://oss.tresys.com/git/selinux.git;protocol=http" |
2 | SRC_URI[md5sum] = "4ec64a0d24aaa77c80b86e74d271e464" | 4 | SRC_URI[md5sum] = "4ec64a0d24aaa77c80b86e74d271e464" |
3 | SRC_URI[sha256sum] = "9c8a8643c9a4dd0eb76fcda1420d636b750b84b27656c6f8bc6886a829d7e520" | 5 | SRC_URI[sha256sum] = "9c8a8643c9a4dd0eb76fcda1420d636b750b84b27656c6f8bc6886a829d7e520" |
@@ -5,3 +7,5 @@ SRC_URI[sha256sum] = "9c8a8643c9a4dd0eb76fcda1420d636b750b84b27656c6f8bc6886a829 | |||
5 | S = "${WORKDIR}/git/${BPN}" | 7 | S = "${WORKDIR}/git/${BPN}" |
6 | 8 | ||
7 | include selinux_common.inc | 9 | include selinux_common.inc |
10 | |||
11 | DEFAULT_PREFERENCE = "-1" | ||
diff --git a/recipes-security/selinux/sepolgen.inc b/recipes-security/selinux/sepolgen.inc new file mode 100644 index 0000000..05e6544 --- /dev/null +++ b/recipes-security/selinux/sepolgen.inc | |||
@@ -0,0 +1,34 @@ | |||
1 | PRINC = "1" | ||
2 | |||
3 | SUMMARY = "Python modules for supporting various SELinux utilities." | ||
4 | DESCRIPTION = "\ | ||
5 | This package contains a Python module that forms the core of the \ | ||
6 | modern audit2allow (which is a part of the package policycoreutils). \ | ||
7 | The sepolgen library is structured to give flexibility to the \ | ||
8 | application using it. The library contains: Reference Policy \ | ||
9 | Representation, which are Objects for representing policies and the \ | ||
10 | reference policy interfaces. Secondly, it has objects and algorithms \ | ||
11 | for representing access and sets of access in an abstract way and \ | ||
12 | searching that access. It also has a parser for reference policy \ | ||
13 | "headers". It contains infrastructure for parsing SELinux related \ | ||
14 | messages as produced by the audit system. It has facilities for \ | ||
15 | generating policy based on required access." | ||
16 | |||
17 | SECTION = "base" | ||
18 | LICENSE = "LGPLv2+" | ||
19 | |||
20 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
21 | |||
22 | DEPENDS += "python" | ||
23 | |||
24 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | ||
25 | /var/lib/sepolgen" | ||
26 | |||
27 | do_install() { | ||
28 | oe_runmake DESTDIR=${D} \ | ||
29 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
30 | install | ||
31 | } | ||
32 | |||
33 | BBCLASSEXTEND = "native" | ||
34 | |||
diff --git a/recipes-security/selinux/sepolgen_1.1.5.bb b/recipes-security/selinux/sepolgen_1.1.5.bb index 318a57c..f4031d9 100644 --- a/recipes-security/selinux/sepolgen_1.1.5.bb +++ b/recipes-security/selinux/sepolgen_1.1.5.bb | |||
@@ -1,39 +1,10 @@ | |||
1 | SUMMARY = "Python modules for supporting various SELinux utilities." | ||
2 | DESCRIPTION = "\ | ||
3 | This package contains a Python module that forms the core of the \ | ||
4 | modern audit2allow (which is a part of the package policycoreutils). \ | ||
5 | The sepolgen library is structured to give flexibility to the \ | ||
6 | application using it. The library contains: Reference Policy \ | ||
7 | Representation, which are Objects for representing policies and the \ | ||
8 | reference policy interfaces. Secondly, it has objects and algorithms \ | ||
9 | for representing access and sets of access in an abstract way and \ | ||
10 | searching that access. It also has a parser for reference policy \ | ||
11 | "headers". It contains infrastructure for parsing SELinux related \ | ||
12 | messages as produced by the audit system. It has facilities for \ | ||
13 | generating policy based on required access." | ||
14 | |||
15 | SECTION = "base" | ||
16 | PR = "r1" | 1 | PR = "r1" |
17 | LICENSE = "LGPLv2+" | ||
18 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
19 | 2 | ||
20 | include selinux_20120216.inc | 3 | include selinux_20120216.inc |
4 | include ${BPN}.inc | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
21 | 7 | ||
22 | SRC_URI[md5sum] = "4ecadef3880019d8cdc08896687608b1" | 8 | SRC_URI[md5sum] = "4ecadef3880019d8cdc08896687608b1" |
23 | SRC_URI[sha256sum] = "16c2b10510be7dbb2dc0967aedb2d69c654ca52ed03d04881c17d2f8b863b3bb" | 9 | SRC_URI[sha256sum] = "16c2b10510be7dbb2dc0967aedb2d69c654ca52ed03d04881c17d2f8b863b3bb" |
24 | 10 | ||
25 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | ||
26 | |||
27 | DEPENDS += "python" | ||
28 | |||
29 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | ||
30 | /var/lib/sepolgen" | ||
31 | |||
32 | do_install() { | ||
33 | oe_runmake DESTDIR=${D} \ | ||
34 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
35 | install | ||
36 | } | ||
37 | |||
38 | BBCLASSEXTEND = "native" | ||
39 | |||
diff --git a/recipes-security/selinux/sepolgen_git.bb b/recipes-security/selinux/sepolgen_git.bb index 68d5a2f..4c8b7df 100644 --- a/recipes-security/selinux/sepolgen_git.bb +++ b/recipes-security/selinux/sepolgen_git.bb | |||
@@ -1,40 +1,7 @@ | |||
1 | SUMMARY = "Python modules for supporting various SELinux utilities." | ||
2 | DESCRIPTION = "\ | ||
3 | This package contains a Python module that forms the core of the \ | ||
4 | modern audit2allow (which is a part of the package policycoreutils). \ | ||
5 | The sepolgen library is structured to give flexibility to the \ | ||
6 | application using it. The library contains: Reference Policy \ | ||
7 | Representation, which are Objects for representing policies and the \ | ||
8 | reference policy interfaces. Secondly, it has objects and algorithms \ | ||
9 | for representing access and sets of access in an abstract way and \ | ||
10 | searching that access. It also has a parser for reference policy \ | ||
11 | "headers". It contains infrastructure for parsing SELinux related \ | ||
12 | messages as produced by the audit system. It has facilities for \ | ||
13 | generating policy based on required access." | ||
14 | |||
15 | SECTION = "base" | ||
16 | PR = "r1" | 1 | PR = "r1" |
17 | LICENSE = "LGPLv2+" | 2 | PV = "1.1.5+git${SRCPV}" |
18 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
19 | DEFAULT_PREFERENCE = "-1" | ||
20 | 3 | ||
21 | include selinux_git.inc | 4 | include selinux_git.inc |
22 | 5 | include ${BPN}.inc | |
23 | SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e" | ||
24 | PV = "1.1.5+git${SRCPV}" | ||
25 | 6 | ||
26 | FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" |
27 | |||
28 | DEPENDS += "python" | ||
29 | |||
30 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \ | ||
31 | /var/lib/sepolgen" | ||
32 | |||
33 | do_install() { | ||
34 | oe_runmake DESTDIR=${D} \ | ||
35 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
36 | install | ||
37 | } | ||
38 | |||
39 | BBCLASSEXTEND = "native" | ||
40 | |||