[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: gnu: Add python-sepolgen.
From: |
Ricardo Wurmus |
Subject: |
06/09: gnu: Add python-sepolgen. |
Date: |
Fri, 21 Apr 2017 18:40:08 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit d7e2d273e111796a4c31a6d9974eec494add138f
Author: Ricardo Wurmus <address@hidden>
Date: Fri Apr 14 13:48:36 2017 +0200
gnu: Add python-sepolgen.
* gnu/packages/selinux.scm (python-sepolgen): New variable.
---
gnu/packages/selinux.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index 22f116e..ee9e83b 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -238,3 +238,55 @@ binary policies.")
(description "The SELinux CIL compiler is a compiler that converts the
@dfn{common intermediate language} (CIL) into a kernel binary policy file.")
(license license:bsd-2)))
+
+(define-public python-sepolgen
+ (package (inherit libsepol)
+ (name "python-sepolgen")
+ (arguments
+ `(#:modules ((srfi srfi-1)
+ (guix build gnu-build-system)
+ (guix build utils))
+ ,@(substitute-keyword-arguments (package-arguments libsepol)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'enter-dir
+ (lambda _ (chdir "sepolgen") #t))
+ ;; By default all Python files would be installed to
+ ;; $out/gnu/store/...-python-.../, so we override the
+ ;; PACKAGEDIR to fix this.
+ (add-after 'enter-dir 'fix-target-path
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((get-python-version
+ ;; FIXME: copied from python-build-system
+ (lambda (python)
+ (let* ((version (last (string-split python
#\-)))
+ (components (string-split version #\.))
+ (major+minor (take components 2)))
+ (string-join major+minor ".")))))
+ (substitute* "src/sepolgen/Makefile"
+ (("^PACKAGEDIR.*")
+ (string-append "PACKAGEDIR="
+ (assoc-ref outputs "out")
+ "/lib/python"
+ (get-python-version
+ (assoc-ref inputs "python"))
+ "/site-packages/sepolgen")))
+ (substitute* "src/share/Makefile"
+ (("\\$\\(DESTDIR\\)") (assoc-ref outputs "out"))))
+ #t)))))))
+ (inputs
+ `(("python" ,python-wrapper)))
+ (native-inputs '())
+ (synopsis "Python module for generating SELinux policies")
+ (description
+ "This package contains a Python module that forms the core of
address@hidden, a part of the package @code{policycoreutils}. The
+sepolgen library contains: Reference Policy Representation, which are Objects
+for representing policies and the reference policy interfaces. 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.")
+ ;; GPLv2 only
+ (license license:gpl2)))
- branch master updated (ba85174 -> 6ef94ec), Ricardo Wurmus, 2017/04/21
- 06/09: gnu: Add python-sepolgen.,
Ricardo Wurmus <=
- 05/09: gnu: Add secilc., Ricardo Wurmus, 2017/04/21
- 01/09: gnu: Add libsepol., Ricardo Wurmus, 2017/04/21
- 02/09: gnu: Add checkpolicy., Ricardo Wurmus, 2017/04/21
- 03/09: gnu: Add libselinux., Ricardo Wurmus, 2017/04/21
- 04/09: gnu: Add libsemanage., Ricardo Wurmus, 2017/04/21
- 08/09: gnu: Add python-setools., Ricardo Wurmus, 2017/04/21
- 09/09: gnu: Add policycoreutils., Ricardo Wurmus, 2017/04/21
- 07/09: gnu: Add python-ipy., Ricardo Wurmus, 2017/04/21