diff options
Diffstat (limited to 'debian/patches')
10 files changed, 441 insertions, 0 deletions
diff --git a/debian/patches/Always-run-Inkscape-under-the-C.UTF-8-locale.patch b/debian/patches/Always-run-Inkscape-under-the-C.UTF-8-locale.patch new file mode 100644 index 0000000..ac8898b --- /dev/null +++ b/debian/patches/Always-run-Inkscape-under-the-C.UTF-8-locale.patch @@ -0,0 +1,21 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Wed, 18 Nov 2020 22:43:38 +0100 +Subject: Always run Inkscape under the C.UTF-8 locale + +--- + doc/sphinx/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am +index c4ade5c..6ecb9ab 100644 +--- a/doc/sphinx/Makefile.am ++++ b/doc/sphinx/Makefile.am +@@ -98,7 +98,7 @@ DEPS_Pacemaker_Remote = $(PNGS_Pacemaker_Remote) + + if BUILD_SPHINX_DOCS + +-INKSCAPE_CMD = $(INKSCAPE) --export-dpi=90 -C ++INKSCAPE_CMD = LC_ALL=C.UTF-8 $(INKSCAPE) --export-dpi=90 -C + + # Pattern rule to generate PNGs from SVGs + # (--export-png works with Inkscape <1.0, --export-filename with >=1.0; diff --git a/debian/patches/Enable-redirecting-etc-init.d-script-calls-to-system.patch b/debian/patches/Enable-redirecting-etc-init.d-script-calls-to-system.patch new file mode 100644 index 0000000..9ed53aa --- /dev/null +++ b/debian/patches/Enable-redirecting-etc-init.d-script-calls-to-system.patch @@ -0,0 +1,39 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu> +Date: Thu, 17 Dec 2015 10:12:01 +0100 +Subject: Enable redirecting /etc/init.d/$script calls to systemd + +--- + daemons/execd/pacemaker_remote.in | 4 ++++ + etc/init.d/pacemaker.in | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/daemons/execd/pacemaker_remote.in b/daemons/execd/pacemaker_remote.in +index 2096c5f..f3ba8e8 100644 +--- a/daemons/execd/pacemaker_remote.in ++++ b/daemons/execd/pacemaker_remote.in +@@ -20,6 +20,10 @@ + # Description: Manage the executor for Pacemaker Remote nodes + ### END INIT INFO + ++# The systemd package provides /lib/lsb/init-functions.d/40-systemd ++# to redirect /etc/init.d/$script calls to systemctl. (Thanks: Lintian.) ++. /lib/lsb/init-functions ++ + desc="Pacemaker Remote Executor" + prog="pacemaker-remoted" + +diff --git a/etc/init.d/pacemaker.in b/etc/init.d/pacemaker.in +index 6ed78a8..cd440dc 100644 +--- a/etc/init.d/pacemaker.in ++++ b/etc/init.d/pacemaker.in +@@ -21,6 +21,10 @@ + # Description: Starts and stops Pacemaker Cluster Manager. + ### END INIT INFO + ++# The systemd package provides /lib/lsb/init-functions.d/40-systemd ++# to redirect /etc/init.d/$script calls to systemctl. (Thanks: Lintian.) ++. /lib/lsb/init-functions ++ + desc="Pacemaker Cluster Manager" + prog="pacemakerd" + diff --git a/debian/patches/Enable-the-init-scripts-on-multi-user-runlevels.patch b/debian/patches/Enable-the-init-scripts-on-multi-user-runlevels.patch new file mode 100644 index 0000000..ac4036a --- /dev/null +++ b/debian/patches/Enable-the-init-scripts-on-multi-user-runlevels.patch @@ -0,0 +1,42 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu> +Date: Sun, 28 Feb 2016 17:56:16 +0100 +Subject: Enable the init scripts on multi-user runlevels + +Upstream does not find this a good idea (see 5b5acab vs fc11a46 and also +https://github.com/ClusterLabs/pacemaker/pull/656), but Debian runs +installed daemons by default. +--- + daemons/execd/pacemaker_remote.in | 4 ++-- + etc/init.d/pacemaker.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/daemons/execd/pacemaker_remote.in b/daemons/execd/pacemaker_remote.in +index f3ba8e8..1e3931f 100644 +--- a/daemons/execd/pacemaker_remote.in ++++ b/daemons/execd/pacemaker_remote.in +@@ -14,8 +14,8 @@ + # Required-Start: $network $remote_fs + # Should-Start: $syslog + # Required-Stop: $network $remote_fs +-# Default-Start: +-# Default-Stop: ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: Manage the executor for Pacemaker Remote nodes + # Description: Manage the executor for Pacemaker Remote nodes + ### END INIT INFO +diff --git a/etc/init.d/pacemaker.in b/etc/init.d/pacemaker.in +index cd440dc..aeefad6 100644 +--- a/etc/init.d/pacemaker.in ++++ b/etc/init.d/pacemaker.in +@@ -15,8 +15,8 @@ + # Required-Start: $network $remote_fs corosync + # Should-Start: $syslog + # Required-Stop: $network $remote_fs corosync +-# Default-Start: +-# Default-Stop: ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 + # Short-Description: Starts and stops Pacemaker Cluster Manager. + # Description: Starts and stops Pacemaker Cluster Manager. + ### END INIT INFO diff --git a/debian/patches/Fix-typos-resouce-resource.patch b/debian/patches/Fix-typos-resouce-resource.patch new file mode 100644 index 0000000..d0e85a5 --- /dev/null +++ b/debian/patches/Fix-typos-resouce-resource.patch @@ -0,0 +1,58 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Sun, 3 Jul 2022 16:02:03 +0200 +Subject: Fix typos: resouce -> resource + +--- + cts/cts-exec.in | 2 +- + cts/lab/CTStests.py | 2 +- + lib/pacemaker/pcmk_sched_primitive.c | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cts/cts-exec.in b/cts/cts-exec.in +index a89eb0e..be19d07 100644 +--- a/cts/cts-exec.in ++++ b/cts/cts-exec.in +@@ -431,7 +431,7 @@ class ExecTests(Tests): + + + def build_multi_rsc_tests(self): +- """ Register complex tests that involve managing multiple resouces of different types """ ++ """ Register complex tests that involve managing multiple resources of different types """ + + common_cmds = self._common_cmds + # do not use service and systemd at the same time, it is the same resource. +diff --git a/cts/lab/CTStests.py b/cts/lab/CTStests.py +index 61766ce..00fe2d9 100644 +--- a/cts/lab/CTStests.py ++++ b/cts/lab/CTStests.py +@@ -743,7 +743,7 @@ class StandbyTest(CTSTest): + # set the node to standby mode + # check resources, none resource should be running on the node + # set the node to active mode +- # check resouces, resources should have been migrated back (SHOULD THEY?) ++ # check resources, resources should have been migrated back (SHOULD THEY?) + + def __call__(self, node): + +diff --git a/lib/pacemaker/pcmk_sched_primitive.c b/lib/pacemaker/pcmk_sched_primitive.c +index aefbf9a..d612b22 100644 +--- a/lib/pacemaker/pcmk_sched_primitive.c ++++ b/lib/pacemaker/pcmk_sched_primitive.c +@@ -1250,7 +1250,7 @@ start_resource(pe_resource_t *rsc, pe_node_t *node, bool optional) + * reasons later. + */ + pe_rsc_trace(rsc, +- "Start of multiply active resouce %s " ++ "Start of multiply active resource %s " + "on expected node %s will be a pseudo-action", + rsc->id, pe__node_name(node)); + pe__set_action_flags(start, pe_action_pseudo); +@@ -1297,7 +1297,7 @@ promote_resource(pe_resource_t *rsc, pe_node_t *node, bool optional) + * other reasons later. + */ + pe_rsc_trace(rsc, +- "Promotion of multiply active resouce %s " ++ "Promotion of multiply active resource %s " + "on expected node %s will be a pseudo-action", + rsc->id, pe__node_name(node)); + pe__set_action_flags(promote, pe_action_pseudo); diff --git a/debian/patches/Make-the-asciidoc-documentation-reproducible.patch b/debian/patches/Make-the-asciidoc-documentation-reproducible.patch new file mode 100644 index 0000000..5434e8b --- /dev/null +++ b/debian/patches/Make-the-asciidoc-documentation-reproducible.patch @@ -0,0 +1,21 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu> +Date: Fri, 4 Mar 2016 10:34:10 +0100 +Subject: Make the asciidoc documentation reproducible + +--- + doc/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 1400145..b6c254c 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -42,7 +42,7 @@ RSYNC_DEST ?= root@www.clusterlabs.org:/var/www/html + RSYNC_OPTS = -rlptvzxS --progress + + if IS_ASCIIDOC +-ASCIIDOC_HTML_ARGS = --unsafe --backend=xhtml11 ++ASCIIDOC_HTML_ARGS = --unsafe --backend=xhtml11 --attribute footer-style=none + ASCIIDOC_DBOOK_ARGS = -b docbook -d book + else + ASCIIDOC_HTML_ARGS = --backend=html5 diff --git a/debian/patches/Remove-references-to-the-build-directory.patch b/debian/patches/Remove-references-to-the-build-directory.patch new file mode 100644 index 0000000..10315b0 --- /dev/null +++ b/debian/patches/Remove-references-to-the-build-directory.patch @@ -0,0 +1,83 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Tue, 4 Jul 2023 00:03:04 +0200 +Subject: Remove references to the build directory + +These break reproducibility. Running programs from the source +directory can be solved by setting environment variables. +--- + agents/stonith/fence_legacy.in | 9 --------- + mk/man.mk | 12 +++++++----- + python/pacemaker/buildoptions.py.in | 6 ------ + 3 files changed, 7 insertions(+), 20 deletions(-) + +diff --git a/agents/stonith/fence_legacy.in b/agents/stonith/fence_legacy.in +index c0eeca1..7583986 100755 +--- a/agents/stonith/fence_legacy.in ++++ b/agents/stonith/fence_legacy.in +@@ -8,15 +8,6 @@ import sys + import argparse + import subprocess + +-# These imports allow running from a source checkout after running `make`. +-# Note that while this doesn't necessarily mean it will successfully run tests, +-# but being able to see --help output can be useful. +-if os.path.exists("@abs_top_srcdir@/python"): +- sys.path.insert(0, "@abs_top_srcdir@/python") +- +-if os.path.exists("@abs_top_builddir@/python") and "@abs_top_builddir@" != "@abs_top_srcdir@": +- sys.path.insert(0, "@abs_top_builddir@/python") +- + from pacemaker.exitstatus import ExitStatus + + VERSION = "1.1.0" +diff --git a/mk/man.mk b/mk/man.mk +index 51dd1e6..ccd8730 100644 +--- a/mk/man.mk ++++ b/mk/man.mk +@@ -31,22 +31,24 @@ HELP2MAN_ARGS = -N --section 8 --name "Part of the Pacemaker cluster resource ma + # + # @TODO Drop MAN8DEPS once we've moved all tool functionality to libpacemaker, + # and all wrappers are converted from shell scripts to C code. ++%.8: export PATH := $(abs_builddir):$(PATH) ++%.8: export PYTHONPATH := $(abs_top_builddir)/python + %.8: % $(MAN8DEPS) + $(AM_V_at)chmod a+x $(abs_builddir)/$< +- PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --version >/dev/null ++ $(abs_builddir)/$< --version >/dev/null + if [ -f $(abs_srcdir)/$@.inc ]; then \ +- PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --help-all >/dev/null; \ ++ $(abs_builddir)/$< --help-all >/dev/null; \ + else \ +- PATH=$(abs_builddir):$$PATH $(abs_builddir)/$< --help >/dev/null; \ ++ $(abs_builddir)/$< --help >/dev/null; \ + fi + $(AM_V_MAN)if [ -f $(abs_srcdir)/$@.inc ]; then \ +- PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) \ ++ $(HELP2MAN) $(HELP2MAN_ARGS) \ + -h --help-all \ + --no-discard-stderr \ + -i $(abs_srcdir)/$@.inc $(abs_builddir)/$< \ + | sed -f $(top_srcdir)/tools/fix-manpages > $@ ; \ + else \ +- PATH=$(abs_builddir):$$PATH $(HELP2MAN) $(HELP2MAN_ARGS) \ ++ $(HELP2MAN) $(HELP2MAN_ARGS) \ + --no-discard-stderr \ + $(abs_builddir)/$< --output $@ ; \ + fi +diff --git a/python/pacemaker/buildoptions.py.in b/python/pacemaker/buildoptions.py.in +index 53b492b..34da8de 100644 +--- a/python/pacemaker/buildoptions.py.in ++++ b/python/pacemaker/buildoptions.py.in +@@ -13,12 +13,6 @@ class BuildOptions: + BASH_PATH = "@BASH_PATH@" + """ Path to the bash shell """ + +- _BUILD_DIR = "@abs_top_builddir@" +- """ Top-level build directory +- NOTE: This is not especially useful on installed systems, but is useful for +- running various programs from a source checkout +- """ +- + CIB_DIR = "@CRM_CONFIG_DIR@" + """ Where CIB files are stored """ + diff --git a/debian/patches/alerts-make-the-scripts-executable.patch b/debian/patches/alerts-make-the-scripts-executable.patch new file mode 100644 index 0000000..89f62cf --- /dev/null +++ b/debian/patches/alerts-make-the-scripts-executable.patch @@ -0,0 +1,24 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu> +Date: Sun, 12 Jun 2016 11:30:07 +0200 +Subject: alerts: make the scripts executable +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +Signed-off-by: Ferenc Wágner <wferi@niif.hu> +--- + agents/alerts/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agents/alerts/Makefile.am b/agents/alerts/Makefile.am +index fdb294f..b8cc756 100644 +--- a/agents/alerts/Makefile.am ++++ b/agents/alerts/Makefile.am +@@ -10,6 +10,6 @@ + include $(top_srcdir)/mk/common.mk + + samplesdir = $(datadir)/$(PACKAGE)/alerts/ +-dist_samples_DATA = alert_file.sh.sample \ ++dist_samples_SCRIPTS = alert_file.sh.sample \ + alert_smtp.sh.sample \ + alert_snmp.sh.sample diff --git a/debian/patches/cts-do-not-capture-the-build-directory.patch b/debian/patches/cts-do-not-capture-the-build-directory.patch new file mode 100644 index 0000000..b6d641e --- /dev/null +++ b/debian/patches/cts-do-not-capture-the-build-directory.patch @@ -0,0 +1,113 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Thu, 28 Sep 2023 08:44:56 +0200 +Subject: cts: do not capture the build directory + +--- + cts/cts-attrd.in | 10 ---------- + cts/cts-exec.in | 9 --------- + cts/cts-fencing.in | 9 --------- + cts/cts-regression.in | 9 --------- + cts/cts-scheduler.in | 9 --------- + 5 files changed, 46 deletions(-) + +diff --git a/cts/cts-attrd.in b/cts/cts-attrd.in +index b7ad538..89e476f 100644 +--- a/cts/cts-attrd.in ++++ b/cts/cts-attrd.in +@@ -17,16 +17,6 @@ import subprocess + import sys + import tempfile + +-# These imports allow running from a source checkout after running `make`. +-# Note that while this doesn't necessarily mean it will successfully run tests, +-# but being able to see --help output can be useful. +-if os.path.exists("@abs_top_srcdir@/python"): +- sys.path.insert(0, "@abs_top_srcdir@/python") +- +-# pylint: disable=comparison-of-constants,comparison-with-itself,condition-evals-to-constant +-if os.path.exists("@abs_top_builddir@/python") and "@abs_top_builddir@" != "@abs_top_srcdir@": +- sys.path.insert(0, "@abs_top_builddir@/python") +- + from pacemaker.buildoptions import BuildOptions + from pacemaker.exitstatus import ExitStatus + from pacemaker._cts.corosync import Corosync +diff --git a/cts/cts-exec.in b/cts/cts-exec.in +index be19d07..acd10af 100644 +--- a/cts/cts-exec.in ++++ b/cts/cts-exec.in +@@ -20,15 +20,6 @@ import time + # Prefer the source tree if available + TEST_DIR = sys.path[0] + +-# These imports allow running from a source checkout after running `make`. +-# Note that while this doesn't necessarily mean it will successfully run tests, +-# but being able to see --help output can be useful. +-if os.path.exists("@abs_top_srcdir@/python"): +- sys.path.insert(0, "@abs_top_srcdir@/python") +- +-if os.path.exists("@abs_top_builddir@/python") and "@abs_top_builddir@" != "@abs_top_srcdir@": +- sys.path.insert(0, "@abs_top_builddir@/python") +- + from pacemaker.buildoptions import BuildOptions + from pacemaker.exitstatus import ExitStatus + from pacemaker._cts.errors import ExitCodeError, OutputFoundError, OutputNotFoundError +diff --git a/cts/cts-fencing.in b/cts/cts-fencing.in +index c2ed29a..99a1286 100644 +--- a/cts/cts-fencing.in ++++ b/cts/cts-fencing.in +@@ -11,15 +11,6 @@ import sys + import subprocess + import tempfile + +-# These imports allow running from a source checkout after running `make`. +-# Note that while this doesn't necessarily mean it will successfully run tests, +-# but being able to see --help output can be useful. +-if os.path.exists("@abs_top_srcdir@/python"): +- sys.path.insert(0, "@abs_top_srcdir@/python") +- +-if os.path.exists("@abs_top_builddir@/python") and "@abs_top_builddir@" != "@abs_top_srcdir@": +- sys.path.insert(0, "@abs_top_builddir@/python") +- + from pacemaker.buildoptions import BuildOptions + from pacemaker.exitstatus import ExitStatus + from pacemaker._cts.corosync import Corosync, localname +diff --git a/cts/cts-regression.in b/cts/cts-regression.in +index c6837c4..c32ae96 100644 +--- a/cts/cts-regression.in ++++ b/cts/cts-regression.in +@@ -13,15 +13,6 @@ import subprocess + import sys + import textwrap + +-# These imports allow running from a source checkout after running `make`. +-# Note that while this doesn't necessarily mean it will successfully run tests, +-# but being able to see --help output can be useful. +-if os.path.exists("@abs_top_srcdir@/python"): +- sys.path.insert(0, "@abs_top_srcdir@/python") +- +-if os.path.exists("@abs_top_builddir@/python") and "@abs_top_builddir@" != "@abs_top_srcdir@": +- sys.path.insert(0, "@abs_top_builddir@/python") +- + from pacemaker.buildoptions import BuildOptions + from pacemaker.exitstatus import ExitStatus + +diff --git a/cts/cts-scheduler.in b/cts/cts-scheduler.in +index ee0cb7b..99f90fc 100644 +--- a/cts/cts-scheduler.in ++++ b/cts/cts-scheduler.in +@@ -17,15 +17,6 @@ import subprocess + import platform + import tempfile + +-# These imports allow running from a source checkout after running `make`. +-# Note that while this doesn't necessarily mean it will successfully run tests, +-# but being able to see --help output can be useful. +-if os.path.exists("@abs_top_srcdir@/python"): +- sys.path.insert(0, "@abs_top_srcdir@/python") +- +-if os.path.exists("@abs_top_builddir@/python") and "@abs_top_builddir@" != "@abs_top_srcdir@": +- sys.path.insert(0, "@abs_top_builddir@/python") +- + from pacemaker.buildoptions import BuildOptions + from pacemaker.exitstatus import ExitStatus + diff --git a/debian/patches/python-clean-up-the-__pycache__-directories.patch b/debian/patches/python-clean-up-the-__pycache__-directories.patch new file mode 100644 index 0000000..144e5b3 --- /dev/null +++ b/debian/patches/python-clean-up-the-__pycache__-directories.patch @@ -0,0 +1,31 @@ +From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org> +Date: Tue, 26 Sep 2023 18:10:08 +0200 +Subject: python: clean up the __pycache__ directories + +--- + python/pacemaker/Makefile.am | 3 +++ + python/tests/Makefile.am | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/python/pacemaker/Makefile.am b/python/pacemaker/Makefile.am +index f209bba..f722d48 100644 +--- a/python/pacemaker/Makefile.am ++++ b/python/pacemaker/Makefile.am +@@ -15,3 +15,6 @@ pkgpython_PYTHON = __init__.py \ + nodist_pkgpython_PYTHON = buildoptions.py + + SUBDIRS = _cts ++ ++clean-local: ++ rm -rf __pycache__ +diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am +index 490b272..6f93823 100644 +--- a/python/tests/Makefile.am ++++ b/python/tests/Makefile.am +@@ -10,3 +10,6 @@ + MAINTAINERCLEANFILES = Makefile.in + + EXTRA_DIST = $(wildcard test_*) ++ ++clean-local: ++ rm -rf __pycache__ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0ad30a0 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,9 @@ +Enable-redirecting-etc-init.d-script-calls-to-system.patch +Enable-the-init-scripts-on-multi-user-runlevels.patch +Make-the-asciidoc-documentation-reproducible.patch +alerts-make-the-scripts-executable.patch +Always-run-Inkscape-under-the-C.UTF-8-locale.patch +Fix-typos-resouce-resource.patch +Remove-references-to-the-build-directory.patch +cts-do-not-capture-the-build-directory.patch +python-clean-up-the-__pycache__-directories.patch |