summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-06-07 14:35:28 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-08-13 20:34:40 +0200
commit2f616834be2e6e104c9cd108e08030b2b4be68da (patch)
tree72ee3b8f1ef9117b5b6c52fb4adee1a5d4e861dd
parentf190cf2e44a0aa6666b6b3b6d7bb5fc0d758f823 (diff)
downloadhostinfo-maintainer-debian/0.1.5.tar.gz
hostinfo-maintainer-debian/0.1.5.tar.bz2
hostinfo-maintainer-debian/0.1.5.zip
debian: debianizationdebian/0.1.5
-rw-r--r--.gitignore1
-rw-r--r--Makefile13
-rw-r--r--debian/.gitignore2
-rw-r--r--debian/changelog30
-rw-r--r--debian/compat1
-rw-r--r--debian/control18
-rw-r--r--debian/copyright26
-rw-r--r--debian/cron.d3
-rwxr-xr-xdebian/rules5
-rwxr-xr-xmissing-maintainer-keys.in (renamed from missing-maintainer-keys)3
-rw-r--r--version.py42
11 files changed, 100 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..e51b26a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,30 @@
+hostinfo-maintainer (0.1.5) UNRELEASED; urgency=low
+
+ * missing-maintainer-keys: fix handling of None value for maintainers
+
+ -- Alexander Sulfrian <alex@spline.inf.fu-berlin.de> Tue, 13 Aug 2013 20:24:07 +0200
+
+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 988e4c0..594b20d 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()