From 8e0ef1f94102c0e3be9a321a05815391b395b2d0 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 1 Dec 2005 19:04:57 +0000 Subject: [PATCH] move build options out of Makefile into build.conf --- refpolicy/Changelog | 1 + refpolicy/INSTALL | 3 ++- refpolicy/Makefile | 48 +++----------------------------------------- refpolicy/README | 12 ++++++++++- refpolicy/build.conf | 46 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 47 deletions(-) create mode 100644 refpolicy/build.conf diff --git a/refpolicy/Changelog b/refpolicy/Changelog index cde6128a..b2c5bf34 100644 --- a/refpolicy/Changelog +++ b/refpolicy/Changelog @@ -1,3 +1,4 @@ +- Move policy build options out of Makefile into build.conf. - Add yppasswd to nis module. - Change optional_policy() to refer to the module name rather than modulename.te. diff --git a/refpolicy/INSTALL b/refpolicy/INSTALL index fa58eca3..1038bae5 100644 --- a/refpolicy/INSTALL +++ b/refpolicy/INSTALL @@ -9,7 +9,8 @@ If you do not have a modules.conf, one can be generated: make conf -This will create a default modules.conf. After installing the policy sources, +This will create a default modules.conf. Options for the policy +build process can be found in build.conf. After installing the policy sources, the old Make targets have been maintained for the monolithic policy: Local policy development: diff --git a/refpolicy/Makefile b/refpolicy/Makefile index 433d80fe..f9ce2b64 100644 --- a/refpolicy/Makefile +++ b/refpolicy/Makefile @@ -14,59 +14,17 @@ # # The default target is 'policy'. # - -######################################## # -# Configurable portions of the Makefile +# Please see build.conf for policy build options. # -# Policy version -# By default, checkpolicy will create the highest -# version policy it supports. Setting this will -# override the version. This only affects -# monolithic policies. -#OUTPUT_POLICY = 18 - -# Policy Type -# strict, targeted, -# strict-mls, targeted-mls, -# strict-mcs, targeted-mcs -TYPE = targeted-mcs - -# Policy Name -# If set, this will be used as the policy -# name. Otherwise the policy type will be -# used for the name. -NAME = refpolicy - -# Distribution -# Some distributions have portions of policy -# for programs or configurations specific to the -# distribution. Setting this will enable options -# for the distribution. -# redhat, gentoo, debian, and suse are current options. -# Fedora users should enable redhat. -DISTRO = redhat - -# Direct admin init -# Setting this will allow sysadm to directly -# run init scripts, instead of requring run_init. -# This is a build option, as role transitions do -# not work in conditional policy. -DIRECT_INITRC=y - -# Build monolithic policy. Putting n here -# will build a loadable module policy. -MONOLITHIC=y - -# Uncomment this to disable command echoing -#QUIET:=@ - ######################################## # # NO OPTIONS BELOW HERE # +include build.conf + # executable paths PREFIX := /usr BINDIR := $(PREFIX)/bin diff --git a/refpolicy/README b/refpolicy/README index f64a0b10..8b991998 100644 --- a/refpolicy/README +++ b/refpolicy/README @@ -70,9 +70,19 @@ checklabels Check the labels on the filesystem, and report when restorelabels Relabel the filesystem and report each file that is relabeled. -2) Reference Policy Directories +2) Reference Policy Files and Directories All directories relative to the root of the Reference Policy sources directory. +Makefile General rules for building the policy. + +Rules.modular Rules specific to building loadable module policies. + +Rules.monolithic Rules specific to building monolithic policies. + +build.conf Options which influence the building of the policy, + such as the policy type (strict, targeted, etc.) + and distribution. + config/appconfig-* Application configuration files for all configurations of the Reference Policy (targeted/strict with or without MLS or MCS). These are used by SELinux-aware programs. diff --git a/refpolicy/build.conf b/refpolicy/build.conf new file mode 100644 index 00000000..916a0636 --- /dev/null +++ b/refpolicy/build.conf @@ -0,0 +1,46 @@ +######################################## +# +# Policy build options +# + +# Policy version +# By default, checkpolicy will create the highest +# version policy it supports. Setting this will +# override the version. This only has an +# effect for monolithic policies. +#OUTPUT_POLICY = 18 + +# Policy Type +# strict, targeted, +# strict-mls, targeted-mls, +# strict-mcs, targeted-mcs +TYPE = targeted-mcs + +# Policy Name +# If set, this will be used as the policy +# name. Otherwise the policy type will be +# used for the name. +NAME = refpolicy + +# Distribution +# Some distributions have portions of policy +# for programs or configurations specific to the +# distribution. Setting this will enable options +# for the distribution. +# redhat, gentoo, debian, and suse are current options. +# Fedora users should enable redhat. +DISTRO = redhat + +# Direct admin init +# Setting this will allow sysadm to directly +# run init scripts, instead of requring run_init. +# This is a build option, as role transitions do +# not work in conditional policy. +DIRECT_INITRC=y + +# Build monolithic policy. Putting n here +# will build a loadable module policy. +MONOLITHIC=y + +# Uncomment this to disable command echoing +#QUIET:=@