rpms/lvm2/devel cluster-locking-built-in.patch, NONE, 1.1 lvm2.spec, 1.78, 1.79

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Oct 14 16:44:13 UTC 2006


Author: agk

Update of /cvs/dist/rpms/lvm2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26573

Modified Files:
	lvm2.spec 
Added Files:
	cluster-locking-built-in.patch 
Log Message:
Build in cluster locking with fallback if external locking fails to load.

[Preparation for combining the spec file with the lvm2-cluster one.]


cluster-locking-built-in.patch:
 LVM2.2.02.11/scripts/lvmconf.sh |    4 ++--
 lib/locking/locking.c           |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

--- NEW FILE cluster-locking-built-in.patch ---
--- 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


Index: lvm2.spec
===================================================================
RCS file: /cvs/dist/rpms/lvm2/devel/lvm2.spec,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- lvm2.spec	14 Oct 2006 15:05:46 -0000	1.78
+++ lvm2.spec	14 Oct 2006 16:44:11 -0000	1.79
@@ -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 @@
 
 %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 @@
 /var/lock/lvm
 
 %changelog
+* Sat Oct 14 2006 Alasdair Kergon <agk at 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 at redhat.com> - 2.02.11-3
 - Drop .0 suffix from release.
 




More information about the fedora-cvs-commits mailing list