First attempt at including dmeventd.

This commit is contained in:
Alasdair Kergon 2009-09-16 21:33:04 +00:00
parent e75e6f11b5
commit 8d2584eb3b

View File

@ -8,7 +8,7 @@
Summary: Userland logical volume management tools
Name: lvm2
Version: 2.02.52
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://sources.redhat.com/lvm2
@ -17,7 +17,6 @@ Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
# Customise lvmconf.sh for built-in clustered locking in Fedora
Patch0: cluster-locking-built-in.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
BuildRequires: ncurses-devel
BuildRequires: readline-devel
@ -26,7 +25,11 @@ BuildRequires: clusterlib-devel >= %{clusterlib_version}
BuildRequires: module-init-tools
BuildRequires: pkgconfig
Requires: device-mapper >= %{device_mapper_version}-%{release}
Requires: device-mapper-event >= %{device_mapper_version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: module-init-tools
Requires(post): chkconfig
Requires(preun): chkconfig
Conflicts: lvm
Obsoletes: lvm
@ -48,24 +51,35 @@ or more physical volumes and creating one or more logical volumes
%define _sbindir /sbin
%define _libdir /%{_lib}
%configure --enable-lvm1_fallback --enable-fsadm --with-clvmd=cman,corosync --with-cluster=internal --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
%configure --enable-lvm1_fallback --enable-fsadm --with-clvmd=cman,corosync --with-cluster=internal --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
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/archive
install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/backup
install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/cache
install -m 0700 -d $RPM_BUILD_ROOT/var/lock/lvm
install -m 0600 /dev/null $RPM_BUILD_ROOT/etc/lvm/cache/.cache
mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d
install scripts/clvmd_init_red_hat $RPM_BUILD_ROOT/etc/rc.d/init.d/clvmd
install -m 0755 scripts/lvm2_monitoring_init_rhel4 $RPM_BUILD_ROOT/etc/rc.d/init.d/lvm2-monitor
install -m 0755 scripts/lvmconf.sh $RPM_BUILD_ROOT/sbin/lvmconf
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
/sbin/chkconfig --add lvm2-monitor
%preun
if [ "$1" = 0 ]; then
/sbin/chkconfig --del lvm2-monitor
fi
%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LIB INSTALL README VERSION WHATS_NEW
@ -167,6 +181,7 @@ rm -rf $RPM_BUILD_ROOT
%dir /etc/lvm/cache
%dir /etc/lvm/archive
%dir /var/lock/lvm
/etc/rc.d/init.d/lvm2-monitor
##############################################################################
# Library and Development subpackages
@ -178,6 +193,7 @@ License: LGPLv2
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: device-mapper-devel >= %{device_mapper_version}-%{release}
Requires: device-mapper-event-devel >= %{device_mapper_version}-%{release}
Requires: pkgconfig
%description devel
@ -186,8 +202,8 @@ the lvm2 libraries.
%files devel
%defattr(-,root,root,-)
%attr(755,root,root) /%{_lib}/liblvm2app.so
%attr(755,root,root) /%{_lib}/liblvm2cmd.so
%{_libdir}/liblvm2app.so
%{_libdir}/liblvm2cmd.so
%{_includedir}/lvm2app.h
%{_includedir}/lvm2cmd.h
/usr%{_libdir}/pkgconfig/lvm2app.pc
@ -205,8 +221,12 @@ This package contains shared lvm2 libraries for applications.
%postun libs -p /sbin/ldconfig
%files libs
%attr(755,root,root) /%{_lib}/liblvm2app.so.*
%attr(755,root,root) /%{_lib}/liblvm2cmd.so.*
%attr(755,root,root) %{_libdir}/liblvm2app.so.*
%attr(755,root,root) %{_libdir}/liblvm2cmd.so.*
%attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2mirror.so.*
%attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2snapshot.so.*
%{_libdir}/libdevmapper-event-lvm2mirror.so
%{_libdir}/libdevmapper-event-lvm2snapshot.so
##############################################################################
# Cluster subpackage
@ -282,7 +302,7 @@ the device-mapper libraries.
%files -n device-mapper-devel
%defattr(-,root,root,-)
%attr(755,root,root) /%{_lib}/libdevmapper.so
%{_libdir}/libdevmapper.so
%{_includedir}/libdevmapper.h
/usr%{_libdir}/pkgconfig/devmapper.pc
@ -302,10 +322,67 @@ This package contains the device-mapper shared library, libdevmapper.
%postun -n device-mapper-libs -p /sbin/ldconfig
%files -n device-mapper-libs
%attr(755,root,root) /%{_lib}/libdevmapper.so.*
%attr(755,root,root) %{_libdir}/libdevmapper.so.*
%package -n device-mapper-event
Summary: Device-mapper event daemon
Group: System Environment/Base
Requires: device-mapper = %{version}-%{release}
Requires: device-mapper-event-libs = %{version}-%{release}
%description -n device-mapper-event
This package contains the dmeventd daemon for monitoring the state
of device-mapper devices.
%files -n device-mapper-event
%defattr(-,root,root,-)
%{_sbindir}/dmeventd
%package -n device-mapper-event-libs
Summary: Device-mapper event daemon shared library
Version: %{device_mapper_version}
Release: %{release}
License: LGPLv2
Requires: device-mapper-event = %{version}-%{release}
Group: System Environment/Libraries
%description -n device-mapper-event-libs
This package contains the device-mapper event daemon shared library,
libdevmapper-event.
%post -n device-mapper-event-libs -p /sbin/ldconfig
%postun -n device-mapper-event-libs -p /sbin/ldconfig
%files -n device-mapper-event-libs
%{_libdir}/libdevmapper-event.so.*
%package -n device-mapper-event-devel
Summary: Development libraries and headers for the device-mapper event daemon
Version: %{device_mapper_version}
Release: %{release}
License: LGPLv2
Group: Development/Libraries
Requires: device-mapper-event = %{device_mapper_version}-%{release}
Requires: device-mapper-event-libs = %{device_mapper_version}-%{release}
Requires: pkgconfig
%description -n device-mapper-event-devel
This package contains files needed to develop applications that use
the device-mapper event library.
%files -n device-mapper-event-devel
%defattr(-,root,root,-)
%attr(755,root,root) /%{_lib}/libdevmapper-event.so
%{_includedir}/libdevmapper-event.h
/usr%{_libdir}/pkgconfig/devmapper-event.pc
%changelog
* Wed Sep 16 2009 Alasdair Kergon <agk@redhat.com> - 2.02.52-2
- Build dmeventd and place into a separate set of subpackages.
- Remove no-longer-needed BuildRoot tag and buildroot emptying at install.
* Tue Sep 15 2009 Alasdair Kergon <agk@redhat.com> - 2.02.52-1
- Prioritise write locks over read locks by default for file locking.
- Add local lock files with suffix ':aux' to serialise locking requests.