diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2013-06-07 14:35:28 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-06-07 15:50:46 +0200 |
commit | b4f2fa215c2822b734877babba48e56fd49ea571 (patch) | |
tree | 20bf25c3ac4380abfd34deed363247fecca9a9ae | |
parent | d5bf1ab34f742a8801390a123aa730349bb87905 (diff) | |
download | hostinfo-maintainer-b4f2fa215c2822b734877babba48e56fd49ea571.tar.gz hostinfo-maintainer-b4f2fa215c2822b734877babba48e56fd49ea571.tar.bz2 hostinfo-maintainer-b4f2fa215c2822b734877babba48e56fd49ea571.zip |
debian: debianizationdebian/0.1.2
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | debian/.gitignore | 2 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 18 | ||||
-rw-r--r-- | debian/copyright | 26 | ||||
-rw-r--r-- | debian/cron.d | 1 | ||||
-rwxr-xr-x | debian/rules | 5 | ||||
-rwxr-xr-x | missing-maintainer-keys.in (renamed from missing-maintainer-keys) | 3 | ||||
-rw-r--r-- | version.py | 41 |
11 files changed, 73 insertions, 43 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..3705ce2 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +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..3463776 --- /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..66350cf --- /dev/null +++ b/debian/cron.d @@ -0,0 +1 @@ +*/5 * * * * 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 c3f5967..a0aef83 100755 --- a/missing-maintainer-keys +++ b/missing-maintainer-keys.in @@ -80,9 +80,8 @@ class MissingMaintainerKeysContext(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 a4c7ed6..0000000 --- a/version.py +++ /dev/null @@ -1,41 +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'], - 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() |