Add cmirror subpackage for clustered mirrors. Set 'preferred_names' in

default lvm.conf (until we fix it properly upstream). Use new upstream
    package with miscellaneous fixes.
This commit is contained in:
Alasdair Kergon 2010-01-22 00:30:20 +00:00
parent 2f6ead1536
commit 6053091aa6

View File

@ -1,19 +1,20 @@
%define device_mapper_version 1.02.42 %define device_mapper_version 1.02.43
%define corosync_version 1.0.0-1 %define corosync_version 1.2.0-1
%define openais_version 1.1.0-1 %define openais_version 1.1.1-1
%define clusterlib_version 3.0.0-20 %define clusterlib_version 3.0.6-1
# Do not reset Release to 1 unless both lvm2 and device-mapper # Do not reset Release to 1 unless both lvm2 and device-mapper
# versions are increased together. # versions are increased together.
Summary: Userland logical volume management tools Summary: Userland logical volume management tools
Name: lvm2 Name: lvm2
Version: 2.02.58 Version: 2.02.59
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Base Group: System Environment/Base
URL: http://sources.redhat.com/lvm2 URL: http://sources.redhat.com/lvm2
Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
Patch0: lvm2-set-default-preferred_names.patch
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -43,6 +44,7 @@ or more physical volumes and creating one or more logical volumes
%prep %prep
%setup -q -n LVM2.%{version} %setup -q -n LVM2.%{version}
%patch0 -p1 -b preferred_names
%build %build
%define _exec_prefix / %define _exec_prefix /
@ -52,7 +54,7 @@ or more physical volumes and creating one or more logical volumes
%define _udevbasedir /lib/udev %define _udevbasedir /lib/udev
%define _udevdir %{_udevbasedir}/rules.d %define _udevdir %{_udevbasedir}/rules.d
%configure --enable-lvm1_fallback --enable-fsadm --with-clvmd=cman,openais,corosync --with-cluster=internal --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 --enable-lvm1_fallback --enable-fsadm --with-clvmd=cman,openais,corosync --with-cluster=internal --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 --enable-cmirrord
make %{?_smp_mflags} make %{?_smp_mflags}
@ -66,6 +68,7 @@ install -m 0600 /dev/null $RPM_BUILD_ROOT/etc/lvm/cache/.cache
mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d 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 scripts/clvmd_init_red_hat $RPM_BUILD_ROOT/etc/rc.d/init.d/clvmd
install scripts/cmirrord_init_red_hat $RPM_BUILD_ROOT/etc/rc.d/init.d/cmirrord
install -m 0755 scripts/lvm2_monitoring_init_red_hat $RPM_BUILD_ROOT/etc/rc.d/init.d/lvm2-monitor install -m 0755 scripts/lvm2_monitoring_init_red_hat $RPM_BUILD_ROOT/etc/rc.d/init.d/lvm2-monitor
install -m 0755 scripts/lvmconf.sh $RPM_BUILD_ROOT/sbin/lvmconf install -m 0755 scripts/lvmconf.sh $RPM_BUILD_ROOT/sbin/lvmconf
@ -225,8 +228,10 @@ This package contains shared lvm2 libraries for applications.
%files libs %files libs
%attr(755,root,root) %{_libdir}/liblvm2app.so.* %attr(755,root,root) %{_libdir}/liblvm2app.so.*
%attr(755,root,root) %{_libdir}/liblvm2cmd.so.* %attr(755,root,root) %{_libdir}/liblvm2cmd.so.*
%attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2.so.*
%attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2mirror.so.* %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2mirror.so.*
%attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2snapshot.so.* %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2snapshot.so.*
%{_libdir}/libdevmapper-event-lvm2.so
%{_libdir}/libdevmapper-event-lvm2mirror.so %{_libdir}/libdevmapper-event-lvm2mirror.so
%{_libdir}/libdevmapper-event-lvm2snapshot.so %{_libdir}/libdevmapper-event-lvm2snapshot.so
@ -267,6 +272,36 @@ fi
%{_mandir}/man8/clvmd.8.gz %{_mandir}/man8/clvmd.8.gz
/etc/rc.d/init.d/clvmd /etc/rc.d/init.d/clvmd
##############################################################################
# Cluster mirror subpackage
##############################################################################
%package -n cmirror
Summary: Daemon for device-mapper-based clustered mirrors
Group: System Environment/Base
Requires(post): chkconfig
Requires(preun): chkconfig
Requires: corosync >= %{corosync_version}
Requires: openais >= %{openais_version}
Requires: clusterlib >= %{clusterlib_version}
BuildRequires: openaislib-devel >= %{openais_version}
%description -n cmirror
Daemon providing device-mapper-based mirrors in a shared-storage cluster.
%post -n cmirror
/sbin/chkconfig --add cmirrord
%preun -n cmirror
if [ "$1" = 0 ]; then
/sbin/chkconfig --del cmirrord
fi
%files -n cmirror
%defattr(-,root,root,-)
%attr(755,root,root) /usr/sbin/cmirrord
%{_mandir}/man8/cmirrord.8.gz
/etc/rc.d/init.d/cmirrord
############################################################################## ##############################################################################
# Device-mapper subpackages # Device-mapper subpackages
############################################################################## ##############################################################################
@ -392,6 +427,15 @@ the device-mapper event library.
%changelog %changelog
* Fri Jan 22 2010 Alasdair Kergon <agk@redhat.com> - 2.02.59-1
- Add cmirror subpackage for clustered mirrors.
- Set 'preferred_names' in default lvm.conf.
- Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.
- Stop dmeventd trying to access already-removed snapshots.
- Fix clvmd to never scan suspended devices.
- Fix detection of completed snapshot merge.
- Improve snapshot merge metadata import validation.
* Thu Jan 14 2010 Alasdair Kergon <agk@redhat.com> - 2.02.58-1 * Thu Jan 14 2010 Alasdair Kergon <agk@redhat.com> - 2.02.58-1
- Fix clvmd automatic target module loading crash. - Fix clvmd automatic target module loading crash.
- Fix allocation code not to stop at the first area of a PV that fits. - Fix allocation code not to stop at the first area of a PV that fits.