From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0qcS-0006YZ-FG for guix-patches@gnu.org; Wed, 19 Apr 2017 10:30:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0qcN-00040K-J9 for guix-patches@gnu.org; Wed, 19 Apr 2017 10:30:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0qcN-0003zv-FG for guix-patches@gnu.org; Wed, 19 Apr 2017 10:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0qcN-0001do-7v for guix-patches@gnu.org; Wed, 19 Apr 2017 10:30:03 -0400 Subject: bug#26561: [PATCH 2/9] gnu: Add checkpolicy. Resent-Message-ID: From: Ricardo Wurmus Date: Wed, 19 Apr 2017 16:29:10 +0200 Message-Id: <20170419142918.11688-2-rekado@elephly.net> In-Reply-To: <20170419142918.11688-1-rekado@elephly.net> References: <20170419142918.11688-1-rekado@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26561@debbugs.gnu.org Cc: Ricardo Wurmus * gnu/packages/selinux.scm (checkpolicy): New variable. --- gnu/packages/selinux.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm index 75758dd6b..5f7e11928 100644 --- a/gnu/packages/selinux.scm +++ b/gnu/packages/selinux.scm @@ -23,6 +23,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages bison) #:use-module (gnu packages flex)) ;; Update the SELinux packages together! @@ -69,3 +70,37 @@ similar tools, and programs such as @code{load_policy}, which must perform specific transformations on binary policies (for example, customizing policy boolean settings).") (license license:lgpl2.1+))) + +(define-public checkpolicy + (package (inherit libsepol) + (name "checkpolicy") + (arguments + `(#:tests? #f ; there is no check target + #:make-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "PREFIX=" out) + (string-append "LDLIBS=" + (assoc-ref %build-inputs "libsepol") + "/lib/libsepol.a " + (assoc-ref %build-inputs "flex") + "/lib/libfl.a") + "CC=gcc")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'enter-dir + (lambda _ (chdir ,name) #t))))) + (inputs + `(("libsepol" ,libsepol))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex))) + (synopsis "Check SELinux security policy configurations and modules") + (description + "This package provides the tools \"checkpolicy\" and \"checkmodule\". +Checkpolicy is a program that checks and compiles a SELinux security policy +configuration into a binary representation that can be loaded into the kernel. +Checkmodule is a program that checks and compiles a SELinux security policy +module into a binary representation.") + ;; GPLv2 only + (license license:gpl2))) -- 2.12.2