From cc1f2d57937133e5ad90bef4067cc889dabae391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pr=C3=A9vot?= Date: Wed, 6 Sep 2023 14:26:08 +0530 Subject: [PATCH] Initial packaging --- debian/changelog | 5 +++ debian/check_patroni.1.in | 2 ++ debian/control | 27 +++++++++++++++ debian/copyright | 55 +++++++++++++++++++++++++++++++ debian/gbp.conf | 5 +++ debian/manpages | 1 + debian/python3-check-patroni.docs | 1 + debian/rules | 14 ++++++++ debian/source/format | 1 + debian/source/options | 1 + debian/upstream/metadata | 5 +++ debian/watch | 2 ++ 12 files changed, 119 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/check_patroni.1.in create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/manpages create mode 100644 debian/python3-check-patroni.docs create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/options create mode 100644 debian/upstream/metadata create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..4f3bfb1 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +check-patroni (1.0.0-1) unstable; urgency=medium + + * Initial release, initiated by py2dsp/3.20230219 + + -- David Prévot Wed, 06 Sep 2023 14:26:10 +0530 diff --git a/debian/check_patroni.1.in b/debian/check_patroni.1.in new file mode 100644 index 0000000..555dc3c --- /dev/null +++ b/debian/check_patroni.1.in @@ -0,0 +1,2 @@ +[name] +check-patroni \- Nagios plugin to check on patroni diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d092be0 --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: check-patroni +Section: utils +Priority: optional +Maintainer: David Prévot +Build-Depends: debhelper-compat (= 13), + help2man, + pybuild-plugin-pyproject, + python3-all, + python3-attr, + python3-click, + python3-nagiosplugin, + python3-pytest-mock, + python3-requests, + python3-setuptools +Standards-Version: 4.6.2 +Testsuite: autopkgtest-pkg-pybuild +Homepage: https://github.com/dalibo/check_patroni +Vcs-Git: https://salsa.debian.org/debian/check-patroni.git +Vcs-Browser: https://salsa.debian.org/debian/check-patroni +Rules-Requires-Root: no + +Package: check-patroni +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Description: Nagios plugin to check on patroni + A nagios plugin for patroni that checks presence of leader, replicas, + and node counts, and also checks each node for replication status. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7e9e590 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,55 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: check-patroni +Upstream-Contact: Dalibo +Source: https://github.com/dalibo/check_patroni + +Files: * +Copyright: 2022, DALIBO +License: PostgreSQL + +Files: vagrant/* +Copyright: 2019, Jehan-Guillaume (ioguix) de Rorthais +License: BSD-3-clause + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: PostgreSQL + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose, without fee, and without a written agreement is + hereby granted, provided that the above copyright notice and this paragraph and + the following two paragraphs appear in all copies. + . + IN NO EVENT SHALL DALIBO BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, + INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE + USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF DALIBO HAS BEEN ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. + . + DALIBO SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE + SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND DALIBO HAS NO + OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR + MODIFICATIONS. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..446c005 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,5 @@ +[DEFAULT] +debian-branch = debian/latest +pristine-tar = True +upstream-branch = upstream/latest +upstream-vcs-tag = v%(version%~%-)s diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..36d400a --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +debian/tmp/check_patroni.1 diff --git a/debian/python3-check-patroni.docs b/debian/python3-check-patroni.docs new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/debian/python3-check-patroni.docs @@ -0,0 +1 @@ +README.md diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c92ad71 --- /dev/null +++ b/debian/rules @@ -0,0 +1,14 @@ +#! /usr/bin/make -f + +export PYBUILD_NAME=check-patroni +%: + dh $@ --with python3 --buildsystem=pybuild + +execute_before_dh_installman: + mkdir --parent $(CURDIR)/debian/tmp + PYTHONPATH=debian/check-patroni/usr/lib/python3.11/dist-packages \ + help2man \ + --no-info \ + --include=$(CURDIR)/debian/check_patroni.1.in \ + debian/check-patroni/usr/bin/check_patroni \ + > $(CURDIR)/debian/tmp/check_patroni.1 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/options b/debian/source/options new file mode 100644 index 0000000..fb8b37b --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore="^[^/]+.(egg-info|dist-info)/" diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..ebf6596 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/dalibo/check_patroni/issues +Bug-Submit: https://github.com/dalibo/check_patroni/issues/new +Repository: https://github.com/dalibo/check_patroni.git +Repository-Browse: https://github.com/dalibo/check_patroni diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..c777381 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=4 +https://github.com/dalibo/check_patroni/tags (?:.*?/)?v?(\d[\d.]*)\.tar\.gz