]> xenbits.xensource.com Git - libvirt.git/commitdiff
Enable udev instead of hal on F12 / RHEL-6 or later
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 20 Nov 2009 15:45:46 +0000 (16:45 +0100)
committerDaniel Veillard <veillard@redhat.com>
Fri, 20 Nov 2009 15:45:46 +0000 (16:45 +0100)
HAL has been deprecated since F12 and RHEL-6, so if building on
these platforms, switch on the udev driver instead

* libvirt.spec.in: Activate udev on F12/RHEL6

libvirt.spec.in

index f2933ad97f4e52ddc55b9d7d913a8a0c22c0cc00..a2ace2cf4ed14fd164ad1524f9202564a06e5a34 100644 (file)
 %define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
 %define with_numactl       0%{!?_without_numactl:%{server_drivers}}
 %define with_selinux       0%{!?_without_selinux:%{server_drivers}}
-%define with_hal           0%{!?_without_hal:%{server_drivers}}
 
 # A few optional bits off by default, we enable later
 %define with_polkit        0%{!?_without_polkit:0}
 %define with_capng         0%{!?_without_capng:0}
 %define with_netcf         0%{!?_without_netcf:0}
+%define with_udev          0%{!?_without_udev:0}
+%define with_hal           0%{!?_without_hal:0}
 
 # Non-server/HV driver defaults which are always enabled
 %define with_python        0%{!?_without_python:1}
 %define with_netcf     0%{!?_without_netcf:%{server_drivers}}
 %endif
 
+# udev is used to manage host devices in Fedora 12 / RHEL-6 or newer
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
+%define with_udev     0%{!?_without_udev:%{server_drivers}}
+%else
+%define with_hal       0%{!?_without_hal:%{server_drivers}}
+%endif
+
 # Force QEMU to run as non-root
 %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
 %define qemu_user  qemu
@@ -179,6 +187,9 @@ Requires: iptables
 %if %{with_hal}
 Requires: hal
 %endif
+%if %{with_udev}
+Requires: udev >= 145
+%endif
 %if %{with_polkit}
 %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
 Requires: polkit >= 0.93
@@ -242,6 +253,10 @@ BuildRequires: gnutls-devel
 %if %{with_hal}
 BuildRequires: hal-devel
 %endif
+%if %{with_udev}
+BuildRequires: libudev-devel >= 145
+BuildRequires: libpciaccess-devel >= 0.10.9
+%endif
 %if %{with_avahi}
 BuildRequires: avahi-devel
 %endif
@@ -476,6 +491,10 @@ of recent versions of Linux (and other OSes).
 %define _without_hal --without-hal
 %endif
 
+%if ! %{with_udev}
+%define _without_udev --without-udev
+%endif
+
 %configure %{?_without_xen} \
            %{?_without_qemu} \
            %{?_without_openvz} \
@@ -502,6 +521,7 @@ of recent versions of Linux (and other OSes).
            %{?_without_netcf} \
            %{?_without_selinux} \
            %{?_without_hal} \
+           %{?_without_udev} \
            --with-qemu-user=%{qemu_user} \
            --with-qemu-group=%{qemu_group} \
            --with-init-script=redhat \