]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Two RPM conditional fixes for RHEL-7
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 11 Jun 2012 16:57:38 +0000 (17:57 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 11 Jun 2012 17:07:20 +0000 (18:07 +0100)
Ensure systemd is used in RHEL-7 and cgconfig is not used in
RHEL-7

libvirt.spec.in

index a78b11791201cc13e409be43bbe0b1dec51c11c6..f8e3b05872dfd3ba053631f0bf102c96c66510c4 100644 (file)
 %define with_hyperv 0
 %endif
 
-# Although earlier Fedora has systemd, libvirt still used sysvinit
-%if 0%{?fedora} >= 17
+# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier
+# Fedora has systemd, libvirt still used sysvinit there.
+%if 0%{?fedora} >= 17 || 0{?rhel} >= 7
 %define with_systemd 1
 %endif
 
@@ -1348,9 +1349,9 @@ if [ $1 -eq 1 ] ; then
 fi
 %else
 %if %{with_cgconfig}
-# Starting with Fedora 16, systemd automounts all cgroups, and cgconfig is
-# no longer a necessary service.
-%if 0%{?rhel} || (0%{?fedora} && 0%{?fedora} < 16)
+# Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
+# and cgconfig is no longer a necessary service.
+%if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16)
 if [ "$1" -eq "1" ]; then
 /sbin/chkconfig cgconfig on
 fi