diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-01-28 22:45:18 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-02-05 18:54:17 +0100 |
commit | 2b9f6ee2c558beaf9e3d2133cf493a9bd8f4f46f (patch) | |
tree | 90d97317cff2eafca73d9630feb6c83e42551780 | |
parent | 45cb2f82c45645681321ec3f310bdac6888d5c05 (diff) | |
download | ptxdist-2b9f6ee2c558beaf9e3d2133cf493a9bd8f4f46f.tar.gz ptxdist-2b9f6ee2c558beaf9e3d2133cf493a9bd8f4f46f.tar.xz |
checkpolicy: add package
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | patches/checkpolicy-2.1.11/0001-makefile-remove-host-path-from-list-of-header-search.patch | 36 | ||||
-rw-r--r-- | patches/checkpolicy-2.1.11/series | 4 | ||||
-rw-r--r-- | rules/checkpolicy.in | 31 | ||||
-rw-r--r-- | rules/checkpolicy.make | 61 |
4 files changed, 132 insertions, 0 deletions
diff --git a/patches/checkpolicy-2.1.11/0001-makefile-remove-host-path-from-list-of-header-search.patch b/patches/checkpolicy-2.1.11/0001-makefile-remove-host-path-from-list-of-header-search.patch new file mode 100644 index 000000000..5e7ca3dda --- /dev/null +++ b/patches/checkpolicy-2.1.11/0001-makefile-remove-host-path-from-list-of-header-search.patch @@ -0,0 +1,36 @@ +From: Marc Kleine-Budde <mkl@pengutronix.de> +Date: Fri, 25 Jan 2013 18:03:04 +0100 +Subject: [PATCH] makefile: remove host path from list of header search dirs + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +--- + Makefile | 2 +- + test/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index e5fae3d..02f7b7e 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,7 @@ YACC = bison -y + + CFLAGS ?= -g -Wall -Werror -Wshadow -O2 -pipe -fno-strict-aliasing + +-override CFLAGS += -I. -I${INCLUDEDIR} ++override CFLAGS += -I. + + CHECKOBJS = y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o \ + policy_define.o +diff --git a/test/Makefile b/test/Makefile +index 0731e89..51d0f63 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -7,7 +7,7 @@ LIBDIR=$(PREFIX)/lib + INCLUDEDIR ?= $(PREFIX)/include + + CFLAGS ?= -g -Wall -W -Werror -O2 -pipe +-override CFLAGS += -I$(INCLUDEDIR) ++override CFLAGS += + + LDLIBS=-lfl -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR) + diff --git a/patches/checkpolicy-2.1.11/series b/patches/checkpolicy-2.1.11/series new file mode 100644 index 000000000..9c6265af9 --- /dev/null +++ b/patches/checkpolicy-2.1.11/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-makefile-remove-host-path-from-list-of-header-search.patch +# 750384bfff2c0909584851a365cba458 - git-ptx-patches magic diff --git a/rules/checkpolicy.in b/rules/checkpolicy.in new file mode 100644 index 000000000..545e7cfb7 --- /dev/null +++ b/rules/checkpolicy.in @@ -0,0 +1,31 @@ +## SECTION=selinux + +config CHECKPOLICY + tristate + prompt "checkpolicy" + # + # The target package is not functional yet, but we need the host + # package. Depend on broken for now. + # + depends on BROKEN + select LIBSELINUX + select LIBSEPOL + select FLEX + help + Security-enhanced Linux is a patch of the Linux kernel and a + number of utilities with enhanced security functionality + designed to add mandatory access controls to Linux. The + Security-enhanced Linux kernel contains new architectural + components originally developed to improve the security of + the Flask operating system. These architectural components + provide general support for the enforcement of many kinds of + mandatory access control policies, including those based on + the concepts of Type Enforcement, Role-based Access Control, + and Multi-level Security. + + This package contains checkpolicy, the SELinux policy + compiler. Only required for building policies. 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. diff --git a/rules/checkpolicy.make b/rules/checkpolicy.make new file mode 100644 index 000000000..6cd26391a --- /dev/null +++ b/rules/checkpolicy.make @@ -0,0 +1,61 @@ +# -*-makefile-*- +# +# Copyright (C) 2013 by Marc Kleine-Budde <mkl@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_CHECKPOLICY) += checkpolicy + +# +# Paths and names +# +CHECKPOLICY_VERSION := 2.1.11 +CHECKPOLICY_MD5 := 046b590de004f8a6cee655c4e95a7970 +CHECKPOLICY := checkpolicy-$(CHECKPOLICY_VERSION) +CHECKPOLICY_SUFFIX := tar.gz +CHECKPOLICY_URL := http://userspace.selinuxproject.org/releases/20120924/$(CHECKPOLICY).$(CHECKPOLICY_SUFFIX) +CHECKPOLICY_SOURCE := $(SRCDIR)/$(CHECKPOLICY).$(CHECKPOLICY_SUFFIX) +CHECKPOLICY_DIR := $(BUILDDIR)/$(CHECKPOLICY) +CHECKPOLICY_LICENSE := unknown + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +CHECKPOLICY_CONF_TOOL := NO +CHECKPOLICY_MAKE_ENV := $(CROSS_ENV) +CHECKPOLICY_MAKE_OPT := LIBDIR=$(PTXDIST_SYSROOT_TARGET)/usr/lib +CHECKPOLICY_INSTALL_OPT = \ + PREFIX=$(CHECKPOLICY_PKGDIR) \ + install + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/checkpolicy.targetinstall: + @$(call targetinfo) + + @$(call install_init, checkpolicy) + @$(call install_fixup, checkpolicy,PRIORITY,optional) + @$(call install_fixup, checkpolicy,SECTION,base) + @$(call install_fixup, checkpolicy,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>") + @$(call install_fixup, checkpolicy,DESCRIPTION,missing) + + @$(call install_copy, checkpolicy, 0, 0, 0755, $(CHECKPOLICY_DIR)/foobar, /dev/null) + + @$(call install_finish, checkpolicy) + + @$(call touch) + +# vim: syntax=make |