Build in cluster locking with fallback if external locking fails to load.
[Preparation for combining the spec file with the lvm2-cluster one.]
This commit is contained in:
parent
7ed5d2555c
commit
bdaf88d52a
47
cluster-locking-built-in.patch
Normal file
47
cluster-locking-built-in.patch
Normal file
@ -0,0 +1,47 @@
|
||||
--- LVM2.2.02.11-old/lib/locking/locking.c 2006-09-02 02:18:17.000000000 +0100
|
||||
+++ LVM2.2.02.11/lib/locking/locking.c 2006-10-14 17:30:41.000000000 +0100
|
||||
@@ -144,18 +144,18 @@ int init_locking(int type, struct cmd_co
|
||||
case 2:
|
||||
if (!cmd->is_static) {
|
||||
log_very_verbose("External locking selected.");
|
||||
- if (!init_external_locking(&_locking, cmd))
|
||||
- break;
|
||||
- return 1;
|
||||
+ if (init_external_locking(&_locking, cmd))
|
||||
+ return 1;
|
||||
}
|
||||
if (!find_config_tree_int(cmd, "locking/fallback_to_clustered_locking",
|
||||
DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING))
|
||||
break;
|
||||
- log_very_verbose("Falling back to clustered locking.");
|
||||
- /* Fall through */
|
||||
#endif
|
||||
|
||||
#ifdef CLUSTER_LOCKING_INTERNAL
|
||||
+ log_very_verbose("Falling back to internal clustered locking.");
|
||||
+ /* Fall through */
|
||||
+
|
||||
case 3:
|
||||
log_very_verbose("Cluster locking selected.");
|
||||
if (!init_cluster_locking(&_locking, cmd))
|
||||
diff -rup LVM2.2.02.11-old/scripts/lvmconf.sh LVM2.2.02.11/scripts/lvmconf.sh
|
||||
--- LVM2.2.02.11-old/scripts/lvmconf.sh 2006-09-20 18:36:47.000000000 +0100
|
||||
+++ LVM2.2.02.11/scripts/lvmconf.sh 2006-10-14 16:57:06.000000000 +0100
|
||||
@@ -36,7 +36,7 @@ function parse_args
|
||||
while [ -n "$1" ]; do
|
||||
case $1 in
|
||||
--enable-cluster)
|
||||
- LOCKING_TYPE=2
|
||||
+ LOCKING_TYPE=3
|
||||
shift
|
||||
;;
|
||||
--disable-cluster)
|
||||
@@ -170,7 +170,7 @@ then
|
||||
if [ -z "$LOCKING_TYPE" ]; then
|
||||
LOCKING_TYPE=1
|
||||
fi
|
||||
- if [ "$LOCKING_TYPE" = "2" ]; then
|
||||
+ if [ "$LOCKING_TYPE" = "3" ]; then
|
||||
cat $CONFIGFILE - <<EOF > $TMPFILE
|
||||
global {
|
||||
# Enable locking for cluster LVM
|
@ -1,11 +1,12 @@
|
||||
Summary: Userland logical volume management tools
|
||||
Name: lvm2
|
||||
Version: 2.02.11
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
URL: http://sources.redhat.com/lvm2
|
||||
Source0: LVM2.%{version}.tgz
|
||||
Patch0: cluster-locking-built-in.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
BuildRequires: device-mapper >= 1.02.11
|
||||
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
|
||||
@ -28,6 +29,7 @@ or more physical volumes and creating one or more logical volumes
|
||||
|
||||
%prep
|
||||
%setup -q -n LVM2.%{version}
|
||||
%patch -p1 -b .locking
|
||||
|
||||
%build
|
||||
%configure --enable-static_link --enable-readline --enable-lvm1_fallback --with-pool=internal --with-staticdir=/sbin --with-user= --with-group=
|
||||
@ -66,6 +68,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/var/lock/lvm
|
||||
|
||||
%changelog
|
||||
* Sat Oct 14 2006 Alasdair Kergon <agk@redhat.com> - 2.02.11-4
|
||||
- Build in cluster locking with fallback if external locking fails to load.
|
||||
|
||||
* Sat Oct 14 2006 Alasdair Kergon <agk@redhat.com> - 2.02.11-3
|
||||
- Drop .0 suffix from release.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user