summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/changelog564
-rw-r--r--debian/clean8
-rw-r--r--debian/control80
-rw-r--r--debian/copyright194
-rw-r--r--debian/crmsh-doc.doc-base16
-rw-r--r--debian/crmsh-doc.install2
-rw-r--r--debian/crmsh-doc.links6
-rw-r--r--debian/crmsh.doc-base7
-rw-r--r--debian/crmsh.install4
-rw-r--r--debian/crmsh.lintian-overrides3
-rw-r--r--debian/crmsh.postinst50
-rw-r--r--debian/crmsh.postrm41
-rw-r--r--debian/gbp.conf19
-rw-r--r--debian/patches/0003-Add-remote-resource-to-local-cache.patchbin0 -> 10133 bytes
-rw-r--r--debian/patches/0004-Fix-privacy-breach-generic-caused-by-footer-template.patch25
-rw-r--r--debian/patches/0005-Fix-privacy-breach-generic-caused-by-atom-xml-templa.patch28
-rw-r--r--debian/patches/0006-Fix-privacy-breach-generic-caused-by-youtube-iframe.patch26
-rw-r--r--debian/patches/0007-pygmentize-lexer.patch81
-rw-r--r--debian/patches/0010-Fix-package-management.patch33
-rw-r--r--debian/patches/0011-Fix-scripts-init.patch14
-rw-r--r--debian/patches/0012-Fix-crm-history.patch24
-rw-r--r--debian/patches/0013-Fix-cluster-bootstrap.patch70
-rw-r--r--debian/patches/0014-Fix-cluster-stop-start.patch17
-rw-r--r--debian/patches/0015-Fix-testsuite-errors.patch188
-rw-r--r--debian/patches/0016-Fix-python2-calls.patch138
-rw-r--r--debian/patches/0017-Fix-profiles-adoc.patch17
-rw-r--r--debian/patches/0018-Fix-python3-install.patch16
-rw-r--r--debian/patches/0019-Remove-news-adoc.patch34
-rw-r--r--debian/patches/0020-Replace-distutils.patch75
-rw-r--r--debian/patches/0021-Fix-bootstrap-bash.patch25
-rw-r--r--debian/patches/series17
-rwxr-xr-xdebian/rules65
-rw-r--r--debian/salsa-ci.yml4
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/include-binaries1
-rw-r--r--debian/source/options1
-rw-r--r--debian/tests/control32
-rwxr-xr-xdebian/tests/pacemaker-basic-resource.sh98
-rwxr-xr-xdebian/tests/pacemaker-cluster-init.sh31
-rwxr-xr-xdebian/tests/pacemaker-node-status.sh76
-rwxr-xr-xdebian/tests/testsuite.sh29
-rwxr-xr-xdebian/tests/utils.sh33
-rw-r--r--debian/upstream/metadata4
-rw-r--r--debian/vim-pcmk.yaml5
-rw-r--r--debian/watch4
45 files changed, 2206 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..3e88592
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,564 @@
+crmsh (4.6.0-1) unstable; urgency=medium
+
+ * New upstream version 4.6.0
+ * d/control: drop depends on python3-parallax (Closes: #1061552)
+ * d/patches: refresh for new version
+ * d/patches: fix build with Python 3.12 (Closes: #1061794)
+ * d/control: update pkgconf dependency
+ * d/patches: fix bootstrap with dash as /bin/sh
+ * d/postinst: create log dir and file unless they exists
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 17 Feb 2024 13:58:22 +0100
+
+crmsh (4.5.0-1) unstable; urgency=medium
+
+ * New upstream version 4.5.0
+ * d/patches: refresh for new version
+ * d/tests: refresh for new version
+ * d/postinst: create a logging directory (Closes: #1042448)
+ * d/clean: remove generated files (Closes: #1044302)
+ * d/patches: add fix for ssh error
+
+ -- Valentin Vidic <vvidic@debian.org> Tue, 10 Oct 2023 22:57:14 +0200
+
+crmsh (4.4.1-1) unstable; urgency=medium
+
+ [ Bas Couwenberg ]
+ * Mark spelling-errors.patch as Applied-Upstream.
+ * Mark getargspec.patch as Applied-Upstream.
+
+ [ Valentin Vidic ]
+ * New upstream version 4.4.1
+ * d/patches: refresh for new version
+
+ -- Valentin Vidic <vvidic@debian.org> Fri, 03 Mar 2023 22:48:41 +0100
+
+crmsh (4.4.0-5) unstable; urgency=medium
+
+ [ Lucas Kanashiro ]
+ * d/tests: use fence-virt in utils.sh test
+
+ [ Valentin Vidic ]
+ * d/control: update Standards-Version to 4.6.2
+ * d/copyright: update year
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 14 Jan 2023 01:45:45 +0100
+
+crmsh (4.4.0-4) unstable; urgency=medium
+
+ * Team upload.
+ * Add patch to not use inspect.getargspec, removed from python3.11.
+ * Add gbp.conf to use pristine-tar & --source-only-changes by default.
+ * Add patch to fix spelling errors.
+
+ -- Bas Couwenberg <sebastic@debian.org> Thu, 12 Jan 2023 09:54:32 +0100
+
+crmsh (4.4.0-3) unstable; urgency=medium
+
+ * d/patches: fix crmadmin parsing (Closes: #1023824)
+ * d/tests: add test for resource restart
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 13 Nov 2022 13:18:35 +0100
+
+crmsh (4.4.0-2) unstable; urgency=medium
+
+ * d/tests: update node status test
+ * d/patches: fix build with new version of setuptools
+ * d/patches: fix typo in patch description
+ * d/lintian-overrides: update format for new lintian
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 15 Oct 2022 14:49:18 +0200
+
+crmsh (4.4.0-1) unstable; urgency=medium
+
+ * New upstream version 4.4.0
+ * d/patches: refresh for new version
+ * d/tests: refresh for new version
+ * d/control: add iputils-ping dependency
+ * d/control: update Standards-Version to 4.6.1
+ * d/lintian-overrides: refresh for new version
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 28 May 2022 12:06:50 +0200
+
+crmsh (4.3.1-3) unstable; urgency=medium
+
+ [ Athos Ribeiro ]
+ * d/p/0020-Use-crmsh-hb_report.patch: use the crmsh shipped hb_report script
+ when available
+ * d/p/0021-Support-python-310.patch: support Python 3.10
+ (Closes: #1009087, #1009092)
+
+ [ Valentin Vidic ]
+ * d/patches: cleanup duplicate patch
+ * d/rules: fix timestamps on patched files for reproducible build
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 10 Apr 2022 09:48:28 +0200
+
+crmsh (4.3.1-2) unstable; urgency=medium
+
+ * d/tests: fix cluster init test
+ * d/patches: add fix for python 3.10 (Closes: #1009087, #1009087)
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 10 Apr 2022 07:11:23 +0200
+
+crmsh (4.3.1-1) unstable; urgency=medium
+
+ [ Valentin Vidic ]
+ * New upstream version 4.3.1 (Closes: #992708)
+ * d/patches: refresh for new version
+ * d/tests: update for new version
+ * d/control: update Standards-Version
+ * d/copyright: update year
+ * d/watch: update github url
+ * d/rules: fix installation of vim syntax plugin (Closes: #990222)
+
+ [ Athos Ribeiro ]
+ * d/t/testsuite.sh: set timezone for time conversion tests
+ * d/p/0017-Fix-health-scripts-python-38-support.patch: remove deprecated
+ function usage
+ * d/p/0018-Replace-crmd.patch: replace crmd calls with pacemaker-controld
+ * d/p/0019-Add-hb_report-dpkg-support.patch: Add dpkg support to hb_report
+
+ -- Valentin Vidic <vvidic@debian.org> Wed, 19 Jan 2022 21:13:36 +0100
+
+crmsh (4.2.1-3) unstable; urgency=medium
+
+ * Team upload
+ * Fix autopkgtest regression with Pacemaker 2.1
+ Caused by the fix of https://bugs.clusterlabs.org/show_bug.cgi?id=5395
+ (commit 0923b405030820daef3474ac2ae07187a7dd97f7)
+
+ -- Ferenc Wágner <wferi@debian.org> Sat, 30 Oct 2021 15:37:37 +0200
+
+crmsh (4.2.1-2) unstable; urgency=medium
+
+ * d/patches: include fix for CVE-2020-35459 (Closes: #985376)
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 21 Mar 2021 21:23:08 +0100
+
+crmsh (4.2.1-1) unstable; urgency=medium
+
+ * New upstream version 4.2.1
+ * d/patches: refresh for new version
+ * d/control: update Standards-Version
+ * d/watch: update version to 4
+ * d/lintian-overrides: ignore text files
+ * d/tests: update for new version
+
+ -- Valentin Vidic <vvidic@debian.org> Wed, 03 Feb 2021 22:05:33 +0100
+
+crmsh (4.2.0-4) unstable; urgency=medium
+
+ * d/patches: fix flaky autopkgtest (Closes: #972619)
+ * d/control: use debhelper v13
+ * d/lintian-overrides: update override name
+
+ -- Valentin Vidic <vvidic@debian.org> Wed, 21 Oct 2020 20:42:26 +0200
+
+crmsh (4.2.0-3) unstable; urgency=medium
+
+ [ Debian Janitor ]
+ * Use secure URI in Homepage field.
+ * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
+ Repository-Browse.
+
+ [ Valentin Vidic ]
+ * debian/tests: use isolation-machine for cluster init (Closes: #953944)
+ * d/control: update Standards-Version to 4.5.0
+ * d/patches: refresh patches
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 15 Mar 2020 20:22:51 +0100
+
+crmsh (4.2.0-2) unstable; urgency=medium
+
+ * d/patches: fix tests failing in 2020
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 04 Jan 2020 11:30:00 +0100
+
+crmsh (4.2.0-1) unstable; urgency=medium
+
+ * New upstream version 4.2.0
+ * d/salsa-ci.yml: enable CI
+ * d/tests: update for pacemaker 2.0.3
+ * d/tests: ufw broken without /sbin/iptables symlink
+ * d/patches: refresh for new upstream version
+ * d/control: add Rules-Requires-Root
+ * d/lintian-overrides: ignore manpage warning
+
+ -- Valentin Vidic <vvidic@debian.org> Thu, 26 Dec 2019 16:05:33 +0100
+
+crmsh (4.1.0-4) unstable; urgency=medium
+
+ * d/tests: skip some tests in uprivileged containers
+ * d/control: update Standards-Version to 4.4.1
+
+ -- Valentin Vidic <vvidic@debian.org> Mon, 18 Nov 2019 20:22:57 +0100
+
+crmsh (4.1.0-3) unstable; urgency=medium
+
+ * d/control: use debhelper v12
+ * d/patches: fix new testsuite errors
+ * d/patches: fix YAML warning for unsafe loader
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 01 Sep 2019 10:39:19 +0200
+
+crmsh (4.1.0-2) unstable; urgency=medium
+
+ * d/control: drop python 2 packages from Build-Depends
+ * d/rules: clean using python 3
+ * d/patches: build documentation using python 3
+ * d/patches: fix spelling problems reported by lintian
+
+ -- Valentin Vidic <vvidic@debian.org> Fri, 16 Aug 2019 19:07:42 +0200
+
+crmsh (4.1.0-1) unstable; urgency=medium
+
+ * New upstream version 4.1.0
+ * d/control: update Standards-Version to 4.4.0
+ * d/patches: update for new version
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 13 Jul 2019 23:26:42 +0200
+
+crmsh (4.0.0~git20190108.3d56538-3) unstable; urgency=medium
+
+ * d/tests: disable regression tests for now
+ * d/tests: cleanup regexp
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 20 Jan 2019 10:59:14 +0100
+
+crmsh (4.0.0~git20190108.3d56538-2) unstable; urgency=medium
+
+ * d/tests: try to fix regression testsuite
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 19 Jan 2019 23:53:26 +0100
+
+crmsh (4.0.0~git20190108.3d56538-1) unstable; urgency=medium
+
+ * New upstream version 4.0.0~git20190108.3d56538 (Closes: #883171)
+ * d/control: update for python3
+ * d/rules: update for python3
+ * d/postinst,prerm: autogenerated with python3
+ * d/patches: update for new version
+ * d/tests: update for new version
+ * d/tests: run testsuite
+ * d/control: link fonts from fonts-font-awesome
+ * d/rules: install README into /usr/share/doc/crmsh
+
+ -- Valentin Vidic <vvidic@debian.org> Sat, 19 Jan 2019 12:39:02 +0100
+
+crmsh (3.0.3-2) unstable; urgency=medium
+
+ * d/patches: use knet for unicast bootstrap
+ * d/tests: use unicast for cluster bootstrap
+ * d/tests: fix default node name
+ * d/control: update Standards-Version to 4.3.0
+ * d/control: update my email address
+
+ -- Valentin Vidic <vvidic@debian.org> Thu, 27 Dec 2018 21:05:17 +0100
+
+crmsh (3.0.3-1) unstable; urgency=medium
+
+ * New upstream version 3.0.3
+ * d/rules: install bash completion
+ * d/rules: install vim plugin
+ * d/patches: refresh for new upstream version
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Mon, 02 Jul 2018 14:35:45 +0200
+
+crmsh (3.0.1-4) unstable; urgency=medium
+
+ * d/control: update Vcs URLs to use salsa
+ * d/rules: cleanup trailing whitespace
+ * d/copyright: use https in Format url
+ * d/control: update Standards-Version to 4.1.4
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Wed, 11 Apr 2018 09:40:22 +0200
+
+crmsh (3.0.1-3) unstable; urgency=medium
+
+ * d/patches: fix crm cluster stop/start on Debian
+ * d/tests: use vim for testing package removal (Closes: #883524)
+ * d/tests: update Depends list for dmidecode (Closes: #883524)
+ * d/patches: drop patches merged upstream
+ * d/compat: update debhelper to v11
+ * d/control: update Standards-Version to 4.1.3
+ * d/changelog: cleanup trailing whitespace
+ * d/control: cleanup trailing whitespace
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Thu, 25 Jan 2018 21:40:26 +0100
+
+crmsh (3.0.1-2) unstable; urgency=medium
+
+ * d/control: add fdisk to Depends (Closes: #872129)
+ * d/control: replace deprecated priority extra
+ * d/control: move tools used by bootstrap to Suggests
+ * d/patches: disable watchdog when generating corosync.conf
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Fri, 01 Sep 2017 20:32:26 +0200
+
+crmsh (3.0.1-1) unstable; urgency=medium
+
+ * New upstream version 3.0.1
+ * d/patches: refresh for new upstream version
+ * d/control: remove dh-autoreconf from Depends
+ * d/patches: add fixes for cluster init on Debian
+ * d/tests: add test for cluster init
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Tue, 25 Jul 2017 15:32:31 +0200
+
+crmsh (3.0.0-1) unstable; urgency=medium
+
+ [ Christoph Berg ]
+ * debian/tests/utils.sh: Make test more robust against environment changes.
+
+ [ Valentin Vidic ]
+ * New upstream version 3.0.0
+ * d/patches: refresh for new upstream version
+ * d/control: remove ${shlibs:Depends} from Depends
+ * d/rules: use dh_missing --fail-missing
+ * d/control: update Standards-Version to 4.0.0
+ * d/control: update debhelper to version 10
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Tue, 27 Jun 2017 23:50:54 +0200
+
+crmsh (2.3.2-4) unstable; urgency=medium
+
+ * Remove uninstall file list
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Mon, 19 Dec 2016 10:45:25 +0100
+
+crmsh (2.3.2-3) unstable; urgency=medium
+
+ * Make crm.8.html generation reproducible
+ * Cleanup debian/rules
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Mon, 12 Dec 2016 10:46:36 +0100
+
+crmsh (2.3.2-2) unstable; urgency=medium
+
+ [ Valentin Vidic ]
+ * Use https for Vcs-Browser link (lintian fix)
+ * Update debian/copyright for moved files (lintian fix)
+ * crmsh: Change Architecture to all
+ * Drop unused libraries from build-depends
+ * Make generated documentation reproducible
+ * Remove unused packages from Build-Depends
+ * Fix crm manpage spelling
+ * crmsh-doc: add Multi-Arch: foreign
+ * d/tests: add basic crm node tests
+ * Patch scripts in utils to work on Debian
+ * d/tests: add tests for package management scripts
+ * Add patch to make 'cluster init' work on Debian
+ * Add python-parallax to Depends (Closes: #819545)
+ * Add patch to fix crm history on Debian systems
+
+ [ Christoph Berg ]
+ * Remove Martin and myself from Uploaders.
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Sun, 04 Dec 2016 18:57:50 +0100
+
+crmsh (2.3.2-1) unstable; urgency=medium
+
+ [ Christoph Berg ]
+ * Fix changelog for previous upload, d/tests got lost.
+
+ [ Arturo Borrero Gonzalez ]
+ * Refresh 0004-Fix-privacy-breach-generic-caused-by-footer-template.patch
+ patch
+
+ [ Valentin Vidic ]
+ * Imported upstream version 2.3.2 (Closes: #815823, #815346)
+ * crm report: add gawk to Depends
+ * crm report: upstream fix for dash (Closes: #772269)
+ * Add myself to Uploaders list
+
+ -- Valentin Vidic <Valentin.Vidic@CARNet.hr> Thu, 03 Nov 2016 10:20:56 +0100
+
+crmsh (2.2.1-1) unstable; urgency=medium
+
+ [ Adrian Vondendriesch ]
+ * New upstream release
+ * patches:
+ - drop 0001-Remove-AM_CONDITIONAL-for-UNAME_IS_DEBIAN.patch
+ - drop 0002-Remove-fix-for-Debian.patch
+ * Add myself to uploaders.
+ * Bump standars version.
+
+ [ Arturo Borrero Gonzalez ]
+ * d/tests: add basic crm and pacemaker tests
+ Check that the crm utility can run without issues, locating all of the
+ libraries it needs, and check the integration between crmsh and pacemaker
+ (and corosync). We build a cluster and then add a basic IP resource to it.
+
+ -- Adrian Vondendriesch <adrian.vondendriesch@credativ.de> Tue, 03 May 2016 20:05:28 +0200
+
+crmsh (2.2.0-1) unstable; urgency=high
+
+ [ Richard B Winters ]
+ * New upstream release
+ * debian/clean: Added
+ - In order to incorporate the recommended strategy for
+ handling Python eggs
+ * debian/rules: Multiple changes;
+ - Updated hardening implementation
+ - Added an export for ensuring a link against all needed
+ libraries (cf. Policy 10.2)
+ - Override configure to properly set paths for build
+ - Override dh_auto_build to add instruction for building
+ html documentation
+ - Override dh_auto_install to remove duplicate files
+ - Override dh_compress to strip compiled bytecode from the
+ package
+ - Added --single-version-externally-managed as recommended
+ for handling Python eggs
+ * debian/control: Multiple changes;
+ - Updated uploaders list and formatted for folding
+ - Added Vcs-Git and Vcs-Browser entries
+ - Updated Build-Depends to reflect current dependencies;
+ - Python updated to Python2.7 as > Python27 not supported
+ - Dropped hardening-wrapper; not necessary any longer
+ - Formatted Build-Depends and Depends entries for folding
+ - Updated Build-Depends to not use transitional packages
+ - Updated description
+ - Bumped standards version to 3.9.6; No changes required
+ - Added crmsh-doc to package offering
+ * debian/copyright: Multiple edits
+ - Updated source field to current upstream source location
+ - Consolidated copyright notices for authors added to upstreams
+ author list found in AUTHORS
+ - Updated copyright for debian/* to include myself and Debian-HA
+ team
+ - Added License paragraph to remove need for including a paragraph
+ for each copyright/license entry present
+ * debian/crmsh.install: Added since multiple package build requires
+ it
+ * debian/crmsh.doc-base: Added for crmsh html documents
+ * debian/crmsh-doc.install: Add to support crmsh-doc package
+ * debian/crmsh-doc.doc-base: Added for crmsh-doc html documents
+ * debian/patches/*: Added for resolving privacy-breach-generic
+ lintian informational warnings;
+ - Includes binary png file in source to remove need for remote
+ resource
+ - Patches crm.conf file for asciidoc, to fix remove remote
+ resource in .html files
+ - Patch python file to fix resource links in atom.xml template
+ - Series file added
+ * debian/postinst: Added to compile bytecode for *.py files
+ * debian/prerm: Added to removed compiled bytecode
+ * debian/pycompat: Added as recommended by packaging tools
+ * debian/source/include-binaries: Added to allow patch which adds
+ a binary png file to the upstream source
+ * debian/source/options: Added
+ - Added to incorporate the recommended strategy for handling
+ Python eggs
+ * debian/watch: Added for monitoring upstream releases
+
+ [ Adrian Vondendriesch ]
+ * debian/control: Add python-dateutil to Build-Depends
+
+ -- Richard B Winters <rik@mmogp.com> Thu, 28 Jan 2016 21:22:05 +0100
+
+crmsh (1.2.6+git+e77add-2) unstable; urgency=medium
+
+ * Update control for new pacemaker dev packages.
+
+ -- Christoph Berg <myon@debian.org> Sat, 16 Jan 2016 16:26:36 +0100
+
+crmsh (1.2.6+git+e77add-1.4) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Port from python-support to dh_python2 (Closes: #785973)
+
+ -- Stefano Rivera <stefanor@debian.org> Thu, 20 Aug 2015 15:31:26 +0200
+
+crmsh (1.2.6+git+e77add-1.3) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Build-Depend on docbook-xsl to fix FTBFS
+ Closes: 770132
+
+ -- Johann Felix Soden <johfel@debian.org> Sat, 22 Nov 2014 13:09:35 +0100
+
+crmsh (1.2.6+git+e77add-1.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Depend on python-yaml to fix grave bug (Closes: #745219)
+
+ -- Stefan Bauer (Cubewerk GmbH) <stefan.bauer@cubewerk.de> Fri, 25 Apr 2014 17:46:39 +0200
+
+crmsh (1.2.6+git+e77add-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add pkg-config to Build-Depends. Closes: 741772
+
+ -- Chris Boot <debian@bootc.net> Sat, 22 Mar 2014 15:50:25 +0000
+
+crmsh (1.2.6+git+e77add-1) unstable; urgency=medium
+
+ * New upstream checkout
+ * debian/control: Bump Standards-Version
+ * debian/control: Add Breaks & Replaces for Pacemaker << 1.1.8
+ Closes: 717986
+ * debian/control: Depend on python-lxml
+ Closes: 738651
+
+ -- Martin Loschwitz <madkiss@debian.org> Fri, 21 Feb 2014 15:51:13 +0000
+
+crmsh (1.2.5+hg1034-1) unstable; urgency=low
+
+ * New upstream checkout
+
+ -- Martin Loschwitz <madkiss@debian.org> Mon, 05 Aug 2013 05:21:29 +0000
+
+crmsh (1.2.5+hg1006-1) unstable; urgency=low
+
+ * New upstream checkout for Pacemaker 1.1.10
+
+ -- Martin Loschwitz <madkiss@debian.org> Fri, 02 Aug 2013 07:37:50 +0000
+
+crmsh (1.2.5+hg953-3) unstable; urgency=low
+
+ * Upload to unstable instead of experimental
+
+ -- Martin Loschwitz <madkiss@debian.org> Fri, 02 Aug 2013 06:52:11 +0000
+
+crmsh (1.2.5+hg953-2) experimental; urgency=low
+
+ * Build-Depend on libcib3-dev instead of libcib2-dev
+
+ -- Martin Loschwitz <madkiss@debian.org> Fri, 19 Apr 2013 07:08:47 +0000
+
+crmsh (1.2.5+hg953-1) experimental; urgency=low
+
+ * New upstream release
+
+ -- Martin Loschwitz <madkiss@debian.org> Wed, 20 Mar 2013 23:11:44 +0000
+
+crmsh (1.2.0+hg20121010-1) unstable; urgency=low
+
+ * New upstream checkout to catch some additional bugfixes
+ * debian/control: Depend on version 1.1.8+git20121010 of libcib as well
+ as libcrmcommon and libpengine to make sure we get the versions with
+ proper .pc files (Closes: #690055)
+
+ -- Martin Loschwitz <madkiss@debian.org> Wed, 10 Oct 2012 11:39:06 +0000
+
+crmsh (1.2.0+hg20121009-3) unstable; urgency=low
+
+ * debian/control: Fix possible circular build dependency by using the
+ real library package names instead of pacemaker-dev (Closes: #690055)
+
+ -- Martin Loschwitz <madkiss@debian.org> Tue, 09 Oct 2012 17:29:01 +0000
+
+crmsh (1.2.0+hg20121009-2) unstable; urgency=low
+
+ * debian/control: Set the maintainer field to the HA group instead of me
+ personally. (Closes: #690055)
+
+ -- Martin Loschwitz <madkiss@debian.org> Tue, 09 Oct 2012 16:20:15 +0000
+
+crmsh (1.2.0+hg20121009-1) unstable; urgency=low
+
+ * Initial release (Closes: #690055) <nnnn is the bug number of your ITP>
+
+ -- Martin Loschwitz <madkiss@debian.org> Tue, 09 Oct 2012 14:36:09 +0000
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..9e2f5c2
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,8 @@
+Makefile
+config.log
+config.status
+crmsh.spec
+doc/website-v1/news.adoc
+etc/crm.conf
+version
+*.egg-info/*
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..368c753
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,80 @@
+Source: crmsh
+Section: admin
+Priority: optional
+Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org>
+Uploaders:
+ Richard B Winters <rik@mmogp.com>,
+ Adrian Vondendriesch <adrian.vondendriesch@credativ.de>,
+ Valentin Vidic <vvidic@debian.org>
+Build-Depends:
+ asciidoc,
+ debhelper-compat (= 13),
+ dh-python,
+ docbook-xml,
+ docbook-xsl,
+ dos2unix,
+ libxml2-utils,
+ pkgconf,
+ python3-all,
+ python3-dateutil,
+ python3-packaging,
+ python3-pygments,
+ python3-setuptools,
+ xsltproc
+Standards-Version: 4.6.2
+Rules-Requires-Root: no
+Homepage: https://crmsh.github.io/
+Vcs-Browser: https://salsa.debian.org/ha-team/crmsh
+Vcs-Git: https://salsa.debian.org/ha-team/crmsh.git
+
+Package: crmsh
+Architecture: all
+Depends:
+ ${misc:Depends},
+ gawk,
+ iputils-ping,
+ pacemaker-cli-utils,
+ ${python3:Depends},
+ python3-dateutil,
+ python3-packaging,
+ python3-lxml,
+ python3-yaml
+Recommends: pacemaker (>= 1.1.12)
+Replaces: pacemaker (<< 1.1.12)
+Breaks: pacemaker (<< 1.1.12)
+Suggests:
+ bash-completion,
+ cluster-glue,
+ csync2,
+ dmidecode,
+ fdisk | util-linux (<< 2.29.2-3~),
+ ocfs2-tools,
+ openssh-server,
+ parted,
+ sbd,
+ ufw,
+ vim-addon-manager
+Description: CRM shell for the pacemaker cluster manager
+ The crm shell is an advanced command-line interface for High-Availability
+ cluster management in GNU/Linux. Effortlessly configure, manage and
+ troubleshoot your clusters from the command line, with full tab completion
+ and extensive help. crmsh also provides advanced features like low-level
+ cluster configuration, cluster scripting and package management, and
+ history exploration tools giving you an instant view of what your cluster
+ is doing.
+
+Package: crmsh-doc
+Section: doc
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}, fonts-font-awesome
+Description: crmsh HTML Documentation
+ The crm shell is an advanced command-line interface for High-Availability
+ cluster management in GNU/Linux. Effortlessly configure, manage and
+ troubleshoot your clusters from the command line, with full tab completion
+ and extensive help. crmsh also provides advanced features like low-level
+ cluster configuration, cluster scripting and package management, and
+ history exploration tools giving you an instant view of what your cluster
+ is doing.
+ .
+ This package contains the html Pacemaker API documentation.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..283ed2c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,194 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: crmsh
+Source: http://github.com/clusterlabs/crmsh
+
+Files: *
+Copyright: (c) 2008-2015 Upstream Authors (From AUTHORS)
+ afederic <afederic[at]gmail[dot]com>
+ Andrew Beekhof <andrew[at]beekhof[dot]net>
+ Borislav Borisov <borislav[dot]v[dot]borisov[at]gmail[dot]com>
+ Christian Seiler <christian[at]iwakd[dot]de>
+ Dejan Muhamedagic <dejan[at]suse[dot]de>
+ Federica Teodori <federica[dot]teodori[at]googlemail[dot]com>
+ Florian Haas <florian[dot]haas[at]linbit[dot]com>
+ Goldwyn Rodrigues <rgoldwyn[at]novell[dot]com>
+ Hideo Yamauchi <renayama19661014[at]ybb[dot]ne[dot]jp>
+ Holger Teutsch <holger[dot]teutsch[at]web[dot]de>
+ Kazunori INOUE <kazunori[dot]inoue3[at]gmail[dot]com>
+ Keisuke MORI <keisuke[dot]mori+ha[at]gmail[dot]com>
+ Kristoffer Gronlund <kgronlund[at]suse[dot]com>
+ Lars Ellenberg <lars[dot]ellenberg[at]linbit[dot]com>
+ Lars Marowsky-Brée <lmb[at]suse[dot]de>
+ Michael Prokop <devnull[at]localhost>
+ NAKAHIRA Kazutomo <nakahira[dot]kazutomo[at]oss[dot]ntt[dot]co[dot]jp>
+ nozawat <nozawat[at]gmail[dot]com>
+ renayama19661014 <renayama19661014[at]ybb[dot]ne[dot]jp>
+ Richard B Winters <rik[at]mmogp[dot]com>
+ seabres <rainer[dot]brestan[at]gmx[dot]net>
+ Tim Serong <tserong[at]suse[dot]com>
+ Vincenzo Pii <piiv[at]zhaw[dot]ch>
+ Vladislav Bogdanov <bubble[at]hoster-ok[dot]com>
+ Xia Li <XLi[at]suse[dot]com>
+ Xinwei Hu <xwhu[at]novell[dot]com>
+ Yan Gao <ygao[at]suse[dot]com>
+ Yuusuke IIDA <iidayuus[at]intellilink[dot]co[dot]jp>
+License: GPL-2+
+
+Files: crmsh/crm_pssh.py
+Copyright: 2003-2008, Brent N. Chun
+ 2009 Andrew McNabb
+ 2011 Dejan Muhamedagic
+License: GPL-2+
+
+Files: contrib/bash_completion.sh
+Copyright: 2013 Kristoffer Gronlund
+ 2006-2008, Ian Macdonald
+ 2009-2010, Bash Completion Maintainers
+License: GPL-2+
+
+Files: crmsh/ordereddict.py
+ crmsh/orderedset.py
+Copyright: 2009 Raymond Hettinger
+License: Expat
+
+Files: doc/website-v1/css/crm.css
+Copyright: 2012-2015 Ryan Tomayko <r@tomayko.com>
+ 2012-2015 Kristoffer Gronlund <kgronlund@suse.com>
+License: GPL-2+
+
+Files: doc/website-v1/css/font-awesome.css
+Copyright: 2012-2015 Dave Gandy
+License: Expat
+
+Files: doc/website-v1/fonts/*
+Copyright: 2012-2015 Dave Gandy
+License: SIL-OFL-1.1
+
+Files: debian/*
+Copyright: 2012-2022 Debian-HA Maintainers
+ 2012-2015 Martin Loschwitz <madkiss@debian.org>
+ 2015 Richard B Winters <rik@mmogp.com>
+ 2016-2023 Valentin Vidic <vvidic@debian.org>
+License: GPL-2+
+
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+License: SIL-OFL-1.1
+ PREAMBLE
+ The goals of the Open Font License (OFL) are to stimulate worldwide
+ development of collaborative font projects, to support the font creation
+ efforts of academic and linguistic communities, and to provide a free and
+ open framework in which fonts may be shared and improved in partnership
+ with others.
+ .
+ The OFL allows the licensed fonts to be used, studied, modified and
+ redistributed freely as long as they are not sold by themselves. The
+ fonts, including any derivative works, can be bundled, embedded,
+ redistributed and/or sold with any software provided that any reserved
+ names are not used by derivative works. The fonts and derivatives,
+ however, cannot be released under any other type of license. The
+ requirement for fonts to remain under this license does not apply
+ to any document created using the fonts or their derivatives.
+ .
+ DEFINITIONS
+ "Font Software" refers to the set of files released by the Copyright
+ Holder(s) under this license and clearly marked as such. This may
+ include source files, build scripts and documentation.
+ .
+ "Reserved Font Name" refers to any names specified as such after the
+ copyright statement(s).
+ .
+ "Original Version" refers to the collection of Font Software components as
+ distributed by the Copyright Holder(s).
+ .
+ "Modified Version" refers to any derivative made by adding to, deleting,
+ or substituting — in part or in whole — any of the components of the
+ Original Version, by changing formats or by porting the Font Software to a
+ new environment.
+ .
+ "Author" refers to any designer, engineer, programmer, technical
+ writer or other person who contributed to the Font Software.
+ .
+ PERMISSION & CONDITIONS
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
+ redistribute, and sell modified and unmodified copies of the Font
+ Software, subject to the following conditions:
+ .
+ 1) Neither the Font Software nor any of its individual components,
+ in Original or Modified Versions, may be sold by itself.
+ .
+ 2) Original or Modified Versions of the Font Software may be bundled,
+ redistributed and/or sold with any software, provided that each copy
+ contains the above copyright notice and this license. These can be
+ included either as stand-alone text files, human-readable headers or
+ in the appropriate machine-readable metadata fields within text or
+ binary files as long as those fields can be easily viewed by the user.
+ .
+ 3) No Modified Version of the Font Software may use the Reserved Font
+ Name(s) unless explicit written permission is granted by the corresponding
+ Copyright Holder. This restriction only applies to the primary font name as
+ presented to the users.
+ .
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+ Software shall not be used to promote, endorse or advertise any
+ Modified Version, except to acknowledge the contribution(s) of the
+ Copyright Holder(s) and the Author(s) or with their explicit written
+ permission.
+ .
+ 5) The Font Software, modified or unmodified, in part or in whole,
+ must be distributed entirely under this license, and must not be
+ distributed under any other license. The requirement for fonts to
+ remain under this license does not apply to any document created
+ using the Font Software.
+ .
+ TERMINATION
+ This license becomes null and void if any of the above conditions are
+ not met.
+ .
+ DISCLAIMER
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+ OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/debian/crmsh-doc.doc-base b/debian/crmsh-doc.doc-base
new file mode 100644
index 0000000..26c4d89
--- /dev/null
+++ b/debian/crmsh-doc.doc-base
@@ -0,0 +1,16 @@
+Document: crmsh-doc
+Title: crmsh complete HTML documentation
+Section: System/Administration
+
+Format: HTML
+Index: /usr/share/doc/crmsh-doc/html/index.html
+Files: /usr/share/doc/crmsh-doc/html/*.html
+ /usr/share/doc/crmsh-doc/html/*/*/*.html
+ /usr/share/doc/crmsh-doc/html/*/*.png
+ /usr/share/doc/crmsh-doc/html/*/*.gif
+ /usr/share/doc/crmsh-doc/html/*/*.css
+ /usr/share/doc/crmsh-doc/html/*/*.otf
+ /usr/share/doc/crmsh-doc/html/*/*.eot
+ /usr/share/doc/crmsh-doc/html/*/*.svg
+ /usr/share/doc/crmsh-doc/html/*/*.ttf
+ /usr/share/doc/crmsh-doc/html/*/*.woff
diff --git a/debian/crmsh-doc.install b/debian/crmsh-doc.install
new file mode 100644
index 0000000..a2633a6
--- /dev/null
+++ b/debian/crmsh-doc.install
@@ -0,0 +1,2 @@
+doc/website-v1/gen/* usr/share/doc/crmsh-doc/html
+debian/copyright usr/share/doc/crmsh-doc
diff --git a/debian/crmsh-doc.links b/debian/crmsh-doc.links
new file mode 100644
index 0000000..6a66ed3
--- /dev/null
+++ b/debian/crmsh-doc.links
@@ -0,0 +1,6 @@
+usr/share/fonts-font-awesome/css/font-awesome.min.css usr/share/doc/crmsh-doc/html/css/font-awesome.min.css
+usr/share/fonts-font-awesome/fonts/FontAwesome.otf usr/share/doc/crmsh-doc/html/fonts/FontAwesome.otf
+usr/share/fonts-font-awesome/fonts/fontawesome-webfont.eot usr/share/doc/crmsh-doc/html/fonts/fontawesome-webfont.eot
+usr/share/fonts-font-awesome/fonts/fontawesome-webfont.svg usr/share/doc/crmsh-doc/html/fonts/fontawesome-webfont.svg
+usr/share/fonts-font-awesome/fonts/fontawesome-webfont.ttf usr/share/doc/crmsh-doc/html/fonts/fontawesome-webfont.ttf
+usr/share/fonts-font-awesome/fonts/fontawesome-webfont.woff usr/share/doc/crmsh-doc/html/fonts/fontawesome-webfont.woff
diff --git a/debian/crmsh.doc-base b/debian/crmsh.doc-base
new file mode 100644
index 0000000..c9195d7
--- /dev/null
+++ b/debian/crmsh.doc-base
@@ -0,0 +1,7 @@
+Document: crmsh
+Title: crmsh HTML documentation
+Section: System/Administration
+
+Format: HTML
+Index: /usr/share/doc/crmsh/crm.8.html
+Files: /usr/share/doc/crmsh/*.html
diff --git a/debian/crmsh.install b/debian/crmsh.install
new file mode 100644
index 0000000..18b686d
--- /dev/null
+++ b/debian/crmsh.install
@@ -0,0 +1,4 @@
+etc/crm/*
+usr/sbin/*
+usr/share/*
+usr/lib/python*/*
diff --git a/debian/crmsh.lintian-overrides b/debian/crmsh.lintian-overrides
new file mode 100644
index 0000000..44db703
--- /dev/null
+++ b/debian/crmsh.lintian-overrides
@@ -0,0 +1,3 @@
+crmsh: spare-manual-page [usr/share/man/man8/crmsh_crm_report.8.gz]
+crmsh: national-encoding [usr/share/crmsh/tests/unittests/pacemaker_unicode.log]
+crmsh: package-contains-documentation-outside-usr-share-doc [usr/share/crmsh/tests/bugs-test.txt]
diff --git a/debian/crmsh.postinst b/debian/crmsh.postinst
new file mode 100644
index 0000000..1212f89
--- /dev/null
+++ b/debian/crmsh.postinst
@@ -0,0 +1,50 @@
+#!/bin/sh
+# postinst script for crmsh
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ if [ ! -e /var/log/crmsh ]; then
+ mkdir /var/log/crmsh
+ chown hacluster:haclient /var/log/crmsh
+ chmod 0775 /var/log/crmsh
+ fi
+
+ if [ ! -e /var/log/crmsh/crmsh.log ]; then
+ touch /var/log/crmsh/crmsh.log
+ chown hacluster:haclient /var/log/crmsh/crmsh.log
+ chmod 0664 /var/log/crmsh/crmsh.log
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/crmsh.postrm b/debian/crmsh.postrm
new file mode 100644
index 0000000..f798316
--- /dev/null
+++ b/debian/crmsh.postrm
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postrm script for crmsh
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge)
+ rm -rf /var/log/crmsh
+ ;;
+
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..e3daba6
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,19 @@
+[DEFAULT]
+
+# The default name for the upstream branch is "upstream".
+# Change it if the name is different (for instance, "master").
+upstream-branch = upstream
+
+# The default name for the Debian branch is "master".
+# Change it if the name is different (for instance, "debian/unstable").
+debian-branch = master
+
+# git-import-orig uses the following names for the upstream tags.
+# Change the value if you are not using git-import-orig
+upstream-tag = upstream/%(version)s
+
+# Always use pristine-tar.
+pristine-tar = True
+
+[buildpackage]
+pbuilder-options = --source-only-changes
diff --git a/debian/patches/0003-Add-remote-resource-to-local-cache.patch b/debian/patches/0003-Add-remote-resource-to-local-cache.patch
new file mode 100644
index 0000000..8f966d5
--- /dev/null
+++ b/debian/patches/0003-Add-remote-resource-to-local-cache.patch
Binary files differ
diff --git a/debian/patches/0004-Fix-privacy-breach-generic-caused-by-footer-template.patch b/debian/patches/0004-Fix-privacy-breach-generic-caused-by-footer-template.patch
new file mode 100644
index 0000000..5da4a07
--- /dev/null
+++ b/debian/patches/0004-Fix-privacy-breach-generic-caused-by-footer-template.patch
@@ -0,0 +1,25 @@
+From: Richard B Winters <rik@mmogp.com>
+Date: Fri, 29 Jan 2016 10:43:26 -0500
+Subject: Fix privacy-breach-generic caused by footer template
+
+ - An image fetched from githubuserconent needs to be
+ replaced with a local cache to avoid the
+ aforementioned lintian informational warning
+
+Change-Id: I3798ca0f774161ed6d99d0da25369ad421e69397
+Signed-off-by: Richard B Winters <rik@mmogp.com>
+---
+ doc/website-v1/crm.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/doc/website-v1/crm.conf
++++ b/doc/website-v1/crm.conf
+@@ -589,7 +589,7 @@
+ </div>
+ </div>
+
+-<a href="https://github.com/ClusterLabs/crmsh"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
++<a href="https://github.com/ClusterLabs/crmsh"><img style="position: absolute; top: 0; right: 0; border: 0;" src="/img/fork-me-on-github.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
+
+ </body>
+ </html>
diff --git a/debian/patches/0005-Fix-privacy-breach-generic-caused-by-atom-xml-templa.patch b/debian/patches/0005-Fix-privacy-breach-generic-caused-by-atom-xml-templa.patch
new file mode 100644
index 0000000..beb880b
--- /dev/null
+++ b/debian/patches/0005-Fix-privacy-breach-generic-caused-by-atom-xml-templa.patch
@@ -0,0 +1,28 @@
+From: Richard B Winters <rik@mmogp.com>
+Date: Fri, 29 Jan 2016 10:43:46 -0500
+Subject: Fix privacy-breach-generic caused by atom xml template
+
+ - Modifies the atom xml template so as not to breach
+ privacy by using remote resources.
+
+Change-Id: I0043f9815620a3b88546c481f416b6ebebe66472
+Signed-off-by: Richard B Winters <rik@mmogp.com>
+---
+ doc/website-v1/make-news.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/website-v1/make-news.py b/doc/website-v1/make-news.py
+index f3c9073..89271d2 100644
+--- a/doc/website-v1/make-news.py
++++ b/doc/website-v1/make-news.py
+@@ -21,8 +21,8 @@ ATOM_TEMPLATE = """<?xml version="1.0" encoding="utf-8"?>
+ <feed xmlns="http://www.w3.org/2005/Atom">
+ <title>crmsh</title>
+ <subtitle>Cluster manager shell news</subtitle>
+-<link href="http://crmsh.github.io/atom.xml" rel="self" />
+-<link href="http://crmsh.github.io/" />
++<link href="/atom.xml" rel="self" />
++<link href="/" />
+ <id>%(id)s</id>
+ <updated>%(updated)s</updated>
+ %(entries)s
diff --git a/debian/patches/0006-Fix-privacy-breach-generic-caused-by-youtube-iframe.patch b/debian/patches/0006-Fix-privacy-breach-generic-caused-by-youtube-iframe.patch
new file mode 100644
index 0000000..074aef2
--- /dev/null
+++ b/debian/patches/0006-Fix-privacy-breach-generic-caused-by-youtube-iframe.patch
@@ -0,0 +1,26 @@
+From: Richard B Winters <rik@mmogp.com>
+Date: Fri, 29 Jan 2016 11:26:22 -0500
+Subject: Fix privacy-breach-generic caused by youtube iframe
+
+ - Modified 2015-05-13-releaswe-2_1_4.adoc so as not to
+ embed the youtube video
+
+Change-Id: Iaaf487ace95f5c5b02ba5f89d796e08e9abab4fd
+Signed-off-by: Richard B Winters <rik@mmogp.com>
+---
+ doc/website-v1/news/2015-05-13-release-2_1_4.adoc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/website-v1/news/2015-05-13-release-2_1_4.adoc b/doc/website-v1/news/2015-05-13-release-2_1_4.adoc
+index 31297cf..e1dc9df 100644
+--- a/doc/website-v1/news/2015-05-13-release-2_1_4.adoc
++++ b/doc/website-v1/news/2015-05-13-release-2_1_4.adoc
+@@ -50,7 +50,7 @@ builds upon the crmsh history feature at openSUSE conf in The Hague
+ earlier this month. The video of that presentation is online here:
+
+ ++++++++++++
+-<iframe width="420" height="315" src="https://www.youtube.com/embed/mngfxzXkFLw" frameborder="0" allowfullscreen></iframe>
++<iframe width="420" height="315" src="/" frameborder="0" allowfullscreen></iframe>
+ ++++++++++++
+
+ https://www.youtube.com/watch?v=mngfxzXkFLw
diff --git a/debian/patches/0007-pygmentize-lexer.patch b/debian/patches/0007-pygmentize-lexer.patch
new file mode 100644
index 0000000..153edd3
--- /dev/null
+++ b/debian/patches/0007-pygmentize-lexer.patch
@@ -0,0 +1,81 @@
+From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
+Subject: Patch to avoid using the custom lexer
+ This patch makes some changes to the crmsh doc build so it doesn't use
+ the included custom lexer.
+Forwarded: not-needed
+Last-Update: 2016-09-23
+
+--- a/doc/website-v1/history-guide.adoc
++++ b/doc/website-v1/history-guide.adoc
+@@ -51,7 +51,7 @@
+ preparing this document we noticed that a probe failed repeatedly
+ on a node which wasn't even running the resource <<Listing 2>>.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 2: "]
+ .crm status output[[Listing 2]]
+ -----------------
+@@ -61,7 +61,7 @@
+ The history +resource+ command shows log messages relevant to the
+ supplied resource <<Listing 3>>.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 3: "]
+ .Logs on failed +nfs-server+ probe operation[[Listing 3]]
+ -----------------
+@@ -88,7 +88,7 @@
+ tracing of the resource agent. <<Listing 4>> shows how to do
+ that.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 4: "]
+ .Set `nfs-server` probe operation resource tracing[[Listing 4]]
+ -----------------
+@@ -126,7 +126,7 @@
+ To begin, we run the `info` command which gives an overview, as
+ shown in <<Listing 5>>.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 5: "]
+ .Basic history information[[Listing 5]]
+ -----------------
+@@ -155,7 +155,7 @@
+ The listing is annotated to explain the output in more detail.
+
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 6: "]
+ .Viewing transitions[[Listing 6]]
+ -----------------
+@@ -194,7 +194,7 @@
+ It may sometimes be useful to see what changed between two
+ transitions. History `diff` command is in action in <<Listing 7>>.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 7: "]
+ .Viewing transitions[[Listing 7]]
+ -----------------
+@@ -212,7 +212,7 @@
+ actions of that transition are yet to be executed. So, the status
+ section of transition _N_ corresponds to the configuration _N-1_.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 8: "]
+ .Full transition log[[Listing 8]]
+ -----------------
+@@ -232,7 +232,7 @@
+ recommendable), then use the history `detail` command to
+ increase the level of detail displayed.
+
+-[source,ansiclr]
++[source,c]
+ [caption="Listing 9: "]
+ .Resource related messages[[Listing 9]]
+ -----------------
diff --git a/debian/patches/0010-Fix-package-management.patch b/debian/patches/0010-Fix-package-management.patch
new file mode 100644
index 0000000..a4da58f
--- /dev/null
+++ b/debian/patches/0010-Fix-package-management.patch
@@ -0,0 +1,33 @@
+Description: Use dpkg and apt for package management
+Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
+Last-Update: 2019-01-12
+--- a/utils/crm_init.py
++++ b/utils/crm_init.py
+@@ -27,12 +27,12 @@
+ def service_info(service):
+ "Returns information about a given service"
+ active, enabled = 'unknown', 'unknown'
+- rc, out, err = crm_script.call(["/usr/bin/systemctl", "is-enabled", "%s.service" % (service)])
++ rc, out, err = crm_script.call(["/bin/systemctl", "is-enabled", "%s.service" % (service)])
+ if rc in (0, 1, 3) and out:
+ enabled = out.strip()
+ else:
+ return {'name': service, 'error': err.strip()}
+- rc, out, err = crm_script.call(["/usr/bin/systemctl", "is-active", "%s.service" % (service)])
++ rc, out, err = crm_script.call(["/bin/systemctl", "is-active", "%s.service" % (service)])
+ if rc in (0, 1, 3) and out:
+ active = out.strip()
+ else:
+--- a/utils/crm_script.py
++++ b/utils/crm_script.py
+@@ -133,8 +133,8 @@
+
+ def service(name, action):
+ if action.startswith('is-'):
+- return call(['/usr/bin/systemctl', action, name + '.service'])
+- return sudo_call(['/usr/bin/systemctl', action, name + '.service'])
++ return call(['/bin/systemctl', action, name + '.service'])
++ return sudo_call(['/bin/systemctl', action, name + '.service'])
+
+
+ def package(name, state):
diff --git a/debian/patches/0011-Fix-scripts-init.patch b/debian/patches/0011-Fix-scripts-init.patch
new file mode 100644
index 0000000..dfdef5a
--- /dev/null
+++ b/debian/patches/0011-Fix-scripts-init.patch
@@ -0,0 +1,14 @@
+Description: Make cluster init work on Debian
+Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
+Last-Update: 2016-11-19
+--- a/crmsh/corosync.py
++++ b/crmsh/corosync.py
+@@ -609,7 +609,7 @@
+ fileline: off
+ to_stderr: no
+ to_logfile: yes
+- logfile: /var/log/cluster/corosync.log
++ logfile: /var/log/corosync/corosync.log
+ to_syslog: yes
+ debug: off
+ timestamp: on
diff --git a/debian/patches/0012-Fix-crm-history.patch b/debian/patches/0012-Fix-crm-history.patch
new file mode 100644
index 0000000..614fc01
--- /dev/null
+++ b/debian/patches/0012-Fix-crm-history.patch
@@ -0,0 +1,24 @@
+Description: Fix detection of cluster events
+ hb_report looks at /var/log/messages for cluster events by default.
+ On Debian systems this file only contains kernel messages so we use
+ /var/log/syslog instead.
+ .
+ Since the pacemaker looging moved to /var/log/pacemaker.log rather
+ than syslog, only this new file contains info on transitions so
+ use it instead of standard syslog messaging.
+Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
+Bug: https://github.com/ClusterLabs/crmsh/issues/169
+Last-Update: 2019-01-12
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/crmsh/history.py
++++ b/crmsh/history.py
+@@ -21,7 +21,7 @@
+ logger = log.setup_logger(__name__)
+
+
+-_LOG_FILES = ("ha-log.txt", "messages", "ha-log", "cluster-log.txt", "journal.log", "pacemaker.log")
++_LOG_FILES = ("ha-log.txt", "syslog", "ha-log", "cluster-log.txt", "journal.log", "pacemaker.log")
+
+
+ #
diff --git a/debian/patches/0013-Fix-cluster-bootstrap.patch b/debian/patches/0013-Fix-cluster-bootstrap.patch
new file mode 100644
index 0000000..342d3fd
--- /dev/null
+++ b/debian/patches/0013-Fix-cluster-bootstrap.patch
@@ -0,0 +1,70 @@
+Description: Fix cluster init on Debian
+ Update file paths and service names to work better on Debian.
+Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
+Last-Update: 2019-01-12
+--- a/crmsh/utils.py
++++ b/crmsh/utils.py
+@@ -2495,13 +2495,13 @@
+ """
+ Check if package is installed
+ """
+- cmd = "rpm -q --quiet {}".format(pkg)
++ cmd = "dpkg-query --status {}".format(pkg)
+ if remote_addr:
+ # check on remote
+ rc, _, _ = sh.cluster_shell().get_rc_stdout_stderr_without_input(remote_addr, cmd)
+ else:
+ # check on local
+- rc, _ = ShellUtils().get_stdout(cmd)
++ rc, _, _ = ShellUtils().get_stdout_stderr(cmd)
+ return rc == 0
+
+
+--- a/crmsh/bootstrap.py
++++ b/crmsh/bootstrap.py
+@@ -52,12 +52,12 @@
+ logger_utils = log.LoggerUtils(logger)
+
+
+-CSYNC2_KEY = "/etc/csync2/key_hagroup"
+-CSYNC2_CFG = "/etc/csync2/csync2.cfg"
++CSYNC2_KEY = "/etc/csync2.key_hagroup"
++CSYNC2_CFG = "/etc/csync2.cfg"
+ COROSYNC_AUTH = "/etc/corosync/authkey"
+ CRM_CFG = "/etc/crm/crm.conf"
+ PROFILES_FILE = "/etc/crm/profiles.yml"
+-SYSCONFIG_SBD = "/etc/sysconfig/sbd"
++SYSCONFIG_SBD = "/etc/default/sbd"
+ SYSCONFIG_PCMK = "/etc/sysconfig/pacemaker"
+ SYSCONFIG_NFS = "/etc/sysconfig/nfs"
+ SYSCONFIG_FW = "/etc/sysconfig/SuSEfirewall2"
+@@ -1385,7 +1385,7 @@
+ clustername=_context.cluster_name,
+ ringXaddr=ringXaddr_res,
+ mcastport=mcastport_res,
+- transport="udpu",
++ transport="knet",
+ ipv6=_context.ipv6,
+ two_rings=two_rings)
+ sync_file(corosync.conf())
+--- a/crmsh/corosync.py
++++ b/crmsh/corosync.py
+@@ -643,7 +643,7 @@
+ two_rings=False,
+ qdevice=None):
+
+- if transport == "udpu":
++ if transport == "knet":
+ ring_tmpl = ""
+ for i in 0, 1:
+ ring_tmpl += " ring{}_addr: {}\n".format(i, ringXaddr[i])
+@@ -682,6 +682,9 @@
+ expected_votes: 1
+ two_node: 0
+ }
++resources {
++ watchdog_device: off
++}
+ """
+ if qdevice is not None:
+ quorum_tmpl = """quorum {
diff --git a/debian/patches/0014-Fix-cluster-stop-start.patch b/debian/patches/0014-Fix-cluster-stop-start.patch
new file mode 100644
index 0000000..a36b5eb
--- /dev/null
+++ b/debian/patches/0014-Fix-cluster-stop-start.patch
@@ -0,0 +1,17 @@
+Description: Fix crm cluster stop/start on Debian
+ Corosync remains running after 'crm cluster stop'.
+ Don't rely on systemd service dependencies to stop it
+ and also make it work with sysv init.
+Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
+Last-Update: 2017-10-20
+--- a/crmsh/ui_cluster.py
++++ b/crmsh/ui_cluster.py
+@@ -170,7 +170,7 @@
+ '''
+ Starts the cluster stack on all nodes or specific node(s)
+ '''
+- service_check_list = ["pacemaker.service"]
++ service_check_list = ["corosync.service", "pacemaker.service"]
+ start_qdevice = False
+ if utils.is_qdevice_configured():
+ start_qdevice = True
diff --git a/debian/patches/0015-Fix-testsuite-errors.patch b/debian/patches/0015-Fix-testsuite-errors.patch
new file mode 100644
index 0000000..b93250a
--- /dev/null
+++ b/debian/patches/0015-Fix-testsuite-errors.patch
@@ -0,0 +1,188 @@
+Description: Fix testsuite
+ Make sure testsuite output works with Pacemaker 2.
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2021-02-03
+--- a/test/unittests/test_utils.py
++++ b/test/unittests/test_utils.py
+@@ -34,12 +34,12 @@
+ mock_run.assert_called_once_with("crm_node -l")
+
+
+-@mock.patch("crmsh.sh.ShellUtils.get_stdout")
++@mock.patch("crmsh.sh.ShellUtils.get_stdout_stderr")
+ def test_package_is_installed_local(mock_run):
+- mock_run.return_value = (0, None)
++ mock_run.return_value = (0, None, None)
+ res = utils.package_is_installed("crmsh")
+ assert res is True
+- mock_run.assert_called_once_with("rpm -q --quiet crmsh")
++ mock_run.assert_called_once_with("dpkg-query --status crmsh")
+
+
+ @mock.patch('crmsh.utils.detect_file')
+--- a/test/unittests/test_sbd.py
++++ b/test/unittests/test_sbd.py
+@@ -512,9 +512,9 @@
+
+ self.sbd_inst._update_sbd_configuration()
+
+- mock_copy.assert_called_once_with("/usr/share/fillup-templates/sysconfig.sbd", "/etc/sysconfig/sbd")
+- mock_sysconfig.assert_called_once_with("/etc/sysconfig/sbd", SBD_WATCHDOG_DEV='/dev/watchdog', SBD_DEVICE='/dev/sdb1;/dev/sdc1', SBD_WATCHDOG_TIMEOUT="15")
+- mock_update.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_copy.assert_called_once_with("/usr/share/fillup-templates/sysconfig.sbd", "/etc/default/sbd")
++ mock_sysconfig.assert_called_once_with("/etc/default/sbd", SBD_WATCHDOG_DEV='/dev/watchdog', SBD_DEVICE='/dev/sdb1;/dev/sdc1', SBD_WATCHDOG_TIMEOUT="15")
++ mock_update.assert_called_once_with("/etc/default/sbd")
+
+ @mock.patch('crmsh.bootstrap.utils.parse_sysconfig')
+ def test_get_sbd_device_from_config_none(self, mock_parse):
+@@ -525,7 +525,7 @@
+ res = self.sbd_inst._get_sbd_device_from_config()
+ assert res == []
+
+- mock_parse.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_parse.assert_called_once_with("/etc/default/sbd")
+ mock_parse_inst.get.assert_called_once_with("SBD_DEVICE")
+
+ @mock.patch('crmsh.utils.re_split_string')
+@@ -539,7 +539,7 @@
+ res = self.sbd_inst._get_sbd_device_from_config()
+ assert res == ["/dev/sdb1", "/dev/sdc1"]
+
+- mock_parse.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_parse.assert_called_once_with("/etc/default/sbd")
+ mock_parse_inst.get.assert_called_once_with("SBD_DEVICE")
+ mock_split.assert_called_once_with(sbd.SBDManager.PARSE_RE, "/dev/sdb1;/dev/sdc1")
+
+@@ -712,7 +712,7 @@
+ mock_exists.return_value = False
+ self.sbd_inst.join_sbd("alice", "node1")
+ mock_package.assert_called_once_with("sbd")
+- mock_exists.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_exists.assert_called_once_with("/etc/default/sbd")
+ mock_invoke.assert_called_once_with("systemctl disable sbd.service")
+
+ @mock.patch('crmsh.bootstrap.invoke')
+@@ -727,7 +727,7 @@
+ self.sbd_inst.join_sbd("alice", "node1")
+
+ mock_package.assert_called_once_with("sbd")
+- mock_exists.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_exists.assert_called_once_with("/etc/default/sbd")
+ mock_invoke.assert_called_once_with("systemctl disable sbd.service")
+ mock_enabled.assert_called_once_with("sbd.service", "node1")
+
+@@ -751,7 +751,7 @@
+ self.sbd_inst.join_sbd("alice", "node1")
+
+ mock_package.assert_called_once_with("sbd")
+- mock_exists.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_exists.assert_called_once_with("/etc/default/sbd")
+ mock_invoke.assert_called_once_with("systemctl enable sbd.service")
+ mock_get_device.assert_called_once_with()
+ mock_verify.assert_called_once_with(["/dev/sdb1"], ["node1"])
+@@ -781,7 +781,7 @@
+ self.sbd_inst.join_sbd("alice", "node1")
+
+ mock_package.assert_called_once_with("sbd")
+- mock_exists.assert_called_once_with("/etc/sysconfig/sbd")
++ mock_exists.assert_called_once_with("/etc/default/sbd")
+ mock_invoke.assert_called_once_with("systemctl enable sbd.service")
+ mock_get_device.assert_called_once_with()
+ mock_warn.assert_called_once_with("node1")
+--- a/test/unittests/test_ui_cluster.py
++++ b/test/unittests/test_ui_cluster.py
+@@ -44,11 +44,13 @@
+ mock_qdevice_configured.return_value = False
+ context_inst = mock.Mock()
+ mock_parse_nodes.return_value = ["node1", "node2"]
+- mock_active.side_effect = [True, True]
++ mock_active.side_effect = [True, True, True, True]
+ self.ui_cluster_inst.do_start(context_inst, "node1", "node2")
+ mock_parse_nodes.assert_called_once_with(context_inst, "node1", "node2")
+ mock_active.assert_has_calls([
++ mock.call("corosync.service", remote_addr="node1"),
+ mock.call("pacemaker.service", remote_addr="node1"),
++ mock.call("corosync.service", remote_addr="node2"),
+ mock.call("pacemaker.service", remote_addr="node2")
+ ])
+ mock_info.assert_has_calls([
+@@ -67,12 +69,13 @@
+ context_inst = mock.Mock()
+ mock_start_pacemaker.return_value = ["node1"]
+ mock_parse_nodes.return_value = ["node1"]
+- mock_active.side_effect = [False, False]
++ mock_active.side_effect = [False, False, False]
+ mock_qdevice_configured.return_value = True
+
+ self.ui_cluster_inst.do_start(context_inst, "node1")
+
+ mock_active.assert_has_calls([
++ mock.call("corosync.service", remote_addr="node1"),
+ mock.call("pacemaker.service", remote_addr="node1"),
+ mock.call("corosync-qdevice.service", remote_addr="node1")
+ ])
+--- a/test/unittests/test_bootstrap.py
++++ b/test/unittests/test_bootstrap.py
+@@ -1760,7 +1760,7 @@
+ bootstrap.rm_configuration_files()
+ mock_run.assert_has_calls([
+ mock.call('rm -f file1 file2', None),
+- mock.call('cp /usr/share/fillup-templates/sysconfig.sbd /etc/sysconfig/sbd', None)
++ mock.call('cp /usr/share/fillup-templates/sysconfig.sbd /etc/default/sbd', None)
+ ])
+
+ @mock.patch('crmsh.utils.get_iplist_from_name')
+--- a/test/cibtests/001.exp.xml
++++ b/test/cibtests/001.exp.xml
+@@ -9,6 +9,9 @@
+ <resources>
+ <primitive id="rsc_dummy" class="ocf" provider="heartbeat" type="Dummy">
+ <operations>
++ <op name="monitor" timeout="20s" interval="10s" id="rsc_dummy-monitor-10s"/>
++ <op name="start" timeout="20s" interval="0s" id="rsc_dummy-start-0s"/>
++ <op name="stop" timeout="20s" interval="0s" id="rsc_dummy-stop-0s"/>
+ <op name="monitor" interval="30" id="rsc_dummy-monitor-30"/>
+ </operations>
+ </primitive>
+--- a/test/cibtests/002.exp.xml
++++ b/test/cibtests/002.exp.xml
+@@ -13,6 +13,11 @@
+ <nvpair name="interleave" value="true" id="testfs-clone-meta_attributes-interleave"/>
+ </meta_attributes>
+ <primitive id="testfs" class="ocf" provider="heartbeat" type="Dummy">
++ <operations>
++ <op name="monitor" timeout="20s" interval="10s" id="testfs-monitor-10s"/>
++ <op name="start" timeout="20s" interval="0s" id="testfs-start-0s"/>
++ <op name="stop" timeout="20s" interval="0s" id="testfs-stop-0s"/>
++ </operations>
+ <instance_attributes id="testfs-instance_attributes">
+ <nvpair name="fake" value="1" id="testfs-instance_attributes-fake"/>
+ </instance_attributes>
+--- a/test/cibtests/003.exp.xml
++++ b/test/cibtests/003.exp.xml
+@@ -14,6 +14,11 @@
+ <nvpair id="testfs-clone-meta_attributes-target-role" name="target-role" value="Stopped"/>
+ </meta_attributes>
+ <primitive id="testfs" class="ocf" provider="heartbeat" type="Dummy">
++ <operations>
++ <op name="monitor" timeout="20s" interval="10s" id="testfs-monitor-10s"/>
++ <op name="start" timeout="20s" interval="0s" id="testfs-start-0s"/>
++ <op name="stop" timeout="20s" interval="0s" id="testfs-stop-0s"/>
++ </operations>
+ <instance_attributes id="testfs-instance_attributes">
+ <nvpair name="fake" value="2" id="testfs-instance_attributes-fake"/>
+ </instance_attributes>
+--- a/test/cibtests/004.exp.xml
++++ b/test/cibtests/004.exp.xml
+@@ -14,6 +14,11 @@
+ <nvpair id="testfs-clone-meta_attributes-target-role" name="target-role" value="Started"/>
+ </meta_attributes>
+ <primitive id="testfs" class="ocf" provider="heartbeat" type="Dummy">
++ <operations>
++ <op name="monitor" timeout="20s" interval="10s" id="testfs-monitor-10s"/>
++ <op name="start" timeout="20s" interval="0s" id="testfs-start-0s"/>
++ <op name="stop" timeout="20s" interval="0s" id="testfs-stop-0s"/>
++ </operations>
+ <instance_attributes id="testfs-instance_attributes">
+ <nvpair name="fake" value="hello" id="testfs-instance_attributes-fake"/>
+ </instance_attributes>
diff --git a/debian/patches/0016-Fix-python2-calls.patch b/debian/patches/0016-Fix-python2-calls.patch
new file mode 100644
index 0000000..568ccd6
--- /dev/null
+++ b/debian/patches/0016-Fix-python2-calls.patch
@@ -0,0 +1,138 @@
+Description: Build using only python 3
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2019-08-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/doc/website-v1/Makefile
++++ b/doc/website-v1/Makefile
+@@ -54,6 +54,7 @@
+ XDGOPEN := xdg-open
+ NEWS := $(wildcard news/*.adoc)
+ NEWSDOC := $(patsubst %.adoc,gen/%/index.html,$(NEWS))
++PYTHON := python3
+
+ .PHONY: all clean deploy open
+
+@@ -62,33 +63,33 @@
+ gen/index.html: index.adoc $(CRMCONF)
+ @mkdir -p $(dir $@)
+ @$(ASCIIDOC) --unsafe -b html5 -a icons -a iconsdir=/img/icons -f $(CRMCONF) -o $@ $<
+- @python ./postprocess.py -o $@ $<
++ @$(PYTHON) ./postprocess.py -o $@ $<
+
+ gen/%/index.html: %.adoc $(CRMCONF)
+ @mkdir -p $(dir $@)
+ @$(ASCIIDOC) --unsafe -b html5 -a icons -a iconsdir=/img/icons -f $(CRMCONF) -o $@ $<
+- @python ./postprocess.py -o $@ $<
++ @$(PYTHON) ./postprocess.py -o $@ $<
+
+ gen/history-guide/index.html: $(HISTORY_LISTINGS)
+
+ gen/man/index.html: ../crm.8.adoc $(CRMCONF)
+ @mkdir -p $(dir $@)
+ @$(ASCIIDOC) --unsafe -b html5 -f $(CRMCONF) -o $@ $<
+- @python ./postprocess.py -o $@ $<
++ @$(PYTHON) ./postprocess.py -o $@ $<
+
+ gen/404.html: 404.adoc $(CRMCONF)
+ @mkdir -p $(dir $@)
+ @$(ASCIIDOC) --unsafe -b html5 -f $(CRMCONF) -o $@ $<
+- @python ./postprocess.py -o $@ $<
++ @$(PYTHON) ./postprocess.py -o $@ $<
+
+ news.adoc: $(NEWS) $(CRMCONF)
+ @echo "news:" $(NEWS)
+- python ./make-news.py $@ $(NEWS)
++ $(PYTHON) ./make-news.py $@ $(NEWS)
+
+ gen/news/index.html: news.adoc
+ @mkdir -p $(dir $@)
+ $(ASCIIDOC) --unsafe -b html5 -f $(CRMCONF) -o $@ $<
+- @python ./postprocess.py -o $@ $<
++ @$(PYTHON) ./postprocess.py -o $@ $<
+
+ gen/css/%.css: css/%.css
+ @mkdir -p gen/css
+@@ -127,7 +128,7 @@
+
+ gen/atom.xml: $(NEWSDOC)
+ @echo "atom:" $(NEWSDOC)
+- python ./make-news.py gen/atom.xml $(NEWS)
++ $(PYTHON) ./make-news.py gen/atom.xml $(NEWS)
+
+ site: gen/atom.xml gen/index.html gen/404.html gen/news/index.html gen/man/index.html $(TGT) $(CSS) $(IMG) $(FONTS) $(NEWSDOC)
+ @which dos2unix >/dev/null && find gen -name "*.html" -type f -exec dos2unix {} \;
+--- a/doc/website-v1/postprocess.py
++++ b/doc/website-v1/postprocess.py
+@@ -48,7 +48,7 @@
+ def generate_toc(infile, outfile, debug):
+
+ if debug:
+- print "Infile:", infile
++ print("Infile:", infile)
+ toc = read_toc_data(infile, debug)
+ '''
+ toc_data = []
+@@ -57,7 +57,7 @@
+ m = section.match(line)
+ if m:
+ if debug:
+- print "toc_data: %s" % str(((m.group('depth'), m.group('text'), m.group('id'))))
++ print("toc_data: %s" % str(((m.group('depth'), m.group('text'), m.group('id')))))
+ toc_data.append((m.group('depth'), m.group('text'), m.group('id')))
+
+ toc = ''
+@@ -73,11 +73,11 @@
+ # Write TOC to outfile
+ if outfile:
+ if debug:
+- print "Writing TOC:"
+- print "----"
+- print toc
+- print "----"
+- print "Outfile:", outfile
++ print("Writing TOC:")
++ print("----")
++ print(toc)
++ print("----")
++ print("Outfile:", outfile)
+ fil = open(outfile)
+ f = fil.readlines()
+ fil.close()
+@@ -96,14 +96,14 @@
+ m = section.match(line)
+ if m:
+ if debug:
+- print "toc_data: %s" % str(((m.group('depth'), m.group('text'), m.group('id'))))
++ print("toc_data: %s" % str(((m.group('depth'), m.group('text'), m.group('id')))))
+ toc_data.append((m.group('depth'), m.group('text'), m.group('id')))
+
+ toc = ''
+ if len(toc_data) > 0:
+ toc = '<div id="toc">\n'
+ for depth, text, link in toc_data:
+- if depth >= 2 and link is not None:
++ if int(depth) >= 2 and link is not None:
+ toc += '<div class="toclevel%s"><a href="#%s">%s</a></div>\n' % (
+ int(depth) - 1, link, text)
+ toc += '</div>\n'
+@@ -126,7 +126,7 @@
+ debug = args.debug
+ outfile = args.output
+ infile = args.input
+- print "+ %s -> %s" % (infile, outfile)
++ print("+ %s -> %s" % (infile, outfile))
+ gen = False
+ for tocpage in TOC_PAGES:
+ if not gen and outfile.endswith(tocpage):
+--- a/doc/website-v1/make-news.py
++++ b/doc/website-v1/make-news.py
+@@ -63,7 +63,7 @@
+ raise ValueError("Missing date")
+
+ def atom_id(self):
+- return root_id + '::' + hashlib.sha1(self.filename).hexdigest()
++ return root_id + '::' + hashlib.sha1(self.filename.encode('utf-8')).hexdigest()
+
+ def atom_date(self):
+ return self.date.replace(' ', 'T') + ':00' + time.tzname[0]
diff --git a/debian/patches/0017-Fix-profiles-adoc.patch b/debian/patches/0017-Fix-profiles-adoc.patch
new file mode 100644
index 0000000..ece2773
--- /dev/null
+++ b/debian/patches/0017-Fix-profiles-adoc.patch
@@ -0,0 +1,17 @@
+Description: Skip building profiles as a separate document
+ It is included in crm(8) already.
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2022-05-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -29,7 +29,7 @@
+ contribdir = $(docdir)/contrib
+ contrib_DATA = contrib/pcmk.vim contrib/README.vimsyntax
+ helpdir = $(datadir)/$(PACKAGE)
+-asciiman = doc/crm.8.adoc doc/crmsh_crm_report.8.adoc doc/profiles.adoc
++asciiman = doc/crm.8.adoc doc/crmsh_crm_report.8.adoc
+ help_DATA = doc/crm.8.adoc
+
+ generated_docs =
diff --git a/debian/patches/0018-Fix-python3-install.patch b/debian/patches/0018-Fix-python3-install.patch
new file mode 100644
index 0000000..de1c33e
--- /dev/null
+++ b/debian/patches/0018-Fix-python3-install.patch
@@ -0,0 +1,16 @@
+Description: Fix build failure with new version of setuptools
+ Files get installed in /usr/local.
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2022-10-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -69,6 +69,7 @@
+ $(PYTHON) $(srcdir)/setup.py install \
+ --root $(DESTDIR)/// \
+ $(python_prefix) \
++ --install-layout=deb \
+ --record $(DESTDIR)$(pkgpythondir)/install_files.txt \
+ --verbose
+ $(INSTALL) -d -m 770 $(DESTDIR)$(CRM_CACHE_DIR)
diff --git a/debian/patches/0019-Remove-news-adoc.patch b/debian/patches/0019-Remove-news-adoc.patch
new file mode 100644
index 0000000..be0fed7
--- /dev/null
+++ b/debian/patches/0019-Remove-news-adoc.patch
@@ -0,0 +1,34 @@
+Description: Fix rebuild failure due to generated files
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2023-10-10
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/doc/website-v1/news.adoc
++++ /dev/null
+@@ -1,26 +0,0 @@
+-= News
+-
+-link:/news/2017-01-31-release-3_0_0[2017-01-31 10:00]
+-
+-:leveloffset: 1
+-
+-include::news/2017-01-31-release-3_0_0.adoc[]
+-
+-:leveloffset: 0
+-
+-''''
+-* link:/news/2016-09-05-release-2_2_2[2016-09-05 19:00 Releasing crmsh version 2.2.2]
+-* link:/news/2016-09-02-release-2_3_1[2016-09-02 10:00 Releasing crmsh version 2.3.1]
+-* link:/news/2016-09-01-release-2_1_7[2016-09-01 09:00 Announcing crmsh stable release 2.1.7]
+-* link:/news/2016-08-12-release-2_3_0[2016-08-12 10:30 Releasing crmsh version 2.3.0]
+-* link:/news/2016-04-28-release-2_2_1[2016-04-28 01:00 crmsh 2.2.1 and 2.1.6 are released]
+-* link:/news/2016-01-15-release-2_2_0[2016-01-15 15:00 crmsh 2.2.0 is released]
+-* link:/news/2016-01-12-release-2_1_5[2016-01-12 10:00 Announcing crmsh stable release 2.1.5]
+-* link:/news/2015-05-25-getting-started-jp[2015-05-25 13:30 Getting Started translated to Japanese]
+-* link:/news/2015-05-13-release-2_1_4[2015-05-13 15:30 Announcing crmsh stable release 2.1.4]
+-* link:/news/2015-04-10-release-2_1_3[2015-04-10 12:30 Announcing crmsh stable release 2.1.3]
+-* link:/news/2015-01-26-release-2_1_2[2015-01-26 11:05 Announcing crmsh release 2.1.2]
+-* link:/news/2014-10-28-release-2_1_1[2014-10-29 00:20 Announcing crmsh release 2.1.1]
+-* link:/news/2014-06-30-release-2_1[2014-06-30 09:00 Announcing crmsh release 2.1]
+-
+-link:https://savannah.nongnu.org/news/?group_id=10890[Old News Archive]
diff --git a/debian/patches/0020-Replace-distutils.patch b/debian/patches/0020-Replace-distutils.patch
new file mode 100644
index 0000000..fd5cfb3
--- /dev/null
+++ b/debian/patches/0020-Replace-distutils.patch
@@ -0,0 +1,75 @@
+Description: Fix build with python 3.12
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2024-03-04
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/crmsh/ra.py
++++ b/crmsh/ra.py
+@@ -50,15 +50,15 @@
+
+ @utils.memoize
+ def can_use_lrmadmin():
+- from distutils import version
++ from packaging.version import Version
+ # after this glue release all users can get meta-data and
+ # similar from lrmd
+ minimum_glue = "1.0.10"
+ _rc, glue_ver = ShellUtils().get_stdout("%s -v" % lrmadmin_prog, stderr_on=False)
+ if not glue_ver: # lrmadmin probably not found
+ return False
+- v_min = version.LooseVersion(minimum_glue)
+- v_this = version.LooseVersion(glue_ver)
++ v_min = Version(minimum_glue)
++ v_this = Version(glue_ver)
+ if v_this < v_min:
+ return False
+ if userdir.getuser() not in ("root", config.path.crm_daemon_user):
+--- a/crmsh/utils.py
++++ b/crmsh/utils.py
+@@ -37,7 +37,7 @@
+ from . import constants
+ from . import options
+ from . import term
+-from distutils.version import LooseVersion
++from packaging import version
+ from .constants import SSH_OPTION
+ from . import log
+ from .prun import prun
+@@ -1632,8 +1632,15 @@
+ return val_l
+
+
+-def is_larger_than_min_version(version, min_version):
+- return LooseVersion(version) >= LooseVersion(min_version)
++def is_larger_than_min_version(this_version, min_version):
++ version_re = re.compile(version.VERSION_PATTERN, re.VERBOSE | re.IGNORECASE)
++ match1 = version_re.search(this_version)
++ if not match1:
++ raise InvalidVersion(f"Invalid version: '{this_version}'")
++ match2 = version_re.search(min_version)
++ if not match2:
++ raise InvalidVersion(f"Invalid version: '{min_version}'")
++ return version.parse(match1.group(0)) >= version.parse(match2.group(0))
+
+
+ def is_min_pcmk_ver(min_ver, cib_f=None):
+--- a/test/unittests/test_utils.py
++++ b/test/unittests/test_utils.py
+@@ -7,7 +7,7 @@
+ import os
+ import socket
+ import re
+-import imp
++import importlib
+ import subprocess
+ import unittest
+ import pytest
+@@ -24,7 +24,7 @@
+ utils._ip_for_cloud = None
+ # Mock memoize method and reload the module under test later with imp
+ mock.patch('crmsh.utils.memoize', lambda x: x).start()
+- imp.reload(utils)
++ importlib.reload(utils)
+
+
+ @mock.patch("crmsh.sh.ShellUtils.get_stdout_stderr")
diff --git a/debian/patches/0021-Fix-bootstrap-bash.patch b/debian/patches/0021-Fix-bootstrap-bash.patch
new file mode 100644
index 0000000..943aeb9
--- /dev/null
+++ b/debian/patches/0021-Fix-bootstrap-bash.patch
@@ -0,0 +1,25 @@
+Description: Fix bootstrap with dash
+Author: Valentin Vidic <vvidic@debian.org>
+Last-Update: 2024-02-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/crmsh/ssh_key.py
++++ b/crmsh/ssh_key.py
+@@ -235,7 +235,7 @@
+ ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -C "Cluster internal on $(hostname)" -N '' <> /dev/null
+ echo 'GENERATED=1'
+ fi
+-for file in ~/.ssh/id_{{{pattern}}}; do
++for file in {pattern}; do
+ if [ -f "$file" ]; then
+ if ! [ -f "$file".pub ]; then
+ ssh-keygen -y -f "$file" > "$file".pub
+@@ -245,7 +245,7 @@
+ done
+ '''.format(
+ condition=' -o '.join([f'-f ~/.ssh/id_{t}' for t in self.KNOWN_KEY_TYPES]),
+- pattern=','.join(self.KNOWN_KEY_TYPES),
++ pattern=' '.join([f'~/.ssh/id_{t}' for t in self.KNOWN_KEY_TYPES]),
+ )
+ result = self.cluster_shell.subprocess_run_without_input(
+ host, user,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b77d82f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,17 @@
+0003-Add-remote-resource-to-local-cache.patch
+0004-Fix-privacy-breach-generic-caused-by-footer-template.patch
+0005-Fix-privacy-breach-generic-caused-by-atom-xml-templa.patch
+0006-Fix-privacy-breach-generic-caused-by-youtube-iframe.patch
+0007-pygmentize-lexer.patch
+0010-Fix-package-management.patch
+0011-Fix-scripts-init.patch
+0012-Fix-crm-history.patch
+0013-Fix-cluster-bootstrap.patch
+0014-Fix-cluster-stop-start.patch
+0015-Fix-testsuite-errors.patch
+0016-Fix-python2-calls.patch
+0017-Fix-profiles-adoc.patch
+0018-Fix-python3-install.patch
+0019-Remove-news-adoc.patch
+0020-Replace-distutils.patch
+0021-Fix-bootstrap-bash.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..19d41fe
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,65 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#DH_VERBOSE = 1
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Ensure that we link against all needed libraries (cf. Policy 10.2)
+export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
+
+# Properly support multi-arch triplet paths
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# If your package provides eggs, install egg-info directories instead of real eggs
+DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed
+
+# main packaging script based on dh7 syntax
+%:
+ dh $@ --with python3
+
+override_dh_missing:
+ dh_missing --fail-missing
+
+override_dh_auto_configure:
+ dh_auto_configure -- --prefix=/usr --sysconfdir=/etc \
+ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --includedir=/usr/include/$(DEB_HOST_MULTIARCH) \
+ --datadir=/usr/share --docdir=/usr/share/doc/crmsh --htmldir=/usr/share/doc/crmsh/html
+
+# Make generated documentation reproducible
+override_dh_auto_build: export TZ=UTC
+override_dh_auto_build:
+ dh_auto_build
+# Manually invoke building of the asciidoc html documentation
+ cd $(CURDIR)/doc/website-v1 && $(MAKE)
+
+DOC = debian/tmp/usr/share/doc/crmsh
+
+override_dh_auto_install:
+ dh_auto_install
+# remove redundant files
+ rm -v $(DOC)/COPYING
+# move README to doc dir
+ mv debian/tmp/usr/share/crmsh/tests/README.regression $(DOC)/README.regression
+# keep crm in /usr/sbin for now
+ install -D debian/tmp/usr/bin/crm debian/tmp/usr/sbin/crm
+ rm debian/tmp/usr/bin/crm
+# remove uninstall file list (breaks reproducible builds)
+ rm debian/tmp/usr/lib/python*/site-packages/crmsh/install_files.txt
+# install bash completion
+ install -m 644 -D contrib/bash_completion.sh debian/tmp/usr/share/bash-completion/completions/crm
+# install vim plugin
+ install -m 644 -D debian/vim-pcmk.yaml debian/tmp/usr/share/vim/registry/vim-pcmk.yaml
+ install -m 644 -D contrib/pcmk-ftdetect.vim debian/tmp/usr/share/vim/addons/ftdetect/pcmk.vim
+ install -m 644 -D contrib/pcmk.vim debian/tmp/usr/share/vim/addons/syntax/pcmk.vim
+ rm -r debian/tmp/usr/share/doc/crmsh/contrib/
+# fix timestamps on patched files for reproducible build
+ find debian/tmp -print0 | xargs -0 touch --date=@$${SOURCE_DATE_EPOCH}
+
+# clean with python 3
+override_dh_auto_clean:
+ python3 setup.py clean -a
+
+override_dh_clean:
+ dh_clean build/ doc/*.8 doc/*.html doc/website-v1/gen/
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
new file mode 100644
index 0000000..33c3a64
--- /dev/null
+++ b/debian/salsa-ci.yml
@@ -0,0 +1,4 @@
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 0000000..2ace81b
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1 @@
+debian/patches/0003-Add-remote-resource-to-local-cache.patch
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..b2b7b88
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1 @@
+extend-diff-ignore="^[^/]+\.egg-info/"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..e67a361
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,32 @@
+Test-Command: crm --help
+Depends: crmsh
+Restrictions: needs-root
+
+Test-Command: crm help
+Depends: crmsh
+Restrictions: needs-root
+
+Test-Command: crm --version
+Depends: crmsh
+Restrictions: needs-root
+
+Tests: utils.sh
+Depends: crmsh, fence-virt
+Restrictions: needs-root, allow-stderr
+
+Tests: testsuite.sh
+Depends: crmsh, openssh-server, python3-pytest
+Restrictions: needs-root
+
+Tests: pacemaker-basic-resource.sh
+Depends: crmsh
+Restrictions: needs-root, allow-stderr, isolation-container, skippable
+
+Tests: pacemaker-node-status.sh
+Depends: crmsh
+Restrictions: needs-root, allow-stderr, isolation-container, skippable
+
+# Test disabled because it generates broken corosync config (missing nodelist)
+Tests: pacemaker-cluster-init.sh
+Depends: crmsh, csync2, ntp, ufw, openssh-server, dmidecode [any-amd64 arm64 armhf any-i386], booth, booth-pacemaker
+Restrictions: needs-root, allow-stderr, isolation-machine, skippable
diff --git a/debian/tests/pacemaker-basic-resource.sh b/debian/tests/pacemaker-basic-resource.sh
new file mode 100755
index 0000000..de2a4c4
--- /dev/null
+++ b/debian/tests/pacemaker-basic-resource.sh
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+set -ex
+
+DAEMON_TIMEOUT=60
+CRM_TIMEOUT=5
+RSC_NAME="test"
+rsc_check()
+{
+ if crm status | grep "$RSC_NAME[[:space:]][(]ocf::\?heartbeat:IPv6addr[)]:[[:space:]].*$1" >/dev/null; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+# https://bugs.launchpad.net/bugs/1828228
+ulimit -H -l unlimited 2>/dev/null || {
+ echo "test disabled for unprivileged namespaces"
+ exit 77
+}
+
+#
+# daemons start
+#
+
+service corosync start
+service pacemaker start
+sleep $DAEMON_TIMEOUT
+
+#
+# disable stonith and quorum
+#
+
+crm configure property stonith-enabled="false"
+crm configure property no-quorum-policy="ignore"
+sleep $CRM_TIMEOUT
+
+#
+# creation & start
+#
+
+crm configure primitive $RSC_NAME \
+ ocf:heartbeat:IPv6addr \
+ params ipv6addr="fe00::200" \
+ cidr_netmask="64" \
+ nic="lo"
+sleep $CRM_TIMEOUT
+crm resource start $RSC_NAME
+sleep $CRM_TIMEOUT
+if rsc_check "Started" ; then
+ : INFO resource creation and start OK
+else
+ : ERROR failed to start resource
+ exit 1
+fi
+
+#
+# restart
+#
+
+crm resource restart $RSC_NAME
+sleep $CRM_TIMEOUT
+if rsc_check "Started" ; then
+ : INFO resource restart OK
+else
+ : ERROR failed to restart resource
+ exit 1
+fi
+
+#
+# stop
+#
+
+crm resource stop $RSC_NAME
+sleep $CRM_TIMEOUT
+if rsc_check "Stopped" ; then
+ : INFO resource stop OK
+else
+ : ERROR failed to stop resource
+ exit 1
+fi
+
+#
+# delete
+#
+
+crm configure delete $RSC_NAME
+sleep $CRM_TIMEOUT
+if ! rsc_check "Stopped" ; then
+ : INFO resource delete OK
+else
+ : ERROR failed to delete resource
+ exit 1
+fi
+
+: INFO all tests OK
+exit 0
diff --git a/debian/tests/pacemaker-cluster-init.sh b/debian/tests/pacemaker-cluster-init.sh
new file mode 100755
index 0000000..a3cf349
--- /dev/null
+++ b/debian/tests/pacemaker-cluster-init.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -ex
+
+# https://bugs.launchpad.net/bugs/1828228
+ulimit -H -l unlimited 2>/dev/null || {
+ echo "test disabled for unprivileged namespaces"
+ exit 77
+}
+
+# ufw currently broken without /sbin/iptables
+if ! ufw status; then
+ test -e /sbin/iptables || ln -s /usr/sbin/iptables /sbin/iptables
+ test -e /sbin/ip6tables || ln -s /usr/sbin/ip6tables /sbin/ip6tables
+fi
+
+service corosync stop
+
+crm cluster init --yes --name=autopkgtest --unicast
+
+crm cluster geo_init --yes --clusters=autopkgtest=127.2.2.2 --tickets=ticket1
+crm resource start g-booth
+sleep 5
+
+crm status
+
+crm status | grep -q booth-ip.*Started
+crm status | grep -q booth-site.*Started
+
+: INFO all tests OK
+exit 0
diff --git a/debian/tests/pacemaker-node-status.sh b/debian/tests/pacemaker-node-status.sh
new file mode 100755
index 0000000..a0a2fbc
--- /dev/null
+++ b/debian/tests/pacemaker-node-status.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+set -ex
+
+DAEMON_TIMEOUT=60
+CRM_TIMEOUT=5
+
+# https://bugs.launchpad.net/bugs/1828228
+ulimit -H -l unlimited 2>/dev/null || {
+ echo "test disabled for unprivileged namespaces"
+ exit 77
+}
+
+#
+# daemons start
+#
+
+service corosync start
+service pacemaker start
+sleep $DAEMON_TIMEOUT
+
+# Get the node name as sugested in
+# https://lists.clusterlabs.org/pipermail/users/2022-May/030309.html
+NODE="$(crm_node -n)"
+if [ -z "$NODE" ]; then
+ echo "Could not detect node name"
+ exit 1
+fi
+# crmsh will try to ping the node name so make sure it can be resolved
+if ! getent hosts "$NODE" >/dev/null 2>&1; then
+ echo "127.0.0.1 $NODE" >> /etc/hosts
+fi
+
+#
+# online
+#
+
+crm status | grep "Online:.*$NODE"
+
+#
+# standby
+#
+
+crm node standby $NODE
+sleep $CRM_TIMEOUT
+crm status | grep "Node $NODE: standby"
+
+crm node online $NODE
+sleep $CRM_TIMEOUT
+crm status | grep "Online:.*$NODE"
+
+#
+# maintenance
+#
+
+crm node maintenance $NODE
+sleep $CRM_TIMEOUT
+crm status | grep "Node $NODE: maintenance"
+
+crm node ready $NODE
+sleep $CRM_TIMEOUT
+crm status | grep "Online:.*$NODE"
+
+#
+# attributes
+#
+
+crm node attribute $NODE set memory_size 1024
+crm node attribute $NODE show memory_size | grep 1024
+crm node utilization $NODE set memory 2048
+crm node utilization $NODE show memory | grep 2048
+crm node server
+crm node show
+
+: INFO all tests OK
+exit 0
diff --git a/debian/tests/testsuite.sh b/debian/tests/testsuite.sh
new file mode 100755
index 0000000..842551a
--- /dev/null
+++ b/debian/tests/testsuite.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+# prepare test env
+export PATH=$PATH:/usr/lib/pacemaker
+export PYTHONPATH=/usr/share/crmsh
+# test/unittests/test_report.py::test_ts_to_dt assumes UTC
+export TZ=UTC
+
+mkdir /usr/share/crmsh/doc
+
+# some tests fail if the cluster is running
+service pacemaker stop
+service corosync stop
+
+cd /usr/share/crmsh/tests/unittests
+printf "Running unittests...\n"
+py.test-3 -vv
+
+cp /usr/share/pacemaker/*.rng /usr/share/crmsh/tests/unittests/schemas/
+
+cd /usr/share/crmsh/tests
+printf "\nRunning cibtests...\n"
+./cib-tests.sh
+
+printf "\nRunning regressions...\n"
+./regression.sh -m buildbot || true
+cat crmtestout/regression.out
diff --git a/debian/tests/utils.sh b/debian/tests/utils.sh
new file mode 100755
index 0000000..6ff8480
--- /dev/null
+++ b/debian/tests/utils.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -ex
+
+export LC_ALL=C
+PKG=fence-virt
+
+dpkg --purge $PKG
+
+# package not installed
+/usr/share/crmsh/utils/crm_rpmcheck.py $PKG | grep error
+
+# install
+/usr/share/crmsh/utils/crm_pkg.py -n $PKG -s present | grep Unpacking
+/usr/share/crmsh/utils/crm_rpmcheck.py $PKG | grep status
+dpkg --status $PKG
+
+# upgrade
+/usr/share/crmsh/utils/crm_pkg.py -n $PKG -s latest | grep False
+
+# purge
+/usr/share/crmsh/utils/crm_pkg.py -n $PKG -s removed | egrep 'Removing|Purging'
+/usr/share/crmsh/utils/crm_rpmcheck.py $PKG | grep error
+
+# clean
+cd $AUTOPKGTEST_TMP
+mkdir dir
+touch dir/file
+cp /usr/share/crmsh/utils/crm_clean.py .
+$PWD/crm_clean.py $PWD/crm_clean.py $PWD/dir
+if ls | grep .; then
+ exit 1
+fi
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..2607150
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,4 @@
+Bug-Database: https://github.com/ClusterLabs/crmsh/issues
+Bug-Submit: https://github.com/ClusterLabs/crmsh/issues/new
+Repository: https://github.com/ClusterLabs/crmsh.git
+Repository-Browse: https://github.com/ClusterLabs/crmsh
diff --git a/debian/vim-pcmk.yaml b/debian/vim-pcmk.yaml
new file mode 100644
index 0000000..3163817
--- /dev/null
+++ b/debian/vim-pcmk.yaml
@@ -0,0 +1,5 @@
+addon: pcmk
+description: "The Pacemaker crmsh plugin for Vim"
+files:
+ - ftdetect/pcmk.vim
+ - syntax/pcmk.vim
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..64a1df1
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+
+opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \
+ https://github.com/ClusterLabs/crmsh/tags .*/v?(\d\S*)\.tar\.gz