attempt to incorporate lvm2-cluster as a subpackage

This commit is contained in:
Alasdair Kergon 2006-10-14 18:28:02 +00:00
parent ab77fcbee4
commit 94fa4a6b69

View File

@ -1,19 +1,23 @@
%define device-mapper-version 1.02.12
Summary: Userland logical volume management tools Summary: Userland logical volume management tools
Name: lvm2 Name: lvm2
Version: 2.02.11 Version: 2.02.11
Release: 5%{?dist} Release: 6%{?dist}
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
URL: http://sources.redhat.com/lvm2 URL: http://sources.redhat.com/lvm2
Source0: LVM2.%{version}.tgz Source0: LVM2.%{version}.tgz
Patch0: cluster-locking-built-in.patch Patch0: clvmd-init-chkconfig.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Patch1: cluster-locking-built-in.patch
BuildRequires: device-mapper >= 1.02.11 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: device-mapper >= %{device-mapper-version}
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
BuildRequires: libtermcap-devel BuildRequires: libtermcap-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: readline-devel BuildRequires: readline-devel
Requires: device-mapper >= 1.02.11 BuildRequires: cman-devel
Requires: device-mapper >= %{device-mapper-version}
Conflicts: lvm Conflicts: lvm
Obsoletes: lvm Obsoletes: lvm
@ -29,15 +33,17 @@ or more physical volumes and creating one or more logical volumes
%prep %prep
%setup -q -n LVM2.%{version} %setup -q -n LVM2.%{version}
%patch -p1 -b .locking %patch -p1 -b .chkconfig
%patch1 -p1 -b .locking
%build %build
%configure --enable-static_link --enable-readline --enable-lvm1_fallback --with-pool=internal --with-staticdir=/sbin --with-user= --with-group= %configure --enable-static_link --enable-readline --enable-lvm1_fallback --with-clvmd=cman --with-cluster=internal --with-pool=internal --with-staticdir=/sbin --with-user= --with-group=
make DESTDIR=$RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
make install_cluster DESTDIR=$RPM_BUILD_ROOT
ln -s lvm.static $RPM_BUILD_ROOT/sbin/lvm ln -s lvm.static $RPM_BUILD_ROOT/sbin/lvm
ln -s lvm.static $RPM_BUILD_ROOT/sbin/pvscan ln -s lvm.static $RPM_BUILD_ROOT/sbin/pvscan
ln -s lvm.static $RPM_BUILD_ROOT/sbin/vgchange ln -s lvm.static $RPM_BUILD_ROOT/sbin/vgchange
@ -47,6 +53,9 @@ install -m 0700 -d $RPM_BUILD_ROOT/etc/lvm/backup
install -m 0700 -d $RPM_BUILD_ROOT/var/lock/lvm install -m 0700 -d $RPM_BUILD_ROOT/var/lock/lvm
install -m 0700 /dev/null $RPM_BUILD_ROOT/etc/lvm/.cache install -m 0700 /dev/null $RPM_BUILD_ROOT/etc/lvm/.cache
install -m 0755 scripts/lvm_dump.sh $RPM_BUILD_ROOT/usr/sbin/lvmdump install -m 0755 scripts/lvm_dump.sh $RPM_BUILD_ROOT/usr/sbin/lvmdump
mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d
install scripts/clvmd_init_rhel4 $RPM_BUILD_ROOT/etc/rc.d/init.d/clvmd
install -m 0755 scripts/lvmconf.sh $RPM_BUILD_ROOT/usr/sbin/lvmconf
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -68,7 +77,49 @@ rm -rf $RPM_BUILD_ROOT
/etc/lvm/archive /etc/lvm/archive
/var/lock/lvm /var/lock/lvm
##############################################################################
# Cluster subpackage
##############################################################################
%package cluster
Summary: Cluster extensions for userland logical volume management tools
Group: System Environment/Base
Requires: lvm2 = %{version}-%{release}
Requires(post): chkconfig
Requires(post): ldconfig
Requires(preun): chkconfig
Requires(preun): device-mapper >= %{device-mapper-version}
Requires(preun): lvm2 >= 2.02
Requires(postun): ldconfig
%description cluster
Extensions to LVM2 to support clusters.
%post cluster
/sbin/chkconfig --add clvmd
/sbin/ldconfig
/usr/sbin/lvmconf --lockinglibdir %{_libdir}
%postun cluster -p /sbin/ldconfig
%preun cluster
if [ "$1" = 0 ]; then
/sbin/chkconfig --del clvmd
/usr/sbin/lvmconf --disable-cluster
fi
%files cluster
%defattr(-,root,root,-)
%attr(755,root,root) %{_sbindir}/clvmd
%{_sbindir}/lvmconf
%{_mandir}/man8/clvmd.8.gz
/etc/rc.d/init.d/clvmd
%changelog %changelog
* Sat Oct 14 2006 Alasdair Kergon <agk@redhat.com> - 2.02.11-6
- Incorporate lvm2-cluster as a subpackage.
* Sat Oct 14 2006 Alasdair Kergon <agk@redhat.com> - 2.02.11-5 * Sat Oct 14 2006 Alasdair Kergon <agk@redhat.com> - 2.02.11-5
- Install lvmdump script. - Install lvmdump script.