From 634e092800755e72d8912f6c614a90a4eaf825af Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Tue, 25 Aug 2015 12:04:01 -0700 Subject: [PATCH] update spec file to require docker-engine-selinux policy Signed-off-by: Jessica Frazelle Upstream-commit: df6d92837029411bd06c4541c08c20127ce8327e Component: engine --- .../hack/make/.build-rpm/docker-engine.spec | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/engine/hack/make/.build-rpm/docker-engine.spec b/components/engine/hack/make/.build-rpm/docker-engine.spec index 5143e4ff4a..8e76d7ae06 100644 --- a/components/engine/hack/make/.build-rpm/docker-engine.spec +++ b/components/engine/hack/make/.build-rpm/docker-engine.spec @@ -50,6 +50,27 @@ Requires: kernel-uek >= 3.8 Requires: device-mapper >= 1.02.90-2 %endif +# docker-selinux conditional +%if 0%{?fedora} >= 22 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oracle} >= 7 +%global with_selinux 1 +%endif + +# start if with_selinux +%if 0%{?with_selinux} +# Version of SELinux we were using +%if 0%{?fedora} >= 22 +%global selinux_policyver 3.13.1-119 +%else +%global selinux_policyver 3.13.1-39 +%endif +%endif # with_selinux + +# RE: rhbz#1195804 - ensure min NVR for selinux-policy +%if 0%{?with_selinux} +Requires: selinux-policy >= %{selinux_policyver} +Requires(pre): %{name}-selinux >= %{epoch}:%{version}-%{release} +%endif # with_selinux + # conflicting packages Conflicts: docker Conflicts: docker-io