diff --git a/lvm2.spec b/lvm2.spec index 3b178b5..8b98b6f 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -1,11 +1,17 @@ %define device_mapper_version 1.02.53 %define enable_cluster 1 -%if %{fedora} < 14 +%if "%{fedora}" == "12" +%define enable_udev 0 +%else +%if "%{fedora}" == "13" +%define enable_udev 1 %define udev_version 153-1 %else +%define enable_udev 1 %define udev_version 158-1 %endif +%endif %if %{enable_cluster} %define corosync_version 1.2.0-1 @@ -40,7 +46,9 @@ BuildRequires: clusterlib-devel >= %{clusterlib_version} %endif BuildRequires: module-init-tools BuildRequires: pkgconfig +%if %{enable_udev} BuildRequires: libudev-devel +%endif Requires: %{name}-libs = %{version}-%{release} Requires: module-init-tools Requires(post): chkconfig @@ -64,10 +72,14 @@ or more physical volumes and creating one or more logical volumes %define _bindir /bin %define _sbindir /sbin %define _libdir /%{_lib} +%if %{enable_udev} %define _udevbasedir /lib/udev %define _udevdir %{_udevbasedir}/rules.d +%define configure_udev --with-udevdir=%{_udevdir} --enable-udev_sync +%endif -%configure --enable-lvm1_fallback --enable-fsadm --with-pool=internal --with-user= --with-group= --with-usrlibdir=/usr/%{_lib} --with-usrsbindir=/usr/sbin --with-udevdir=%{_udevdir} --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-applib --enable-cmdlib --enable-dmeventd --enable-udev_sync %{configure_cluster} + +%configure --enable-lvm1_fallback --enable-fsadm --with-pool=internal --with-user= --with-group= --with-usrlibdir=/usr/%{_lib} --with-usrsbindir=/usr/sbin --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-applib --enable-cmdlib --enable-dmeventd %{configure_cluster} %{?configure_udev} make %{?_smp_mflags} @@ -187,7 +199,9 @@ fi %{_mandir}/man8/vgs.8.gz %{_mandir}/man8/vgscan.8.gz %{_mandir}/man8/vgsplit.8.gz +%if %{enable_udev} %{_udevdir}/11-dm-lvm.rules +%endif %dir /etc/lvm %ghost /etc/lvm/cache/.cache %config(noreplace) %verify(not md5 mtime size) /etc/lvm/lvm.conf @@ -330,12 +344,14 @@ License: GPLv2 Group: System Environment/Base URL: http://sources.redhat.com/dm Requires: device-mapper-libs = %{device_mapper_version}-%{release} +Requires: util-linux-ng >= 2.15 +%if %{enable_udev} Requires: udev >= %{udev_version} Requires: libudev -Requires: util-linux-ng >= 2.15 # We need dracut to install required udev rules if udev_sync # feature is turned on so we don't lose required notifications. Conflicts: dracut < 002-18 +%endif %description -n device-mapper This package contains the supporting userspace utility, dmsetup, @@ -343,14 +359,17 @@ for the kernel device-mapper. %files -n device-mapper %defattr(-,root,root,-) -%doc COPYING COPYING.LIB WHATS_NEW_DM VERSION_DM README INSTALL udev/12-dm-permissions.rules +%doc COPYING COPYING.LIB WHATS_NEW_DM VERSION_DM README INSTALL %attr(755,root,root) /sbin/dmsetup %{_mandir}/man8/dmsetup.8.gz +%if %{enable_udev} +%doc udev/12-dm-permissions.rules %dir %{_udevbasedir} %dir %{_udevdir} %{_udevdir}/10-dm.rules %{_udevdir}/13-dm-disk.rules %{_udevdir}/95-dm-notify.rules +%endif %package -n device-mapper-devel Summary: Development libraries and headers for device-mapper @@ -445,6 +464,9 @@ the device-mapper event library. %changelog +* Mon Aug 2 2010 Alasdair Kergon - 2.02.72-5 +- Make udev configurable and merge with f12. + * Mon Aug 2 2010 Alasdair Kergon - 2.02.72-4 - Merge f13, f14 and rawhide spec files.