diff -Nru gfs2-utils-3.1.3/debian/changelog gfs2-utils-3.1.3/debian/changelog
--- gfs2-utils-3.1.3/debian/changelog	2015-01-10 11:21:37.000000000 +0000
+++ gfs2-utils-3.1.3/debian/changelog	2015-10-29 23:32:09.000000000 +0000
@@ -1,3 +1,12 @@
+gfs2-utils (3.1.3-1.2+plugwash1) UNRELEASED; urgency=medium
+
+  * Change build-depends from libcorosync-common-dev to libcorosync-dev
+  * Add libcpg-dev, libcfg-dev and libquorum-dev to build-depends.
+  * Fix clean target
+  * Make some fixes for new corosync API (incomplete)
+
+ -- Peter Michael Green <plugwash@raspbian.org>  Thu, 29 Oct 2015 20:57:14 +0000
+
 gfs2-utils (3.1.3-1.2) unstable; urgency=low
 
   [ Salvatore Bonaccorso ]
diff -Nru gfs2-utils-3.1.3/debian/control gfs2-utils-3.1.3/debian/control
--- gfs2-utils-3.1.3/debian/control	2015-01-10 10:49:29.000000000 +0000
+++ gfs2-utils-3.1.3/debian/control	2015-10-29 21:33:33.000000000 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org>
 Uploaders: Bastian Blank <waldi@debian.org>, Frederik Schüler <fs@debian.org>,
  Guido Günther <agx@sigxcpu.org>, Martin Loschwitz <madkiss@debian.org>
-Build-Depends: debhelper (>= 9), automake, autoconf, libtool, autotools-dev, perl-modules, libcorosync-dev (>= 1.2.0), libopenais-dev (>= 1.1.2), liblogthread-dev (>= 3.1.0), libccs-dev (>= 3.1.0), libcman-dev (>= 3.1.0), libdlm-dev (>= 3.1.0), libdlmcontrol-dev (>= 3.1.0), libfence-dev (>= 3.1.0), libncurses5-dev, pkg-config, autopoint, zlib1g-dev, openais-dev (>= 1.1.4)
+Build-Depends: debhelper (>= 9), automake, autoconf, libtool, autotools-dev, perl-modules, libcorosync-common-dev (>= 1.2.0), libopenais-dev (>= 1.1.2), liblogthread-dev (>= 3.1.0), libccs-dev (>= 3.1.0), libcman-dev (>= 3.1.0), libdlm-dev (>= 3.1.0), libdlmcontrol-dev (>= 3.1.0), libfence-dev (>= 3.1.0), libncurses5-dev, pkg-config, autopoint, zlib1g-dev, openais-dev (>= 1.1.4), libcpg-dev, libcfg-dev, libquorum-dev
 Standards-Version: 3.9.3
 Homepage: http://sources.redhat.com/cluster/wiki/
 
