Changeset 2238
- 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
| r1978 |
r2238 |
|
| 4 | 4 | # published by the Free Software Foundation, version 2. |
|---|
| 5 | 5 | # |
|---|
| 6 | | # Author: Spencer Shimko <sshimko@tresys.com> |
|---|
| | 6 | # Authors: Spencer Shimko <sshimko@tresys.com> |
|---|
| | 7 | # Brian Williams <bwilliams@tresys.com> |
|---|
| 7 | 8 | # |
|---|
| 8 | 9 | # README: This build systems creates a refpolicy based policy RPM. The repo |
|---|
| … | … | |
| 18 | 19 | |
|---|
| 19 | 20 | # The name of the policy eg in the case of selinux-policy-ftg it would be ftg |
|---|
| 20 | | POLNAME ?= cds-baseline |
|---|
| | 21 | POLNAME ?= clip |
|---|
| 21 | 22 | |
|---|
| 22 | 23 | # This is the version number of the RPM that will be |
|---|
| 23 | 24 | # generated. Typically you bump this for delivery. |
|---|
| 24 | | VERSION ?= 1.0 |
|---|
| | 25 | VERSION ?= 2.0 |
|---|
| 25 | 26 | |
|---|
| 26 | 27 | # bump this if creating multiple releases from the same |
|---|
| 27 | 28 | # version (think about this... why are you doing this?) |
|---|
| 28 | | RELEASE ?= 1 |
|---|
| | 29 | RELEASE ?= 3 |
|---|
| | 30 | |
|---|
| | 31 | # The name of the Vendor |
|---|
| | 32 | VENDOR ?= Tresys Technology, LLC |
|---|
| | 33 | |
|---|
| | 34 | # The name of the Packager |
|---|
| | 35 | PACKAGER ?= Tresys Technology, LLC |
|---|
| 29 | 36 | |
|---|
| 30 | 37 | # change this to "y" to build a src rpm |
|---|
| … | … | |
| 35 | 42 | MODE ?= permissive |
|---|
| 36 | 43 | |
|---|
| 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" |
|---|
| 43 | 44 | |
|---|
| 44 | 45 | # please insert any docs here that you want to be placed in the tarball |
|---|
| … | … | |
| 57 | 58 | CONF_DIR := $(ROOT_DIR)/conf |
|---|
| 58 | 59 | SUPPORT_DIR := $(ROOT_DIR)/support |
|---|
| 59 | | POLICY_SPEC := $(CONF_DIR)/selinux-policy.spec |
|---|
| 60 | 60 | |
|---|
| 61 | 61 | RPM_TMPDIR := $(ROOT_DIR)/tmp |
|---|
| … | … | |
| 66 | 66 | POL_TYPE := $(shell grep "^TYPE = " $(POLICY_DIR)/build.conf |awk ' { print $$3 } ') |
|---|
| 67 | 67 | OUTPUT_VER := $(shell grep "^OUTPUT_POLICY = " $(POLICY_DIR)/build.conf |awk ' { print $$3 } ') |
|---|
| | 68 | MONOLITHIC := $(shell grep "^MONOLITHIC" $(POLICY_DIR)/build.conf | grep -c "y" ) |
|---|
| | 69 | |
|---|
| | 70 | ifeq ($(MONOLITHIC),1) |
|---|
| | 71 | POLICY_SPEC := $(CONF_DIR)/selinux-policy-monolithic.spec |
|---|
| | 72 | else |
|---|
| | 73 | POLICY_SPEC := $(CONF_DIR)/selinux-policy-modular.spec |
|---|
| | 74 | endif |
|---|
| 68 | 75 | |
|---|
| 69 | 76 | ifeq ($(OUTPUT_VER),) |
|---|
| … | … | |
| 118 | 125 | --define 'release $(RELEASE)' --define 'type $(POL_TYPE)' \ |
|---|
| 119 | 126 | --define 'output_version $(OUTPUT_VER)' \ |
|---|
| 120 | | --define 'packager $(PACKAGER)' \ |
|---|
| 121 | | --define 'vendor $(VENDOR)' \ |
|---|
| 122 | 127 | --define 'mode $(MODE)' --define 'polname $(POLNAME)' \ |
|---|
| | 128 | --define 'vendor $(VENDOR)' --define 'packager $(PACKAGER)' \ |
|---|
| 123 | 129 | -b$(BIN_OR_ALL) SPECS/$(notdir $(POLICY_SPEC)) |
|---|
| 124 | 130 | mv $(RPM_BUILDROOT)/RPMS/noarch/selinux-policy-$(POLNAME)-$(VERSION)-$(RELEASE).noarch.rpm $(OUTPUT_DIR) |
|---|
| r1978 |
r2238 |
|
| 1 | | # This is the spec file for a Tresys refpolicy based guard |
|---|
| 2 | 1 | %define POLICYDIR /etc/selinux/%{polname} |
|---|
| 3 | 2 | %define FILE_CONTEXT %{POLICYDIR}/contexts/files/file_contexts |
|---|
| … | … | |
| 7 | 6 | Version: %{version} |
|---|
| 8 | 7 | Release: %{release} |
|---|
| 9 | | License: Proprietary |
|---|
| | 8 | License: GPL |
|---|
| 10 | 9 | Vendor: %{vendor} |
|---|
| 11 | 10 | Packager: %{packager} |
|---|
| … | … | |
| 45 | 44 | make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/selinux/%{polname}/users/local.users |
|---|
| 46 | 45 | make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/selinux/%{polname}/users/system.users |
|---|
| | 46 | make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT $RPM_BUILD_ROOT%{_sysconfdir}/selinux/%{polname}/contexts/netfilter_contexts |
|---|
| 47 | 47 | make NAME=%{polname} DESTDIR=$RPM_BUILD_ROOT install |
|---|
| 48 | 48 | |
|---|
| … | … | |
| 70 | 70 | %config(noreplace) %{_sysconfdir}/selinux/%{polname}/contexts/removable_context |
|---|
| 71 | 71 | %config(noreplace) %{_sysconfdir}/selinux/%{polname}/contexts/userhelper_context |
|---|
| | 72 | %{_sysconfdir}/selinux/%{polname}/seusers |
|---|
| 72 | 73 | %{_sysconfdir}/selinux/%{polname}/contexts/files |
|---|
| 73 | 74 | %{_sysconfdir}/selinux/%{polname}/contexts/netfilter_contexts |
|---|
| | 75 | %config %{_sysconfdir}/selinux/%{polname}/contexts/users/* |
|---|
| 74 | 76 | %dir %{_sysconfdir}/selinux/*/users |
|---|
| 75 | 77 | %config %{_sysconfdir}/selinux/%{polname}/users/system.users |
|---|
| … | … | |
| 88 | 90 | #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." |
|---|
| 89 | 91 | #read |
|---|
| 90 | | #/usr/sbin/setenforce 0 |
|---|
| | 92 | /usr/sbin/setenforce 0 |
|---|
| 91 | 93 | |
|---|
| 92 | 94 | if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && [ -e /selinux/policyvers ]; then |
|---|
| 93 | 95 | [ -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}'` |
|---|
| 95 | 97 | fi |
|---|
| 96 | 98 | echo "" > /etc/selinux/%{polname}/booleans |
|---|
Download in other formats:
* Generating other formats may take time.