DMVERSION=1.02.65
DEBRELEASE=1
# also update debian changelog patch
-PVERELEASE=${DEBRELEASE}pve1
+PVERELEASE=${DEBRELEASE}pve2
PVEVER=${LVMVERSION}-${PVERELEASE}
DMVER=${DMVERSION}-${PVERELEASE}
# Set to 0 to fail when a lock request cannot be satisfied immediately.
wait_for_locks = 1
-Index: new/lib/locking/cluster_locking.c
-===================================================================
---- new.orig/lib/locking/cluster_locking.c 2011-09-21 10:08:21.000000000 +0200
-+++ new/lib/locking/cluster_locking.c 2011-09-21 10:10:55.000000000 +0200
-@@ -66,10 +66,14 @@
- {
- int local_socket;
- struct sockaddr_un sockaddr;
-+ int suppress_messages = 0;
-+
-+ if (ignorelockingfailure() && getenv("LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES"))
-+ suppress_messages = 1;
-
- /* Open local socket */
- if ((local_socket = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
-- log_error("Local socket creation failed: %s", strerror(errno));
-+ log_error_suppress(suppress_messages, "Local socket creation failed: %s", strerror(errno));
- return -1;
- }
-
-@@ -82,7 +86,7 @@
- sizeof(sockaddr))) {
- int saved_errno = errno;
-
-- log_error("connect() failed on local socket: %s",
-+ log_error_suppress(suppress_messages, "connect() failed on local socket: %s",
- strerror(errno));
- if (close(local_socket))
- stack;
Index: new/debian/changelog
===================================================================
---- new.orig/debian/changelog 2011-09-20 12:49:41.000000000 +0200
-+++ new/debian/changelog 2011-09-20 12:53:25.000000000 +0200
-@@ -1,3 +1,9 @@
+--- new.orig/debian/changelog 2011-11-25 08:39:04.000000000 +0100
++++ new/debian/changelog 2011-11-25 08:46:06.000000000 +0100
+@@ -1,3 +1,17 @@
++lvm2 (2.02.86-1pve2) unstable; urgency=low
++
++ * disable clvmd by default
++
++ * do not set locking type automatically
++
++ -- Proxmox Support Team <support@proxmox.com> Fri, 25 Nov 2011 08:45:28 +0100
++
+lvm2 (2.02.86-1pve1) unstable; urgency=low
-+
++
+ * backport to squeeze for use with Proxmox VE
-+
++
+ -- Proxmox Support Team <support@proxmox.com> Tue, 20 Sep 2011 12:53:25 +0200
-+
++
lvm2 (2.02.86-1) unstable; urgency=low
* New upstream version.
+@@ -56,7 +70,7 @@
+
+ * Import upstream version 2.02.72:
+ - CVE-2010-2526: Fix insecure communication between lvm2 and clvmd.
+- (Closes: #591204)
++ (Closes: #591204)
+ - Only use single node clvm if explicitly requested.
+
+ -- Bastian Blank <waldi@debian.org> Thu, 19 Aug 2010 14:44:02 +0200
+@@ -523,7 +537,7 @@
+ * Don't make /lib/lvm2 the default library directory as it causes initrd
+ troubles.
+ Closes: #287042
+-
++
+ -- Patrick Caulfield <patrick@debian.org> Fri, 24 Dec 2004 12:27:05 +0000
+
+ lvm2 (2.00.31-1) unstable; urgency=low
+@@ -551,7 +565,7 @@
+ * Remove "is not recommended for production use" from package description.
+ Closes: #278919
+ * Add lvm2create_initrd to documentation directory.
+-
++
+ -- Patrick Caulfield <patrick@debian.org> Wed, 3 Nov 2004 09:37:56 +0000
+
+ lvm2 (2.00.24-2) unstable; urgency=low
+@@ -596,7 +610,7 @@
+ Closes: #260700
+ * Add Czech debconf translation
+ Closes: #265545
+-
++
+ -- Patrick Caulfield <patrick@debian.org> Fri, 20 Aug 2004 10:44:11 +0100
+
+ lvm2 (2.00.19-3) unstable; urgency=low
+@@ -736,7 +750,7 @@
+ -- Andres Salomon <dilinger@voxel.net> Thu, 07 Aug 2003 01:04:59 -0400
+
+ lvm2 (1.95.15-2) unstable; urgency=low
+-
++
+ * Calm-before-the-storm release; the next one will either be 2.00 (once
+ the kill-yer-VGs bug is fixed) or 1.95 with lvm10 compatibility (once
+ patrick returns from vacation).
+@@ -812,7 +826,7 @@
+ * Add dmsetup as a suggestion.
+ * Add /etc/lvm/lvm.conf conffile.
+ * Add undocumented(7) for the commands missing manpages.
+-
++
+ -- Andres Salomon <dilinger@mp3revolution.net> Mon, 4 Mar 2002 04:51:26 -0500
+
+ lvm2 (0.95.02cvs20020220) unstable; urgency=low
Index: new/debian/clvm.init
===================================================================
---- new.orig/debian/clvm.init 2011-09-21 11:08:28.000000000 +0200
-+++ new/debian/clvm.init 2011-09-21 11:22:15.000000000 +0200
+--- new.orig/debian/clvm.init 2011-11-25 08:39:04.000000000 +0100
++++ new/debian/clvm.init 2011-11-25 08:42:54.000000000 +0100
@@ -4,8 +4,8 @@
# Provides: clvm
# Required-Start: $remote_fs lvm2 cman
# Short-Description: start and stop the lvm cluster locking daemon
### END INIT INFO
#
-@@ -44,10 +44,10 @@
+@@ -26,28 +26,31 @@
+ . /lib/lsb/init-functions
+ if [ ! -f /etc/cluster/cluster.conf ]; then
+- log_failure_msg "clvmd: cluster not configured. Aborting."
++ log_action_msg "clvmd: cluster not configured"
+ exit 0
+ fi
+
+-if ! cman_tool status >/dev/null 2>&1; then
+- log_failure_msg "clvmd: cluster is not running. Aborting."
+- exit 0
+-fi
+-
+-CLVMDTIMEOUT=20
++CLVMDTIMEOUT=30
++START_CLVM=no
+
+ # Read configuration variable file if it is present
+ [ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
++[ "$START_CLVM" = "yes" ] || exit 0
++
+ DAEMON_OPTS="-T$CLVMDTIMEOUT"
+
++if ! cman_tool status >/dev/null 2>&1; then
++ log_failure_msg "clvmd: cluster is not running. Aborting."
++ exit 1
++fi
++
do_start()
{
- start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS || status="$?"
}
do_activate()
+@@ -55,9 +58,6 @@
+ if [ -n "$LVM_VGS" ] ; then
+ log_action_msg "Activating VGs $LVM_VGS"
+ vgchange -ayl $LVM_VGS || return $?
+- else
+- log_action_msg "Activating all VGs"
+- vgchange -ayl || return $?
+ fi
+ }
+
@@ -91,7 +91,7 @@
case "$status" in
0) log_end_msg 0 ;;
do_deactivate
Index: new/debian/rules
===================================================================
---- new.orig/debian/rules 2011-09-21 11:08:28.000000000 +0200
-+++ new/debian/rules 2011-09-21 11:08:51.000000000 +0200
+--- new.orig/debian/rules 2011-11-25 08:39:04.000000000 +0100
++++ new/debian/rules 2011-11-25 08:39:39.000000000 +0100
@@ -160,7 +160,7 @@
install_clvm: DIR = $(BUILD_DIR)/install_deb
install_clvm: $(STAMPS_DIR)/install_deb
+$(MAKE_SELF) install-base
install_dmsetup: export DH_OPTIONS = -pdmsetup
+Index: new/debian/clvm.default
+===================================================================
+--- new.orig/debian/clvm.default 2011-11-25 08:39:04.000000000 +0100
++++ new/debian/clvm.default 2011-11-25 08:42:26.000000000 +0100
+@@ -1,8 +1,11 @@
+ # Bourne shell compatible script, sourced by /etc/init.d/clvm to set
+ # additional arguments for clvmd.
+
++# enable clmvd
++#START_CLVM=yes
++
+ # Startup timeout:
+-CLVMDTIMEOUT=20
++#CLVMDTIMEOUT=30
+
+ # Volume groups to activate on startup:
+ # LVM_VGS="cluster_vg1 cluster_vg2"
--- /dev/null
+Index: new/debian/control
+===================================================================
+--- new.orig/debian/control 2011-09-22 10:21:22.000000000 +0200
++++ new/debian/control 2011-09-22 10:21:53.000000000 +0200
+@@ -47,7 +47,7 @@
+
+ Package: libdevmapper1.02.1
+ Section: libs
+-Priority: required
++Priority: optional
+ Architecture: any
+ Depends: ${shlibs:Depends}, ${misc:Depends}, dmsetup (>= ${binary:Version})
+ Breaks: lvm2 (<< 2.02.66)
fix-changelog.patch
fix-fsadm-install.patch
remove-udebs.patch
-autodetect-locking-type.patch
+#autodetect-locking-type.patch
+suppress-error-messages.patch
fix-lvm2-init-script-patch
+fix-libdevmapper-priority.patch
--- /dev/null
+Index: new/lib/locking/cluster_locking.c
+===================================================================
+--- new.orig/lib/locking/cluster_locking.c 2011-09-21 10:08:21.000000000 +0200
++++ new/lib/locking/cluster_locking.c 2011-09-21 10:10:55.000000000 +0200
+@@ -66,10 +66,14 @@
+ {
+ int local_socket;
+ struct sockaddr_un sockaddr;
++ int suppress_messages = 0;
++
++ if (ignorelockingfailure() && getenv("LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES"))
++ suppress_messages = 1;
+
+ /* Open local socket */
+ if ((local_socket = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
+- log_error("Local socket creation failed: %s", strerror(errno));
++ log_error_suppress(suppress_messages, "Local socket creation failed: %s", strerror(errno));
+ return -1;
+ }
+
+@@ -82,7 +86,7 @@
+ sizeof(sockaddr))) {
+ int saved_errno = errno;
+
+- log_error("connect() failed on local socket: %s",
++ log_error_suppress(suppress_messages, "connect() failed on local socket: %s",
+ strerror(errno));
+ if (close(local_socket))
+ stack;