Tags: gfs2-utils +stretch
Thanks
I ran into this package trying to get a transition to go through in
raspbian stretch. After attacking some issues with build-dependencies on
obsolete packages and with the clean target not cleaning up properly I
ran into the same error that is given in this bug report.
I fixed a load of errors with type/costant names. it appears that cpg_
prefixes had been replaced with cs_ prefixes. I also fixed a case of a
struct that had had a field removed. Since the app had previously just
been setting that field to null I just removed the assignment.
Unfortunately I then ran into a function that added a new parameter.
gcc -DHAVE_CONFIG_H -I. -I../../make -I../../group/libgfscontrol
-I../../group/include -I/usr/src/linux/include -I../../make
-I../../make -I. -D_FORTIFY_SOURCE=2 -I/usr/include/openais
-I../../dlm/include -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -O2 -ggdb3 -Wall -Wshadow
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
-Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings
-Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wformat=2
-Wformat-security -Wformat-nonliteral -Wno-long-long
-Wno-strict-aliasing -MT gfs_controld-member_cman.o -MD -MP -MF
.deps/gfs_controld-member_cman.Tpo -c -o gfs_controld-member_cman.o
`test -f 'member_cman.c' || echo './'`member_cman.c
member_cman.c: In function 'setup_cluster':
member_cman.c:94:8: error: too few arguments to function 'quorum_initialize'
err = quorum_initialize(&qh, &quorum_callbacks);
^
In file included from member_cman.c:5:0:
/usr/include/corosync/quorum.h:63:12: note: declared here
cs_error_t quorum_initialize (
^
Makefile:564: recipe for target 'gfs_controld-member_cman.o' failed
make[3]: *** [gfs_controld-member_cman.o] Error 1
make[3]: Leaving directory '/gfs2-utils-3.1.3/group/gfs_controld'
Makefile:397: recipe for target 'check-recursive' failed
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory '/gfs2-utils-3.1.3/group'
Makefile:453: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/gfs2-utils-3.1.3'
dh_auto_test: make -j1 check returned exit code 2
debian/rules:18: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
root@odroidu2:/gfs2-utils-3.1.3#
I found some documentation on the paramter in question, but i've no idea
how to chose between the two possible values whin the context of a flyby
fix to existing code.
http://manpages.ubuntu.com/manpages/saucy/man3/quorum_initialize.3.html
The_quorum_type_ argument is set to:
#define QUORUM_FREE 0
#define QUORUM_SET 1
_QUORUM_FREE_ value means that no quorum algorithm is loaded and that
no
callbacks will take place.
_QUORUM_SET_ value means that one quorum algorithm is configured and
that
callbacks will take place.
When a configuration change occurs, the callback is called from the
*quorum_dispatch()* function.
Debdiff of what I have done so far is attatched.
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 <plugw...@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-maintain...@lists.alioth.debian.org>
Uploaders: Bastian Blank <wa...@debian.org>, Frederik Schüler
<f...@debian.org>,
Guido Günther <a...@sigxcpu.org>, Martin Loschwitz <madk...@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 <plugw...@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