From df7ea14eb748574407dd29385291df5f4550bbaa Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 6 May 2013 17:32:30 +0200 Subject: debian: debianization --- debian/.gitignore | 2 + debian/bash-completion | 1 + debian/changelog | 108 +++++++++++++++++++++++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 17 ++++++++ debian/copyright | 26 ++++++++++++ debian/rules | 5 +++ version.py | 13 ++++++ 8 files changed, 173 insertions(+) create mode 100644 debian/.gitignore create mode 100644 debian/bash-completion create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..9382cbe --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,2 @@ +hostinfo-tools* +files diff --git a/debian/bash-completion b/debian/bash-completion new file mode 100644 index 0000000..619d81e --- /dev/null +++ b/debian/bash-completion @@ -0,0 +1 @@ +contrib/bash-completion hostinfo diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f43be21 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,108 @@ +hostinfo-tools (0.2.1) unstable; urgency=low + + * utils: handle None values in group_by + + -- Alexander Sulfrian Wed, 10 Jul 2013 20:03:40 +0200 + +hostinfo-tools (0.2.0) unstable; urgency=low + + * hostinfo: add -V and --version to get the version + * hostinfo: _match and _match_key are now private functions + * hostinfo: add basic string matching for the search + * Printer: add force argument to force to print at least an empty entry + * hostinfo: add missing or + * utils: new group_by interface for generic grouping + * hostinfo: add filter for matching hosts + * hostinfo: add --details option + * hostinfo: add --only-names option + * hostinfo: fix some pylint + * hostinfo: add basic search mechanism + * Printer: add possibility to add label on top level + * hostinfo: migration from getopts to argparse + + -- Alexander Sulfrian Wed, 05 Jun 2013 19:30:01 +0200 + +hostinfo-tools (0.1.11) unstable; urgency=low + + * Printer: fix renaming of vserver-host to vserver_host + + -- Alexander Sulfrian Mon, 03 Jun 2013 16:20:21 +0200 + +hostinfo-tools (0.1.10) unstable; urgency=low + + * hostinfo: print keys of list elements + * Printer: recursive printing of lists + * Printer: allow to filter plain values + * Printer: fix printing of empty dicts + + -- Alexander Sulfrian Wed, 29 May 2013 19:08:10 +0200 + +hostinfo-tools (0.1.9) unstable; urgency=low + + * Printer: refactoring the whole thing for better pylint result + * bin/hostinfo: use realpath do find relativ lib path + + -- Alexander Sulfrian Wed, 29 May 2013 11:35:59 +0200 + +hostinfo-tools (0.1.8) unstable; urgency=low + + * bin/hostinfo: fix typo + + -- Alexander Sulfrian Fri, 17 May 2013 17:20:41 +0200 + +hostinfo-tools (0.1.7) unstable; urgency=low + + * contrib/bash-completion: add missing command line flags + + -- Alexander Sulfrian Fri, 17 May 2013 16:39:33 +0200 + +hostinfo-tools (0.1.6) unstable; urgency=low + + * bin/hostinfo: write error messages to stderr + * bin/hostinfo: ignore HOSTINFO_PATH if its empty + * bin/hostinfo: add support for --hosts and --short + * some code layout + * hostinfo: basepath for the hostinfo files is configurable now + * hostinfo: add help cmdline parameter + * Printer: add more spaces for better structure of the output + * Printer: refactor the whole thing, add --verbose flag to show keys with value None + + -- Alexander Sulfrian Fri, 17 May 2013 15:42:38 +0200 + +hostinfo-tools (0.1.5) unstable; urgency=low + + * Printer: indent multiline values correctly + * Printer: ignore vserver ips on vserver host + * bin/hostinfo: add --keys to get valid keys for a host + * bin/hostinfo: add --file to get the path of the yaml file with the information + * bin/hostinfo: allow intermixing of option and non-option arguments + + -- Alexander Sulfrian Thu, 16 May 2013 21:18:01 +0200 + +hostinfo-tools (0.1.4) unstable; urgency=low + + * share/bash-completion: add simple bash-completion + + -- Alexander Sulfrian Wed, 08 May 2013 11:23:34 +0200 + +hostinfo-tools (0.1.3) unstable; urgency=low + + * hostinfo: add filter support for sub keys like addresses.eth0 + * bin/hostinfo: add getopt for advanced parameter support + * hostinfo: Prefix class, ports/addresses handling adjusted, new online mode + * hostinfo/printer: new lables + * bin/hostinfo: fix local lib import + + -- Alexander Sulfrian Wed, 08 May 2013 03:46:47 +0200 + +hostinfo-tools (0.1.2) unstable; urgency=low + + * bin/hostinfo: use development libraries if available + + -- Alexander Sulfrian Mon, 06 May 2013 19:57:22 +0200 + +hostinfo-tools (0.1.1) unstable; urgency=low + + * Initial release. + + -- Alexander Sulfrian 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..5b4f921 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: hostinfo-tools +Section: admin +Priority: extra +Maintainer: Alexander Sulfrian +Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), + python-all (<< 3), bash-completion, python-debian +Standards-Version: 3.9.1 +Homepage: http://git.spline.inf.fu-berlin.de/hostinfo-tools/ +Vcs-Git: git://git.spline.inf.fu-berlin.de/hostinfo-tools +X-Python-Version: >= 2.6, << 3.0 + +Package: hostinfo-tools +Architecture: all +Depends: ${python:Depends}, ${misc:Depends}, python-dnspython, python-yaml +Description: scripts to query the hostinfo database + With this script you could query the autogenerated hostinfo + database with the information bcfg2 knows about the hosts. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..553273d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This work was packaged for Debian by: + + Alexander Sulfrian on Mon, 06 May 2013 17:30:15 +0200 + +It was downloaded from: + + http://git.spline.inf.fu-berlin.de/hostinfo-tools/ + +Upstream Author(s): + + Alexander Sulfrian + +Copyright: + + Copyright (C) 2013 Alexander Sulfrian + +License: + + as-is + +The Debian packaging is: + + Copyright (C) 2013 Alexander Sulfrian + +and is licensed under the GPL version 3, +see "/usr/share/common-licenses/GPL-3". diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..439ebc6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +%: + dh $@ --with=python2,bash-completion + diff --git a/version.py b/version.py index a4c7ed6..08bc587 100644 --- a/version.py +++ b/version.py @@ -30,8 +30,21 @@ def call_git_describe(abbrev=4): except: return None +def parse_debian_changelog(): + try: + from debian import changelog + + with open(os.path.join(OWN_DIR, 'debian', 'changelog')) as cfile: + clog = changelog.Changelog(cfile) + return str(clog.get_version()) + except: + return None + def get_git_version(abbrev=4): version = call_git_describe(abbrev) + if version is None: + version = parse_debian_changelog() + if version is None: raise ValueError("Cannot find the version number!") -- cgit v1.2.3-1-g7c22