Browse Source

Initial packaging. Closes: #977536

Christoph Biedl 1 year ago
parent
commit
d74f1dfead

+ 6 - 0
debian/changelog

@@ -0,0 +1,6 @@
+nagios-tang (7-1) unstable; urgency=medium
+
+  * Initial commit. Closes: #977536
+    The tang-nagios package was earlier provided by the src:tang package.
+
+ -- Christoph Biedl <debian.axhn@manchmal.in-ulm.de>  Wed, 23 Dec 2020 18:34:57 +0100

+ 28 - 0
debian/control

@@ -0,0 +1,28 @@
+Source: nagios-tang
+Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Homepage: https://github.com/latchset/nagios-tang
+Standards-Version: 4.5.0
+Vcs-Browser: https://git.in-ulm.de/cbiedl/nagios-tang
+Vcs-Git: https://git.in-ulm.de/cbiedl/nagios-tang.git
+Build-Depends: debhelper-compat (= 13),
+    asciidoctor,
+    cmake,
+    libhttp-parser-dev,
+    libjose-dev,
+    meson,
+    pkg-config,
+    systemd [linux-any],
+    tang [linux-any],
+Priority: optional
+Rules-Requires-Root: no
+Section: net
+
+Package: tang-nagios
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+    jose,
+Suggests:
+    tang,
+Description: monitoring plugin to check the tang server
+ This package provides a plugin to monitor a tang server, a service for
+ binding cryptographic keys to network presence.

+ 24 - 0
debian/copyright

@@ -0,0 +1,24 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: nagios-tang
+Source: https://github.com/latchset/nagios-tang
+
+Files: *
+Copyright: 2016 Red Hat, Inc.
+License: GPL-3.0+
+
+License: GPL-3.0+
+ This program 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 3 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 <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

+ 2 - 0
debian/patches/series

@@ -0,0 +1,2 @@
+# patches for upstream
+upstream.use-asciidoctor-to-build-manpages.patch

+ 21 - 0
debian/patches/upstream.use-asciidoctor-to-build-manpages.patch

@@ -0,0 +1,21 @@
+Subject: Use asciidoctor to build the manpages                                                              
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2018-10-30
+Bug: https://github.com/latchset/tang/issues/32
+
+--- a/meson.build
++++ b/meson.build
+@@ -61,10 +61,10 @@
+   warning('Will not run tests due to missing dependencies!')
+ endif
+ 
+-a2x = find_program('a2x', required: false)
+-if a2x.found()
++asciidoctor = find_program('asciidoctor', required: false)
++if asciidoctor.found()
+   custom_target('nagios-tang.1',
+-    command: [a2x, '-f', 'manpage', '-D', meson.current_build_dir(), '@INPUT@'],
++    command: [asciidoctor, '--attribute', 'reproducible', '--backend=manpage', '-D', meson.current_build_dir(), '@INPUT@'],
+     install_dir: join_paths(get_option('mandir'), 'man1'),
+     input: 'nagios-tang.1.adoc',
+     output: 'nagios-tang.1',

+ 8 - 0
debian/rules

@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS := hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+%:
+	dh $@

+ 1 - 0
debian/source/format

@@ -0,0 +1 @@
+3.0 (quilt)

+ 6 - 0
debian/tests/control

@@ -0,0 +1,6 @@
+Tests: run-testsuite
+Depends: @,
+    systemd,
+    tang,
+Architecture: linux-any
+Restrictions: allow-stderr

+ 20 - 0
debian/tests/run-testsuite

@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+TANG=
+
+for f in /usr/lib/*/nagios/plugins/tang ; do
+    [ -f "$f" ] || continue
+    [ -x "$f" ] || continue
+    TANG="$f"
+done
+
+if [ -z "$TANG" ] ; then
+    echo 'E: No (nagios-)tang executable found'
+    exit 1
+fi
+
+export PATH="$(dirname "$TANG"):/usr/libexec:$PATH"
+
+exec ./tang

+ 4 - 0
debian/watch

@@ -0,0 +1,4 @@
+
+version=4
+https://github.com/latchset/@PACKAGE@/releases \
+    /latchset/@PACKAGE@/releases/download/[^/]+/@PACKAGE@-([0-9][.0-9]*)@ARCHIVE_EXT@