From 0fd769784a283f36c32d7cd606607568b5d54464 Mon Sep 17 00:00:00 2001 From: Nathan Straz Date: Fri, 20 Nov 2009 15:07:23 -0600 Subject: Don't build selinux stuff on rhel4 --- qarsh.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qarsh.spec b/qarsh.spec index e06883b..9eb3098 100644 --- a/qarsh.spec +++ b/qarsh.spec @@ -32,6 +32,7 @@ allows anyone to connect to the host as any user and do any thing. WARNING: THIS PACKAGE PROVIDES REMOTE ROOT ACCESS WITHOUT AUTHENTICATION +%if "%{rhel}" == "5" %global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0) @@ -50,21 +51,28 @@ Requires(postun): /usr/sbin/semodule %description selinux SELinux policy maker for qarsh +%endif + %prep %setup -q %build make %{?_smp_mflags} +%if "%{rhel}" == "5" make -C SELinux +%endif %install rm -rf $RPM_BUILD_ROOT make install INSTROOT=$RPM_BUILD_ROOT + +%if "%{rhel}" == "5" mkdir -p $RPM_BUILD_ROOT%{_datadir}/selinux/packages/qarsh cp -p SELinux/qarshd.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/qarsh make -C SELinux clean +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -77,6 +85,7 @@ if [ $1 = 0 ]; then /sbin/service xinetd reload > /dev/null 2>&1 || : fi +%if "%{rhel}" == "5" %post selinux /usr/sbin/semodule -i %{_datadir}/selinux/packages/qarsh/qarshd.pp || : /sbin/fixfiles -R qarsh-server restore || : @@ -85,6 +94,7 @@ fi if [ $1 = 0 ]; then /usr/sbin/semodule -r qarshd || : fi +%endif %files %defattr(-,root,root) @@ -101,10 +111,12 @@ fi %config /etc/xinetd.d/btimed %doc %{_mandir}/man8/* +%if "%{rhel}" == "5" %files selinux %defattr(-,root,root) %doc SELinux/* %{_datadir}/selinux/packages/qarsh +%endif %changelog -- cgit