53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From 6b9e1293f940536fcdfba91b1aea776ad847e09c Mon Sep 17 00:00:00 2001
|
|
From: Eric Blake <eblake@redhat.com>
|
|
Date: Thu, 8 Dec 2011 13:32:37 -0700
|
|
Subject: [PATCH 10/13] spec: fix logic bug in deciding to turn on cgconfig
|
|
|
|
(cirect cherry-pick of upstream commit 3b95f28)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=738725
|
|
|
|
Commit ecd8725 tried to silence a spurious warning on the initial
|
|
libvirt install, and commit ba6cbb1 tried to fix up the logic to the
|
|
correct Fedora version, but the warning was still present due to a
|
|
logic bug: since %{fedora} and %{rhel} are never simulatanously
|
|
set, then 0%{rhel} <= 6 made the %if always true. Checking for
|
|
minimum versions (via >=) is okay, but checking for maximum versions
|
|
(via <=) requires a prerequisite test that the platform being tested
|
|
is non-zero.
|
|
|
|
Also fix a bogus setting of with_libxl (although we previously
|
|
hard-code with_libxl to 0 for rhel earlier in the file, so this
|
|
was not as severe a bug).
|
|
|
|
* libvirt.spec.in (with_cgconfig): Don't enable cgconfig on F16.
|
|
---
|
|
libvirt.spec.in | 4 ++--
|
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libvirt.spec.in b/libvirt.spec.in
|
|
index ad522bc..cfc3a43 100644
|
|
--- a/libvirt.spec.in
|
|
+++ b/libvirt.spec.in
|
|
@@ -135,7 +135,7 @@
|
|
%endif
|
|
|
|
# Fedora doesn't have new enough Xen for libxl until F16
|
|
-%if 0%{?fedora} < 16
|
|
+%if 0%{?fedora} && 0%{?fedora} < 16
|
|
%define with_libxl 0
|
|
%endif
|
|
|
|
@@ -899,7 +899,7 @@ done
|
|
%if %{with_cgconfig}
|
|
# Starting with Fedora 16, systemd automounts all cgroups, and cgconfig is
|
|
# no longer a necessary service.
|
|
-%if 0%{?fedora} <= 15 || 0%{?rhel} <= 6
|
|
+%if 0%{?rhel} || (0%{?fedora} && 0%{?fedora} < 16)
|
|
if [ "$1" -eq "1" ]; then
|
|
/sbin/chkconfig cgconfig on
|
|
fi
|
|
--
|
|
1.7.7.3
|
|
|