/[gentoo-x86]/eclass/selinux-policy-2.eclass
Gentoo

Diff of /eclass/selinux-policy-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 Revision 1.9
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.8 2011/08/12 20:01:29 swift Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.9 2011/08/22 04:46:32 vapier Exp $
4 4
5# Eclass for installing SELinux policy, and optionally 5# Eclass for installing SELinux policy, and optionally
6# reloading the reference-policy based modules. 6# reloading the reference-policy based modules.
7 7
8# @ECLASS: selinux-policy-2.eclass 8# @ECLASS: selinux-policy-2.eclass
9# @MAINTAINER: 9# @MAINTAINER:
10# selinux@gentoo.org 10# selinux@gentoo.org
11# @BLURB: This eclass supports the deployment of the various SELinux modules in sec-policy 11# @BLURB: This eclass supports the deployment of the various SELinux modules in sec-policy
12# @DESCRIPTION: 12# @DESCRIPTION:
13# The selinux-policy-2.eclass supports deployment of the various SELinux modules 13# The selinux-policy-2.eclass supports deployment of the various SELinux modules
14# defined in the sec-policy category. It is responsible for extracting the 14# defined in the sec-policy category. It is responsible for extracting the
15# specific bits necessary for single-module deployment (instead of full-blown 15# specific bits necessary for single-module deployment (instead of full-blown
16# policy rebuilds) and applying the necessary patches. 16# policy rebuilds) and applying the necessary patches.
17# 17#
18# Also, it supports for bundling patches to make the whole thing just a bit more 18# Also, it supports for bundling patches to make the whole thing just a bit more
19# manageable. 19# manageable.
20 20
21# @ECLASS-VARIABLE: MODS 21# @ECLASS-VARIABLE: MODS
22# @DESCRIPTION: 22# @DESCRIPTION:
23# This variable contains the (upstream) module name for the SELinux module. 23# This variable contains the (upstream) module name for the SELinux module.
24# This name is only the module name, not the category! 24# This name is only the module name, not the category!
25: ${MODS:="_illegal"} 25: ${MODS:="_illegal"}
26 26
27# @ECLASS-VARIABLE: BASEPOL 27# @ECLASS-VARIABLE: BASEPOL
28# @DESCRIPTION: 28# @DESCRIPTION:
29# This variable contains the version string of the selinux-base-policy package 29# This variable contains the version string of the selinux-base-policy package
30# that this module build depends on. It is used to patch with the appropriate 30# that this module build depends on. It is used to patch with the appropriate
31# patch bundle(s) that are part of selinux-base-policy. 31# patch bundle(s) that are part of selinux-base-policy.
32: ${BASEPOL:=""} 32: ${BASEPOL:=""}
33 33
34# @ECLASS-VARIABLE: POLICY_PATCH 34# @ECLASS-VARIABLE: POLICY_PATCH
35# @DESCRIPTION: 35# @DESCRIPTION:
36# This variable contains the additional patch(es) that need to be applied on top 36# This variable contains the additional patch(es) that need to be applied on top
155 || die "Failed to copy the module files to ${S}/${i}" 155 || die "Failed to copy the module files to ${S}/${i}"
156 done 156 done
157} 157}
158 158
159# @FUNCTION: selinux-policy-2_src_compile 159# @FUNCTION: selinux-policy-2_src_compile
160# @DESCRIPTION: 160# @DESCRIPTION:
161# Build the SELinux policy module (.pp file) for just the selected module, and 161# Build the SELinux policy module (.pp file) for just the selected module, and
162# this for each SELinux policy mentioned in POLICY_TYPES 162# this for each SELinux policy mentioned in POLICY_TYPES
163selinux-policy-2_src_compile() { 163selinux-policy-2_src_compile() {
164 for i in ${POLICY_TYPES}; do 164 for i in ${POLICY_TYPES}; do
165 # Parallel builds are broken, so we need to force -j1 here 165 # Parallel builds are broken, so we need to force -j1 here

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20