Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/4] sepolgen: Add target compile option.
Date: Mon,  9 Jan 2017 15:56:12 -0500	[thread overview]
Message-ID: <20170109205614.25011-2-aduskett@codeblue.com> (raw)
In-Reply-To: <20170109205614.25011-1-aduskett@codeblue.com>

If a user wants to use the tool audit2allow provided by
policycoreutils, they will need the python bindings from
sepolgen on the target file system.


Signed-off-by: Adam Duskett <aduskett@codeblue.com>
---
 package/sepolgen/Config.in   |  8 ++++++++
 package/sepolgen/sepolgen.mk | 22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 package/sepolgen/Config.in

diff --git a/package/sepolgen/Config.in b/package/sepolgen/Config.in
new file mode 100644
index 0000000..f43a1bc
--- /dev/null
+++ b/package/sepolgen/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_SEPOLGEN
+	bool "sepolgen"
+	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..c40bbb3 100644
--- a/package/sepolgen/sepolgen.mk
+++ b/package/sepolgen/sepolgen.mk
@@ -9,6 +9,27 @@ SEPOLGEN_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/fi
 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) \
@@ -28,3 +49,4 @@ define HOST_SEPOLGEN_INSTALL_CMDS
 endef
 
 $(eval $(host-generic-package))
+$(eval $(generic-package))
-- 
2.9.3

  reply	other threads:[~2017-01-09 20:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 20:56 [Buildroot] [PATCH 1/4] sepolgen: bump version to 2.6 Adam Duskett
2017-01-09 20:56 ` Adam Duskett [this message]
2017-01-09 20:56 ` [Buildroot] [PATCH 3/4] libselinux: allow python bindings on the target filing system Adam Duskett
2017-01-09 20:56 ` [Buildroot] [PATCH 4/4] policycoreutils: Add audit2allow support Adam Duskett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170109205614.25011-2-aduskett@codeblue.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox