generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
51
package/selinux-python/Config.in
Normal file
51
package/selinux-python/Config.in
Normal file
@ -0,0 +1,51 @@
|
||||
config BR2_PACKAGE_SELINUX_PYTHON
|
||||
bool "selinux-python"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_PACKAGE_PYTHON3
|
||||
help
|
||||
A set of SELinux tools written in python that help with
|
||||
managing a system with SELinux enabled. If no packages are
|
||||
selected nothing will actually be built.
|
||||
|
||||
https://github.com/SELinuxProject/selinux/wiki
|
||||
|
||||
if BR2_PACKAGE_SELINUX_PYTHON
|
||||
|
||||
config BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW
|
||||
bool "audit2allow"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # semodule-utils -> libsepol
|
||||
select BR2_PACKAGE_CHECKPOLICY
|
||||
select BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
|
||||
select BR2_PACKAGE_SEMODULE_UTILS
|
||||
help
|
||||
This module installs two programs:
|
||||
|
||||
audit2allow - Generate SELinux policy allow/dontaudit rules
|
||||
from logs of denied operations.
|
||||
|
||||
audit2why - translates SELinux audit messages into a
|
||||
description of why the access was denied (audit2allow -w)
|
||||
|
||||
comment "audit2allow needs a toolchain w/ gcc 5"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
config BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
|
||||
bool "sepolgen"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # semodule-utils -> libsepol
|
||||
select BR2_PACKAGE_SEMODULE_UTILS
|
||||
help
|
||||
This package contains a Python module that allows you to
|
||||
generate an initial SELinux policy module template.
|
||||
|
||||
comment "sepolgen needs a toolchain w/ gcc 5"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
|
||||
endif
|
||||
|
||||
comment "selinux-python packages needs a toolchain w/ wchar, threads, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
BR2_STATIC_LIBS
|
||||
5
package/selinux-python/selinux-python.hash
Normal file
5
package/selinux-python/selinux-python.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# https://github.com/SELinuxProject/selinux/wiki/Releases
|
||||
sha256 8ad91061300387996ccb474962fb93dde263d924aa8f740618be16b22e2444ec selinux-python-3.3.tar.gz
|
||||
|
||||
# Hash for license file
|
||||
sha256 204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994 COPYING
|
||||
42
package/selinux-python/selinux-python.mk
Normal file
42
package/selinux-python/selinux-python.mk
Normal file
@ -0,0 +1,42 @@
|
||||
################################################################################
|
||||
#
|
||||
# selinux-python
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SELINUX_PYTHON_VERSION = 3.3
|
||||
SELINUX_PYTHON_SITE = https://github.com/SELinuxProject/selinux/releases/download/$(SELINUX_PYTHON_VERSION)
|
||||
SELINUX_PYTHON_LICENSE = GPL-2.0
|
||||
SELINUX_PYTHON_LICENSE_FILES = COPYING
|
||||
SELINUX_PYTHON_DEPENDENCIES = python3
|
||||
|
||||
SELINUX_PYTHON_MAKE_OPTS += \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
ARCH="$(BR2_ARCH)" \
|
||||
LIBDIR="$(STAGING_DIR)/usr/lib" \
|
||||
PYTHONLIBDIR="usr/lib/python$(PYTHON3_VERSION_MAJOR)"
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW),y)
|
||||
SELINUX_PYTHON_DEPENDENCIES += checkpolicy
|
||||
SELINUX_PYTHON_MAKE_DIRS += audit2allow
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN),y)
|
||||
SELINUX_PYTHON_MAKE_DIRS += sepolgen/src/sepolgen
|
||||
endif
|
||||
|
||||
define SELINUX_PYTHON_BUILD_CMDS
|
||||
$(foreach d,$(SELINUX_PYTHON_MAKE_DIRS),
|
||||
$(MAKE) -C $(@D)/$(d) $(SELINUX_PYTHON_MAKE_OPTS) \
|
||||
all
|
||||
)
|
||||
endef
|
||||
|
||||
define SELINUX_PYTHON_INSTALL_TARGET_CMDS
|
||||
$(foreach d,$(SELINUX_PYTHON_MAKE_DIRS),
|
||||
$(MAKE) -C $(@D)/$(d) $(SELINUX_PYTHON_MAKE_OPTS) \
|
||||
DESTDIR=$(TARGET_DIR) install
|
||||
)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user