From fc28f58c77080e94215719ba4f2aa3f3162c8300 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Thu, 17 Oct 2019 20:48:52 +0200 Subject: [PATCH 1/9] Generate version.py if it does not exist --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ae651125..ee823df9 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,14 @@ from distutils.core import setup -import cdist import os import re +import subprocess + + +if not os.path.exists(os.path.join('cdist', 'version.py')): + subprocess.run([os.path.join('bin', 'build-helper'), 'version', ]) + + +import cdist def data_finder(data_dir): From 2d0af7b7ccc34d450a1b0cfb6532f6d2439ee7a4 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 18 Oct 2019 10:24:11 +0200 Subject: [PATCH 2/9] Generate verions.py only if git cloned repo --- setup.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ee823df9..2bb1e16d 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,24 @@ from distutils.core import setup +from distutils.errors import DistutilsError import os import re import subprocess -if not os.path.exists(os.path.join('cdist', 'version.py')): - subprocess.run([os.path.join('bin', 'build-helper'), 'version', ]) +# We have it only if it is a git cloned repo. +build_helper = os.path.join('bin', 'build-helper') +# Version file path. +version_file = os.path.join('cdist', 'version.py') +# If we have build-helper we could be a git repo. +if os.path.exists(build_helper): + # Try to generate version.py. + rv = subprocess.run([build_helper, 'version', ]) + if rv.returncode != 0: + raise DistutilsError("Failed to generate {}".format(version_file)) +else: + # Otherwise, version.py should be present. + if not os.path.exists(version_file): + raise DistutilsError("Missing version file {}".format(version_file)) import cdist From f6a45808f9796630aa415209d711424d570e145e Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 18 Oct 2019 13:11:59 +0200 Subject: [PATCH 3/9] Fix building man pages command --- docs/src/cdist-upgrade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/cdist-upgrade.rst b/docs/src/cdist-upgrade.rst index e57ed63c..67fd4934 100644 --- a/docs/src/cdist-upgrade.rst +++ b/docs/src/cdist-upgrade.rst @@ -11,7 +11,7 @@ To upgrade cdist in the current branch use git pull # Also update the manpages - ./build man + make man export MANPATH=$MANPATH:$(pwd -P)/doc/man If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. From 32c15f2ecbc9a4cf29258f9d8e28ef537bcc2ac1 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sun, 20 Oct 2019 18:59:48 +0000 Subject: [PATCH 4/9] Fix spelling error in manpage --- cdist/conf/type/__xymon_client/man.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__xymon_client/man.rst b/cdist/conf/type/__xymon_client/man.rst index 6f90c15b..6660b0ef 100644 --- a/cdist/conf/type/__xymon_client/man.rst +++ b/cdist/conf/type/__xymon_client/man.rst @@ -23,7 +23,7 @@ state 'present', 'absent', defaults to 'present'. servers - One or more IP adresses (space separated) of the Xymon server(s) to report + One or more IP addresses (space separated) of the Xymon server(s) to report to. While DNS-names are ok it is discouraged, defaults to 127.0.0.1. From 50a3130b0ae280526ac13fd8a3619717d29c57ac Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Mon, 21 Oct 2019 12:02:53 +0200 Subject: [PATCH 5/9] ++changelog --- docs/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog b/docs/changelog index 176c5d40..5020c3c2 100644 --- a/docs/changelog +++ b/docs/changelog @@ -3,6 +3,7 @@ Changelog next: * Type __letsencrypt_cert: Add Alpine support (Nico Schottelius) + * Type __xymon_client: Fix spelling error in manpage (Dmitry Bogatov) 6.0.2: 2019-10-17 * New types: __xymon_server, __xymon_apache, __xymon_config, __xymon_client (Thomas Eckert) From 00852cb17d375da39ae585ec337da18a4f63587d Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 25 Oct 2019 14:26:08 +0200 Subject: [PATCH 6/9] ++changelog --- docs/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog b/docs/changelog index 5020c3c2..cdc4e8f5 100644 --- a/docs/changelog +++ b/docs/changelog @@ -4,6 +4,7 @@ Changelog next: * Type __letsencrypt_cert: Add Alpine support (Nico Schottelius) * Type __xymon_client: Fix spelling error in manpage (Dmitry Bogatov) + * Build: Support pip from git (Darko Poljak, Ľubomír Kučera) 6.0.2: 2019-10-17 * New types: __xymon_server, __xymon_apache, __xymon_config, __xymon_client (Thomas Eckert) From 0ec52fd1bd1a5b20aa5d8503da62d18b43399403 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal <49-ahmedbilal@users.noreply.code.ungleich.ch> Date: Sun, 27 Oct 2019 18:11:08 +0100 Subject: [PATCH 7/9] alpine support added in __package_update_index --- cdist/conf/type/__package_update_index/explorer/currage | 3 +++ cdist/conf/type/__package_update_index/explorer/type | 1 + cdist/conf/type/__package_update_index/gencode-remote | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/cdist/conf/type/__package_update_index/explorer/currage b/cdist/conf/type/__package_update_index/explorer/currage index 3539b8e1..cfb778d5 100644 --- a/cdist/conf/type/__package_update_index/explorer/currage +++ b/cdist/conf/type/__package_update_index/explorer/currage @@ -34,6 +34,9 @@ case "$type" in echo 0 fi ;; + alpine) + echo 0 + ;; *) echo "Your specified type ($type) is currently not supported." >&2 echo "Please contribute an implementation for it if you can." >&2 ;; diff --git a/cdist/conf/type/__package_update_index/explorer/type b/cdist/conf/type/__package_update_index/explorer/type index 35254c5f..c98e1e67 100644 --- a/cdist/conf/type/__package_update_index/explorer/type +++ b/cdist/conf/type/__package_update_index/explorer/type @@ -26,6 +26,7 @@ else amazon|scientific|centos|fedora|redhat) echo "yum" ;; debian|ubuntu|devuan) echo "apt" ;; archlinux) echo "pacman" ;; + alpine) echo "apk" ;; *) echo "Don't know how to manage packages on: $os" >&2 exit 1 diff --git a/cdist/conf/type/__package_update_index/gencode-remote b/cdist/conf/type/__package_update_index/gencode-remote index 738d38eb..9b2ecba2 100755 --- a/cdist/conf/type/__package_update_index/gencode-remote +++ b/cdist/conf/type/__package_update_index/gencode-remote @@ -47,6 +47,10 @@ case "$type" in echo "pacman --noprogressbar --sync --refresh" echo "pacman package database synced (age was: $currage)" >> "$__messages_out" ;; + alpine) + echo "apk update" + echo "apk package database updated." + ;; *) echo "Don't know how to manage packages for type: $type" >&2 exit 1 From 39b320a19a14c1e7653ff14e7e824f2d1ac762cb Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Sun, 27 Oct 2019 19:12:52 +0100 Subject: [PATCH 8/9] ++changelog --- docs/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog b/docs/changelog index cdc4e8f5..d4b55336 100644 --- a/docs/changelog +++ b/docs/changelog @@ -5,6 +5,7 @@ next: * Type __letsencrypt_cert: Add Alpine support (Nico Schottelius) * Type __xymon_client: Fix spelling error in manpage (Dmitry Bogatov) * Build: Support pip from git (Darko Poljak, Ľubomír Kučera) + * Type __package_update_index: Add Alpine support (Ahmed Bilal Khalid) 6.0.2: 2019-10-17 * New types: __xymon_server, __xymon_apache, __xymon_config, __xymon_client (Thomas Eckert) From 5fcd4bc09f1f34c20c53a9a5cc25d084d86c36d8 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Thu, 31 Oct 2019 08:56:13 +0100 Subject: [PATCH 9/9] Release 6.0.3 --- docs/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog b/docs/changelog index d4b55336..1ba56e73 100644 --- a/docs/changelog +++ b/docs/changelog @@ -1,7 +1,7 @@ Changelog --------- -next: +6.0.3: 2019-10-31 * Type __letsencrypt_cert: Add Alpine support (Nico Schottelius) * Type __xymon_client: Fix spelling error in manpage (Dmitry Bogatov) * Build: Support pip from git (Darko Poljak, Ľubomír Kučera)