From patchwork Wed Sep 25 19:32:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clayton Shotwell X-Patchwork-Id: 277981 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 96F682C0092 for ; Thu, 26 Sep 2013 05:34:11 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 94FA732B04; Wed, 25 Sep 2013 19:34:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id byZwJ4vrFLgo; Wed, 25 Sep 2013 19:34:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B315A31E13; Wed, 25 Sep 2013 19:33:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0625B1C1007 for ; Wed, 25 Sep 2013 19:33:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 02E348A95C for ; Wed, 25 Sep 2013 19:33:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RvW34JEzpqDN for ; Wed, 25 Sep 2013 19:33:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs02.rockwellcollins.com (secvs02.rockwellcollins.com [205.175.225.241]) by whitealder.osuosl.org (Postfix) with ESMTPS id 645638A9CD for ; Wed, 25 Sep 2013 19:33:01 +0000 (UTC) Received: from nosuchhost.198.131.in-addr.arpa (HELO collinscrsmtp01.rockwellcollins.com) ([131.198.63.132]) by mail-virt.rockwellcollins.com with ESMTP; 25 Sep 2013 14:33:01 -0500 Received: from nyx ([131.198.63.11]) by collinscrsmtp01.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013092514330045-4250842 ; Wed, 25 Sep 2013 14:33:00 -0500 From: Clayton Shotwell To: buildroot@busybox.net Date: Wed, 25 Sep 2013 14:32:41 -0500 Message-Id: <1380137571-688-7-git-send-email-clshotwe@rockwellcollins.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1380137571-688-1-git-send-email-clshotwe@rockwellcollins.com> References: <1380137571-688-1-git-send-email-clshotwe@rockwellcollins.com> X-MIMETrack: Itemize by SMTP Server on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 09/25/2013 02:33:00 PM, Serialize by Router on CollinsCRSMTP01/CedarRapids/Collins/Rockwell(Release 8.5.2FP2 HF162|May 16, 2011) at 09/25/2013 02:33:01 PM, Serialize complete at 09/25/2013 02:33:01 PM X-TNEFEvaluated: 1 Cc: Clayton Shotwell Subject: [Buildroot] [PATCH v3 06/16] checkpolicy: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Clayton Shotwell --- Changes v2 -> v3: - Added checkpolicy as a host package (suggested by Arnout). Changes v1 -> v2: - General cleanup to the mk file to conform to the standard format. - Removed the option to do a target build because it should never be needed during normal operation. - Added checkpolicy as a host package. (Suggested by Arnout) package/Config.in.host | 1 + package/checkpolicy/Config.in.host | 10 ++++++++++ package/checkpolicy/checkpolicy.mk | 30 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 package/checkpolicy/Config.in.host create mode 100644 package/checkpolicy/checkpolicy.mk diff --git a/package/Config.in.host b/package/Config.in.host index 5fd2570..1b3e11b 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -1,5 +1,6 @@ menu "Host utilities" +source "package/checkpolicy/Config.in.host" source "package/dfu-util/Config.in.host" source "package/dosfstools/Config.in.host" source "package/e2fsprogs/Config.in.host" diff --git a/package/checkpolicy/Config.in.host b/package/checkpolicy/Config.in.host new file mode 100644 index 0000000..75794be --- /dev/null +++ b/package/checkpolicy/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_CHECKPOLICY + bool "host checkpolicy" + help + checkpolicy is the policy compiler. It uses libsepol to + generate the binary policy. checkpolicy uses the static + libsepol since it deals with low level details of the policy + that have not been encapsulated/abstracted by a proper + shared library interface. + + http://selinuxproject.org/page/Main_Page diff --git a/package/checkpolicy/checkpolicy.mk b/package/checkpolicy/checkpolicy.mk new file mode 100644 index 0000000..0c82d63 --- /dev/null +++ b/package/checkpolicy/checkpolicy.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# checkpolicy +# +################################################################################ + +CHECKPOLICY_VERSION = 2.1.12 +CHECKPOLICY_SITE = http://userspace.selinuxproject.org/releases/20130423/ +CHECKPOLICY_LICENSE = GPLv2 +CHECKPOLICY_LICENSE_FILES = COPYING + +HOST_CHECKPOLICY_DEPENDENCIES = host-libselinux host-flex host-bison + +HOST_CHECKPOLICY_MAKE_OPTS = $(HOST_CONFIGURE_OPTS) \ + LEX="$(HOST_DIR)/usr/bin/flex" \ + YACC="$(HOST_DIR)/usr/bin/bison -y" + +define HOST_CHECKPOLICY_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR) +endef + +define HOST_CHECKPOLICY_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR) +endef + +define HOST_CHECKPOLICY_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(host-generic-package))