summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Deutsch <fabiand@fedoraproject.org>2013-09-12 09:47:16 (GMT)
committerFabian Deutsch <fabiand@fedoraproject.org>2013-09-12 09:47:16 (GMT)
commitcf02bcad2c520a37f53c71c6c3a4c789f99af63f (patch)
tree38fcb2735e4e290199d36f0b39f011249c89c1db
parent087a67e2a6dfca7e2313e77977adfb9b8e03223e (diff)
downloadovirt-node-cf02bcad2c520a37f53c71c6c3a4c789f99af63f.zip
ovirt-node-cf02bcad2c520a37f53c71c6c3a4c789f99af63f.tar.gz
ovirt-node-cf02bcad2c520a37f53c71c6c3a4c789f99af63f.tar.xz
Fix selinux policy version discovery (rhbz#1005864)f20
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
-rw-r--r--ovirt-node.spec28
1 files changed, 18 insertions, 10 deletions
diff --git a/ovirt-node.spec b/ovirt-node.spec
index 3e51842..15ffeae 100644
--- a/ovirt-node.spec
+++ b/ovirt-node.spec
@@ -15,7 +15,7 @@
Summary: The %{product_family} daemons/scripts
Name: ovirt-node
Version: 3.0.0
-Release: 7.0%{?BUILD_NUMBER}%{?extra_release}%{?dist}
+Release: 8.0%{?BUILD_NUMBER}%{?extra_release}%{?dist}
Source0: %{name}-%{version}.tar.gz
License: GPLv2+
Group: Applications/System
@@ -213,15 +213,20 @@ rm -rf /tmp/cim_schema*
#
# SELinux subpackage
#
+%global selinux_modulename ovirt
%global selinux_variants targeted
+%if %{is_el6}
%global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0)
-%global modulename ovirt
+%else
+%global selinux_policyver %_selinux_policy_version
+%endif
%package selinux
Summary: SELinux policy module supporting %{product_family}
Group: System Environment/Base
BuildArch: noarch
-BuildRequires: policycoreutils, checkpolicy, selinux-policy-devel
+BuildRequires: policycoreutils, checkpolicy
+BuildRequires: selinux-policy-devel >= %{selinux_policyver}
BuildRequires: hardlink
%if "%{selinux_policyver}" != ""
Requires: selinux-policy >= %{selinux_policyver}
@@ -238,7 +243,7 @@ SELinux policy module supporting %{product_family}
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -i \
- %{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
+ %{_datadir}/selinux/${selinuxvariant}/%{selinux_modulename}.pp &> /dev/null || :
done
# Is this to greedy?
/sbin/restorecon -R / || :
@@ -257,7 +262,7 @@ done
if [ $1 -eq 0 ] ; then
for selinuxvariant in %{selinux_variants}
do
- /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
+ /usr/sbin/semodule -s ${selinuxvariant} -r %{selinux_modulename} &> /dev/null || :
done
# Is this to greedy?
/sbin/restorecon -R / &> /dev/null || :
@@ -320,7 +325,7 @@ for selinuxvariant in %{selinux_variants}
do
%{__make} NAME=${selinuxvariant} \
-f %{?policy_devel_root}%{_datadir}/selinux/devel/Makefile
- mv -v %{modulename}.pp %{modulename}.pp.${selinuxvariant}
+ mv -v %{selinux_modulename}.pp %{selinux_modulename}.pp.${selinuxvariant}
done
cd -
@@ -359,8 +364,8 @@ cd semodule
for selinuxvariant in %{selinux_variants}
do
%{__install} -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
- %{__install} -p -m 644 %{modulename}.pp.${selinuxvariant} \
- %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp
+ %{__install} -p -m 644 %{selinux_modulename}.pp.${selinuxvariant} \
+ %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{selinux_modulename}.pp
done
cd -
@@ -536,7 +541,7 @@ fi
%files selinux
%defattr(-,root,root,0755)
%doc semodule/*.fc semodule/*.te
-%{_datadir}/selinux/*/%{modulename}.pp
+%{_datadir}/selinux/*/%{selinux_modulename}.pp
%files
@@ -633,7 +638,10 @@ fi
%changelog
-* Mon Sep 09 2013 Fabian Deutsch <fabian.deutsch@gmx.de> - 3.0.0-7.0
+* Thu Sep 12 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 3.0.0-8.0
+- Fix selinux policy version discovery (rhbz#1005864)
+
+* Mon Sep 09 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 3.0.0-7.0
- Adjust selinux dependency
* Wed Sep 04 2013 Fabian Deutsch <fabiand@fedoraproject.org> - 3.0.0-6.0