diff -Nru gfs2-utils-3.1.3/debian/patches/0005-corosync-api-fixes.patch gfs2-utils-3.1.3/debian/patches/0005-corosync-api-fixes.patch
--- gfs2-utils-3.1.3/debian/patches/0005-corosync-api-fixes.patch	1970-01-01 00:00:00.000000000 +0000
+++ gfs2-utils-3.1.3/debian/patches/0005-corosync-api-fixes.patch	2015-10-29 23:55:44.000000000 +0000
@@ -0,0 +1,196 @@
+Description:  Make some fixes for new corosync API (incomplete)
+Author: Peter Michael Green <plugwash@raspbian.org>
+
+Index: gfs2-utils-3.1.3/group/gfs_controld/cpg-new.c
+===================================================================
+--- gfs2-utils-3.1.3.orig/group/gfs_controld/cpg-new.c
++++ gfs2-utils-3.1.3/group/gfs_controld/cpg-new.c
+@@ -342,7 +342,7 @@ static const char *msg_name(int type)
+ static int _send_message(cpg_handle_t h, void *buf, int len, int type)
+ {
+ 	struct iovec iov;
+-	cpg_error_t error;
++	cs_error_t error;
+ 	int retries = 0;
+ 
+ 	iov.iov_base = buf;
+@@ -350,7 +350,7 @@ static int _send_message(cpg_handle_t h,
+ 
+  retry:
+ 	error = cpg_mcast_joined(h, CPG_TYPE_AGREED, &iov, 1);
+-	if (error == CPG_ERR_TRY_AGAIN) {
++	if (error == CS_ERR_TRY_AGAIN) {
+ 		retries++;
+ 		usleep(1000);
+ 		if (!(retries % 100))
+@@ -358,7 +358,7 @@ static int _send_message(cpg_handle_t h,
+ 				   retries, msg_name(type));
+ 		goto retry;
+ 	}
+-	if (error != CPG_OK) {
++	if (error != CS_OK) {
+ 		log_error("cpg_mcast_joined error %d handle %llx %s",
+ 			  error, (unsigned long long)h, msg_name(type));
+ 		return -1;
+@@ -2685,7 +2685,7 @@ static cpg_callbacks_t cpg_callbacks = {
+ static void process_cpg_mountgroup(int ci)
+ {
+ 	struct mountgroup *mg;
+-	cpg_error_t error;
++	cs_error_t error;
+ 
+ 	mg = find_mg_ci(ci);
+ 	if (!mg) {
+@@ -2693,8 +2693,8 @@ static void process_cpg_mountgroup(int c
+ 		return;
+ 	}
+ 
+-	error = cpg_dispatch(mg->cpg_handle, CPG_DISPATCH_ALL);
+-	if (error != CPG_OK) {
++	error = cpg_dispatch(mg->cpg_handle, CS_DISPATCH_ALL);
++	if (error != CS_OK) {
+ 		log_error("cpg_dispatch error %d", error);
+ 		return;
+ 	}
+@@ -2704,7 +2704,7 @@ static void process_cpg_mountgroup(int c
+ 
+ int gfs_join_mountgroup(struct mountgroup *mg)
+ {
+-	cpg_error_t error;
++	cs_error_t error;
+ 	cpg_handle_t h;
+ 	struct cpg_name name;
+ 	int i = 0, fd, ci, rv;
+@@ -2718,7 +2718,7 @@ int gfs_join_mountgroup(struct mountgrou
+ 	}
+ 
+ 	error = cpg_initialize(&h, &cpg_callbacks);
+-	if (error != CPG_OK) {
++	if (error != CS_OK) {
+ 		log_error("cpg_initialize error %d", error);
+ 		goto fail;
+ 	}
+@@ -2742,13 +2742,13 @@ int gfs_join_mountgroup(struct mountgrou
+ 
+  retry:
+ 	error = cpg_join(h, &name);
+-	if (error == CPG_ERR_TRY_AGAIN) {
++	if (error == CS_ERR_TRY_AGAIN) {
+ 		sleep(1);
+ 		if (!(++i % 10))
+ 			log_error("cpg_join error retrying");
+ 		goto retry;
+ 	}
+-	if (error != CPG_OK) {
++	if (error != CS_OK) {
+ 		log_error("cpg_join error %d", error);
+ 		cpg_finalize(h);
+ 		goto fail_client;
+@@ -2771,7 +2771,7 @@ int gfs_join_mountgroup(struct mountgrou
+ 
+ void gfs_leave_mountgroup(struct mountgroup *mg, int mnterr)
+ {
+-	cpg_error_t error;
++	cs_error_t error;
+ 	struct cpg_name name;
+ 	int i = 0;
+ 
+@@ -2787,13 +2787,13 @@ void gfs_leave_mountgroup(struct mountgr
+ 
+  retry:
+ 	error = cpg_leave(mg->cpg_handle, &name);
+-	if (error == CPG_ERR_TRY_AGAIN) {
++	if (error == CS_ERR_TRY_AGAIN) {
+ 		sleep(1);
+ 		if (!(++i % 10))
+ 			log_error("cpg_leave error retrying");
+ 		goto retry;
+ 	}
+-	if (error != CPG_OK)
++	if (error != CS_OK)
+ 		log_error("cpg_leave error %d", error);
+ }
+ 
+@@ -3290,16 +3290,16 @@ static cpg_callbacks_t cpg_callbacks_dae
+ 
+ void process_cpg_daemon(int ci)
+ {
+-	cpg_error_t error;
++	cs_error_t error;
+ 
+-	error = cpg_dispatch(cpg_handle_daemon, CPG_DISPATCH_ALL);
+-	if (error != CPG_OK)
++	error = cpg_dispatch(cpg_handle_daemon, CS_DISPATCH_ALL);
++	if (error != CS_OK)
+ 		log_error("daemon cpg_dispatch error %d", error);
+ }
+ 
+ int setup_cpg_daemon(void)
+ {
+-	cpg_error_t error;
++	cs_error_t error;
+ 	cpg_handle_t h;
+ 	struct cpg_name name;
+ 	int i = 0;
+@@ -3315,7 +3315,7 @@ int setup_cpg_daemon(void)
+ 	our_protocol.kernel_max[2] = 1;
+ 
+ 	error = cpg_initialize(&h, &cpg_callbacks_daemon);
+-	if (error != CPG_OK) {
++	if (error != CS_OK) {
+ 		log_error("daemon cpg_initialize error %d", error);
+ 		return -1;
+ 	}
+@@ -3330,13 +3330,13 @@ int setup_cpg_daemon(void)
+ 
+  retry:
+ 	error = cpg_join(h, &name);
+-	if (error == CPG_ERR_TRY_AGAIN) {
++	if (error == CS_ERR_TRY_AGAIN) {
+ 		sleep(1);
+ 		if (!(++i % 10))
+ 			log_error("daemon cpg_join error retrying");
+ 		goto retry;
+ 	}
+-	if (error != CPG_OK) {
++	if (error != CS_OK) {
+ 		log_error("daemon cpg_join error %d", error);
+ 		goto fail;
+ 	}
+@@ -3352,7 +3352,7 @@ int setup_cpg_daemon(void)
+ void close_cpg_daemon(void)
+ {
+ 	struct mountgroup *mg;
+-	cpg_error_t error;
++	cs_error_t error;
+ 	struct cpg_name name;
+ 	int i = 0;
+ 
+@@ -3367,13 +3367,13 @@ void close_cpg_daemon(void)
+ 
+  retry:
+ 	error = cpg_leave(cpg_handle_daemon, &name);
+-	if (error == CPG_ERR_TRY_AGAIN) {
++	if (error == CS_ERR_TRY_AGAIN) {
+ 		sleep(1);
+ 		if (!(++i % 10))
+ 			log_error("daemon cpg_leave error retrying");
+ 		goto retry;
+ 	}
+-	if (error != CPG_OK)
++	if (error != CS_OK)
+ 		log_error("daemon cpg_leave error %d", error);
+  fin:
+ 	list_for_each_entry(mg, &mountgroups, list) {
+Index: gfs2-utils-3.1.3/group/gfs_controld/member_cman.c
+===================================================================
+--- gfs2-utils-3.1.3.orig/group/gfs_controld/member_cman.c
++++ gfs2-utils-3.1.3/group/gfs_controld/member_cman.c
+@@ -157,7 +157,6 @@ static void shutdown_callback(corosync_c
+ static corosync_cfg_callbacks_t cfg_callbacks =
+ {
+ 	.corosync_cfg_shutdown_callback = shutdown_callback,
+-	.corosync_cfg_state_track_callback = NULL,
+ };
+ 
+ void process_cluster_cfg(int ci)
diff -Nru gfs2-utils-3.1.3/debian/patches/series gfs2-utils-3.1.3/debian/patches/series
--- gfs2-utils-3.1.3/debian/patches/series	2013-01-11 18:18:10.000000000 +0000
+++ gfs2-utils-3.1.3/debian/patches/series	2015-10-29 23:32:55.000000000 +0000
@@ -2,3 +2,4 @@
 0002-Fix-Default-Start-Stop-for-dependency-based-boot.patch
 0003_fix_gfs2cluster_init_script.patch
 0004-fix-init-scripts.patch
+0005-corosync-api-fixes.patch
diff -Nru gfs2-utils-3.1.3/debian/rules gfs2-utils-3.1.3/debian/rules
--- gfs2-utils-3.1.3/debian/rules	2015-01-10 11:16:52.000000000 +0000
+++ gfs2-utils-3.1.3/debian/rules	2015-10-29 23:54:42.000000000 +0000
@@ -36,3 +36,7 @@
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf debian/*.init
+	rm -rf m4 
+	rm -f make/clusterautoconfig.h.in missing po/Makevars.template po/stamp-po
+	rm -f ABOUT-NLS `find . -name Makefile.in`
+	rm -f aclocal.m4 compile config.guess config.log config.sub configure depcomp install-sh ltmain.sh
