1
0
Pavol Rusnak 2008-11-04 16:41:12 +00:00 committed by Git OBS Bridge
parent a94a8f0ac8
commit d1d3770b71
2 changed files with 139 additions and 10 deletions

View File

@ -0,0 +1,74 @@
--- refpolicy-mcs/build.conf
+++ refpolicy-mcs/build.conf
@@ -12,13 +12,13 @@
# Policy Type
# standard, mls, mcs
-TYPE = standard
+TYPE = 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
+NAME = refpolicy-mcs
# Distribution
# Some distributions have portions of policy
@@ -27,7 +27,7 @@
# for the distribution.
# redhat, gentoo, debian, suse, and rhel4 are current options.
# Fedora users should enable redhat.
-#DISTRO = redhat
+DISTRO = suse
# Unknown Permissions Handling
# The behavior for handling permissions defined in the
--- refpolicy-mls/build.conf
+++ refpolicy-mls/build.conf
@@ -12,13 +12,13 @@
# Policy Type
# standard, mls, mcs
-TYPE = standard
+TYPE = mls
# Policy Name
# If set, this will be used as the policy
# name. Otherwise the policy type will be
# used for the name.
-NAME = refpolicy
+NAME = refpolicy-mls
# Distribution
# Some distributions have portions of policy
@@ -27,7 +27,7 @@
# for the distribution.
# redhat, gentoo, debian, suse, and rhel4 are current options.
# Fedora users should enable redhat.
-#DISTRO = redhat
+DISTRO = suse
# Unknown Permissions Handling
# The behavior for handling permissions defined in the
--- refpolicy-standard/build.conf
+++ refpolicy-standard/build.conf
@@ -18,7 +18,7 @@
# If set, this will be used as the policy
# name. Otherwise the policy type will be
# used for the name.
-NAME = refpolicy
+NAME = refpolicy-standard
# Distribution
# Some distributions have portions of policy
@@ -27,7 +27,7 @@
# for the distribution.
# redhat, gentoo, debian, suse, and rhel4 are current options.
# Fedora users should enable redhat.
-#DISTRO = redhat
+DISTRO = suse
# Unknown Permissions Handling
# The behavior for handling permissions defined in the

View File

@ -17,34 +17,89 @@ Release: 1
Url: http://oss.tresys.com/projects/refpolicy/
License: GPL v2
Group: System/Base
Summary: SELinux policy
Summary: SELinux policies
Source: refpolicy-%{version}.tar.bz2
Patch0: %{name}-build_conf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: checkpolicy policycoreutils libsepol-devel python python-xml m4
BuildArch: noarch
%description
SELinux policy - based on reference policy from Tresys
SELinux policies
%package refpolicy-standard
Group: System/Base
Summary: SELinux policy - Tresys Standard Refpolicy
Provides: selinux-policy
%description refpolicy-standard
SELinux policy - based on reference policy from Tresys - standard
%package refpolicy-mcs
Group: System/Base
Summary: SELinux policy - Tresys MCS Refpolicy
Provides: selinux-policy
%description refpolicy-mcs
SELinux policy - based on reference policy from Tresys - mcs
%package refpolicy-mls
Group: System/Base
Summary: SELinux policy - Tresys MLS Refpolicy
Provides: selinux-policy
%description refpolicy-mls
SELinux policy - based on reference policy from Tresys - mls
%prep
%setup -q -n refpolicy
%setup -q -c -n selinux-policy -T
tar xfj %{SOURCE0} && mv refpolicy refpolicy-standard
tar xfj %{SOURCE0} && mv refpolicy refpolicy-mcs
tar xfj %{SOURCE0} && mv refpolicy refpolicy-mls
%patch0
%build
make conf
make policy
for i in standard mcs mls; do
cd refpolicy-$i
make conf
make policy
cd ..
done
%install
make DESTDIR=$RPM_BUILD_ROOT install
sed -i "s:^# edit $RPM_BUILD_ROOT:# edit :" $RPM_BUILD_ROOT%{_sysconfdir}/selinux/refpolicy/contexts/files/file_contexts.homedirs
for i in standard mcs mls; do
cd refpolicy-$i
make DESTDIR=$RPM_BUILD_ROOT install
sed -i "s:^# edit $RPM_BUILD_ROOT:# edit :" $RPM_BUILD_ROOT%{_sysconfdir}/selinux/refpolicy-$i/contexts/files/file_contexts.homedirs
cd ..
done
%clean
rm -rf $RPM_BUILD_ROOT
%files
%files refpolicy-standard
%defattr(-,root,root)
%doc COPYING Changelog README
%dir %{_sysconfdir}/selinux
%dir %{_sysconfdir}/selinux/refpolicy
%{_sysconfdir}/selinux/refpolicy/*
%dir %{_sysconfdir}/selinux/refpolicy-standard
%{_sysconfdir}/selinux/refpolicy-standard/*
%files refpolicy-mcs
%defattr(-,root,root)
%doc COPYING Changelog README
%dir %{_sysconfdir}/selinux
%dir %{_sysconfdir}/selinux/refpolicy-mcs
%{_sysconfdir}/selinux/refpolicy-mcs/*
%files refpolicy-mls
%defattr(-,root,root)
%doc COPYING Changelog README
%dir %{_sysconfdir}/selinux
%dir %{_sysconfdir}/selinux/refpolicy-mls
%{_sysconfdir}/selinux/refpolicy-mls/*
%changelog