All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] sepolgen: allow compiling for target
@ 2017-02-02 22:45 Adam Duskett
  2017-02-02 22:45 ` [Buildroot] [PATCH 2/4] checkpolicy: " Adam Duskett
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Adam Duskett @ 2017-02-02 22:45 UTC (permalink / raw)
  To: buildroot

Sepolgen is currently a host-only package, however it is a dependency
of audit2allow.  This patch allows for sepolgen to be compiled for the
target.

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
---
 package/Config.in            |  1 +
 package/sepolgen/Config.in   |  9 +++++++++
 package/sepolgen/sepolgen.mk | 19 +++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 package/sepolgen/Config.in

diff --git a/package/Config.in b/package/Config.in
index d1c517a..9fedc23 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1707,6 +1707,7 @@ endmenu
 
 menu "Security"
 	source "package/policycoreutils/Config.in"
+	source "package/sepolgen/Config.in"
 	source "package/setools/Config.in"
 endmenu
 
diff --git a/package/sepolgen/Config.in b/package/sepolgen/Config.in
new file mode 100644
index 0000000..87621b6
--- /dev/null
+++ b/package/sepolgen/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_SEPOLGEN
+	bool "sepolgen"
+    select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
+	help
+	  This package contains a Python module that forms the core of the 
+	  modern audit2allow (which is a part of the package policycoreutils). 
+	  It contains infrastructure for parsing SELinux related messages as 
+	  produced by the audit system. 
+	  It has facilities for generating policy based on required access.
diff --git a/package/sepolgen/sepolgen.mk b/package/sepolgen/sepolgen.mk
index 137eaed..ce3f683 100644
--- a/package/sepolgen/sepolgen.mk
+++ b/package/sepolgen/sepolgen.mk
@@ -10,6 +10,24 @@ SEPOLGEN_LICENSE = GPLv2
 SEPOLGEN_LICENSE_FILES = COPYING
 
 ifeq ($(BR2_PACKAGE_PYTHON3),y)
+SEPOLGEN_DEPENDENCIES = python3
+SEPOLGEN_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) \
+	PYTHONLIBDIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
+else
+SEPOLGEN_DEPENDENCIES = python
+SEPOLGEN_MAKE_CMDS = $(TARGET_CONFIGURE_OPTS) \
+	PYTHONLIBDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
+endif
+
+define SEPOLGEN_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_SEPOLGEN_MAKE_CMDS) DESTDIR=$(TARGET_DIR)
+endef
+
+define SEPOLGEN_INSTALL_TARGET_CMDS
+	$(MAKE_ENV) $(MAKE) -C $(@D) $(SEPOLGEN_MAKE_CMDS) DESTDIR=$(TARGET_DIR) install
+endef
+
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
 HOST_SEPOLGEN_DEPENDENCIES = host-python3
 HOST_SEPOLGEN_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) \
 	PYTHONLIBDIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
@@ -27,4 +45,5 @@ define HOST_SEPOLGEN_INSTALL_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_SEPOLGEN_MAKE_CMDS) DESTDIR=$(HOST_DIR) install
 endef
 
+$(eval $(generic-package))
 $(eval $(host-generic-package))
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-04-12 20:45 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 22:45 [Buildroot] [PATCH 1/4] sepolgen: allow compiling for target Adam Duskett
2017-02-02 22:45 ` [Buildroot] [PATCH 2/4] checkpolicy: " Adam Duskett
2017-03-27 17:04   ` Matthew Weber
2017-03-27 19:13     ` Matthew Weber
2017-04-03 13:14       ` Adam Duskett
2017-04-03 13:38         ` Matthew Weber
2017-04-09 13:43   ` Thomas Petazzoni
2017-02-02 22:45 ` [Buildroot] [PATCH 3/4] libselinux: allow compiling python wrapper module " Adam Duskett
2017-03-27 17:21   ` Matthew Weber
2017-03-27 19:19     ` Matthew Weber
2017-04-04  2:09       ` Matthew Weber
2017-04-09 13:44   ` Thomas Petazzoni
2017-04-11 12:40   ` Thomas Petazzoni
2017-04-12 12:53     ` Matthew Weber
2017-04-12 13:54       ` Matthew Weber
2017-04-12 14:00         ` Matthew Weber
2017-04-12 20:45           ` Matthew Weber
2017-02-02 22:45 ` [Buildroot] [PATCH 4/4] policycoreutils: add option to build audit2allow Adam Duskett
2017-03-27 17:22   ` Matthew Weber
2017-03-27 19:20     ` Matthew Weber
2017-04-09 13:44   ` Thomas Petazzoni
2017-03-27 19:11 ` [Buildroot] [PATCH 1/4] sepolgen: allow compiling for target Matthew Weber
2017-04-09 13:43 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.