Changeset 2238

Show
Ignore:
Timestamp:
06/13/08 09:59:52 (4 months ago)
Author:
dsugar
Message:

updated make/spec files to match current CLIP

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/framework-plugin/resources/build/Makefile

    r1978 r2238  
    44#      published by the Free Software Foundation, version 2. 
    55# 
    6 # Author: Spencer Shimko <sshimko@tresys.com> 
     6# Authors: Spencer Shimko <sshimko@tresys.com> 
     7#          Brian Williams <bwilliams@tresys.com> 
    78# 
    89# README: This build systems creates a refpolicy based policy RPM.  The repo  
     
    1819 
    1920# The name of the policy eg in the case of selinux-policy-ftg it would be ftg 
    20 POLNAME ?= cds-baseline 
     21POLNAME ?= clip 
    2122 
    2223# This is the version number of the RPM that will be  
    2324# generated.  Typically you bump this for delivery. 
    24 VERSION ?= 1.0 
     25VERSION ?= 2.0 
    2526 
    2627# bump this if creating multiple releases from the same  
    2728# version (think about this... why are you doing this?) 
    28 RELEASE ?= 1 
     29RELEASE ?= 3 
     30 
     31# The name of the Vendor 
     32VENDOR ?= Tresys Technology, LLC 
     33 
     34# The name of the Packager 
     35PACKAGER ?= Tresys Technology, LLC 
    2936 
    3037# change this to "y" to build a src rpm 
     
    3542MODE ?= permissive 
    3643 
    37 # This is Vendor creating the package, it defaults to Tresys Technology, LLC 
    38 VENDOR ?= "Tresys Technology, LLC" 
    39  
    40 # This is the Package responsible for generating this pakcage, it defaults to 
    41 # Treys Technology, LLC 
    42 PACKAGER ?= "Tresys Technology, LLC"  
    4344 
    4445# please insert any docs here that you want to be placed in the tarball 
     
    5758CONF_DIR := $(ROOT_DIR)/conf 
    5859SUPPORT_DIR := $(ROOT_DIR)/support 
    59 POLICY_SPEC := $(CONF_DIR)/selinux-policy.spec 
    6060 
    6161RPM_TMPDIR := $(ROOT_DIR)/tmp 
     
    6666POL_TYPE := $(shell grep "^TYPE = " $(POLICY_DIR)/build.conf |awk ' { print $$3 } ') 
    6767OUTPUT_VER := $(shell grep "^OUTPUT_POLICY = " $(POLICY_DIR)/build.conf |awk ' { print $$3 } ') 
     68MONOLITHIC := $(shell grep "^MONOLITHIC" $(POLICY_DIR)/build.conf | grep -c "y" ) 
     69 
     70ifeq ($(MONOLITHIC),1) 
     71  POLICY_SPEC := $(CONF_DIR)/selinux-policy-monolithic.spec 
     72else 
     73  POLICY_SPEC := $(CONF_DIR)/selinux-policy-modular.spec 
     74endif 
    6875 
    6976ifeq ($(OUTPUT_VER),) 
     
    118125                --define 'release $(RELEASE)' --define 'type $(POL_TYPE)' \ 
    119126                --define 'output_version $(OUTPUT_VER)' \ 
    120                 --define 'packager $(PACKAGER)' \ 
    121                 --define 'vendor $(VENDOR)' \ 
    122127                --define 'mode $(MODE)' --define 'polname $(POLNAME)' \ 
     128                --define 'vendor $(VENDOR)' --define 'packager $(PACKAGER)' \ 
    123129                -b$(BIN_OR_ALL) SPECS/$(notdir $(POLICY_SPEC)) 
    124130        mv  $(RPM_BUILDROOT)/RPMS/noarch/selinux-policy-$(POLNAME)-$(VERSION)-$(RELEASE).noarch.rpm $(OUTPUT_DIR) 
  • trunk/framework-plugin/resources/conf/selinux-policy-monolithic.spec

    r1978 r2238  
    1 # This is the spec file for a Tresys refpolicy based guard 
    21%define POLICYDIR /etc/selinux/%{polname} 
    32%define FILE_CONTEXT %{POLICYDIR}/contexts/files/file_contexts 
     
    76Version: %{version} 
    87Release: %{release} 
    9 License: Proprietary 
     8License: GPL 
    109Vendor: %{vendor} 
    1110Packager: %{packager} 
     
    4544make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/selinux/%{polname}/users/local.users 
    4645make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/selinux/%{polname}/users/system.users 
     46make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/selinux/%{polname}/contexts/netfilter_contexts 
    4747make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT install 
    4848 
     
    7070%config(noreplace) %{_sysconfdir}/selinux/%{polname}/contexts/removable_context 
    7171%config(noreplace) %{_sysconfdir}/selinux/%{polname}/contexts/userhelper_context 
     72%{_sysconfdir}/selinux/%{polname}/seusers 
    7273%{_sysconfdir}/selinux/%{polname}/contexts/files 
    7374%{_sysconfdir}/selinux/%{polname}/contexts/netfilter_contexts 
     75%config %{_sysconfdir}/selinux/%{polname}/contexts/users/* 
    7476%dir %{_sysconfdir}/selinux/*/users 
    7577%config %{_sysconfdir}/selinux/%{polname}/users/system.users 
     
    8890#echo "Do to configuration differences the system will be set to permissive mode.  The system will then be relabeled and then it MUST be rebooted.  DO NOT RUN THE SYSTEM WITHOUT REBOOTING!  Press enter to continue." 
    8991#read 
    90 #/usr/sbin/setenforce 0 
     92/usr/sbin/setenforce 0 
    9193 
    9294if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && [ -e /selinux/policyvers ]; then 
    9395        [ -x /usr/sbin/load_policy ] && /usr/sbin/load_policy  
    94         [ -x /usr/sbin/setfiles ] && /usr/sbin/setfiles -F %{FILE_CONTEXT} `mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]|xfs|jfs|reiserfs).*rw/{print $3}'` 
     96        [ -x /sbin/setfiles ] && /sbin/setfiles -F %{FILE_CONTEXT} `mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]|xfs|jfs|reiserfs).*rw/{print $3}'` 
    9597fi 
    9698echo "" > /etc/selinux/%{polname}/booleans