[libvirt PATCH 07/13] rpm: move logic for setting selinux policy variables

Daniel P. Berrangé posted 13 patches 4 years, 4 months ago
[libvirt PATCH 07/13] rpm: move logic for setting selinux policy variables
Posted by Daniel P. Berrangé 4 years, 4 months ago
It is currently mixed in with the comment and variables controlling the
min OS version.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 libvirt.spec.in | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index aa50db3c16..37f8a218e6 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -4,11 +4,6 @@
 # that's still supported by the vendor. It may work on other distros
 # or versions, but no effort will be made to ensure that going forward.
 
-%if 0%{?fedora} > 34 || 0%{?rhel} > 8
-    %global with_selinux 1
-    %global modulename virt
-%endif
-
 %define min_rhel 8
 %define min_fedora 33
 
@@ -192,6 +187,11 @@
     %define with_modular_daemons 1
 %endif
 
+%if 0%{?fedora} > 34 || 0%{?rhel} > 8
+    %global with_selinux 1
+    %global modulename virt
+%endif
+
 # Force QEMU to run as non-root
 %define qemu_user  qemu
 %define qemu_group  qemu
-- 
2.31.1

Re: [libvirt PATCH 07/13] rpm: move logic for setting selinux policy variables
Posted by Pavel Hrdina 4 years, 4 months ago
On Fri, Aug 06, 2021 at 06:48:04PM +0100, Daniel P. Berrangé wrote:
> It is currently mixed in with the comment and variables controlling the
> min OS version.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  libvirt.spec.in | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index aa50db3c16..37f8a218e6 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -4,11 +4,6 @@
>  # that's still supported by the vendor. It may work on other distros
>  # or versions, but no effort will be made to ensure that going forward.
>  

Just a nitpick, this leaves empty line here which was introduced by
the second patch in the series.

Pavel

> -%if 0%{?fedora} > 34 || 0%{?rhel} > 8
> -    %global with_selinux 1
> -    %global modulename virt
> -%endif
> -
>  %define min_rhel 8
>  %define min_fedora 33
>  
> @@ -192,6 +187,11 @@
>      %define with_modular_daemons 1
>  %endif
>  
> +%if 0%{?fedora} > 34 || 0%{?rhel} > 8
> +    %global with_selinux 1
> +    %global modulename virt
> +%endif
> +
>  # Force QEMU to run as non-root
>  %define qemu_user  qemu
>  %define qemu_group  qemu
> -- 
> 2.31.1
>