mirror of
git://git.yoctoproject.org/meta-selinux
synced 2026-01-01 13:58:04 +00:00
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>
This commit is contained in:
parent
1f3b70427c
commit
17335d322c
24
recipes-security/selinux/checkpolicy.inc
Normal file
24
recipes-security/selinux/checkpolicy.inc
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
PRINC = "1"
|
||||
|
||||
SUMMARY = "SELinux policy compiler"
|
||||
DESCRIPTION = "\
|
||||
This package contains checkpolicy, the SELinux policy compiler. Only \
|
||||
required for building policies. It uses libsepol to generate the \
|
||||
binary policy. checkpolicy uses the static libsepol since it deals \
|
||||
with low level details of the policy that have not been \
|
||||
encapsulated/abstracted by a proper shared library interface."
|
||||
|
||||
SECTION = "base"
|
||||
LICENSE = "GPLv2+"
|
||||
|
||||
DEPENDS += "libsepol libselinux bison-native flex-native"
|
||||
|
||||
EXTRA_OEMAKE += "PREFIX=${D}"
|
||||
EXTRA_OEMAKE += "LEX='flex'"
|
||||
|
||||
do_install_append() {
|
||||
install test/dismod ${D}/${bindir}/sedismod
|
||||
install test/dispol ${D}/${bindir}/sedispol
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
@ -1,30 +1,9 @@
|
|||
SUMMARY = "SELinux policy compiler"
|
||||
DESCRIPTION = "\
|
||||
This package contains checkpolicy, the SELinux policy compiler. Only \
|
||||
required for building policies. It uses libsepol to generate the \
|
||||
binary policy. checkpolicy uses the static libsepol since it deals \
|
||||
with low level details of the policy that have not been \
|
||||
encapsulated/abstracted by a proper shared library interface."
|
||||
|
||||
SECTION = "base"
|
||||
PR = "r2"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
include selinux_20120216.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
SRC_URI[md5sum] = "e7b5d62873d4efc8a502b75f042f6735"
|
||||
SRC_URI[sha256sum] = "8ed586fd2ccf9900f86e38b72af4aa5cc3bade35d0fa19c53ac1a3d59fe0013a"
|
||||
|
||||
DEPENDS += "libsepol libselinux bison-native flex-native"
|
||||
|
||||
EXTRA_OEMAKE += "PREFIX=${D}"
|
||||
EXTRA_OEMAKE += "LEX='flex'"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
do_install_append() {
|
||||
install test/dismod ${D}/${bindir}/sedismod
|
||||
install test/dispol ${D}/${bindir}/sedispol
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +1,7 @@
|
|||
SUMMARY = "SELinux policy compiler"
|
||||
DESCRIPTION = "\
|
||||
This package contains checkpolicy, the SELinux policy compiler. Only \
|
||||
required for building policies. It uses libsepol to generate the \
|
||||
binary policy. checkpolicy uses the static libsepol since it deals \
|
||||
with low level details of the policy that have not been \
|
||||
encapsulated/abstracted by a proper shared library interface."
|
||||
|
||||
SECTION = "base"
|
||||
PR = "r2"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
include selinux_git.inc
|
||||
|
||||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.8+git${SRCPV}"
|
||||
|
||||
DEPENDS += "libsepol libselinux bison-native flex-native"
|
||||
|
||||
EXTRA_OEMAKE += "PREFIX=${D}"
|
||||
EXTRA_OEMAKE += "LEX='flex'"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
do_install_append() {
|
||||
install test/dismod ${D}/${bindir}/sedismod
|
||||
install test/dispol ${D}/${bindir}/sedispol
|
||||
}
|
||||
include selinux_git.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
|
|
|||
43
recipes-security/selinux/libselinux.inc
Normal file
43
recipes-security/selinux/libselinux.inc
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
PRINC = "1"
|
||||
|
||||
SUMMARY = "SELinux library and simple utilities"
|
||||
DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \
|
||||
process and file security contexts and to obtain security policy \
|
||||
decisions. Required for any applications that use the SELinux API."
|
||||
SECTION = "base"
|
||||
LICENSE = "PD"
|
||||
|
||||
inherit lib_package pythonnative
|
||||
|
||||
DEPENDS += "libsepol python swig-native"
|
||||
|
||||
PACKAGES += "${PN}-python"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
|
||||
|
||||
def get_policyconfigarch(d):
|
||||
import re
|
||||
target = d.getVar('TARGET_ARCH', True)
|
||||
p = re.compile('i.86')
|
||||
target = p.sub('i386',target)
|
||||
return "ARCH=%s" % (target)
|
||||
EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap -j1 \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
|
||||
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
|
||||
PYTHONLIBDIR='${PYLIB}'
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
oe_runmake install-pywrap swigify \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
@ -1,49 +1,11 @@
|
|||
SUMMARY = "SELinux library and simple utilities"
|
||||
DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \
|
||||
process and file security contexts and to obtain security policy \
|
||||
decisions. Required for any applications that use the SELinux API."
|
||||
SECTION = "base"
|
||||
PR = "r3"
|
||||
LICENSE = "PD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
|
||||
|
||||
include selinux_20120216.inc
|
||||
inherit lib_package pythonnative
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
|
||||
|
||||
SRC_URI[md5sum] = "8ea0548dd65e9479b357ba1447f89221"
|
||||
SRC_URI[sha256sum] = "749d4b39c80aa9df8247b8b3187ab72442c0dbad6e70bf312e25052bd4e7063f"
|
||||
|
||||
SRC_URI += "file://libselinux-fix-init-load-policy.patch"
|
||||
|
||||
DEPENDS += "libsepol python swig-native"
|
||||
|
||||
PACKAGES += "${PN}-python"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
|
||||
|
||||
def get_policyconfigarch(d):
|
||||
import re
|
||||
target = d.getVar('TARGET_ARCH', True)
|
||||
p = re.compile('i.86')
|
||||
target = p.sub('i386',target)
|
||||
return "ARCH=%s" % (target)
|
||||
EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap -j1 \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
|
||||
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
|
||||
PYTHONLIBDIR='${PYLIB}'
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
oe_runmake install-pywrap swigify \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
|||
|
|
@ -1,48 +1,9 @@
|
|||
SUMMARY = "SELinux library and simple utilities"
|
||||
DESCRIPTION = "libselinux provides an API for SELinux applications to get and set \
|
||||
process and file security contexts and to obtain security policy \
|
||||
decisions. Required for any applications that use the SELinux API."
|
||||
SECTION = "base"
|
||||
PR = "r3"
|
||||
LICENSE = "PD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
include selinux_git.inc
|
||||
inherit lib_package pythonnative
|
||||
|
||||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.9+git${SRCPV}"
|
||||
|
||||
DEPENDS += "libsepol python swig-native"
|
||||
include selinux_git.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
PACKAGES += "${PN}-python"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
|
||||
|
||||
def get_git_policyconfigarch(d):
|
||||
import re
|
||||
target = d.getVar('TARGET_ARCH', True)
|
||||
p = re.compile('i.86')
|
||||
target = p.sub('i386',target)
|
||||
return "ARCH=%s" % (target)
|
||||
EXTRA_OEMAKE += "${@get_git_policyconfigarch(d)}"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap -j1 \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
|
||||
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
|
||||
PYTHONLIBDIR='${PYLIB}'
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
oe_runmake install-pywrap swigify \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
SRC_URI += "file://libselinux-fix-init-load-policy.patch"
|
||||
|
|
|
|||
43
recipes-security/selinux/libsemanage.inc
Normal file
43
recipes-security/selinux/libsemanage.inc
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
PRINC = "1"
|
||||
|
||||
SUMMARY = "SELinux binary policy manipulation library"
|
||||
DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \
|
||||
It is used by checkpolicy (the policy compiler) and similar tools, as well \
|
||||
as by programs like load_policy that need to perform specific transformations \
|
||||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
LICENSE = "LGPLv2.1+"
|
||||
|
||||
inherit lib_package
|
||||
|
||||
DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native"
|
||||
|
||||
PACKAGES += "${PN}-python"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
|
||||
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
|
||||
PYTHONLIBDIR='${PYLIB}'
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake install \
|
||||
DESTDIR="${D}" \
|
||||
PREFIX="${D}/${prefix}" \
|
||||
INCLUDEDIR="${D}/${includedir}" \
|
||||
LIBDIR="${D}/${libdir}" \
|
||||
SHLIBDIR="${D}/${libdir}"
|
||||
|
||||
oe_runmake install-pywrap swigify \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
@ -1,52 +1,14 @@
|
|||
SUMMARY = "SELinux binary policy manipulation library"
|
||||
DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \
|
||||
It is used by checkpolicy (the policy compiler) and similar tools, as well \
|
||||
as by programs like load_policy that need to perform specific transformations \
|
||||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
PR = "r3"
|
||||
LICENSE = "LGPLv2.1+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
include selinux_20120216.inc
|
||||
inherit lib_package
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
SRC_URI[md5sum] = "b49d75602432d8cfad8a3e5a0a966f07"
|
||||
SRC_URI[sha256sum] = "64e6849fe50fb463ec0ba24653a26e3452fa4aaa7d7e192213d5c5a7c525aebb"
|
||||
|
||||
DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native"
|
||||
|
||||
SRC_URI += "file://Fix-segfault-for-standard-policy.patch \
|
||||
file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
|
||||
file://libsemanage-semanage.conf-for-cross-compile.patch \
|
||||
file://libsemanage-fix-path-len-limit.patch"
|
||||
|
||||
PACKAGES += "${PN}-python"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
|
||||
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
|
||||
PYTHONLIBDIR='${PYLIB}'
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake install \
|
||||
DESTDIR="${D}" \
|
||||
PREFIX="${D}/${prefix}" \
|
||||
INCLUDEDIR="${D}/${includedir}" \
|
||||
LIBDIR="${D}/${libdir}" \
|
||||
SHLIBDIR="${D}/${libdir}"
|
||||
|
||||
oe_runmake install-pywrap swigify \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
|||
|
|
@ -1,53 +1,12 @@
|
|||
SUMMARY = "SELinux binary policy manipulation library"
|
||||
DESCRIPTION = "libsemanage provides an API for the manipulation of SELinux binary policies. \
|
||||
It is used by checkpolicy (the policy compiler) and similar tools, as well \
|
||||
as by programs like load_policy that need to perform specific transformations \
|
||||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
PR = "r3"
|
||||
LICENSE = "LGPLv2.1+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
include selinux_git.inc
|
||||
inherit lib_package
|
||||
|
||||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.6+git${SRCPV}"
|
||||
|
||||
DEPENDS += "libsepol libselinux ustr bzip2 python bison-native flex-native"
|
||||
include selinux_git.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
SRC_URI += "file://Fix-segfault-for-standard-policy.patch \
|
||||
file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \
|
||||
file://libsemanage-semanage.conf-for-cross-compile.patch \
|
||||
file://libsemanage-fix-path-len-limit.patch"
|
||||
|
||||
PACKAGES += "${PN}-python"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
|
||||
|
||||
do_compile_append() {
|
||||
oe_runmake pywrap \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}' \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
|
||||
PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
|
||||
PYTHONLIBDIR='${PYLIB}'
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake install \
|
||||
DESTDIR="${D}" \
|
||||
PREFIX="${D}/${prefix}" \
|
||||
INCLUDEDIR="${D}/${includedir}" \
|
||||
LIBDIR="${D}/${libdir}" \
|
||||
SHLIBDIR="${D}/${libdir}"
|
||||
|
||||
oe_runmake install-pywrap swigify \
|
||||
DESTDIR=${D} \
|
||||
PYLIBVER='python${PYTHON_BASEVERSION}' \
|
||||
PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
|
|
|||
14
recipes-security/selinux/libsepol.inc
Normal file
14
recipes-security/selinux/libsepol.inc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
PRINC = "1"
|
||||
|
||||
SUMMARY = "SELinux binary policy manipulation library"
|
||||
DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \
|
||||
It is used by checkpolicy (the policy compiler) and similar tools, as well \
|
||||
as by programs like load_policy that need to perform specific transformations \
|
||||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
LICENSE = "LGPLv2+"
|
||||
|
||||
inherit lib_package
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
|
|
@ -1,20 +1,11 @@
|
|||
SUMMARY = "SELinux binary policy manipulation library"
|
||||
DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \
|
||||
It is used by checkpolicy (the policy compiler) and similar tools, as well \
|
||||
as by programs like load_policy that need to perform specific transformations \
|
||||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
PR = "r1"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
include selinux_20120216.inc
|
||||
inherit lib_package
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
SRC_URI[md5sum] = "909dae553edb34ea2224002a0c529cb0"
|
||||
SRC_URI[sha256sum] = "8f5ea42ae6cc00b21f0e5f31f354d19fcce3edfe9328971d266245718714b1e8"
|
||||
|
||||
SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,9 @@
|
|||
SUMMARY = "SELinux binary policy manipulation library"
|
||||
DESCRIPTION = "libsepol provides an API for the manipulation of SELinux binary policies. \
|
||||
It is used by checkpolicy (the policy compiler) and similar tools, as well \
|
||||
as by programs like load_policy that need to perform specific transformations \
|
||||
on binary policies such as customizing policy boolean settings."
|
||||
SECTION = "base"
|
||||
PR = "r1"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
include selinux_git.inc
|
||||
inherit lib_package
|
||||
|
||||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.4+git${SRCPV}"
|
||||
|
||||
include selinux_git.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||
|
||||
SRC_URI += "file://libsepol-Change-ranlib-for-cross-compiling.patch"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
|
|
|
|||
86
recipes-security/selinux/policycoreutils.inc
Normal file
86
recipes-security/selinux/policycoreutils.inc
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
PRINC = "1"
|
||||
|
||||
SUMMARY = "SELinux policy core utilities"
|
||||
DESCRIPTION = "policycoreutils contains the policy core utilities that are required \
|
||||
for basic operation of a SELinux system. These utilities include \
|
||||
load_policy to load policies, setfiles to label filesystems, newrole \
|
||||
to switch roles, and run_init to run /etc/init.d scripts in the proper \
|
||||
context."
|
||||
SECTION = "base"
|
||||
LICENSE = "GPLv2+"
|
||||
|
||||
SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
|
||||
|
||||
PAM_SRC_URI = "file://pam.d/newrole \
|
||||
file://pam.d/run_init \
|
||||
"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage"
|
||||
DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
|
||||
RDEPENDS_${BPN} += "\
|
||||
libselinux-python \
|
||||
libsemanage-python \
|
||||
sepolgen \
|
||||
"
|
||||
RDEPENDS_${BPN} += "\
|
||||
python \
|
||||
python-unixadmin \
|
||||
python-shell \
|
||||
python-crypt \
|
||||
python-subprocess \
|
||||
python-syslog \
|
||||
python-textutils \
|
||||
python-ipy \
|
||||
"
|
||||
|
||||
RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python"
|
||||
|
||||
WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}"
|
||||
ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}"
|
||||
|
||||
PACKAGES =+ "${PN}-python ${PN}-sandbox"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-sandbox = "${datadir}/sandbox/*"
|
||||
FILES_${PN}-sandbox += "${bindir}/sandbox"
|
||||
FILES_${PN}-sandbox += "${sbindir}/seunshare"
|
||||
|
||||
inherit pythonnative
|
||||
|
||||
AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `"
|
||||
PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `"
|
||||
EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=${PAMH} AUDITH=${AUDITH}', 'PAMH= AUDITH= ', d)} INOTIFYH=n"
|
||||
EXTRA_OEMAKE += "PREFIX=${D}"
|
||||
EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
PCU_NATIVE_CMDS = "setfiles semodule_package semodule semodule_link semodule_expand semodule_deps"
|
||||
|
||||
do_compile_virtclass-native() {
|
||||
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
|
||||
oe_runmake -C $PCU_CMD \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}'
|
||||
done
|
||||
}
|
||||
|
||||
do_install_virtclass-native() {
|
||||
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
|
||||
oe_runmake -C $PCU_CMD install \
|
||||
DESTDIR="${D}" \
|
||||
PREFIX="${D}/${prefix}" \
|
||||
SBINDIR="${D}/${base_sbindir}"
|
||||
done
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
test "${CLASSOVERRIDE}" = "class-native" && return 0
|
||||
|
||||
if [ -e ${WORKDIR}/pam.d ]; then
|
||||
install -d ${D}${sysconfdir}/pam.d/
|
||||
install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
|
||||
fi
|
||||
}
|
||||
|
|
@ -1,94 +1,13 @@
|
|||
SUMMARY = "SELinux policy core utilities"
|
||||
DESCRIPTION = "policycoreutils contains the policy core utilities that are required \
|
||||
for basic operation of a SELinux system. These utilities include \
|
||||
load_policy to load policies, setfiles to label filesystems, newrole \
|
||||
to switch roles, and run_init to run /etc/init.d scripts in the proper \
|
||||
context."
|
||||
SECTION = "base"
|
||||
PR = "r7"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
include selinux_20120216.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
SRC_URI[md5sum] = "fefdede2815cdd2ba8b68599fef1f257"
|
||||
SRC_URI[sha256sum] = "8bbbc36b7d375edff891503932da93e37553f0dd7bdceded7ce9a45c80bec3d1"
|
||||
|
||||
SRC_URI += "file://policycoreutils-fix-format-security.patch \
|
||||
file://policycoreutils-remove-empty-po-files.patch \
|
||||
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||
"
|
||||
|
||||
PAM_SRC_URI = "file://pam.d/newrole \
|
||||
file://pam.d/run_init \
|
||||
"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage"
|
||||
DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
|
||||
RDEPENDS_${BPN} += "\
|
||||
libselinux-python \
|
||||
libsemanage-python \
|
||||
sepolgen \
|
||||
"
|
||||
RDEPENDS_${BPN} += "\
|
||||
python \
|
||||
python-unixadmin \
|
||||
python-shell \
|
||||
python-crypt \
|
||||
python-subprocess \
|
||||
python-syslog \
|
||||
python-textutils \
|
||||
python-ipy \
|
||||
"
|
||||
|
||||
RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python"
|
||||
|
||||
WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}"
|
||||
ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}"
|
||||
|
||||
PACKAGES =+ "${PN}-python ${PN}-sandbox"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-sandbox = "${datadir}/sandbox/*"
|
||||
FILES_${PN}-sandbox += "${bindir}/sandbox"
|
||||
FILES_${PN}-sandbox += "${sbindir}/seunshare"
|
||||
|
||||
inherit pythonnative
|
||||
|
||||
AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `"
|
||||
PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `"
|
||||
EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=${PAMH} AUDITH=${AUDITH}', 'PAMH= AUDITH= ', d)} INOTIFYH=n"
|
||||
EXTRA_OEMAKE += "PREFIX=${D}"
|
||||
EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
PCU_NATIVE_CMDS = "setfiles semodule_package semodule semodule_link semodule_expand semodule_deps"
|
||||
|
||||
do_compile_virtclass-native() {
|
||||
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
|
||||
oe_runmake -C $PCU_CMD \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}'
|
||||
done
|
||||
}
|
||||
|
||||
do_install_virtclass-native() {
|
||||
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
|
||||
oe_runmake -C $PCU_CMD install \
|
||||
DESTDIR="${D}" \
|
||||
PREFIX="${D}/${prefix}" \
|
||||
SBINDIR="${D}/${base_sbindir}"
|
||||
done
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
test "${CLASSOVERRIDE}" = "class-native" && return 0
|
||||
|
||||
if [ -e ${WORKDIR}/pam.d ]; then
|
||||
install -d ${D}${sysconfdir}/pam.d/
|
||||
install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,94 +1,11 @@
|
|||
SUMMARY = "SELinux policy core utilities"
|
||||
DESCRIPTION = "policycoreutils contains the policy core utilities that are required \
|
||||
for basic operation of a SELinux system. These utilities include \
|
||||
load_policy to load policies, setfiles to label filesystems, newrole \
|
||||
to switch roles, and run_init to run /etc/init.d scripts in the proper \
|
||||
context."
|
||||
SECTION = "base"
|
||||
PR = "r7"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
PV = "2.1.10+git${SRCPV}"
|
||||
|
||||
include selinux_git.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "2.1.10+git${SRCPV}"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
SRC_URI += "file://policycoreutils-fix-format-security.patch \
|
||||
file://policycoreutils-remove-empty-po-files.patch \
|
||||
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
|
||||
"
|
||||
|
||||
PAM_SRC_URI = "file://pam.d/newrole \
|
||||
file://pam.d/run_init \
|
||||
"
|
||||
|
||||
DEPENDS += "libsepol libselinux libsemanage"
|
||||
DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}"
|
||||
EXTRA_DEPENDS = "libcap-ng libcgroup"
|
||||
EXTRA_DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam audit', '', d)}"
|
||||
|
||||
RDEPENDS_${BPN} += "\
|
||||
libselinux-python \
|
||||
libsemanage-python \
|
||||
sepolgen \
|
||||
"
|
||||
RDEPENDS_${BPN} += "\
|
||||
python \
|
||||
python-unixadmin \
|
||||
python-shell \
|
||||
python-crypt \
|
||||
python-subprocess \
|
||||
python-syslog \
|
||||
python-textutils \
|
||||
python-ipy \
|
||||
"
|
||||
RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python"
|
||||
|
||||
WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}"
|
||||
ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}"
|
||||
|
||||
PACKAGES =+ "${PN}-python ${PN}-sandbox"
|
||||
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-sandbox = "${datadir}/sandbox/*"
|
||||
FILES_${PN}-sandbox += "${bindir}/sandbox"
|
||||
FILES_${PN}-sandbox += "${sbindir}/seunshare"
|
||||
|
||||
inherit pythonnative
|
||||
|
||||
AUDITH="`ls ${STAGING_INCDIR}/libaudit.h >/dev/null 2>&1 && echo /usr/include/libaudit.h `"
|
||||
PAMH="`ls ${STAGING_INCDIR}/security/pam_appl.h >/dev/null 2>&1 && echo /usr/include/security/pam_appl.h `"
|
||||
EXTRA_OEMAKE += "${@base_contains('DISTRO_FEATURES', 'pam', 'PAMH=${PAMH} AUDITH=${AUDITH}', 'PAMH= AUDITH= ', d)} INOTIFYH=n"
|
||||
EXTRA_OEMAKE += "PREFIX=${D}"
|
||||
EXTRA_OEMAKE += "INITDIR=${D}/etc/init.d"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
PCU_NATIVE_CMDS = "setfiles semodule_package semodule semodule_link semodule_expand semodule_deps"
|
||||
|
||||
do_compile_virtclass-native() {
|
||||
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
|
||||
oe_runmake -C $PCU_CMD \
|
||||
INCLUDEDIR='${STAGING_INCDIR}' \
|
||||
LIBDIR='${STAGING_LIBDIR}'
|
||||
done
|
||||
}
|
||||
|
||||
do_install_virtclass-native() {
|
||||
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
|
||||
oe_runmake -C $PCU_CMD install \
|
||||
DESTDIR="${D}" \
|
||||
PREFIX="${D}/${prefix}" \
|
||||
SBINDIR="${D}/${base_sbindir}"
|
||||
done
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
test "${CLASSOVERRIDE}" = "class-native" && return 0
|
||||
|
||||
if [ -e ${WORKDIR}/pam.d ]; then
|
||||
install -d ${D}${sysconfdir}/pam.d/
|
||||
install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
|
||||
SRC_URI = "git://oss.tresys.com/git/selinux.git;protocol=http"
|
||||
SRC_URI[md5sum] = "4ec64a0d24aaa77c80b86e74d271e464"
|
||||
SRC_URI[sha256sum] = "9c8a8643c9a4dd0eb76fcda1420d636b750b84b27656c6f8bc6886a829d7e520"
|
||||
|
|
@ -5,3 +7,5 @@ SRC_URI[sha256sum] = "9c8a8643c9a4dd0eb76fcda1420d636b750b84b27656c6f8bc6886a829
|
|||
S = "${WORKDIR}/git/${BPN}"
|
||||
|
||||
include selinux_common.inc
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
|
|
|||
34
recipes-security/selinux/sepolgen.inc
Normal file
34
recipes-security/selinux/sepolgen.inc
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
PRINC = "1"
|
||||
|
||||
SUMMARY = "Python modules for supporting various SELinux utilities."
|
||||
DESCRIPTION = "\
|
||||
This package contains a Python module that forms the core of the \
|
||||
modern audit2allow (which is a part of the package policycoreutils). \
|
||||
The sepolgen library is structured to give flexibility to the \
|
||||
application using it. The library contains: Reference Policy \
|
||||
Representation, which are Objects for representing policies and the \
|
||||
reference policy interfaces. Secondly, it has objects and algorithms \
|
||||
for representing access and sets of access in an abstract way and \
|
||||
searching that access. It also has a parser for reference policy \
|
||||
"headers". It contains infrastructure for parsing SELinux related \
|
||||
messages as produced by the audit system. It has facilities for \
|
||||
generating policy based on required access."
|
||||
|
||||
SECTION = "base"
|
||||
LICENSE = "LGPLv2+"
|
||||
|
||||
FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
|
||||
DEPENDS += "python"
|
||||
|
||||
FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \
|
||||
/var/lib/sepolgen"
|
||||
|
||||
do_install() {
|
||||
oe_runmake DESTDIR=${D} \
|
||||
PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
|
||||
install
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
|
|
@ -1,39 +1,10 @@
|
|||
SUMMARY = "Python modules for supporting various SELinux utilities."
|
||||
DESCRIPTION = "\
|
||||
This package contains a Python module that forms the core of the \
|
||||
modern audit2allow (which is a part of the package policycoreutils). \
|
||||
The sepolgen library is structured to give flexibility to the \
|
||||
application using it. The library contains: Reference Policy \
|
||||
Representation, which are Objects for representing policies and the \
|
||||
reference policy interfaces. Secondly, it has objects and algorithms \
|
||||
for representing access and sets of access in an abstract way and \
|
||||
searching that access. It also has a parser for reference policy \
|
||||
"headers". It contains infrastructure for parsing SELinux related \
|
||||
messages as produced by the audit system. It has facilities for \
|
||||
generating policy based on required access."
|
||||
|
||||
SECTION = "base"
|
||||
PR = "r1"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
include selinux_20120216.inc
|
||||
include ${BPN}.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
SRC_URI[md5sum] = "4ecadef3880019d8cdc08896687608b1"
|
||||
SRC_URI[sha256sum] = "16c2b10510be7dbb2dc0967aedb2d69c654ca52ed03d04881c17d2f8b863b3bb"
|
||||
|
||||
FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
|
||||
DEPENDS += "python"
|
||||
|
||||
FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \
|
||||
/var/lib/sepolgen"
|
||||
|
||||
do_install() {
|
||||
oe_runmake DESTDIR=${D} \
|
||||
PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
|
||||
install
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,40 +1,7 @@
|
|||
SUMMARY = "Python modules for supporting various SELinux utilities."
|
||||
DESCRIPTION = "\
|
||||
This package contains a Python module that forms the core of the \
|
||||
modern audit2allow (which is a part of the package policycoreutils). \
|
||||
The sepolgen library is structured to give flexibility to the \
|
||||
application using it. The library contains: Reference Policy \
|
||||
Representation, which are Objects for representing policies and the \
|
||||
reference policy interfaces. Secondly, it has objects and algorithms \
|
||||
for representing access and sets of access in an abstract way and \
|
||||
searching that access. It also has a parser for reference policy \
|
||||
"headers". It contains infrastructure for parsing SELinux related \
|
||||
messages as produced by the audit system. It has facilities for \
|
||||
generating policy based on required access."
|
||||
|
||||
SECTION = "base"
|
||||
PR = "r1"
|
||||
LICENSE = "LGPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
PV = "1.1.5+git${SRCPV}"
|
||||
|
||||
include selinux_git.inc
|
||||
|
||||
SRCREV = "339f8079d7b9dd1e0b0138e2d096dc7c60b2092e"
|
||||
PV = "1.1.5+git${SRCPV}"
|
||||
include ${BPN}.inc
|
||||
|
||||
FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
|
||||
DEPENDS += "python"
|
||||
|
||||
FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/site-packages \
|
||||
/var/lib/sepolgen"
|
||||
|
||||
do_install() {
|
||||
oe_runmake DESTDIR=${D} \
|
||||
PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
|
||||
install
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user