Merge branch 'master' of code.ungleich.ch:ungleich-public/cdist

This commit is contained in:
Nico Schottelius 2019-11-08 13:26:49 +01:00
commit 7a17630c2d
7 changed files with 35 additions and 4 deletions

View file

@ -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
;;

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -1,8 +1,11 @@
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)
* 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)

View file

@ -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.

View file

@ -1,7 +1,27 @@
from distutils.core import setup
import cdist
from distutils.errors import DistutilsError
import os
import re
import subprocess
# 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
def data_finder(data_dir):