diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | debian/.gitignore | 2 | ||||
-rw-r--r-- | debian/changelog | 24 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 18 | ||||
-rw-r--r-- | debian/copyright | 26 | ||||
-rw-r--r-- | debian/cron.d | 3 | ||||
-rwxr-xr-x | debian/rules | 5 | ||||
-rwxr-xr-x | missing-maintainer-keys.in (renamed from missing-maintainer-keys) | 3 | ||||
-rw-r--r-- | version.py | 42 |
11 files changed, 94 insertions, 44 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e8d8004 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +missing-maintainer-keys diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a178da3 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +VERSION=$(shell dpkg-parsechangelog | sed -n 's/^Version: //p') + +all: + cp -a missing-maintainer-keys.in missing-maintainer-keys + sed -i 's/__VERSION__/$(VERSION)/' missing-maintainer-keys + +clean: + $(RM) missing-maintainer-keys + +install: + install -D missing-maintainer-keys $(DESTDIR)/usr/lib/nagios/plugins/missing-maintainer-keys diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..b72a3db --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,2 @@ +nagios-plugins-hostinfo-maintainer* +files diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6459025 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,24 @@ +hostinfo-maintainer (0.1.4) UNRELEASED; urgency=low + + * missing-maintainer-keys: allow extended maintainers + + -- Alexander Sulfrian <alex@spline.inf.fu-berlin.de> Tue, 13 Aug 2013 19:59:21 +0200 + +hostinfo-maintainer (0.1.3) UNRELEASED; urgency=low + + * version: show if working copy is dirty + * missing-maintainer-keys: add maintainer count to output + + -- Alexander Sulfrian <alex@spline.inf.fu-berlin.de> Mon, 10 Jun 2013 20:45:37 +0200 + +hostinfo-maintainer (0.1.2-2) UNRELEASED; urgency=low + + * debain/cron.d: set the required PATH + + -- Alexander Sulfrian <alex@spline.inf.fu-berlin.de> Fri, 07 Jun 2013 16:36:19 +0200 + +hostinfo-maintainer (0.1.2) unstable; urgency=low + + * Initial release. + + -- Alexander Sulfrian <alex@spline.inf.fu-berlin.de> Mon, 06 May 2013 17:31:41 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d681380 --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: hostinfo-maintainer +Section: net +Priority: extra +Maintainer: Alexander Sulfrian <alex@spline.inf.fu-berlin.de> +Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), + python-all (<< 3), dpkg-dev +Standards-Version: 3.9.1 +Homepage: http://git.spline.inf.fu-berlin.de/hostinfo-maintainer/ +Vcs-Git: git://git.spline.inf.fu-berlin.de/hostinfo-maintainer +X-Python-Version: >= 2.6, << 3.0 + +Package: nagios-plugins-hostinfo-maintainer +Architecture: all +Depends: ${python:Depends}, ${misc:Depends}, python-yaml, python-nagiosplugin, + nsca-ng-client | nsca-client +Description: nagios checks for maintainer information in hostinfo database + With this nagios checks you could run different checks concering + the maintainer information stored in the hostinfo database. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..7489c23 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This work was packaged for Debian by: + + Alexander Sulfrian <alex@spline.inf.fu-berlin.de> on Mon, 06 May 2013 17:30:15 +0200 + +It was downloaded from: + + http://git.spline.inf.fu-berlin.de/hostinfo-maintainer/ + +Upstream Author(s): + + Alexander Sulfrian <alex@spline.inf.fu-berlin.de> + +Copyright: + + Copyright (C) 2013 Alexander Sulfrian + +License: + + as-is + +The Debian packaging is: + + Copyright (C) 2013 Alexander Sulfrian <alex@spline.inf.fu-berlin.de> + +and is licensed under the GPL version 3, +see "/usr/share/common-licenses/GPL-3". diff --git a/debian/cron.d b/debian/cron.d new file mode 100644 index 0000000..f8f92f3 --- /dev/null +++ b/debian/cron.d @@ -0,0 +1,3 @@ +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin + +*/1 * * * * nobody invoke_check /usr/lib/nagios/plugins/missing-maintainer-keys diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..abde6ef --- /dev/null +++ b/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +%: + dh $@ + diff --git a/missing-maintainer-keys b/missing-maintainer-keys.in index 0022d5a..071116a 100755 --- a/missing-maintainer-keys +++ b/missing-maintainer-keys.in @@ -112,9 +112,8 @@ class MaintainersContext(nagiosplugin.Context): min="0") def print_version(): - import version self = os.path.basename(sys.argv[0]) - print("%s %s" % (self, version.get_git_version())) + print("%s __VERSION__" % self) sys.exit(nagiosplugin.Unknown.code) @nagiosplugin.guarded diff --git a/version.py b/version.py deleted file mode 100644 index 498ce51..0000000 --- a/version.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# To use this script, simply import it your setup.py file, and use the -# results of get_git_version() as your package version: -# -# from version import * -# -# setup( -# version=get_git_version(), -# . -# . -# . -# ) - -__all__ = ["get_git_version"] - -import os -import re -from subprocess import Popen, PIPE - -OWN_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__))) - -def call_git_describe(abbrev=4): - try: - p = Popen(['git', 'describe', '--abbrev=%d' % abbrev, - '--tags', '--dirty'], - cwd=OWN_DIR, stdout=PIPE, stderr=PIPE) - p.stderr.close() - line = p.stdout.readlines()[0] - return line.strip() - - except: - return None - -def get_git_version(abbrev=4): - version = call_git_describe(abbrev) - if version is None: - raise ValueError("Cannot find the version number!") - - return re.sub('^debian/', '', version) - -if __name__ == "__main__": - print get_git_version() |