diff options
Diffstat (limited to 'debian/patches')
21 files changed, 1242 insertions, 0 deletions
diff --git a/debian/patches/0001-libtoolize_check.patch b/debian/patches/0001-libtoolize_check.patch new file mode 100644 index 0000000..b016959 --- /dev/null +++ b/debian/patches/0001-libtoolize_check.patch @@ -0,0 +1,62 @@ +From: Author: Johannes Schauer <j.schauer@email.de> +Date: Tue, 21 Apr 2015 20:35:22 -0400 +Subject: libtoolize_check + +--- + autogen.sh | 22 ++++++++-------------- + 1 file changed, 8 insertions(+), 14 deletions(-) + +diff --git a/autogen.sh b/autogen.sh +index 7464c9d..3e79704 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -91,16 +91,11 @@ do + fi + done + +-for command in libtool14 libtool15 libtool glibtool +-do +- URL=$gnu/$pkg/ +- if +- testProgram $command +- then +- libtool=$command +- libtoolize=`echo "$libtool" | sed -e 's/libtool/libtoolize/'` +- fi +-done ++if ++ testProgram libtoolize ++then ++ libtoolize=libtoolize ++fi + + if [ -z $autoconf ]; then + echo You must have autoconf installed to compile the cluster-glue package. +@@ -114,7 +109,7 @@ elif [ -z $automake ]; then + echo or get the source tarball at: $gnu/automake/ + exit 1 + +-elif [ -z $libtool ]; then ++elif [ -z $libtoolize ]; then + echo You must have libtool installed to compile the cluster-glue package. + echo Download the appropriate package for your system, + echo or get the source tarball at: $gnu/libtool/ +@@ -125,7 +120,7 @@ oneline() { + read x; echo "$x" + } + +-LT_version=`$libtool --version | oneline | sed -e 's%^[^0-9]*%%' -e s'% .*%%'` ++LT_version=`$libtoolize --version | oneline | sed -e 's%^[^0-9]*%%' -e s'% .*%%'` + LT_majvers=`echo "$LT_version" | sed -e 's%\..*%%'` + LT_minvers=`echo "$LT_version" | sed -e 's%^[^.]*\.%%' ` + LT_minnum=`echo "$LT_minvers" | sed -e 's%[^0-9].*%%'` +@@ -138,8 +133,7 @@ then + fi + + # Create local copies so that the incremental updates will work. +-rm -f ./autoconf ./automake ./autoheader ./libtool +-ln -s `which $libtool` ./libtool ++rm -f ./autoconf ./automake ./autoheader + ln -s `which $autoconf` ./autoconf + ln -s `which $automake` ./automake + ln -s `which $autoheader` ./autoheader diff --git a/debian/patches/0002-Fix-spelling-of-output-and-improve-grammar.patch b/debian/patches/0002-Fix-spelling-of-output-and-improve-grammar.patch new file mode 100644 index 0000000..4204570 --- /dev/null +++ b/debian/patches/0002-Fix-spelling-of-output-and-improve-grammar.patch @@ -0,0 +1,32 @@ +From: Richard B Winters <rik@mmogp.com> +Date: Fri, 17 Apr 2015 08:46:31 -0400 +Subject: Fix spelling of output and improve grammar + +The spelling of output as ouput within the source throws a lintian +warning. This patch resolves that. + +The grammar was also a tad off, so it was improved. + +Change-Id: I5ad23a1fb89c5fdb39ba1f9bb13905ff36de82ad +Signed-off-by: Richard B Winters <rik@mmogp.com> +--- + lrm/lrmd/lrmd.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lrm/lrmd/lrmd.c b/lrm/lrmd/lrmd.c +index 385096b..188a4c0 100644 +--- a/lrm/lrmd/lrmd.c ++++ b/lrm/lrmd/lrmd.c +@@ -3362,9 +3362,9 @@ on_ra_proc_finished(ProcTrack* p, int status, int signo, int exitcode + , op->rapop); + } else { + lrmd_log(LOG_WARNING, "There is something wrong: the " +- "first line isn't read in. Maybe the heartbeat " +- "does not ouput string correctly for status " +- "operation. Or the code (myself) is wrong."); ++ "first line isn't read in. Maybe heartbeat does " ++ "not ouptut the string correctly for the status " ++ "operation, or perhaps the code is wrong."); + } + } + diff --git a/debian/patches/0003-Remove-.hgtags-from-source.patch b/debian/patches/0003-Remove-.hgtags-from-source.patch new file mode 100644 index 0000000..ee3901d --- /dev/null +++ b/debian/patches/0003-Remove-.hgtags-from-source.patch @@ -0,0 +1,87 @@ +From: Richard B Winters <rik@mmogp.com> +Date: Tue, 21 Apr 2015 20:40:30 -0400 +Subject: Remove .hgtags from source + +The .hgtags file should not be packed with the release tarball. + +Change-Id: I4845454ef1caf05fe311e284b8b27f048d77baae +Signed-off-by: Richard B Winters <rik@mmogp.com> +--- + .hgtags | 68 ----------------------------------------------------------------- + 1 file changed, 68 deletions(-) + delete mode 100644 .hgtags + +diff --git a/.hgtags b/.hgtags +deleted file mode 100644 +index 6e84e98..0000000 +--- a/.hgtags ++++ /dev/null +@@ -1,68 +0,0 @@ +-01ecac8670a6c2e47202a9ce2f5e27e9dcdbeff6 STABLE-1.1.3 +-19d11d8d62c270c48a3feab5ed66b18897c9cc8d sle11-rc9 +-2185d55c12e37c48abc239dd1f8b3b9ef012fd6b obs-2.1.2-1 +-235a71009062702c906cc68f23904ddcbe17535f STABLE-2.0.6 +-29540582671a9e33ae2122d319c68258346f1a3f STABLE-2.1.1 +-2cb36a1c01c76ef3e3a449f16b13730c761efff2 STABLE-2.1.3 +-2ece20ad31a4271076e5c43dd3f2ea25caa55635 Series-Root-1.0 +-3b8dc33a402daaf7e3754acadd1898c0fe69072f STABLE-2.0.3 +-45c377d7a35dba92d46321d2f824bc0d9b17f54e obs-2.1.2-24 +-67a443d135f128ca28f15e4e8999d3e0caabed61 sle11-rc3 +-68de68ef5f0a7b97a4ff0d9806c598527c8659b8 STABLE-2.0.4 +-705b21e4b623f7d2fc5c83d99beffb709905c996 STABLE-0.4.9c +-7190f69e29a08350bcec753509eb37f53593334a beta-2.99.0 +-7f90244e5c25372e70178f77f44c76a8564e1665 SLE10-SP1 +-7f90244e5c25372e70178f77f44c76a8564e1665 STABLE-2.1.0 +-823208439a98179d7c01d6eed1db50dd96802663 sle11-rc7 +-86fa06f08a123868eb272a20bf850cec1805a12f STABLE-2.0.8 +-97d025dd33648a1e50a3a1bf40573669440dd1b6 obs-2.1.2-4 +-9b34f480b8e8966e9ed4276507cc562564763720 beta-2.99.2 +-9eb2a4db4ff595d18302426029b03153fad77ef7 beta-2.99.1 +-a230062a445096b89cf75bef85e285ee55626a78 obs-2.1.2-2 +-af867b71bcc645f3d3c56fe8fdd883b17a851e46 STABLE-2.0.0 +-b4a0a0ffd15eb2dd1285bdbd86ea9716a9d0bf36 STABLE-2.0.5 +-b906db882c37647abfd21fa1473950445ad7813c STABLE-2.1.2 +-ba476a3948ea0cf52098fa050a27a8856a214825 sle11-rc2 +-be0d49da51a810e870356b7f2a52013e5c775c0d Beta-0.4.9a +-c77ad4549888539e7fc9a6b56cccdb1403749198 STABLE-0.4.9e +-c7d672b9f3ece79ad26fb8a7df20265bcb596515 sle11-beta6 +-cf0265eed1b5b3b3f25f7e56eb807d21ca261d68 SLES10-GA-2.0.7-1.5 +-cf0265eed1b5b3b3f25f7e56eb807d21ca261d68 STABLE-2.0.7 +-d1899e1eecc09b7a6e66a02609408272bb856c6a STABLE-1.1.5 +-dae6b0b3e109afc5df29a7127ab6dd9e1bd0a20a sle11-rc5 +-e3691501a2d0631c3796b6a728fadf7d90691203 obs-2.1.2-15 +-e3855af19554339204b5b2b2a199a7bc31e22843 STABLE-2.0.1 +-e3855af19554339204b5b2b2a199a7bc31e22843 STABLE-2.0.2 +-e6637f62c87ada212a83942ec5b2a4bf30b98c3f Series-Root-1.2 +-f6c2cd2593f365f984ce051db61466738ac05dcd Beta-0.4.9f +-940fa13f6a0a929d15a01af9a0b62c16e4d2706a glue-1.0 +-130b1d7af88912d077d32a7c386c3c94d0b2da16 glue-1.0.2-rc1 +-78894a112c0a134dc709d2a8772085180444c40c glue-1.0.2-rc2 +-7700902a4de3ee84fa2007a4b4602693c5ac26a8 glue-1.0.2-rc2a +-97fcdf789e174b0a0b23e28dcabe2f7d579d426f glue-1.0.2 +-0a64e6f77894da1364b17dc3c73b65561717f4aa glue-1.0.3 +-0a64e6f77894da1364b17dc3c73b65561717f4aa glue-1.0.3 +-0000000000000000000000000000000000000000 glue-1.0.3 +-0000000000000000000000000000000000000000 glue-1.0.3 +-979c4ffae287976631a30d10258903aea6fb28fa glue-1.0.3 +-979c4ffae287976631a30d10258903aea6fb28fa glue-1.0.3 +-0000000000000000000000000000000000000000 glue-1.0.3 +-0000000000000000000000000000000000000000 glue-1.0.3 +-9bcd134f1ebff7baf80f4b21c3b5f620b0ee976e glue-1.0.3 +-9bcd134f1ebff7baf80f4b21c3b5f620b0ee976e glue-1.0.3 +-0000000000000000000000000000000000000000 glue-1.0.3 +-0000000000000000000000000000000000000000 glue-1.0.3 +-2e33ecd820b2673755d1280a259489a026921f63 glue-1.0.3 +-761edff8c35ea2cdf3e1bd37d600b06233e61d4f glue-1.0.4-rc1 +-3229873980e1028bf05de81f5bafccb3a92b9aa4 glue-1.0.4 +-3af80b93d9e5d5e441f3f4c3aad16775ea27d2d9 glue-1.0.5 +-1c87a0c58c59fc384b93ec11476cefdbb6ddc1e1 glue-1.0.6 +-61200fbe18358e420cdc2037d87e803e150c1eac glue-1.0.7-rc1 +-5e06b2ddd24b37ad6c1c25d958d7a9dda7d02f93 glue-1.0.7 +-5740338816e1ff07d0e37f36214f442e183984d7 glue-1.0.8-rc1 +-c69dc6ace936f501776df92dab3d611c2405f69e glue-1.0.8 +-0a08a469fdc8a0db1875369497bc83c0523ceb21 glue-1.0.9 +-12055ca2b025ab250a544701edaa1f5aaf63aef1 glue-1.0.10 +-02bdcf58f9a098b717784746308e199e12eeb005 glue-1.0.11 +-c64d6e96f20ad5ba245f7fb9e1295b14fa179e29 glue-1.0.12-rc1 +-d05229decc34d66c4752536dc7c9d812d1e6d5ca glue-1.0.12 diff --git a/debian/patches/0004-Remove-.hgignore-from-source.patch b/debian/patches/0004-Remove-.hgignore-from-source.patch new file mode 100644 index 0000000..86bb299 --- /dev/null +++ b/debian/patches/0004-Remove-.hgignore-from-source.patch @@ -0,0 +1,111 @@ +From: Richard B Winters <rik@mmogp.com> +Date: Tue, 21 Apr 2015 20:41:22 -0400 +Subject: Remove .hgignore from source + +The .hgignore file should not be packed with the release tarball + +Change-Id: If417384794d46c97d0bbc46231c76f19d2debb1b +Signed-off-by: Richard B Winters <rik@mmogp.com> +--- + .hgignore | 92 --------------------------------------------------------------- + 1 file changed, 92 deletions(-) + delete mode 100644 .hgignore + +diff --git a/.hgignore b/.hgignore +deleted file mode 100644 +index 8ce7ca5..0000000 +--- a/.hgignore ++++ /dev/null +@@ -1,92 +0,0 @@ +-syntax: glob +- +-# Autofoo entries +-*.o +-*.la +-*.lo +-*.loT +-*.pyc +-.libs +-.deps +-*.cache +-.cvsignore +-compile +-configure +-configure.status +-configure.lineno +-depcomp +-aclocal.m4 +-libtool +-ltmain.sh +-ltconfig +-libltdl +-mkinstalldirs +-install-sh +-missing +-py-compile +-autom4te* +-libtool.m4 +-ltdl.m4 +-libltdl.tar +-autoconf +-autoheader +-automake +-include/glue_config.h +-include/stamp-h1 +-include/pils/plugin.h +-include/stamp-h2 +-ylwrap +- +-# BEAM Entries +-*.beam +-parser-messages +-MISC_ERRORS +-cscope.files +-cscope.out +-patches +-updates +-logs +- +-# OS and Editor Artifacts +-.DS_Store +-*.diff +-*.patch +-*~ +- +-# Project build targets +-lib/clplumbing/base64_md5_test +-lib/clplumbing/ipctest +-lib/clplumbing/ipctransientclient +-lib/clplumbing/ipctransientserver +-logd/ha_logd +-logd/ha_logger +-logd/logtest +-lrm/admin/lrmadmin +-lrm/lrmd/lrmd +-lrm/test/apitest +-lrm/test/callbacktest +-lrm/test/plugintest +-lrm/test/lrmregtest +-lrm/test/lrmregtest-heartbeat +-lrm/test/lrmregtest-lsb +-lrm/test/regression.sh +-lrm/test/LRMBasicSanityCheck +-lrm/test/simple_ops +- +-# Misc +-GPATH +-GRTAGS +-GSYMS +-GTAGS +-HTML +-TAGS +-.gres.* +-*.orig +-.gdb_history +- +-# Entries better done as regexp's to avoid matching too broadly +-syntax: regexp +-^config\.* +-README$ +-Makefile$ +-Makefile.in$ diff --git a/debian/patches/0005-Remove-.hgsigs-from-source.patch b/debian/patches/0005-Remove-.hgsigs-from-source.patch new file mode 100644 index 0000000..fc9c646 --- /dev/null +++ b/debian/patches/0005-Remove-.hgsigs-from-source.patch @@ -0,0 +1,23 @@ +From: Richard B Winters <rik@mmogp.com> +Date: Tue, 21 Apr 2015 20:42:12 -0400 +Subject: Remove .hgsigs from source + +The .hgsigs file should not be packed with the release tarball. + +Change-Id: I72da4087cdb3bb321f5a5a80a5b3758cc488b79a +Signed-off-by: Richard B Winters <rik@mmogp.com> +--- + .hgsigs | 4 ---- + 1 file changed, 4 deletions(-) + delete mode 100644 .hgsigs + +diff --git a/.hgsigs b/.hgsigs +deleted file mode 100644 +index ddb9f3d..0000000 +--- a/.hgsigs ++++ /dev/null +@@ -1,4 +0,0 @@ +-b6dca003bb176978af803eeb33019b6aef3c58b0 0 iEYEABECAAYFAktnGJAACgkQWnQN9wr0w1ywBACghXYwYkv/70Xg5AQMzVjRWKZecIoAnjRUytRoYl+dhhqbhfdXSD+/Bfvw +-6007185b487e3f2dc3b24674a9105761b2cde6ea 0 iEYEABECAAYFAktoWfsACgkQWnQN9wr0w1ySZwCfQILyC2VJrCnVEU2zvTIyI7ustDAAn37hhb9JM8JQVKLfPEbqIloz1m3m +-979c4ffae287976631a30d10258903aea6fb28fa 0 iEYEABECAAYFAktoY38ACgkQWnQN9wr0w1wHxgCeMZyOt8ccxmIsvIHg4/y6KmqtTVAAn2jn7dOmFMjA8m4ju59YaQ1Bznhb +-798645ead29e20b361af883fce695b85caf3392b 0 iEYEABECAAYFAlPJCM4ACgkQWnQN9wr0w1wv+QCeJQOjaYNXNJZA61n7Fu8f63CeVBEAnja4WqiYC+TS4HvmRJz6oNi6p48u diff --git a/debian/patches/0019-Current-Pacemaker-does-not-use-ha_logd.patch b/debian/patches/0019-Current-Pacemaker-does-not-use-ha_logd.patch new file mode 100644 index 0000000..ff4a845 --- /dev/null +++ b/debian/patches/0019-Current-Pacemaker-does-not-use-ha_logd.patch @@ -0,0 +1,21 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Wed, 20 Jan 2021 12:06:03 +0100 +Subject: Current Pacemaker does not use ha_logd + +--- + logd/logd.service.in | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/logd/logd.service.in b/logd/logd.service.in +index c321d22..506da3d 100644 +--- a/logd/logd.service.in ++++ b/logd/logd.service.in +@@ -1,8 +1,6 @@ + [Unit] + Description=ha_logd logging daemon + Documentation=man:ha_logd(8) +-Before=pacemaker.service +-PartOf=pacemaker.service + + [Service] + ExecStart=@libdir@/@HB_PKG@/ha_logd -c @sysconfdir@/logd.cf diff --git a/debian/patches/0020-Fix-typo-bounary-boundary.patch b/debian/patches/0020-Fix-typo-bounary-boundary.patch new file mode 100644 index 0000000..ae72df0 --- /dev/null +++ b/debian/patches/0020-Fix-typo-bounary-boundary.patch @@ -0,0 +1,21 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Wed, 20 Jan 2021 12:24:02 +0100 +Subject: Fix typo: bounary -> boundary + +--- + lib/clplumbing/cl_msg_types.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/clplumbing/cl_msg_types.c b/lib/clplumbing/cl_msg_types.c +index f13c61d..3786f1e 100644 +--- a/lib/clplumbing/cl_msg_types.c ++++ b/lib/clplumbing/cl_msg_types.c +@@ -1128,7 +1128,7 @@ binary2string(char* buf, char* maxp, void* value, size_t len, int depth) + baselen = B64_stringlen(len) + 1; + + if ( buf + baselen > maxp){ +- cl_log(LOG_ERR, "binary2string: out of bounary"); ++ cl_log(LOG_ERR, "binary2string: out of boundary"); + return -1; + } + diff --git a/debian/patches/asciidoctor.patch b/debian/patches/asciidoctor.patch new file mode 100644 index 0000000..122f850 --- /dev/null +++ b/debian/patches/asciidoctor.patch @@ -0,0 +1,45 @@ +Description: Replace deprecated asciidoc with asciidoctor +Author: Valentin Vidic <vvidic@debian.org> +Last-Update: 2018-10-12 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -42,12 +42,18 @@ + XSLTPROC_HTML_OPTIONS ?= $(XSLTPROC_OPTIONS) + XSLTPROC_FO_OPTIONS ?= $(XSLTPROC_OPTIONS) + ++if IS_A2X ++MANPAGE_GENERATOR = $(A2X) -f manpage ++else ++MANPAGE_GENERATOR = $(ASCIIDOCTOR) -b manpage ++endif ++ + %.5 %.8 %.1: %.xml + $(XSLTPROC) \ + $(XSLTPROC_MANPAGES_OPTIONS) \ + $(MANPAGES_STYLESHEET) $< + + hb_report.8: hb_report.8.txt +- a2x -f manpage $< ++ $(MANPAGE_GENERATOR) $< + + endif +--- a/configure.ac ++++ b/configure.ac +@@ -526,9 +526,12 @@ + if test "x$XSLTPROC" = "x"; then + AC_MSG_WARN([xsltproc not installed, unable to (re-)build manual pages]) + fi +- AC_PATH_PROGS(ASCIIDOC, asciidoc) +- if test "x$ASCIIDOC" = "x"; then +- AC_MSG_WARN([asciidoc not installed, unable to (re-)build manual pages]) ++ ++ AC_PATH_PROGS(A2X, a2x) ++ AC_PATH_PROGS(ASCIIDOCTOR, asciidoctor) ++ AM_CONDITIONAL(IS_A2X, test x"${A2X}" != x"") ++ if test "x$A2X" = "x" && test "x$ASCIIDOCTOR" = "x"; then ++ AC_MSG_WARN([asciidoc(tor) not installed, unable to (re-)build manual pages]) + fi + fi + AM_CONDITIONAL(BUILD_DOC, test "x$XSLTPROC" != "x" ) diff --git a/debian/patches/file_paths.patch b/debian/patches/file_paths.patch new file mode 100644 index 0000000..beb9dcf --- /dev/null +++ b/debian/patches/file_paths.patch @@ -0,0 +1,26 @@ +Description: Adjust file paths for Debian + Fix --with-rundir option for configure +Author: Valentin Vidic <vvidic@debian.org> +Last-Update: 2019-01-21 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/configure.ac ++++ b/configure.ac +@@ -382,7 +382,6 @@ + AC_DEFINE_UNQUOTED(GLUE_DAEMON_DIR,"$GLUE_DAEMON_DIR", Location for daemons) + AC_SUBST(GLUE_DAEMON_DIR) + +-GLUE_STATE_DIR=${localstatedir}/run + AC_DEFINE_UNQUOTED(GLUE_STATE_DIR,"$GLUE_STATE_DIR", Where to keep state files and sockets) + AC_SUBST(GLUE_STATE_DIR) + +@@ -390,7 +389,8 @@ + AC_DEFINE_UNQUOTED(GLUE_SHARED_DIR,"$GLUE_SHARED_DIR", Location for scripts) + AC_SUBST(GLUE_SHARED_DIR) + +-AC_DEFINE_UNQUOTED(HA_VARRUNDIR,"$GLUE_STATE_DIR", Where Heartbeat keeps state files and sockets - old name) ++HA_VARRUNDIR="$GLUE_STATE_DIR" ++AC_DEFINE_UNQUOTED(HA_VARRUNDIR,"$HA_VARRUNDIR", Where Heartbeat keeps state files and sockets - old name) + AC_SUBST(HA_VARRUNDIR) + + HA_VARLIBHBDIR=${localstatedir}/lib/heartbeat diff --git a/debian/patches/fix-configure-libxml2.patch b/debian/patches/fix-configure-libxml2.patch new file mode 100644 index 0000000..1d52c75 --- /dev/null +++ b/debian/patches/fix-configure-libxml2.patch @@ -0,0 +1,37 @@ +Description: Use pkgconfig to configure libxml-2.0 + xml2-config to be removed from Debian packaging +Author: Valentin Vidic <vvidic@debian.org> +Last-Update: 2020-02-15 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/configure.ac ++++ b/configure.ac +@@ -516,7 +516,6 @@ + AC_PATH_PROGS(MAILCMD, mailx mail) + AC_PATH_PROGS(EGREP, egrep) + AC_PATH_PROGS(PKGCONFIG, pkg-config) +-AC_PATH_PROGS(XML2CONFIG, xml2-config) + + AC_ARG_ENABLE([doc], + AS_HELP_STRING([--enable-doc], [build documentation (default is yes)]), +@@ -726,16 +725,11 @@ + dnl AC_CHECK_HEADERS(netinet/ip_icmp.h) + + AC_MSG_CHECKING(for special libxml2 includes) +-if test "x$XML2CONFIG" = "x"; then +- AC_MSG_ERROR(libxml2 config not found) +-else +- XML2HEAD="`$XML2CONFIG --cflags`" +- AC_MSG_RESULT($XML2HEAD) +- AC_CHECK_LIB(xml2, xmlReadMemory) +-fi +- +-CPPFLAGS="$CPPFLAGS $XML2HEAD" ++PKG_CHECK_MODULES(XML, [libxml-2.0]) ++CPPFLAGS="$CPPFLAGS $XML_CFLAGS" ++LIBS="$LIBS $XML_LIBS" + ++AC_CHECK_LIB(xml2, xmlReadMemory) + AC_CHECK_HEADERS(libxml/xpath.h) + if test "$ac_cv_header_libxml_xpath_h" != "yes"; then + AC_MSG_ERROR(The libxml developement headers were not found) diff --git a/debian/patches/ha_logger_man.patch b/debian/patches/ha_logger_man.patch new file mode 100644 index 0000000..71f4f0d --- /dev/null +++ b/debian/patches/ha_logger_man.patch @@ -0,0 +1,28 @@ +Description: Move ha_logger manpage to section 8 + Fixes lintian warning for /usr/sbin binaries. +Author: Valentin Vidic <vvidic@debian.org> +Last-Update: 2019-07-11 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -28,7 +28,7 @@ + man_MANS = + + if BUILD_DOC +-man_MANS += hb_report.8 ha_logd.8 ha_logger.1 stonith.8 meatclient.8 ++man_MANS += hb_report.8 ha_logd.8 ha_logger.8 stonith.8 meatclient.8 + + EXTRA_DIST = $(man_MANS) + +--- a/doc/ha_logger.xml.in ++++ b/doc/ha_logger.xml.in +@@ -34,7 +34,7 @@ + </refentryinfo> + <refmeta> + <refentrytitle>ha_logger</refentrytitle> +- <manvolnum>1</manvolnum> ++ <manvolnum>8</manvolnum> + <refmiscinfo class="manual">User commands</refmiscinfo> + </refmeta> + <refnamediv> diff --git a/debian/patches/hurd.diff b/debian/patches/hurd.diff new file mode 100644 index 0000000..46207b9 --- /dev/null +++ b/debian/patches/hurd.diff @@ -0,0 +1,43 @@ +Description: Fix build on hurd #650820 +Author: Gabriele Giacone <1o5g4r8o@gmail.com> +Last-Update: 2012-07-24 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/clplumbing/cl_pidfile.c ++++ b/lib/clplumbing/cl_pidfile.c +@@ -79,7 +79,11 @@ static int IsRunning(long pid) + int rc = 0; + long mypid; + int running = 0; ++#ifdef __GNU__ ++ char proc_path[4096], exe_path[4096], myexe_path[4096]; ++#else + char proc_path[PATH_MAX], exe_path[PATH_MAX], myexe_path[PATH_MAX]; ++#endif + + /* check if pid is running */ + if (CL_KILL(pid, 0) < 0 && errno == ESRCH) { +@@ -93,7 +97,11 @@ static int IsRunning(long pid) + /* check to make sure pid hasn't been reused by another process */ + snprintf(proc_path, sizeof(proc_path), "/proc/%lu/exe", pid); + ++#ifdef __GNU__ ++ rc = readlink(proc_path, exe_path, sizeof(exe_path)-1); ++#else + rc = readlink(proc_path, exe_path, PATH_MAX-1); ++#endif + if(rc < 0) { + cl_perror("Could not read from %s", proc_path); + goto bail; +@@ -103,7 +111,11 @@ static int IsRunning(long pid) + mypid = (unsigned long) getpid(); + + snprintf(proc_path, sizeof(proc_path), "/proc/%lu/exe", mypid); ++#ifdef __GNU__ ++ rc = readlink(proc_path, myexe_path, sizeof(myexe_path)-1); ++#else + rc = readlink(proc_path, myexe_path, PATH_MAX-1); ++#endif + if(rc < 0) { + cl_perror("Could not read from %s", proc_path); + goto bail; diff --git a/debian/patches/ipc_param_type b/debian/patches/ipc_param_type new file mode 100644 index 0000000..8030599 --- /dev/null +++ b/debian/patches/ipc_param_type @@ -0,0 +1,48 @@ +commit eeacbaac57b033682fb6249435b3db22c3445eb1 +Author: Dejan Muhamedagic <dejan@hello-penguin.com> +Date: Mon Jan 2 12:53:18 2017 +0100 + + Low: ipc: fix poll function parameter type + +--- a/include/clplumbing/ipc.h ++++ b/include/clplumbing/ipc.h +@@ -700,7 +700,7 @@ + /* Destroys an object constructed by ipc_set_auth or ipc_str_to_auth() */ + extern void ipc_destroy_auth(IPC_Auth * auth); + +-extern void ipc_set_pollfunc(int (*)(struct pollfd*, unsigned int, int)); ++extern void ipc_set_pollfunc(int (*)(struct pollfd*, nfds_t, int)); + extern void ipc_bufpool_dump_stats(void); + + #ifdef IPC_TIME_DEBUG +--- a/lib/clplumbing/ipctest.c ++++ b/lib/clplumbing/ipctest.c +@@ -53,8 +53,8 @@ + static int checksock(IPC_Channel* channel); + static void checkifblocked(IPC_Channel* channel); + +-static int (*PollFunc)(struct pollfd * fds, unsigned int, int) +-= (int (*)(struct pollfd * fds, unsigned int, int)) poll; ++static int (*PollFunc)(struct pollfd * fds, nfds_t, int) ++= (int (*)(struct pollfd * fds, nfds_t, int)) poll; + static gboolean checkmsg(IPC_Message* rmsg, const char * who, int rcount); + + static const char *procname; +--- a/lib/clplumbing/ocf_ipc.c ++++ b/lib/clplumbing/ocf_ipc.c +@@ -47,12 +47,12 @@ + struct IPC_WAIT_CONNECTION * socket_wait_conn_new(GHashTable* ch_attrs); + struct IPC_CHANNEL * socket_client_channel_new(GHashTable* ch_attrs); + +-int (*ipc_pollfunc_ptr)(struct pollfd*, unsigned int, int) +-= (int (*)(struct pollfd*, unsigned int, int)) poll; ++int (*ipc_pollfunc_ptr)(struct pollfd*, nfds_t, int) ++= (int (*)(struct pollfd*, nfds_t, int)) poll; + + /* Set the IPC poll function to the given function */ + void +-ipc_set_pollfunc(int (*pf)(struct pollfd*, unsigned int, int)) ++ipc_set_pollfunc(int (*pf)(struct pollfd*, nfds_t, int)) + { + ipc_pollfunc_ptr = pf; + } diff --git a/debian/patches/kfbsd.diff b/debian/patches/kfbsd.diff new file mode 100644 index 0000000..fbb78b9 --- /dev/null +++ b/debian/patches/kfbsd.diff @@ -0,0 +1,16 @@ +Description: Fix build on FreeBSD #650820 +Author: Gabriele Giacone <1o5g4r8o@gmail.com> +Last-Update: 2012-07-24 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/clplumbing/ipcsocket.c ++++ b/lib/clplumbing/ipcsocket.c +@@ -2406,7 +2406,7 @@ socket_verify_auth(struct IPC_CHANNEL* c + + #define EXTRASPACE 0 + +-#ifdef HAVE_STRUCT_CMSGCRED ++#if defined(HAVE_STRUCT_CMSGCRED) || defined( __FreeBSD_kernel__) || defined(__GNU__) + /* FreeBSD */ + typedef struct cmsgcred Cred; + # define crRuid cmcred_uid diff --git a/debian/patches/openipmi-selector.patch b/debian/patches/openipmi-selector.patch new file mode 100644 index 0000000..d9ad24d --- /dev/null +++ b/debian/patches/openipmi-selector.patch @@ -0,0 +1,59 @@ +Description: Fix FTBFS with openipmi 2.0.25 + selector_t deprecated in new openipmi version +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Last-Update: 2018-05-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/plugins/stonith/ipmi_os_handler.c ++++ b/lib/plugins/stonith/ipmi_os_handler.c +@@ -34,7 +34,7 @@ + + #include <time.h> + +-extern selector_t *os_sel; ++extern struct selector_s *os_sel; + + #if 0 + static void check_no_locks(os_handler_t *handler); +@@ -107,7 +107,7 @@ + }; + + static void +-timer_handler(selector_t *sel, ++timer_handler(struct selector_s *sel, + sel_timer_t *timer, + void *data) + { +--- a/lib/plugins/stonith/ipmilan_command.c ++++ b/lib/plugins/stonith/ipmilan_command.c +@@ -49,7 +49,7 @@ + #define OPERATION_TIME_OUT 10 + + os_handler_t *os_hnd=NULL; +-selector_t *os_sel; ++struct selector_s *os_sel; + static ipmi_con_t *con; + extern os_handler_t ipmi_os_cb_handlers; + static int reset_method; +@@ -84,10 +84,10 @@ + + void send_ipmi_cmd(ipmi_con_t *con, int request); + +-void timed_out(selector_t *sel, sel_timer_t *timer, void *data); ++void timed_out(struct selector_s *sel, sel_timer_t *timer, void *data); + + void +-timed_out(selector_t *sel, sel_timer_t *timer, void *data) ++timed_out(struct selector_s *sel, sel_timer_t *timer, void *data) + { + PILCallLog(PluginImports->log,PIL_CRIT, "IPMI operation timed out... :(\n"); + gstatus = S_TIMEOUT; +@@ -280,7 +280,7 @@ + return 1; + } + +- rv = sel_alloc_selector(os_hnd, &os_sel); ++ rv = sel_alloc_selector_nothread(&os_sel); + if (rv) { + PILCallLog(PluginImports->log,PIL_CRIT, "Could not allocate selector\n"); + return rv; diff --git a/debian/patches/perl-interpreter.patch b/debian/patches/perl-interpreter.patch new file mode 100644 index 0000000..676a48e --- /dev/null +++ b/debian/patches/perl-interpreter.patch @@ -0,0 +1,15 @@ +Description: Fix interpreter for perl scripts + Policy 10.4 states that Perl scripts must use + /usr/bin/perl directly and not via /usr/bin/env +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Last-Update: 2018-08-17 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/plugins/stonith/external/vcenter ++++ b/lib/plugins/stonith/external/vcenter +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # + # External STONITH module for VMWare vCenter/ESX + # diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch new file mode 100644 index 0000000..73410d5 --- /dev/null +++ b/debian/patches/python3.patch @@ -0,0 +1,406 @@ +Description: Convert scripts to python3 +Author: Valentin Vidic <vvidic@debian.org> +Last-Update: 2019-06-26 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/plugins/stonith/external/dracmc-telnet ++++ b/lib/plugins/stonith/external/dracmc-telnet +@@ -75,7 +75,7 @@ + + def _get_timestamp(self): + ct = time.time() +- msecs = (ct - long(ct)) * 1000 ++ msecs = (ct - int(ct)) * 1000 + return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S", + time.localtime(ct)), msecs) + +@@ -93,48 +93,48 @@ + def login(self, user, passwd): + time.sleep(0.3) + try: +- line = self.read_until('Login: ', self._timeout) +- self.write(user) +- self.write('\r') +- line = self.read_until('Password: ', self._timeout) +- self.write(passwd) +- self.write('\r') ++ line = self.read_until(b'Login: ', self._timeout) ++ self.write(user.encode("utf-8")) ++ self.write(b'\r') ++ line = self.read_until(b'Password: ', self._timeout) ++ self.write(passwd.encode("utf-8")) ++ self.write(b'\r') + except: +- self.write("\r") +- line = self.read_until('Login: ', self._timeout) +- self.write(user) +- self.write('\r') +- line = self.read_until('Password: ', self._timeout) +- self.write(passwd) +- self.write('\r') ++ self.write(b"\r") ++ line = self.read_until(b'Login: ', self._timeout) ++ self.write(user.encode("utf-8")) ++ self.write(b'\r') ++ line = self.read_until(b'Password: ', self._timeout) ++ self.write(passwd.encode("utf-8")) ++ self.write('b\r') + try: +- line = self.read_until('DRAC/MC:', self._timeout) ++ line = self.read_until(b'DRAC/MC:', self._timeout) + except: +- self.write("\r") +- line = self.read_until('DRAC/MC:', self._timeout) ++ self.write(b"\r") ++ line = self.read_until(b'DRAC/MC:', self._timeout) + + def hardreset(self): +- self.write('serveraction -s %s hardreset\r' % self._server) +- line = self.read_until('OK', 10) +- line = self.read_until('DRAC/MC:', self._timeout) ++ self.write(b'serveraction -s %b hardreset\r' % self._server.encode("utf-8")) ++ line = self.read_until(b'OK', 10) ++ line = self.read_until(b'DRAC/MC:', self._timeout) + + def powercycle(self): +- self.write('serveraction -s %s powercycle\r' % self._server) +- line = self.read_until('OK', 10) +- line = self.read_until('DRAC/MC:', self._timeout) ++ self.write(b'serveraction -s %b powercycle\r' % self._server.encode("utf-8")) ++ line = self.read_until(b'OK', 10) ++ line = self.read_until(b'DRAC/MC:', self._timeout) + + def on(self): +- self.write('serveraction -s %s powerup\r' % self._server) +- line = self.read_until('OK', 10) +- line = self.read_until('DRAC/MC:', self._timeout) ++ self.write(b'serveraction -s %b powerup\r' % self._server.encode("utf-8")) ++ line = self.read_until(b'OK', 10) ++ line = self.read_until(b'DRAC/MC:', self._timeout) + + def off(self): +- self.write('serveraction -s %s powerdown\r' % self._server) +- line = self.read_until('OK', 10) +- line = self.read_until('DRAC/MC:', self._timeout) ++ self.write(b'serveraction -s %b powerdown\r' % self._server.encode("utf-8")) ++ line = self.read_until(b'OK', 10) ++ line = self.read_until(b'DRAC/MC:', self._timeout) + + def exit(self): +- self.write('exit\r') ++ self.write(b'exit\r') + + def get_history(self): + return "\n".join(self._history) +@@ -171,7 +171,7 @@ + + def _get_timestamp(self): + ct = time.time() +- msecs = (ct - long(ct)) * 1000 ++ msecs = (ct - int(ct)) * 1000 + return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S", + time.localtime(ct)), msecs) + +@@ -201,7 +201,7 @@ + self._parameters['cyclades_port']) + c.login(self._parameters['username'], + self._parameters['password']) +- except Exception, args: ++ except Exception as args: + if "Connection reset by peer" in str(args): + self._echo_debug("Someone is already logged in... retry=%s" % tries) + c.close() +@@ -363,7 +363,7 @@ + func = getattr(self, cmd, self.not_implemented) + rc = func() + return(rc) +- except Exception, args: ++ except Exception as args: + self.echo_log("err", 'Exception raised:', str(args)) + if self._connection: + self.echo_log("err", self._connection.get_history()) +--- a/lib/plugins/stonith/external/ibmrsa-telnet ++++ b/lib/plugins/stonith/external/ibmrsa-telnet +@@ -72,7 +72,7 @@ + + def _get_timestamp(self): + ct = time.time() +- msecs = (ct - long(ct)) * 1000 ++ msecs = (ct - int(ct)) * 1000 + return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S", + time.localtime(ct)), msecs) + +@@ -90,31 +90,31 @@ + + def login(self, user, passwd): + time.sleep(1) +- line = self.expect(['\nlogin : ', '\nusername: '], self._timeout) +- self.write(user) +- self.write('\r') +- line = self.expect(['\nPassword: ', '\npassword: '], self._timeout) +- self.write(passwd, nolog = True) +- self.write('\r') +- line = self.expect(['\nsystem>', '> '], self._timeout) ++ line = self.expect([b'\nlogin : ', b'\nusername: '], self._timeout) ++ self.write(user.encode("utf-8")) ++ self.write(b'\r') ++ line = self.expect([b'\nPassword: ', b'\npassword: '], self._timeout) ++ self.write(passwd.encode("utf-8"), nolog = True) ++ self.write(b'\r') ++ line = self.expect([b'\nsystem>', b'> '], self._timeout) + + def reset(self): +- self.write('power cycle\r') +- line = self.expect(['\nok'], self._timeout) +- line = self.expect(['\nsystem>', '> '], self._timeout) ++ self.write(b'power cycle\r') ++ line = self.expect([b'\nok'], self._timeout) ++ line = self.expect([b'\nsystem>', b'> '], self._timeout) + + def on(self): +- self.write('power on\r') +- line = self.expect(['\nok'], self._timeout) +- line = self.expect(['\nsystem>', '> '], self._timeout) ++ self.write(b'power on\r') ++ line = self.expect([b'\nok'], self._timeout) ++ line = self.expect([b'\nsystem>', b'> '], self._timeout) + + def off(self): +- self.write('power off\r') +- line = self.expect(['\nok'], self._timeout) +- line = self.expect(['\nsystem>', '> '], self._timeout) ++ self.write(b'power off\r') ++ line = self.expect([b'\nok'], self._timeout) ++ line = self.expect([b'\nsystem>', b'> '], self._timeout) + + def exit(self): +- self.write('exit\r') ++ self.write(b'exit\r') + + def get_history(self): + return "\n".join(self._history) +@@ -150,7 +150,7 @@ + + def _get_timestamp(self): + ct = time.time() +- msecs = (ct - long(ct)) * 1000 ++ msecs = (ct - int(ct)) * 1000 + return "%s,%03d" % (time.strftime("%Y-%m-%d %H:%M:%S", + time.localtime(ct)), msecs) + +@@ -306,7 +306,7 @@ + func = getattr(self, cmd, self.not_implemented) + rc = func() + return(rc) +- except Exception, args: ++ except Exception as args: + self.echo_log("err", 'Exception raised:', str(args)) + if self._connection: + self.echo_log("err", self._connection.get_history()) +--- a/lib/plugins/stonith/ribcl.py.in ++++ b/lib/plugins/stonith/ribcl.py.in +@@ -19,7 +19,7 @@ + + import sys + import socket +-from httplib import * ++from http.client import * + from time import sleep + + +@@ -30,30 +30,30 @@ + host = argv[1].split('.')[0]+'-rm' + cmd = argv[2] + except IndexError: +- print "Not enough arguments" ++ print("Not enough arguments") + sys.exit(1) + + +-login = [ '<RIBCL VERSION="1.2">', +- '<LOGIN USER_LOGIN="Administrator" PASSWORD="********">' ] ++login = [ b'<RIBCL VERSION="1.2">', ++ b'<LOGIN USER_LOGIN="Administrator" PASSWORD="********">' ] + + +-logout = [ '</LOGIN>', '</RIBCL>' ] ++logout = [ b'</LOGIN>', b'</RIBCL>' ] + + +-status = [ '<SERVER_INFO MODE="read">', '<GET_HOST_POWER_STATUS/>', +- '</SERVER_INFO>' ] ++status = [ b'<SERVER_INFO MODE="read">', b'<GET_HOST_POWER_STATUS/>', ++ b'</SERVER_INFO>' ] + + +-reset = [ '<SERVER_INFO MODE="write">', '<RESET_SERVER/>', '</SERVER_INFO>' ] ++reset = [ b'<SERVER_INFO MODE="write">', b'<RESET_SERVER/>', b'</SERVER_INFO>' ] + + +-off = [ '<SERVER_INFO MODE = "write">', '<SET_HOST_POWER HOST_POWER = "N"/>', +- '</SERVER_INFO>' ] ++off = [ b'<SERVER_INFO MODE = "write">', b'<SET_HOST_POWER HOST_POWER = "N"/>', ++ b'</SERVER_INFO>' ] + + +-on = [ '<SERVER_INFO MODE = "write">', '<SET_HOST_POWER HOST_POWER = "Y"/>', +- '</SERVER_INFO>' ] ++on = [ b'<SERVER_INFO MODE = "write">', b'<SET_HOST_POWER HOST_POWER = "Y"/>', ++ b'</SERVER_INFO>' ] + + + todo = { 'reset':reset, 'on':on, 'off':off, 'status':status } +@@ -67,7 +67,7 @@ + else: + acmds.append(login + todo[cmd] + logout) + except KeyError: +- print "Invalid command: "+ cmd ++ print("Invalid command: "+ cmd) + sys.exit(1) + + +@@ -76,12 +76,12 @@ + + + c=HTTPSConnection(host) +- c.send('<?xml version="1.0"?>\r\n') ++ c.send(b'<?xml version="1.0"?>\r\n') + c.sock.recv(1024) + + + for line in cmds: +- c.send(line+'\r\n') ++ c.send(line+b'\r\n') + c.sock.recv(1024) + + +@@ -89,13 +89,9 @@ + sleep(1) + + +-except socket.gaierror, msg: +- print msg ++except socket.gaierror as msg: ++ print(msg) + sys.exit(1) +-except socket.sslerror, msg: +- print msg ++except socket.error as msg: ++ print(msg) + sys.exit(1) +-except socket.error, msg: +- print msg +- sys.exit(1) +- +--- a/lib/plugins/stonith/external/riloe ++++ b/lib/plugins/stonith/external/riloe +@@ -36,7 +36,7 @@ + import socket + import subprocess + import xml.dom.minidom +-import httplib ++import http.client + import time + import re + +@@ -164,12 +164,12 @@ + } + + if cmd in info: +- print info[cmd] ++ print(info[cmd]) + sys.exit(0) + + if cmd == 'getconfignames': + for arg in [ "hostlist", "ilo_hostname", "ilo_user", "ilo_password", "ilo_can_reset", "ilo_protocol", "ilo_powerdown_method", "ilo_proxyhost", "ilo_proxyport"]: +- print arg ++ print(arg) + sys.exit(0) + + if not rihost: +@@ -258,7 +258,7 @@ + ''' + msg = "" + str_status = "" +- for attr in node.attributes.keys(): ++ for attr in list(node.attributes.keys()): + if attr == A_STATUS: + str_status = node.getAttribute(attr) + elif attr == A_MSG: +@@ -286,7 +286,7 @@ + variable correspondingly. + ''' + global power +- for attr in node.attributes.keys(): ++ for attr in list(node.attributes.keys()): + if attr == A_POWER_STATE: + power_state = node.getAttribute(attr).upper() + else: +@@ -333,25 +333,23 @@ + proxy_connect='CONNECT %s:%s HTTP/1.1\r\n'%(host,443) + user_agent='User-Agent: python\r\n' + proxy_pieces=proxy_connect+user_agent+'\r\n' +- proxy.sendall(proxy_pieces) +- response=proxy.recv(8192) ++ proxy.sendall(proxy_pieces.encode("utf-8")) ++ response=proxy.recv(8192).decode("utf-8") + status=response.split()[1] + if status!=str(200): + fatal("Error status=: %s" %(response)) + import ssl + sock = ssl.wrap_socket(proxy) +- h=httplib.HTTPConnection('localhost') ++ h=http.client.HTTPConnection('localhost') + h.sock=sock + return h + else: +- return httplib.HTTPSConnection(host) +- except socket.gaierror, msg: ++ return http.client.HTTPSConnection(host) ++ except socket.gaierror as msg: + fatal("%s: %s" %(msg,host)) +- except socket.sslerror, msg: +- fatal("%s for %s" %(msg,host)) +- except socket.error, msg: ++ except socket.error as msg: + fatal("%s while talking to %s" %(msg,host)) +- except ImportError, msg: ++ except ImportError as msg: + fatal("ssl support missing (%s)" %msg) + + def send_request(req,proc_f): +@@ -364,8 +362,8 @@ + t_begin = time.time() + c = open_ilo(rihost) + try: +- c.send(req+'\r\n') +- except socket.error, msg: ++ c.send(req.encode("utf-8") + b'\r\n') ++ except socket.error as msg: + fatal("%s, while talking to %s" %(msg,rihost)) + t_end = time.time() + my_debug("request sent in %0.2f s" % ((t_end-t_begin))) +@@ -378,7 +376,7 @@ + if not reply: + break + result.append(reply) +- except socket.error, msg: ++ except socket.error as msg: + if msg[0] == 6: # connection closed + break + my_err("%s, while talking to %s" %(msg,rihost)) +@@ -389,12 +387,13 @@ + if not result: + fatal("no response from %s within %0.2f s"%(rihost,(t_end-t_begin))) + for reply in result: ++ reply = reply.decode("utf-8") + # work around the iLO bug, i.e. element RIBCL closed twice + if re.search("</RIBCL", reply) and re.search("<RIBCL.*/>", reply): + reply = re.sub("<(RIBCL.*)/>", r"<\1>", reply) + try: + doc = xml.dom.minidom.parseString(reply) +- except xml.parsers.expat.ExpatError,msg: ++ except xml.parsers.expat.ExpatError as msg: + fatal("malformed response: %s\n%s"%(msg,reply)) + rc = proc_f(doc) + doc.unlink() diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..c8cb124 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,20 @@ +0001-libtoolize_check.patch +0002-Fix-spelling-of-output-and-improve-grammar.patch +0003-Remove-.hgtags-from-source.patch +0004-Remove-.hgignore-from-source.patch +0005-Remove-.hgsigs-from-source.patch +kfbsd.diff +hurd.diff +x32-cl_times +ipc_param_type +python3.patch +spelling.patch +systemd-doc.patch +openipmi-selector.patch +perl-interpreter.patch +asciidoctor.patch +file_paths.patch +ha_logger_man.patch +fix-configure-libxml2.patch +0019-Current-Pacemaker-does-not-use-ha_logd.patch +0020-Fix-typo-bounary-boundary.patch diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch new file mode 100644 index 0000000..f5f060f --- /dev/null +++ b/debian/patches/spelling.patch @@ -0,0 +1,80 @@ +Description: Fix spelling errors reported by lintian + Some errors like 'EVERYTIME' and 'some system' do not + need fixing. +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Last-Update: 2018-04-25 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/lib/lrm/clientlib.c ++++ b/lib/lrm/clientlib.c +@@ -197,7 +197,7 @@ + /* if already signed on, sign off first*/ + if (is_signed_on) { + cl_log(LOG_WARNING, +- "lrm_signon: the client is alreay signed on, re-sign"); ++ "lrm_signon: the client is already signed on, re-sign"); + lrm_signoff(lrm); + } + +--- a/logd/logtest.c ++++ b/logd/logtest.c +@@ -78,7 +78,7 @@ + snprintf(msgstring, sizeof(msgstring),"Message %d", count++); + fprintf(stderr, "sending %s\n", msgstring); + if (LogToDaemon(priority, msgstring,MAXMSGSIZE, FALSE) != HA_OK){ +- printf("sending out messge %d failed\n", count); ++ printf("sending out message %d failed\n", count); + dropmsg++; + } + +--- a/lrm/lrmd/lrmd.c ++++ b/lrm/lrmd/lrmd.c +@@ -1394,7 +1394,7 @@ + /*get the client in the client list*/ + client = lookup_client(pid); + if (NULL == client) { +- lrmd_log(LOG_ERR, "on_connect_cbk: donnot find the client " ++ lrmd_log(LOG_ERR, "on_connect_cbk: do not find the client " + "[pid:%d] in internal client list. ", pid); + send_ret_msg(ch, HA_FAIL); + return TRUE; +@@ -1680,7 +1680,7 @@ + cl_msg_add_list(ret,F_LRM_RCLASS,ra_class_list); + if (HA_OK != msg2ipcchan(ret, client->ch_cmd)) { + lrmd_log(LOG_ERR, +- "on_msg_get_rsc_classes: cannot send the ret mesage"); ++ "on_msg_get_rsc_classes: cannot send the ret message"); + } + ha_msg_del(ret); + +@@ -3363,7 +3363,7 @@ + } else { + lrmd_log(LOG_WARNING, "There is something wrong: the " + "first line isn't read in. Maybe heartbeat does " +- "not ouptut the string correctly for the status " ++ "not output the string correctly for the status " + "operation, or perhaps the code is wrong."); + } + } +--- a/lrm/admin/lrmadmin.c ++++ b/lrm/admin/lrmadmin.c +@@ -129,7 +129,7 @@ + "daemon dead1", + "daemon dead2", + "daemon stopped", +- "status unknow" ++ "status unknown" + }; + + +--- a/lib/clplumbing/cl_msg_types.c ++++ b/lib/clplumbing/cl_msg_types.c +@@ -1015,7 +1015,7 @@ + + } else { + cl_log(LOG_ERR, "field already exists " +- "with differnt type=%d", msg->types[j]); ++ "with different type=%d", msg->types[j]); + return (HA_FAIL); + } + diff --git a/debian/patches/systemd-doc.patch b/debian/patches/systemd-doc.patch new file mode 100644 index 0000000..f8908fa --- /dev/null +++ b/debian/patches/systemd-doc.patch @@ -0,0 +1,14 @@ +Description: Add manpage to systemd service documentation +Author: Valentin Vidic <Valentin.Vidic@CARNet.hr> +Last-Update: 2018-04-25 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/logd/logd.service.in ++++ b/logd/logd.service.in +@@ -1,5 +1,6 @@ + [Unit] + Description=ha_logd logging daemon ++Documentation=man:ha_logd(8) + Before=pacemaker.service + PartOf=pacemaker.service + diff --git a/debian/patches/x32-cl_times b/debian/patches/x32-cl_times new file mode 100644 index 0000000..798a1e8 --- /dev/null +++ b/debian/patches/x32-cl_times @@ -0,0 +1,48 @@ +Fix cl_times on x32 + +On x32, sizeof(long) is 4, and sizeof(clock_t) is 8. cl_times as logic to +reject that case. We fix this by setting the return type of the function to +long long instead on x32. + +--- a/include/clplumbing/longclock.h ++++ b/include/clplumbing/longclock.h +@@ -79,7 +79,11 @@ + * + * extern const longclock_t zero_longclock; + */ ++#if __ILP32__ && __x86_64__ ++extern unsigned long long cl_times(void); ++#else + extern unsigned long cl_times(void); ++#endif + + #ifdef CLOCK_T_IS_LONG_ENOUGH + # ifndef HAVE_LONGCLOCK_ARITHMETIC +--- a/lib/clplumbing/longclock.c ++++ b/lib/clplumbing/longclock.c +@@ -68,7 +68,11 @@ hz_longclock(void) + # define TIMES_PARAM &dummy_longclock_tms_struct + #endif + ++#if __ILP32__ && __x86_64__ ++unsigned long long ++#else + unsigned long ++#endif + cl_times(void) /* Make times(2) behave rationally on Linux */ + { + clock_t ret; +@@ -114,9 +118,13 @@ cl_times(void) /* Make times(2) behave r + * because of sign extension. + * We do expect sizeof(clock_t) <= sizeof(long), however. + */ ++#if __ILP32__ && __x86_64__ ++ return ret; ++#else + BUILD_BUG_ON(sizeof(clock_t) > sizeof(unsigned long)); + #define CLOCK_T_MAX (~0UL >> (8*(sizeof(unsigned long) - sizeof(clock_t)))) + return (unsigned long)ret & CLOCK_T_MAX; ++#endif + } + + #ifdef CLOCK_T_IS_LONG_ENOUGH |