aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-04-23 17:23:32 +0100
committerDavid Howells <dhowells@redhat.com>2010-04-23 17:23:32 +0100
commit7202706b3c7d3cb302cdd23c260e74a0ab4a6b46 (patch)
treeee90d7066e4c98f2b1bdb64df601791c7860d334
parent957323efa5fa95c1f8008145bc0e8d720f4fb153 (diff)
downloadcachefilesd-7202706b3c7d3cb302cdd23c260e74a0ab4a6b46.tar.gz
SELinux: The SELinux policy is now in the selinux-policy-* RPMs
The SELinux policy is now in the selinux-policy package and so doesn't need to be here. Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--README10
-rw-r--r--redhat/cachefilesd.spec81
2 files changed, 14 insertions, 77 deletions
diff --git a/README b/README
index 9c091e6..2c1ac8d 100644
--- a/README
+++ b/README
@@ -362,11 +362,11 @@ not read or write files in the cache, and so it is precluded from accessing the
data cached therein; nor is it permitted to create new files in the cache.
-The policy source files are installed for reference as:
+The policy source files are for reference installed as:
- /usr/share/doc/cachefilesd-selinux-*/cachefilesd.te
- /usr/share/doc/cachefilesd-selinux-*/cachefilesd.fc
- /usr/share/doc/cachefilesd-selinux-*/cachefilesd.if
+ /usr/share/doc/cachefilesd-*/cachefilesd.te
+ /usr/share/doc/cachefilesd-*/cachefilesd.fc
+ /usr/share/doc/cachefilesd-*/cachefilesd.if
By default, the cache is located in /var/fscache, but if it is desirable that
it should be elsewhere, than either the above policy files must be altered, or
@@ -378,5 +378,5 @@ located elsewhere when SELinux is in enforcing mode, please see:
/usr/share/doc/cachefilesd-*/move-cache.txt
-When the cachefilesd rpm is installed; alternatively, the document can be found
+When the cachefilesd RPM is installed; alternatively, the document can be found
in the sources.
diff --git a/redhat/cachefilesd.spec b/redhat/cachefilesd.spec
index 11b79e9..d9b14bd 100644
--- a/redhat/cachefilesd.spec
+++ b/redhat/cachefilesd.spec
@@ -1,6 +1,3 @@
-%define selinux_variants mls strict targeted
-%define selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp)
-
Name: cachefilesd
Version: 0.10
Release: 1%{?dist}
@@ -14,26 +11,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
BuildRequires: automake, autoconf
Requires(post): /sbin/chkconfig, /sbin/service
Requires(preun): /sbin/chkconfig, /sbin/service
-Requires: %{name}-selinux = %{version}-%{release}
+Requires: selinux-policy-base = 3.7.10-5
%description
The cachefilesd daemon manages the caching files and directory that are
that are used by network filesystems such a AFS and NFS to
do persistent caching to the local disk.
-%package selinux
-Summary: SELinux policy module supporting cachefilesd
-Group: System Environment/Base
-BuildRequires: checkpolicy, selinux-policy-devel, hardlink
-%if "%{selinux_policyver}" != ""
-Requires: selinux-policy >= %{selinux_policyver}
-%endif
-Requires(post): /usr/sbin/semodule, /sbin/restorecon
-Requires(postun): /usr/sbin/semodule, /sbin/restorecon
-
-%description selinux
-SELinux policy module supporting cachefilesd
-
%prep
%setup -q
@@ -48,18 +32,6 @@ CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
make all
-# Build SELinux policy modules
-cd selinux
-for selinuxvariant in %{selinux_variants}
-do
- make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
- mkdir ${selinuxvariant}
- mv cachefilesd.pp ${selinuxvariant}/cachefilesd.pp
- bzip2 -9 ${selinuxvariant}/cachefilesd.pp
- make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
-done
-cd -
-
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/sbin
@@ -72,20 +44,7 @@ make DESTDIR=%{buildroot} install
install -m 644 cachefilesd.conf %{buildroot}%{_sysconfdir}
install -m 755 cachefilesd.initd %{buildroot}%{_sysconfdir}/rc.d/init.d/cachefilesd
-install -m 644 selinux/move-cache.txt %{buildroot}/usr/share/doc/%{name}-selinux-%{version}/
-
-# Install SELinux policy modules
-cd selinux
-for selinuxvariant in %{selinux_variants}
-do
- install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
- install -p -m 644 ${selinuxvariant}/cachefilesd.pp.bz2 \
- %{buildroot}%{_datadir}/selinux/${selinuxvariant}
-done
-cd -
-
-# Hardlink identical policy module packages together
-/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
+install -m 644 selinux/move-cache.txt %{buildroot}/usr/share/doc/%{name}-%{version}/
%clean
rm -rf $RPM_BUILD_ROOT
@@ -97,14 +56,6 @@ if [ "$1" -ge 1 ]; then
/sbin/service cachefilesd condrestart > /dev/null
fi
-%post selinux
-# Install SELinux policy modules
-for selinuxvariant in %{selinux_variants}
-do
- /usr/sbin/semodule -s ${selinuxvariant} -i \
- %{_datadir}/selinux/${selinuxvariant}/cachefilesd.pp.bz2 &> /dev/null || :
-done
-
%preun
if [ $1 -eq 0 ]; then
/sbin/service cachefilesd stop
@@ -117,38 +68,24 @@ if [ $1 -eq 0 ]; then
/sbin/restorecon -R %{_localstatedir}/fscache || :
fi
-%postun selinux
-# Clean up after package removal
-if [ $1 -eq 0 ]; then
- # Remove SELinux policy modules
- for selinuxvariant in %{selinux_variants}
- do
- /usr/sbin/semodule -s ${selinuxvariant} -r cachefilesd &> /dev/null || :
- done
- # Clean up any remaining file contexts (shouldn't be any really)
- [ -d %{_localstatedir}/fscache ] && \
- /sbin/restorecon -R %{_localstatedir}/fscache &> /dev/null || :
-fi
-
%files
%defattr(-,root,root)
%doc README
%doc howto.txt
+%doc selinux/move-cache.txt
+%doc selinux/*.fc
+%doc selinux/*.if
+%doc selinux/*.te
%config(noreplace) %{_sysconfdir}/cachefilesd.conf
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/cachefilesd
/sbin/*
%{_mandir}/*/*
%{_localstatedir}/fscache
-%files selinux
-%defattr(-,root,root,0755)
-%doc selinux/move-cache.txt
-%doc selinux/*.fc
-%doc selinux/*.if
-%doc selinux/*.te
-%{_datadir}/selinux/*/cachefilesd.pp.bz2
-
%changelog
+* Fri Apr 23 2010 David Howells <dhowells@redhat.com>
+- The SELinux policies for cachefilesd now live in the selinux-policy RPM, so
+ the cachefilesd-selinux RPM is now redundant.
* Thu Feb 25 2010 David Howells <dhowells@redhat.com>
- Fix the SELinux policies for cachefilesd.