diff --git a/cdist/__init__.py b/cdist/__init__.py index 74db1a13..9068ae69 100644 --- a/cdist/__init__.py +++ b/cdist/__init__.py @@ -56,6 +56,21 @@ class UnresolvableRequirementsError(cdist.Error): pass +class CdistBetaRequired(cdist.Error): + """Beta functionality is used but beta is not enabled""" + + def __init__(self, command, arg): + self.command = command + self.arg = arg + + def __str__(self): + err_msg = ("\'{}\' argument of \'{}\' command is beta, but beta is " + "not enabled. If you want to use it please enable beta " + "functionalities by using the -b/--enable-beta command " + "line flag.") + return err_msg.format(self.arg, self.command) + + class CdistObjectError(Error): """Something went wrong with an object""" diff --git a/cdist/conf/type/__apt_key/man.rst b/cdist/conf/type/__apt_key/man.rst index 7ee2a621..9009877e 100644 --- a/cdist/conf/type/__apt_key/man.rst +++ b/cdist/conf/type/__apt_key/man.rst @@ -55,5 +55,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011-2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_key_uri/man.rst b/cdist/conf/type/__apt_key_uri/man.rst index e8741dff..82a191b9 100644 --- a/cdist/conf/type/__apt_key_uri/man.rst +++ b/cdist/conf/type/__apt_key_uri/man.rst @@ -45,5 +45,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011-2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_norecommends/man.rst b/cdist/conf/type/__apt_norecommends/man.rst index 7ef496c3..001fffe4 100644 --- a/cdist/conf/type/__apt_norecommends/man.rst +++ b/cdist/conf/type/__apt_norecommends/man.rst @@ -36,5 +36,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_ppa/man.rst b/cdist/conf/type/__apt_ppa/man.rst index 978e1252..8347c908 100644 --- a/cdist/conf/type/__apt_ppa/man.rst +++ b/cdist/conf/type/__apt_ppa/man.rst @@ -44,5 +44,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011-2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_source/man.rst b/cdist/conf/type/__apt_source/man.rst index 31f2e9e6..8aa6c144 100644 --- a/cdist/conf/type/__apt_source/man.rst +++ b/cdist/conf/type/__apt_source/man.rst @@ -63,5 +63,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011-2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_update_index/man.rst b/cdist/conf/type/__apt_update_index/man.rst index 326d4c2f..3031902f 100644 --- a/cdist/conf/type/__apt_update_index/man.rst +++ b/cdist/conf/type/__apt_update_index/man.rst @@ -35,5 +35,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__block/man.rst b/cdist/conf/type/__block/man.rst index 6d7b8ba1..90e50381 100644 --- a/cdist/conf/type/__block/man.rst +++ b/cdist/conf/type/__block/man.rst @@ -76,5 +76,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2013 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__ccollect_source/man.rst b/cdist/conf/type/__ccollect_source/man.rst index a6723fa8..617571bb 100644 --- a/cdist/conf/type/__ccollect_source/man.rst +++ b/cdist/conf/type/__ccollect_source/man.rst @@ -63,5 +63,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__cdist/man.rst b/cdist/conf/type/__cdist/man.rst index 1bfb35c5..f02f848a 100644 --- a/cdist/conf/type/__cdist/man.rst +++ b/cdist/conf/type/__cdist/man.rst @@ -57,5 +57,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__cdistmarker/man.rst b/cdist/conf/type/__cdistmarker/man.rst index cb4dace8..f3a8bafe 100644 --- a/cdist/conf/type/__cdistmarker/man.rst +++ b/cdist/conf/type/__cdistmarker/man.rst @@ -49,5 +49,7 @@ Daniel Maher COPYING ------- -Copyright \(C) 2011 Daniel Maher. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Daniel Maher. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__config_file/man.rst b/cdist/conf/type/__config_file/man.rst index 414a970b..5e0e58bd 100644 --- a/cdist/conf/type/__config_file/man.rst +++ b/cdist/conf/type/__config_file/man.rst @@ -58,5 +58,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul/man.rst b/cdist/conf/type/__consul/man.rst index c15ded45..19ceb535 100644 --- a/cdist/conf/type/__consul/man.rst +++ b/cdist/conf/type/__consul/man.rst @@ -48,5 +48,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_agent/man.rst b/cdist/conf/type/__consul_agent/man.rst index fcbf112d..0f4aa12c 100644 --- a/cdist/conf/type/__consul_agent/man.rst +++ b/cdist/conf/type/__consul_agent/man.rst @@ -175,5 +175,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_check/man.rst b/cdist/conf/type/__consul_check/man.rst index 699bbfad..dc7895de 100644 --- a/cdist/conf/type/__consul_check/man.rst +++ b/cdist/conf/type/__consul_check/man.rst @@ -96,5 +96,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015-2016 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015-2016 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_reload/man.rst b/cdist/conf/type/__consul_reload/man.rst index 410bd5e6..f48a041a 100644 --- a/cdist/conf/type/__consul_reload/man.rst +++ b/cdist/conf/type/__consul_reload/man.rst @@ -36,5 +36,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_service/man.rst b/cdist/conf/type/__consul_service/man.rst index 0c815402..bcfe4067 100644 --- a/cdist/conf/type/__consul_service/man.rst +++ b/cdist/conf/type/__consul_service/man.rst @@ -76,5 +76,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_template/man.rst b/cdist/conf/type/__consul_template/man.rst index a6228cad..f13c699d 100644 --- a/cdist/conf/type/__consul_template/man.rst +++ b/cdist/conf/type/__consul_template/man.rst @@ -135,5 +135,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_template_template/man.rst b/cdist/conf/type/__consul_template_template/man.rst index 406a06df..b2e3820b 100644 --- a/cdist/conf/type/__consul_template_template/man.rst +++ b/cdist/conf/type/__consul_template_template/man.rst @@ -78,5 +78,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015-2016 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015-2016 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_checks/man.rst b/cdist/conf/type/__consul_watch_checks/man.rst index 35c8c9ca..a9a9f58d 100644 --- a/cdist/conf/type/__consul_watch_checks/man.rst +++ b/cdist/conf/type/__consul_watch_checks/man.rst @@ -67,5 +67,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_event/man.rst b/cdist/conf/type/__consul_watch_event/man.rst index 03c2f07e..6fe60d40 100644 --- a/cdist/conf/type/__consul_watch_event/man.rst +++ b/cdist/conf/type/__consul_watch_event/man.rst @@ -60,5 +60,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_key/man.rst b/cdist/conf/type/__consul_watch_key/man.rst index efa6cb41..a12f8425 100644 --- a/cdist/conf/type/__consul_watch_key/man.rst +++ b/cdist/conf/type/__consul_watch_key/man.rst @@ -57,5 +57,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_keyprefix/man.rst b/cdist/conf/type/__consul_watch_keyprefix/man.rst index d884eb79..c600323c 100644 --- a/cdist/conf/type/__consul_watch_keyprefix/man.rst +++ b/cdist/conf/type/__consul_watch_keyprefix/man.rst @@ -57,5 +57,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_nodes/man.rst b/cdist/conf/type/__consul_watch_nodes/man.rst index 52974c3c..d886a586 100644 --- a/cdist/conf/type/__consul_watch_nodes/man.rst +++ b/cdist/conf/type/__consul_watch_nodes/man.rst @@ -53,5 +53,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_service/man.rst b/cdist/conf/type/__consul_watch_service/man.rst index f22ee568..37cabcc9 100644 --- a/cdist/conf/type/__consul_watch_service/man.rst +++ b/cdist/conf/type/__consul_watch_service/man.rst @@ -77,5 +77,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_services/man.rst b/cdist/conf/type/__consul_watch_services/man.rst index c53caa04..cea5f901 100644 --- a/cdist/conf/type/__consul_watch_services/man.rst +++ b/cdist/conf/type/__consul_watch_services/man.rst @@ -53,5 +53,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__cron/man.rst b/cdist/conf/type/__cron/man.rst index 59f59e14..d0694738 100644 --- a/cdist/conf/type/__cron/man.rst +++ b/cdist/conf/type/__cron/man.rst @@ -78,5 +78,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011-2013 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2013 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__debconf_set_selections/man.rst b/cdist/conf/type/__debconf_set_selections/man.rst index 3f7f05ae..58c25b81 100644 --- a/cdist/conf/type/__debconf_set_selections/man.rst +++ b/cdist/conf/type/__debconf_set_selections/man.rst @@ -47,5 +47,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2014 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__directory/man.rst b/cdist/conf/type/__directory/man.rst index e756b1d6..74b00afe 100644 --- a/cdist/conf/type/__directory/man.rst +++ b/cdist/conf/type/__directory/man.rst @@ -95,5 +95,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__dog_vdi/man.rst b/cdist/conf/type/__dog_vdi/man.rst index 2d6f15b8..4be1920d 100644 --- a/cdist/conf/type/__dog_vdi/man.rst +++ b/cdist/conf/type/__dog_vdi/man.rst @@ -53,5 +53,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__file/man.rst b/cdist/conf/type/__file/man.rst index e21390c7..7d9b413b 100644 --- a/cdist/conf/type/__file/man.rst +++ b/cdist/conf/type/__file/man.rst @@ -106,5 +106,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2013 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__filesystem/explorer/lsblk b/cdist/conf/type/__filesystem/explorer/lsblk new file mode 100644 index 00000000..9ae544ac --- /dev/null +++ b/cdist/conf/type/__filesystem/explorer/lsblk @@ -0,0 +1,43 @@ +#!/bin/sh +# +# 2016 - 2016 Daniel Heule (hda at sfs.biz) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + +os=$("$__explorer/os") + +if [ -f "$__object/parameter/device" ]; then + blkdev="$(cat "$__object/parameter/device")" +else + blkdev="$__object_id" +fi + +case "$os" in + centos|fedora|redhat|suse|gentoo) + if [ ! -x "$(command -v lsblk)" ]; then + echo "lsblk is required for __filesystem type" >&2 + exit 1 + else + #echo -n $(lsblk -nd -P -o NAME,FSTYPE,LABEL,MOUNTPOINT "$blkdev" 2>/dev/null) + lsblk -nd -P -o NAME,FSTYPE,LABEL,MOUNTPOINT "$blkdev" 2>/dev/null + fi + ;; + *) + echo "__filesystem type lacks implementation for os: $os" >&2 + exit 1 + ;; +esac diff --git a/cdist/conf/type/__filesystem/gencode-remote b/cdist/conf/type/__filesystem/gencode-remote new file mode 100644 index 00000000..3ca1c498 --- /dev/null +++ b/cdist/conf/type/__filesystem/gencode-remote @@ -0,0 +1,102 @@ +#!/bin/sh +# +# 2016 - 2016 Daniel Heule (hda at sfs.biz) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + + +fstype="$(cat "$__object/parameter/fstype")" + +if [ -f "$__object/parameter/device" ]; then + mydev="$(cat "$__object/parameter/device")" +else + mydev="$__object_id" +fi + +label="$(cat "$__object/parameter/label")" +mkfsoptions="$(cat "$__object/parameter/mkfsoptions")" + + +if [ -f "$__object/parameter/force" ]; then + # create filesystem even an other filesystem is on disk or the label is not correct, use with caution ! + forcefs="true" +else + forcefs="false" +fi + + + +blkdev_devname="$(grep -P -o 'NAME="\K[^"]*' "$__object/explorer/lsblk")" +blkdev_fstype="$(grep -P -o 'FSTYPE="\K[^"]*' "$__object/explorer/lsblk")" +blkdev_label="$(grep -P -o 'LABEL="\K[^"]*' "$__object/explorer/lsblk")" +blkdev_mountpoint="$(grep -P -o 'MOUNTPOINT="\K[^"]*' "$__object/explorer/lsblk")" + +if [ -z "$blkdev_devname" ]; then + echo "Specified device $mydev not found on target system" >&2 + exit 1 +fi + +[ "$blkdev_label" = "$label" ] && [ "$blkdev_fstype" = "$fstype" ] && exit 0 + +if [ -n "$blkdev_mountpoint" ]; then + echo "Specified device $mydev is mounted on $blkdev_mountpoint, __filesystem does NOTHING with mountd devices" >&2 + exit 0 +fi + +if [ -n "$blkdev_fstype" ] && [ "$forcefs" != "true" ]; then + if [ "$blkdev_label" != "$label" ]; then + echo "Specified device $mydev has not the spezified label: $blkdev_label, but __filesystem does NOTHING in this case without the --force option" >&2 + exit 0 + fi + if [ "$blkdev_fstype" != "$fstype" ]; then + echo "Specified device $mydev has not the spezified filesystem: $blkdev_fstype, but __filesystem does NOTHING in this case without the --force option" >&2 + exit 0 + fi +fi + + +# ok, all conditions checked, we need to format the device, lets go +opts="$mkfsoptions" +if [ -n "$label" ]; then + opts="$opts -L '$label'" +fi + +case "$fstype" in + ext2|ext3|ext4) + if [ "$forcefs" = "true" ]; then + opts="$opts -F" + fi + echo "mkfs.$fstype $opts /dev/$blkdev_devname" + ;; + btrfs) + if [ "$forcefs" = "true" ]; then + opts="$opts --force" + fi + echo "mkfs.btrfs $opts /dev/$blkdev_devname" + ;; + xfs) + if [ "$forcefs" = "true" ]; then + opts="$opts -f" + fi + echo "mkfs.xfs $opts /dev/$blkdev_devname" + ;; + *) + echo "__filesystem type lacks implementation for filesystem: $fstype" >&2 + exit 1 + ;; +esac +echo "filesystem $fstype on $mydev : /dev/$blkdev_devname created" >> "$__messages_out" diff --git a/cdist/conf/type/__filesystem/man.rst b/cdist/conf/type/__filesystem/man.rst new file mode 100644 index 00000000..d88e27c1 --- /dev/null +++ b/cdist/conf/type/__filesystem/man.rst @@ -0,0 +1,81 @@ +cdist-type__filesystem(7) +========================= + +NAME +---- +cdist-type__filesystem - Create Filesystems. + + +DESCRIPTION +----------- +This cdist type allows you to create filesystems on devices. + +If the device is mounted on target, it refuses to do anything. + +If the device has a filesystem other then the specified and/or +the label is not correct, it only makes a new filesystem +if you have specified --force option. + + +REQUIRED PARAMETERS +------------------- +fstype + Filesystem type, for example 'ext3', 'btrfs' or 'xfs'. + + + +OPTIONAL PARAMETERS +------------------- +device + Blockdevice for filesystem, Defaults to object_id. + On linux, it can be any lsblk accepted device notation. + + | + | For example: + | /dev/sdx + | or /dev/disk/by-xxxx/xxx + | or /dev/mapper/xxxx + +label + Label which sould apply on the filesystem. + +mkfsoptions + Additional options which are inserted to the mkfs.xxx call. + + +BOOLEAN PARAMETERS +------------------ +force + Normaly, this type does nothing if a filesystem is found + on the target device. If you specify force, it's formated + if the filesystem type or label differs from parameters. + Warning: This option can easily lead into data loss! + +MESSAGES +-------- +filesystem on \: created + Filesytem was created on + + +EXAMPLES +-------- + +.. code-block:: sh + + # Ensures that device /dev/sdb is formated with xfs + __filesystem /dev/sdb --fstype xfs --label Testdisk1 + # The same thing with btrfs and disk spezified by pci path to disk 1:0 on vmware + __filesystem dev_sdb --fstype btrfs --device /dev/disk/by-path/pci-0000:0b:00.0-scsi-0:0:0:0 --label Testdisk2 + # Make sure that a multipath san device has a filesystem ... + __filesystem dev_sdb --fstype xfs --device /dev/mapper/360060e80432f560050202f22000023ff --label Testdisk3 + + +AUTHORS +------- +Daniel Heule + + +COPYING +------- +Copyright \(C) 2016 Daniel Heule. Free use of this software is +granted under the terms of the GNU General Public License version 3 or any later version (GPLv3+). diff --git a/cdist/conf/type/__filesystem/parameter/boolean b/cdist/conf/type/__filesystem/parameter/boolean new file mode 100644 index 00000000..14b33226 --- /dev/null +++ b/cdist/conf/type/__filesystem/parameter/boolean @@ -0,0 +1 @@ +force diff --git a/cdist/conf/type/__filesystem/parameter/default/label b/cdist/conf/type/__filesystem/parameter/default/label new file mode 100644 index 00000000..e69de29b diff --git a/cdist/conf/type/__filesystem/parameter/default/mkfsoptions b/cdist/conf/type/__filesystem/parameter/default/mkfsoptions new file mode 100644 index 00000000..e69de29b diff --git a/cdist/conf/type/__filesystem/parameter/optional b/cdist/conf/type/__filesystem/parameter/optional new file mode 100644 index 00000000..79dddc21 --- /dev/null +++ b/cdist/conf/type/__filesystem/parameter/optional @@ -0,0 +1,3 @@ +device +label +mkfsoptions diff --git a/cdist/conf/type/__filesystem/parameter/required b/cdist/conf/type/__filesystem/parameter/required new file mode 100644 index 00000000..98f8b69f --- /dev/null +++ b/cdist/conf/type/__filesystem/parameter/required @@ -0,0 +1 @@ +fstype diff --git a/cdist/conf/type/__firewalld_rule/man.rst b/cdist/conf/type/__firewalld_rule/man.rst index 5e8e25a7..53ae52b8 100644 --- a/cdist/conf/type/__firewalld_rule/man.rst +++ b/cdist/conf/type/__firewalld_rule/man.rst @@ -75,5 +75,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2015 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__git/man.rst b/cdist/conf/type/__git/man.rst index c1341ec0..64adfd2f 100644 --- a/cdist/conf/type/__git/man.rst +++ b/cdist/conf/type/__git/man.rst @@ -54,5 +54,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__group/man.rst b/cdist/conf/type/__group/man.rst index daea0909..614f3d57 100644 --- a/cdist/conf/type/__group/man.rst +++ b/cdist/conf/type/__group/man.rst @@ -74,5 +74,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011-2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__hostname/man.rst b/cdist/conf/type/__hostname/man.rst index ea1186bc..d23a3b8a 100644 --- a/cdist/conf/type/__hostname/man.rst +++ b/cdist/conf/type/__hostname/man.rst @@ -46,5 +46,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__iptables_apply/man.rst b/cdist/conf/type/__iptables_apply/man.rst index 6f9ab923..76e1f6bf 100644 --- a/cdist/conf/type/__iptables_apply/man.rst +++ b/cdist/conf/type/__iptables_apply/man.rst @@ -39,5 +39,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__iptables_rule/man.rst b/cdist/conf/type/__iptables_rule/man.rst index 5256c711..92d8859f 100644 --- a/cdist/conf/type/__iptables_rule/man.rst +++ b/cdist/conf/type/__iptables_rule/man.rst @@ -60,5 +60,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__issue/man.rst b/cdist/conf/type/__issue/man.rst index eacd8378..097f2c01 100644 --- a/cdist/conf/type/__issue/man.rst +++ b/cdist/conf/type/__issue/man.rst @@ -41,5 +41,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__jail/man.rst b/cdist/conf/type/__jail/man.rst index bd9826e4..7fc8f455 100644 --- a/cdist/conf/type/__jail/man.rst +++ b/cdist/conf/type/__jail/man.rst @@ -118,5 +118,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2012,2016 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012,2016 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__jail_freebsd10/man.rst b/cdist/conf/type/__jail_freebsd10/man.rst index 9efd7c2a..9063f339 100644 --- a/cdist/conf/type/__jail_freebsd10/man.rst +++ b/cdist/conf/type/__jail_freebsd10/man.rst @@ -117,5 +117,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2012-2016 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012-2016 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__jail_freebsd9/man.rst b/cdist/conf/type/__jail_freebsd9/man.rst index fe32010d..cc79c785 100644 --- a/cdist/conf/type/__jail_freebsd9/man.rst +++ b/cdist/conf/type/__jail_freebsd9/man.rst @@ -118,5 +118,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2012-2016 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012-2016 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__key_value/man.rst b/cdist/conf/type/__key_value/man.rst index 0d0ad3ae..f069d989 100644 --- a/cdist/conf/type/__key_value/man.rst +++ b/cdist/conf/type/__key_value/man.rst @@ -88,5 +88,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__keyboard/man.rst b/cdist/conf/type/__keyboard/man.rst new file mode 100644 index 00000000..0eb4cde9 --- /dev/null +++ b/cdist/conf/type/__keyboard/man.rst @@ -0,0 +1,37 @@ +cdist-type__keyboard(7) +======================= + +NAME +---- +cdit-type__keyboard - Set keyboard layout + + +DESCRIPTION +----------- +This cdist type allows you to modify keyboard layout. + + +REQUIRED PARAMETERS +------------------- +type + Any valid type, for example "us" + + +EXAMPLES +-------- + +.. code-block:: sh + + # Set keyboard type to "us" + __keyboard --type "us" + + +AUTHORS +------- +Carlos Ortigoza + + +COPYING +------- +Copyright \(C) 2016 Carlos Ortigoza. Free use of this software is +granted under the terms of the GNU General Public License v3 or later (GPLv3+). diff --git a/cdist/conf/type/__keyboard/manifest b/cdist/conf/type/__keyboard/manifest new file mode 100644 index 00000000..3bfddf0b --- /dev/null +++ b/cdist/conf/type/__keyboard/manifest @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Carlos Ortigoza (carlos.ortigoza at ungleich.ch) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Configure keyboard type by modifying /etc/sysconfig/keyboard file. +# + +os=$(cat "$__global/explorer/os") +keyboard_type="$(cat "$__object/parameter/type")" + +case "$os" in + centos) + __file /etc/sysconfig/keyboard \ + --owner root --group root --mode 644 \ + --state exists + + require="__file/etc/sysconfig/keyboard" \ + __key_value KEYTABLE \ + --file /etc/sysconfig/keyboard \ + --delimiter '=' \ + --value "\"$keyboard_type\"" + + require="__file/etc/sysconfig/keyboard" \ + __key_value LAYOUT \ + --file /etc/sysconfig/keyboard \ + --delimiter '=' \ + --value "\"$keyboard_type\"" + ;; + *) + echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 + echo "Please contribute an implementation for it if you can." >&2 + exit 1 + ;; +esac diff --git a/cdist/conf/type/__keyboard/parameter/required b/cdist/conf/type/__keyboard/parameter/required new file mode 100644 index 00000000..aa80e646 --- /dev/null +++ b/cdist/conf/type/__keyboard/parameter/required @@ -0,0 +1 @@ +type diff --git a/cdist/conf/type/__keyboard/singleton b/cdist/conf/type/__keyboard/singleton new file mode 100644 index 00000000..e69de29b diff --git a/cdist/conf/type/__line/man.rst b/cdist/conf/type/__line/man.rst index 11840bac..e6adce9c 100644 --- a/cdist/conf/type/__line/man.rst +++ b/cdist/conf/type/__line/man.rst @@ -71,5 +71,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2012-2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012-2013 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__link/man.rst b/cdist/conf/type/__link/man.rst index 4560b1af..9dc4665f 100644 --- a/cdist/conf/type/__link/man.rst +++ b/cdist/conf/type/__link/man.rst @@ -54,5 +54,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__locale/man.rst b/cdist/conf/type/__locale/man.rst index e46d14bd..60a4eacc 100644 --- a/cdist/conf/type/__locale/man.rst +++ b/cdist/conf/type/__locale/man.rst @@ -3,7 +3,7 @@ cdist-type__locale(7) NAME ---- -cdit-type__locale - Configure locales +cdist-type__locale - Configure locales DESCRIPTION @@ -34,7 +34,7 @@ EXAMPLES SEE ALSO -------- -:strong:`locale`\ (1), :strong:`localedef`\ (1) +:strong:`locale`\ (1), :strong:`localedef`\ (1), :strong:`cdist-type__locale_system`\ (7) AUTHORS @@ -44,5 +44,6 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2013-2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013-2016 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 or +later (GPLv3+). diff --git a/cdist/conf/type/__locale_system/man.rst b/cdist/conf/type/__locale_system/man.rst new file mode 100644 index 00000000..03d36960 --- /dev/null +++ b/cdist/conf/type/__locale_system/man.rst @@ -0,0 +1,64 @@ +cdist-type__locale_system(7) +============================ + +NAME +---- +cdist-type__locale_system - Set system-wide locale + + +DESCRIPTION +----------- +This cdist type allows you to modify system-wide locale. +The name of the locale category is given as the object id +(usually you are probably interested in using LANG). + + +OPTIONAL PARAMETERS +------------------- + +state + present or absent, defaults to present. + If present, sets the locale category to the given value. + If absent, removes the locale category from the system file. + +value + The value for the locale category. + Defaults to en_US.UTF-8. + + +EXAMPLES +-------- + +.. code-block:: sh + + # Set LANG to en_US.UTF-8 + __locale_system LANG + + # Same as above, but more explicit + __locale_system LANG --value en_US.UTF-8 + + # Set category LC_MESSAGES to de_CH.UTF-8 + __locale_system LC_MESSAGES --value de_CH.UTF-8 + + # Remove setting for LC_ALL + __locale_system LC_ALL --state absent + + + +SEE ALSO +-------- +:strong:`locale`\ (1), :strong:`localedef`\ (1), :strong:`cdist-type__locale`\ (7) + + +AUTHORS +------- +| Steven Armstrong +| Carlos Ortigoza +| Nico Schottelius + + +COPYING +------- +Copyright \(C) 2016 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 or +later (GPLv3+). diff --git a/cdist/conf/type/__locale_system/manifest b/cdist/conf/type/__locale_system/manifest new file mode 100644 index 00000000..02cf48df --- /dev/null +++ b/cdist/conf/type/__locale_system/manifest @@ -0,0 +1,55 @@ +#!/bin/sh +# +# 2012-2016 Steven Armstrong (steven-cdist at armstrong.cc) +# 2016 Carlos Ortigoza (carlos.ortigoza at ungleich.ch) +# 2016 Nico Schottelius (nico.schottelius at ungleich.ch) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Configure system-wide locale by modifying i18n file. +# + +os=$(cat "$__global/explorer/os") + +case "$os" in + debian|ubuntu) + locale_conf="/etc/default/locale" + ;; + archlinux) + locale_conf="/etc/locale.conf" + ;; + redhat|centos) + locale_conf="/etc/sysconfig/i18n" + ;; + *) + echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 + echo "Please contribute an implementation for it if you can." >&2 + exit 1 + ;; +esac + +__file "$locale_conf" \ + --owner root --group root --mode 644 \ + --state exists + +require="__file/$locale_conf" \ + __key_value "$locale_conf:$__object_id" \ + --file "$locale_conf" \ + --key "$__object_id" \ + --delimiter = \ + --state "$(cat "$__object/parameter/state")" \ + --value "$(cat "$__object/parameter/value")" diff --git a/cdist/conf/type/__locale_system/parameter/default/state b/cdist/conf/type/__locale_system/parameter/default/state new file mode 100644 index 00000000..e7f6134f --- /dev/null +++ b/cdist/conf/type/__locale_system/parameter/default/state @@ -0,0 +1 @@ +present diff --git a/cdist/conf/type/__locale_system/parameter/default/value b/cdist/conf/type/__locale_system/parameter/default/value new file mode 100644 index 00000000..927508f3 --- /dev/null +++ b/cdist/conf/type/__locale_system/parameter/default/value @@ -0,0 +1 @@ +en_US.UTF-8 diff --git a/cdist/conf/type/__locale_system/parameter/optional b/cdist/conf/type/__locale_system/parameter/optional new file mode 100644 index 00000000..d0460d86 --- /dev/null +++ b/cdist/conf/type/__locale_system/parameter/optional @@ -0,0 +1,2 @@ +state +value diff --git a/cdist/conf/type/__motd/man.rst b/cdist/conf/type/__motd/man.rst index b568985f..17369684 100644 --- a/cdist/conf/type/__motd/man.rst +++ b/cdist/conf/type/__motd/man.rst @@ -42,5 +42,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__mount/man.rst b/cdist/conf/type/__mount/man.rst index 799288af..d719a1cd 100644 --- a/cdist/conf/type/__mount/man.rst +++ b/cdist/conf/type/__mount/man.rst @@ -78,5 +78,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__mysql_database/man.rst b/cdist/conf/type/__mysql_database/man.rst index 0e21a8a1..1e245a08 100644 --- a/cdist/conf/type/__mysql_database/man.rst +++ b/cdist/conf/type/__mysql_database/man.rst @@ -43,5 +43,7 @@ Benedikt Koeppel COPYING ------- -Copyright \(C) 2012 Benedikt Koeppel. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Benedikt Koeppel. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package/man.rst b/cdist/conf/type/__package/man.rst index 91319e18..fc36402b 100644 --- a/cdist/conf/type/__package/man.rst +++ b/cdist/conf/type/__package/man.rst @@ -58,5 +58,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_apt/man.rst b/cdist/conf/type/__package_apt/man.rst index 45818636..0a7958d4 100644 --- a/cdist/conf/type/__package_apt/man.rst +++ b/cdist/conf/type/__package_apt/man.rst @@ -56,5 +56,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_emerge/man.rst b/cdist/conf/type/__package_emerge/man.rst index 839b647e..88adaff0 100644 --- a/cdist/conf/type/__package_emerge/man.rst +++ b/cdist/conf/type/__package_emerge/man.rst @@ -57,5 +57,7 @@ Thomas Oettli COPYING ------- -Copyright \(C) 2013 Thomas Oettli. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Thomas Oettli. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_emerge_dependencies/man.rst b/cdist/conf/type/__package_emerge_dependencies/man.rst index 11531b34..598d31f1 100644 --- a/cdist/conf/type/__package_emerge_dependencies/man.rst +++ b/cdist/conf/type/__package_emerge_dependencies/man.rst @@ -46,5 +46,7 @@ Thomas Oettli COPYING ------- -Copyright \(C) 2013 Thomas Oettli. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Thomas Oettli. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_luarocks/man.rst b/cdist/conf/type/__package_luarocks/man.rst index fd831aa5..5dc10195 100644 --- a/cdist/conf/type/__package_luarocks/man.rst +++ b/cdist/conf/type/__package_luarocks/man.rst @@ -49,5 +49,7 @@ Christian G. Warden COPYING ------- -Copyright \(C) 2012 SwellPath, Inc. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 SwellPath, Inc. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_opkg/man.rst b/cdist/conf/type/__package_opkg/man.rst index d7858ba2..0fd40b33 100644 --- a/cdist/conf/type/__package_opkg/man.rst +++ b/cdist/conf/type/__package_opkg/man.rst @@ -49,5 +49,7 @@ Giel van Schijndel COPYING ------- -Copyright \(C) 2012 Giel van Schijndel. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Giel van Schijndel. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pacman/man.rst b/cdist/conf/type/__package_pacman/man.rst index 7b9bd1b4..2686202d 100644 --- a/cdist/conf/type/__package_pacman/man.rst +++ b/cdist/conf/type/__package_pacman/man.rst @@ -52,5 +52,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pip/man.rst b/cdist/conf/type/__package_pip/man.rst index 85d6d42b..234ceee2 100644 --- a/cdist/conf/type/__package_pip/man.rst +++ b/cdist/conf/type/__package_pip/man.rst @@ -59,5 +59,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pkg_freebsd/man.rst b/cdist/conf/type/__package_pkg_freebsd/man.rst index 4b210356..b06c7faf 100644 --- a/cdist/conf/type/__package_pkg_freebsd/man.rst +++ b/cdist/conf/type/__package_pkg_freebsd/man.rst @@ -64,5 +64,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2012 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pkgng_freebsd/man.rst b/cdist/conf/type/__package_pkgng_freebsd/man.rst index bdc268af..251e2c5f 100644 --- a/cdist/conf/type/__package_pkgng_freebsd/man.rst +++ b/cdist/conf/type/__package_pkgng_freebsd/man.rst @@ -95,5 +95,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2014 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_rubygem/man.rst b/cdist/conf/type/__package_rubygem/man.rst index 5bec9d2d..96ad21f7 100644 --- a/cdist/conf/type/__package_rubygem/man.rst +++ b/cdist/conf/type/__package_rubygem/man.rst @@ -49,5 +49,8 @@ Chase Allen James COPYING ------- -Copyright \(C) 2011 Chase Allen James. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). + +Copyright \(C) 2011 Chase Allen James. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_update_index/man.rst b/cdist/conf/type/__package_update_index/man.rst index e64fddae..454aa05b 100644 --- a/cdist/conf/type/__package_update_index/man.rst +++ b/cdist/conf/type/__package_update_index/man.rst @@ -22,7 +22,7 @@ OPTIONAL PARAMETERS type The package manager to use. Default is determined based on the $os explorer variable. - e.g. + e.g. * apt for Debian * yum for Red Hat * pacman for Arch Linux @@ -47,5 +47,8 @@ Ricardo Catalinas Jiménez COPYING ------- -Copyright \(C) 2014 Ricardo Catalinas Jiménez. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). + +Copyright \(C) 2014 Ricardo Catalinas Jiménez. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_upgrade_all/man.rst b/cdist/conf/type/__package_upgrade_all/man.rst index fd4dba44..62cbc43d 100644 --- a/cdist/conf/type/__package_upgrade_all/man.rst +++ b/cdist/conf/type/__package_upgrade_all/man.rst @@ -44,8 +44,10 @@ AUTHORS ------- Ricardo Catalinas Jiménez - COPYING ------- -Copyright \(C) 2014 Ricardo Catalinas Jiménez. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). + +Copyright \(C) 2014 Ricardo Catalinas Jiménez. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_yum/man.rst b/cdist/conf/type/__package_yum/man.rst index 581d3539..45ad9a55 100644 --- a/cdist/conf/type/__package_yum/man.rst +++ b/cdist/conf/type/__package_yum/man.rst @@ -59,5 +59,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_zypper/man.rst b/cdist/conf/type/__package_zypper/man.rst index cb9cb518..0051359b 100644 --- a/cdist/conf/type/__package_zypper/man.rst +++ b/cdist/conf/type/__package_zypper/man.rst @@ -68,4 +68,6 @@ COPYING ------- Copyright \(C) 2012 Nico Schottelius. Copyright \(C) 2013 Daniel Heule. -Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). +You can redistribute it and/or modify it under the terms of the +GNU General Public License as published by the Free Software Foundation, +either version 3 of the License, or (at your option) any later version. diff --git a/cdist/conf/type/__pacman_conf/man.rst b/cdist/conf/type/__pacman_conf/man.rst index 931f8812..6b8adfc9 100644 --- a/cdist/conf/type/__pacman_conf/man.rst +++ b/cdist/conf/type/__pacman_conf/man.rst @@ -69,5 +69,7 @@ Dominique Roux COPYING ------- -Copyright \(C) 2015 Dominique Roux. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Dominique Roux. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__pacman_conf_integrate/man.rst b/cdist/conf/type/__pacman_conf_integrate/man.rst index f36dca45..c21b56d8 100644 --- a/cdist/conf/type/__pacman_conf_integrate/man.rst +++ b/cdist/conf/type/__pacman_conf_integrate/man.rst @@ -45,5 +45,7 @@ Dominique Roux COPYING ------- -Copyright \(C) 2015 Dominique Roux. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Dominique Roux. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__pf_apply/man.rst b/cdist/conf/type/__pf_apply/man.rst index 1b7f4e3b..eee345e7 100644 --- a/cdist/conf/type/__pf_apply/man.rst +++ b/cdist/conf/type/__pf_apply/man.rst @@ -49,5 +49,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2012 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__pf_ruleset/man.rst b/cdist/conf/type/__pf_ruleset/man.rst index 756a9e30..5719e94e 100644 --- a/cdist/conf/type/__pf_ruleset/man.rst +++ b/cdist/conf/type/__pf_ruleset/man.rst @@ -49,5 +49,7 @@ Jake Guffey COPYING ------- -Copyright \(C) 2012 Jake Guffey. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Jake Guffey. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix/man.rst b/cdist/conf/type/__postfix/man.rst index dff85fec..43b158e0 100644 --- a/cdist/conf/type/__postfix/man.rst +++ b/cdist/conf/type/__postfix/man.rst @@ -36,5 +36,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_master/man.rst b/cdist/conf/type/__postfix_master/man.rst index b6e6fc94..07756f74 100644 --- a/cdist/conf/type/__postfix_master/man.rst +++ b/cdist/conf/type/__postfix_master/man.rst @@ -78,6 +78,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). - +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_postconf/man.rst b/cdist/conf/type/__postfix_postconf/man.rst index 5c2c2a0e..3222d4a7 100644 --- a/cdist/conf/type/__postfix_postconf/man.rst +++ b/cdist/conf/type/__postfix_postconf/man.rst @@ -48,5 +48,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_postmap/man.rst b/cdist/conf/type/__postfix_postmap/man.rst index 2f455346..2a82b44a 100644 --- a/cdist/conf/type/__postfix_postmap/man.rst +++ b/cdist/conf/type/__postfix_postmap/man.rst @@ -36,5 +36,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_reload/man.rst b/cdist/conf/type/__postfix_reload/man.rst index 36a66d45..944e22fa 100644 --- a/cdist/conf/type/__postfix_reload/man.rst +++ b/cdist/conf/type/__postfix_reload/man.rst @@ -36,5 +36,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postgres_database/man.rst b/cdist/conf/type/__postgres_database/man.rst index 517c12a3..acceec9b 100644 --- a/cdist/conf/type/__postgres_database/man.rst +++ b/cdist/conf/type/__postgres_database/man.rst @@ -40,5 +40,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__postgres_role/man.rst b/cdist/conf/type/__postgres_role/man.rst index a2a0268a..11fd73d5 100644 --- a/cdist/conf/type/__postgres_role/man.rst +++ b/cdist/conf/type/__postgres_role/man.rst @@ -61,5 +61,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__process/man.rst b/cdist/conf/type/__process/man.rst index 0e4690b1..e439f37c 100644 --- a/cdist/conf/type/__process/man.rst +++ b/cdist/conf/type/__process/man.rst @@ -68,5 +68,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__qemu_img/man.rst b/cdist/conf/type/__qemu_img/man.rst index 663e9162..210c7f5f 100644 --- a/cdist/conf/type/__qemu_img/man.rst +++ b/cdist/conf/type/__qemu_img/man.rst @@ -47,5 +47,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2012-2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012-2014 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__rbenv/man.rst b/cdist/conf/type/__rbenv/man.rst index 6341908a..607019cf 100644 --- a/cdist/conf/type/__rbenv/man.rst +++ b/cdist/conf/type/__rbenv/man.rst @@ -43,5 +43,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2012-2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012-2014 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__rsync/man.rst b/cdist/conf/type/__rsync/man.rst index 295feceb..94b06d63 100644 --- a/cdist/conf/type/__rsync/man.rst +++ b/cdist/conf/type/__rsync/man.rst @@ -108,5 +108,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2015 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__ssh_authorized_key/man.rst b/cdist/conf/type/__ssh_authorized_key/man.rst index a65ebdd9..b58ad879 100644 --- a/cdist/conf/type/__ssh_authorized_key/man.rst +++ b/cdist/conf/type/__ssh_authorized_key/man.rst @@ -65,5 +65,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__ssh_authorized_keys/man.rst b/cdist/conf/type/__ssh_authorized_keys/man.rst index e6829883..ba310ff9 100644 --- a/cdist/conf/type/__ssh_authorized_keys/man.rst +++ b/cdist/conf/type/__ssh_authorized_keys/man.rst @@ -115,5 +115,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012-2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012-2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__ssh_dot_ssh/man.rst b/cdist/conf/type/__ssh_dot_ssh/man.rst index 3084d60d..7d35affa 100644 --- a/cdist/conf/type/__ssh_dot_ssh/man.rst +++ b/cdist/conf/type/__ssh_dot_ssh/man.rst @@ -43,5 +43,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2014 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__staged_file/man.rst b/cdist/conf/type/__staged_file/man.rst index 4c54e5f5..9a6ba732 100644 --- a/cdist/conf/type/__staged_file/man.rst +++ b/cdist/conf/type/__staged_file/man.rst @@ -109,5 +109,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2015 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2015 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__start_on_boot/man.rst b/cdist/conf/type/__start_on_boot/man.rst index 4d4dd631..851d1a89 100644 --- a/cdist/conf/type/__start_on_boot/man.rst +++ b/cdist/conf/type/__start_on_boot/man.rst @@ -55,5 +55,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2012 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/docs/dev/show_all_exported_variables b/cdist/conf/type/__sysctl/explorer/value similarity index 81% rename from docs/dev/show_all_exported_variables rename to cdist/conf/type/__sysctl/explorer/value index 18acceca..fc85b3d8 100755 --- a/docs/dev/show_all_exported_variables +++ b/cdist/conf/type/__sysctl/explorer/value @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2014 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -17,9 +17,6 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# -# Generate documentation of exported variables -# - -cat bin/* | awk '/^export/ { print $2 }' +# get the current runtime value +sysctl -n "$__object_id" || true diff --git a/docs/dev/sync-to-testhost b/cdist/conf/type/__sysctl/gencode-remote similarity index 67% rename from docs/dev/sync-to-testhost rename to cdist/conf/type/__sysctl/gencode-remote index cc59eb8d..0f3b0b40 100755 --- a/docs/dev/sync-to-testhost +++ b/cdist/conf/type/__sysctl/gencode-remote @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2014 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -17,12 +17,14 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# -# Sync repo to testhosts -# -dirs="cdist cdist-nutzung" +value_should="$(cat "$__object/parameter/value")" +value_is="$(cat "$__object/explorer/value")" -for dir in $dirs; do - rsync -av --delete /home/users/nico/p/$dir/ root@rnic01:$dir -done +if [ "$value_should" = "$value_is" ]; then + # Nothing to do + exit 0 +fi + +# set the current runtime value +printf 'sysctl -w %s="%s"\n' "$__object_id" "$value_should" diff --git a/cdist/conf/type/__sysctl/man.rst b/cdist/conf/type/__sysctl/man.rst new file mode 100644 index 00000000..6873003e --- /dev/null +++ b/cdist/conf/type/__sysctl/man.rst @@ -0,0 +1,39 @@ +cdist-type__sysctl(7) +===================== + +NAME +---- +cdist-type__sysctl - manage sysctl settings + + +DESCRIPTION +----------- +Manages permanent as well as runtime sysctl settings. +Permament settings are set by managing entries in /etc/sysctl.conf. +Runtime settings are set by directly calling the sysctl executable. + + +REQUIRED PARAMETERS +------------------- +value + The value to set for the given key (object_id) + + +EXAMPLES +-------- + +.. code-block:: sh + + __sysctl net.ipv4.ip_forward --value 1 + + +AUTHORS +------- +Steven Armstrong + + +COPYING +------- +Copyright \(C) 2014 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 or +later (GPLv3+). diff --git a/cdist/conf/type/__sysctl/manifest b/cdist/conf/type/__sysctl/manifest new file mode 100755 index 00000000..dd317806 --- /dev/null +++ b/cdist/conf/type/__sysctl/manifest @@ -0,0 +1,39 @@ +#!/bin/sh +# +# 2014 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + + +os=$(cat "$__global/explorer/os") + +case "$os" in + redhat|centos|ubuntu|debian|archlinux) + : + ;; + *) + echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 + echo "Please contribute an implementation for it if you can." >&2 + exit 1 + ;; +esac + +__key_value "$__object_name" \ + --key "$__object_id" \ + --file /etc/sysctl.conf \ + --value "$(cat "$__object/parameter/value")" \ + --delimiter '=' diff --git a/cdist/conf/type/__sysctl/parameter/required b/cdist/conf/type/__sysctl/parameter/required new file mode 100644 index 00000000..6d4e1507 --- /dev/null +++ b/cdist/conf/type/__sysctl/parameter/required @@ -0,0 +1 @@ +value diff --git a/cdist/conf/type/__update_alternatives/man.rst b/cdist/conf/type/__update_alternatives/man.rst index 2fff3cba..73d82d11 100644 --- a/cdist/conf/type/__update_alternatives/man.rst +++ b/cdist/conf/type/__update_alternatives/man.rst @@ -40,5 +40,7 @@ Nico Schottelius COPYING ------- -Copyright \(C) 2013 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Nico Schottelius. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__user/man.rst b/cdist/conf/type/__user/man.rst index 172bde7c..5001bfa4 100644 --- a/cdist/conf/type/__user/man.rst +++ b/cdist/conf/type/__user/man.rst @@ -94,5 +94,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2011 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__user_groups/man.rst b/cdist/conf/type/__user_groups/man.rst index 37fd25d7..6767b7a8 100644 --- a/cdist/conf/type/__user_groups/man.rst +++ b/cdist/conf/type/__user_groups/man.rst @@ -46,5 +46,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2012 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__yum_repo/man.rst b/cdist/conf/type/__yum_repo/man.rst index 543a456d..94366c3a 100644 --- a/cdist/conf/type/__yum_repo/man.rst +++ b/cdist/conf/type/__yum_repo/man.rst @@ -118,5 +118,7 @@ Steven Armstrong COPYING ------- -Copyright \(C) 2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2014 Steven Armstrong. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__zypper_repo/man.rst b/cdist/conf/type/__zypper_repo/man.rst index 9cc5e1c3..73799d91 100644 --- a/cdist/conf/type/__zypper_repo/man.rst +++ b/cdist/conf/type/__zypper_repo/man.rst @@ -67,5 +67,7 @@ Daniel Heule COPYING ------- -Copyright \(C) 2013 Daniel Heule. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Daniel Heule. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/conf/type/__zypper_service/man.rst b/cdist/conf/type/__zypper_service/man.rst index c76a5ffc..ea48aebb 100644 --- a/cdist/conf/type/__zypper_service/man.rst +++ b/cdist/conf/type/__zypper_service/man.rst @@ -60,5 +60,7 @@ Daniel Heule COPYING ------- -Copyright \(C) 2013 Daniel Heule. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). +Copyright \(C) 2013 Daniel Heule. You can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. diff --git a/cdist/config.py b/cdist/config.py index da560e91..31b41781 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -28,6 +28,7 @@ import time import pprint import itertools import tempfile +import socket import cdist @@ -70,15 +71,16 @@ def inspect_ssh_mux_opts(): class Config(object): """Cdist main class to hold arbitrary data""" - def __init__(self, local, remote, dry_run=False): + def __init__(self, local, remote, dry_run=False, jobs=None): self.local = local self.remote = remote - self.log = logging.getLogger(self.local.target_host) + self.log = logging.getLogger(self.local.target_host[0]) self.dry_run = dry_run + self.jobs = jobs self.explorer = core.Explorer(self.local.target_host, self.local, - self.remote) + self.remote, jobs=self.jobs) self.manifest = core.Manifest(self.local.target_host, self.local) self.code = core.Code(self.local.target_host, self.local, self.remote) @@ -118,6 +120,7 @@ class Config(object): if args.manifest == '-' and args.hostfile == '-': raise cdist.Error(("Cannot read both, manifest and host file, " "from stdin")) + # if no host source is specified then read hosts from stdin if not (args.hostfile or args.host): args.hostfile = '-' @@ -229,19 +232,51 @@ class Config(object): log.debug("remote_copy for host \"{}\": {}".format( host, remote_copy)) + try: + # getaddrinfo returns a list of 5-tuples: + # (family, type, proto, canonname, sockaddr) + # where sockaddr is: + # (address, port) for AF_INET, + # (address, port, flow_info, scopeid) for AF_INET6 + ip_addr = socket.getaddrinfo( + host, None, type=socket.SOCK_STREAM)[0][4][0] + # gethostbyaddr returns triple + # (hostname, aliaslist, ipaddrlist) + host_name = socket.gethostbyaddr(ip_addr)[0] + log.debug("derived host_name for host \"{}\": {}".format( + host, host_name)) + except socket.gaierror as e: + log.warn("host_name: {}".format(e)) + # in case of error provide empty value + host_name = '' + except socket.herror as e: + log.warn("host_name: {}".format(e)) + # in case of error provide empty value + host_name = '' + + try: + host_fqdn = socket.getfqdn(host) + log.debug("derived host_fqdn for host \"{}\": {}".format( + host, host_fqdn)) + except socket.herror as e: + log.warn("host_fqdn: {}".format(e)) + # in case of error provide empty value + host_fqdn = '' + target_host = (host, host_name, host_fqdn) + local = cdist.exec.local.Local( - target_host=host, + target_host=target_host, base_root_path=host_base_path, host_dir_name=host_dir_name, initial_manifest=args.manifest, add_conf_dirs=args.conf_dir) remote = cdist.exec.remote.Remote( - target_host=host, + target_host=target_host, remote_exec=remote_exec, remote_copy=remote_copy) - c = cls(local, remote, dry_run=args.dry_run) + c = cls(local, remote, dry_run=args.dry_run, jobs=args.jobs) c.run() except cdist.Error as e: diff --git a/cdist/core/code.py b/cdist/core/code.py index 8e3cd63e..cfc1316a 100644 --- a/cdist/core/code.py +++ b/cdist/core/code.py @@ -36,6 +36,9 @@ common: env: PATH: prepend directory with type emulator symlinks == local.bin_path __target_host: the target host we are working on + __target_hostname: the target hostname provided from __target_host + __target_fqdn: the target's fully qualified domain name provided from + __target_host __cdist_manifest: full qualified path of the manifest == script __cdist_type_base_path: full qualified path to the directory where types are defined for use in type emulator @@ -46,6 +49,9 @@ gencode-local env: __target_host: the target host we are working on + __target_hostname: the target hostname provided from __target_host + __target_fqdn: the target's fully qualified domain name provided from + __target_host __global: full qualified path to the global output dir == local.out_path __object: full qualified path to the object's dir @@ -61,6 +67,9 @@ gencode-remote env: __target_host: the target host we are working on + __target_hostname: the target hostname provided from __target_host + __target_fqdn: the target's fully qualified domain name provided from + __target_host __global: full qualified path to the global output dir == local.out_path __object: full qualified path to the object's dir @@ -89,12 +98,17 @@ class Code(object): """Generates and executes cdist code scripts. """ + # target_host is tuple (target_host, target_hostname, target_fqdn) def __init__(self, target_host, local, remote): - self.target_host = target_host + self.target_host = target_host[0] + self.target_hostname = target_host[1] + self.target_fqdn = target_host[2] self.local = local self.remote = remote self.env = { - '__target_host': self.target_host, + '__target_host': self.target_host[0], + '__target_hostname': self.target_host[1], + '__target_fqdn': self.target_host[2], '__global': self.local.base_path, '__files': self.local.files_path, } diff --git a/cdist/core/explorer.py b/cdist/core/explorer.py index 345f45ff..ef85431c 100644 --- a/cdist/core/explorer.py +++ b/cdist/core/explorer.py @@ -23,6 +23,7 @@ import logging import os import glob +import multiprocessing import cdist @@ -65,18 +66,24 @@ class Explorer(object): """Executes cdist explorers. """ - def __init__(self, target_host, local, remote): + def __init__(self, target_host, local, remote, jobs=None): self.target_host = target_host - self.log = logging.getLogger(target_host) + self._open_logger() self.local = local self.remote = remote self.env = { - '__target_host': self.target_host, + '__target_host': self.target_host[0], + '__target_hostname': self.target_host[1], + '__target_fqdn': self.target_host[2], '__explorer': self.remote.global_explorer_path, } self._type_explorers_transferred = [] + self.jobs = jobs + + def _open_logger(self): + self.log = logging.getLogger(self.target_host[0]) # global @@ -91,17 +98,65 @@ class Explorer(object): """ self.log.info("Running global explorers") self.transfer_global_explorers() + if self.jobs is None: + self._run_global_explorers_seq(out_path) + else: + self._run_global_explorers_parallel(out_path) + + def _run_global_explorer(self, explorer, out_path): + output = self.run_global_explorer(explorer) + path = os.path.join(out_path, explorer) + with open(path, 'w') as fd: + fd.write(output) + + def _run_global_explorers_seq(self, out_path): + self.log.info("Running global explorers sequentially") for explorer in self.list_global_explorer_names(): - output = self.run_global_explorer(explorer) - path = os.path.join(out_path, explorer) - with open(path, 'w') as fd: - fd.write(output) + self._run_global_explorer(explorer, out_path) + + def _run_global_explorers_parallel(self, out_path): + self.log.info("Running global explorers in {} parallel jobs".format( + self.jobs)) + self.log.debug("Multiprocessing start method is {}".format( + multiprocessing.get_start_method())) + self.log.debug(("Starting multiprocessing Pool for global " + "explorers run")) + with multiprocessing.Pool(self.jobs) as pool: + self.log.debug("Starting async for global explorer run") + results = [ + pool.apply_async(self._run_global_explorer, (e, out_path,)) + for e in self.list_global_explorer_names() + ] + + self.log.debug("Waiting async results for global explorer runs") + for r in results: + r.get() # self._run_global_explorer returns None + self.log.debug(("Multiprocessing run for global explorers " + "finished")) + + # logger is not pickable, so remove it when we pickle + def __getstate__(self): + state = self.__dict__.copy() + if 'log' in state: + del state['log'] + return state + + # recreate logger when we unpickle + def __setstate__(self, state): + self.__dict__.update(state) + self._open_logger() def transfer_global_explorers(self): """Transfer the global explorers to the remote side.""" self.remote.mkdir(self.remote.global_explorer_path) - self.remote.transfer(self.local.global_explorer_path, - self.remote.global_explorer_path) + if self.jobs is None: + self.remote.transfer(self.local.global_explorer_path, + self.remote.global_explorer_path) + else: + self.remote.transfer_dir_parallel( + self.local.global_explorer_path, + self.remote.global_explorer_path, + self.jobs) self.remote.run(["chmod", "0700", "%s/*" % (self.remote.global_explorer_path)]) diff --git a/cdist/core/manifest.py b/cdist/core/manifest.py index ac322101..a16e9346 100644 --- a/cdist/core/manifest.py +++ b/cdist/core/manifest.py @@ -32,6 +32,9 @@ common: env: PATH: prepend directory with type emulator symlinks == local.bin_path __target_host: the target host we are working on + __target_hostname: the target hostname provided from __target_host + __target_fqdn: the target's fully qualified domain name provided from + __target_host __global: full qualified path to the global output dir == local.out_path __cdist_manifest: full qualified path of the manifest == script @@ -95,14 +98,16 @@ class Manifest(object): self.target_host = target_host self.local = local - self.log = logging.getLogger(self.target_host) + self.log = logging.getLogger(self.target_host[0]) self.env = { 'PATH': "%s:%s" % (self.local.bin_path, os.environ['PATH']), # for use in type emulator '__cdist_type_base_path': self.local.type_path, '__global': self.local.base_path, - '__target_host': self.target_host, + '__target_host': self.target_host[0], + '__target_hostname': self.target_host[1], + '__target_fqdn': self.target_host[2], '__files': self.local.files_path, } diff --git a/cdist/emulator.py b/cdist/emulator.py index 58ab7389..2c5e567b 100644 --- a/cdist/emulator.py +++ b/cdist/emulator.py @@ -64,7 +64,11 @@ class Emulator(object): try: self.global_path = self.env['__global'] - self.target_host = self.env['__target_host'] + self.target_host = ( + self.env['__target_host'], + self.env['__target_hostname'], + self.env['__target_fqdn'] + ) # Internal variables self.object_source = self.env['__cdist_manifest'] @@ -101,7 +105,7 @@ class Emulator(object): else: logging.root.setLevel(logging.INFO) - self.log = logging.getLogger(self.target_host) + self.log = logging.getLogger(self.target_host[0]) def commandline(self): """Parse command line""" diff --git a/cdist/exec/local.py b/cdist/exec/local.py index 4fdb5170..c6e25be3 100644 --- a/cdist/exec/local.py +++ b/cdist/exec/local.py @@ -83,7 +83,19 @@ class Local(object): return None def _init_log(self): - self.log = logging.getLogger(self.target_host) + self.log = logging.getLogger(self.target_host[0]) + + # logger is not pickable, so remove it when we pickle + def __getstate__(self): + state = self.__dict__.copy() + if 'log' in state: + del state['log'] + return state + + # recreate logger when we unpickle + def __setstate__(self, state): + self.__dict__.update(state) + self._init_log() def _init_permissions(self): # Setup file permissions using umask @@ -184,8 +196,11 @@ class Local(object): if env is None: env = os.environ.copy() - # Export __target_host for use in __remote_{copy,exec} scripts - env['__target_host'] = self.target_host + # Export __target_host, __target_hostname, __target_fqdn + # for use in __remote_{copy,exec} scripts + env['__target_host'] = self.target_host[0] + env['__target_hostname'] = self.target_host[1] + env['__target_fqdn'] = self.target_host[2] # Export for emulator env['__cdist_object_marker'] = self.object_marker_name diff --git a/cdist/exec/remote.py b/cdist/exec/remote.py index b6ff8c1f..9c70bdf4 100644 --- a/cdist/exec/remote.py +++ b/cdist/exec/remote.py @@ -26,9 +26,10 @@ import sys import glob import subprocess import logging -import cdist.exec.util as exec_util +import multiprocessing import cdist +import cdist.exec.util as exec_util class DecodeError(cdist.Error): @@ -66,10 +67,25 @@ class Remote(object): self.type_path = os.path.join(self.conf_path, "type") self.global_explorer_path = os.path.join(self.conf_path, "explorer") - self.log = logging.getLogger(self.target_host) + self._open_logger() self._init_env() + def _open_logger(self): + self.log = logging.getLogger(self.target_host[0]) + + # logger is not pickable, so remove it when we pickle + def __getstate__(self): + state = self.__dict__.copy() + if 'log' in state: + del state['log'] + return state + + # recreate logger when we unpickle + def __setstate__(self, state): + self.__dict__.update(state) + self._open_logger() + def _init_env(self): """Setup environment for scripts - HERE????""" # FIXME: better do so in exec functions that require it! @@ -102,14 +118,48 @@ class Remote(object): command = self._copy.split() path = os.path.join(source, f) command.extend([path, '{0}:{1}'.format( - self.target_host, destination)]) + self.target_host[0], destination)]) self._run_command(command) else: command = self._copy.split() command.extend([source, '{0}:{1}'.format( - self.target_host, destination)]) + self.target_host[0], destination)]) self._run_command(command) + def transfer_dir_parallel(self, source, destination, jobs): + """Transfer a directory to the remote side in parallel mode.""" + self.log.debug("Remote transfer: %s -> %s", source, destination) + self.rmdir(destination) + if os.path.isdir(source): + self.mkdir(destination) + self.log.info("Remote transfer in {} parallel jobs".format( + jobs)) + self.log.debug("Multiprocessing start method is {}".format( + multiprocessing.get_start_method())) + self.log.debug(("Starting multiprocessing Pool for parallel " + "remote transfer")) + with multiprocessing.Pool(jobs) as pool: + self.log.debug("Starting async for parallel transfer") + commands = [] + for f in glob.glob1(source, '*'): + command = self._copy.split() + path = os.path.join(source, f) + command.extend([path, '{0}:{1}'.format( + self.target_host[0], destination)]) + commands.append(command) + results = [ + pool.apply_async(self._run_command, (cmd,)) + for cmd in commands + ] + + self.log.debug("Waiting async results for parallel transfer") + for r in results: + r.get() # self._run_command returns None + self.log.debug(("Multiprocessing for parallel transfer " + "finished")) + else: + raise cdist.Error("Source {} is not a directory".format(source)) + def run_script(self, script, env=None, return_output=False): """Run the given script with the given environment on the remote side. Return the output as a string. @@ -128,7 +178,7 @@ class Remote(object): """ # prefix given command with remote_exec cmd = self._exec.split() - cmd.append(self.target_host) + cmd.append(self.target_host[0]) # FIXME: replace this by -o SendEnv name -o SendEnv name ... to ssh? # can't pass environment to remote side, so prepend command with @@ -165,9 +215,12 @@ class Remote(object): assert isinstance(command, (list, tuple)), ( "list or tuple argument expected, got: %s" % command) - # export target_host for use in __remote_{exec,copy} scripts + # export target_host, target_hostname, target_fqdn + # for use in __remote_{exec,copy} scripts os_environ = os.environ.copy() - os_environ['__target_host'] = self.target_host + os_environ['__target_host'] = self.target_host[0] + os_environ['__target_hostname'] = self.target_host[1] + os_environ['__target_fqdn'] = self.target_host[2] self.log.debug("Remote run: %s", command) try: diff --git a/cdist/shell.py b/cdist/shell.py index dacff674..9378efc3 100644 --- a/cdist/shell.py +++ b/cdist/shell.py @@ -22,6 +22,7 @@ import logging import os import subprocess +import tempfile # initialise cdist import cdist.exec.local @@ -38,9 +39,20 @@ class Shell(object): self.shell = shell - self.target_host = "cdist-shell-no-target-host" + self.target_host = ( + "cdist-shell-no-target-host", + "cdist-shell-no-target-host", + "cdist-shell-no-target-host", + ) + + host_dir_name = cdist.str_hash(self.target_host[0]) + base_root_path = tempfile.mkdtemp() + host_base_path = os.path.join(base_root_path, host_dir_name) + self.local = cdist.exec.local.Local( - target_host=self.target_host) + target_host=self.target_host, + base_root_path=host_base_path, + host_dir_name=host_dir_name) def _init_shell(self): """Select shell to execute, if not specified by user""" @@ -59,7 +71,9 @@ class Shell(object): '__cdist_type_base_path': self.local.type_path, '__cdist_manifest': "cdist shell", '__global': self.local.base_path, - '__target_host': self.target_host, + '__target_host': self.target_host[0], + '__target_hostname': self.target_host[1], + '__target_fqdn': self.target_host[2], '__manifest': self.local.manifest_path, '__explorer': self.local.global_explorer_path, '__files': self.local.files_path, diff --git a/cdist/test/__init__.py b/cdist/test/__init__.py index d9630f53..83b0c618 100644 --- a/cdist/test/__init__.py +++ b/cdist/test/__init__.py @@ -37,7 +37,11 @@ class CdistTestCase(unittest.TestCase): remote_exec = os.path.join(global_fixtures_dir, "remote", "exec") remote_copy = os.path.join(global_fixtures_dir, "remote", "copy") - target_host = 'cdisttesthost' + target_host = ( + 'cdisttesthost', + 'cdisttesthost', + 'cdisttesthost', + ) def mkdtemp(self, **kwargs): return tempfile.mkdtemp(prefix='tmp.cdist.test.', **kwargs) diff --git a/cdist/test/code/__init__.py b/cdist/test/code/__init__.py index 7f61c13f..83c93f8b 100644 --- a/cdist/test/code/__init__.py +++ b/cdist/test/code/__init__.py @@ -41,7 +41,7 @@ class CodeTestCase(test.CdistTestCase): def setUp(self): self.local_dir = self.mkdtemp() - self.hostdir = cdist.str_hash(self.target_host) + self.hostdir = cdist.str_hash(self.target_host[0]) self.host_base_path = os.path.join(self.local_dir, self.hostdir) self.local = local.Local( @@ -83,7 +83,12 @@ class CodeTestCase(test.CdistTestCase): junk, value = line.split(': ') key = junk.split(' ')[1] output_dict[key] = value - self.assertEqual(output_dict['__target_host'], self.local.target_host) + self.assertEqual(output_dict['__target_host'], + self.local.target_host[0]) + self.assertEqual(output_dict['__target_hostname'], + self.local.target_host[1]) + self.assertEqual(output_dict['__target_fqdn'], + self.local.target_host[2]) self.assertEqual(output_dict['__global'], self.local.base_path) self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path) self.assertEqual(output_dict['__object'], @@ -101,7 +106,12 @@ class CodeTestCase(test.CdistTestCase): junk, value = line.split(': ') key = junk.split(' ')[1] output_dict[key] = value - self.assertEqual(output_dict['__target_host'], self.local.target_host) + self.assertEqual(output_dict['__target_host'], + self.local.target_host[0]) + self.assertEqual(output_dict['__target_hostname'], + self.local.target_host[1]) + self.assertEqual(output_dict['__target_fqdn'], + self.local.target_host[2]) self.assertEqual(output_dict['__global'], self.local.base_path) self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path) self.assertEqual(output_dict['__object'], diff --git a/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local b/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local index 5883c268..7fa70342 100755 --- a/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local +++ b/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local @@ -1,6 +1,8 @@ #!/bin/sh echo "echo __target_host: $__target_host" +echo "echo __target_hostname: $__target_hostname" +echo "echo __target_fqdn: $__target_fqdn" echo "echo __global: $__global" echo "echo __type: $__type" echo "echo __object: $__object" diff --git a/cdist/test/config/__init__.py b/cdist/test/config/__init__.py index cfcc3c70..db753f41 100644 --- a/cdist/test/config/__init__.py +++ b/cdist/test/config/__init__.py @@ -55,7 +55,7 @@ class ConfigRunTestCase(test.CdistTestCase): self.temp_dir = self.mkdtemp() self.local_dir = os.path.join(self.temp_dir, "local") - self.hostdir = cdist.str_hash(self.target_host) + self.hostdir = cdist.str_hash(self.target_host[0]) self.host_base_path = os.path.join(self.local_dir, self.hostdir) os.makedirs(self.host_base_path) self.local = cdist.exec.local.Local( diff --git a/cdist/test/emulator/__init__.py b/cdist/test/emulator/__init__.py index 3fe9a4e5..4fd0ed40 100644 --- a/cdist/test/emulator/__init__.py +++ b/cdist/test/emulator/__init__.py @@ -48,7 +48,7 @@ class EmulatorTestCase(test.CdistTestCase): handle, self.script = self.mkstemp(dir=self.temp_dir) os.close(handle) base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) host_base_path = os.path.join(base_path, hostdir) self.local = local.Local( @@ -151,7 +151,7 @@ class EmulatorConflictingRequirementsTestCase(test.CdistTestCase): handle, self.script = self.mkstemp(dir=self.temp_dir) os.close(handle) base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) host_base_path = os.path.join(base_path, hostdir) self.local = local.Local( @@ -241,7 +241,7 @@ class AutoRequireEmulatorTestCase(test.CdistTestCase): def setUp(self): self.temp_dir = self.mkdtemp() base_path = os.path.join(self.temp_dir, "out") - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) host_base_path = os.path.join(base_path, hostdir) self.local = local.Local( @@ -274,7 +274,7 @@ class OverrideTestCase(test.CdistTestCase): handle, self.script = self.mkstemp(dir=self.temp_dir) os.close(handle) base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) host_base_path = os.path.join(base_path, hostdir) self.local = local.Local( @@ -315,7 +315,7 @@ class ArgumentsTestCase(test.CdistTestCase): def setUp(self): self.temp_dir = self.mkdtemp() base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) host_base_path = os.path.join(base_path, hostdir) handle, self.script = self.mkstemp(dir=self.temp_dir) os.close(handle) @@ -440,7 +440,7 @@ class StdinTestCase(test.CdistTestCase): self.temp_dir = self.mkdtemp() base_path = os.path.join(self.temp_dir, "out") - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) host_base_path = os.path.join(base_path, hostdir) self.local = local.Local( diff --git a/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local b/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local index 771894fb..3d568ad3 100755 --- a/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local +++ b/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local @@ -1,6 +1,8 @@ #!/bin/sh echo "echo __target_host: $__target_host" +echo "echo __target_hostname: $__target_hostname" +echo "echo __target_fqdn: $__target_fqdn" echo "echo __global: $__global" echo "echo __type: $__type" echo "echo __object: $__object" diff --git a/cdist/test/exec/local.py b/cdist/test/exec/local.py index f83fd6b7..0efdfa0a 100644 --- a/cdist/test/exec/local.py +++ b/cdist/test/exec/local.py @@ -44,10 +44,14 @@ class LocalTestCase(test.CdistTestCase): def setUp(self): - target_host = 'localhost' + target_host = ( + 'localhost', + 'localhost', + 'localhost', + ) self.temp_dir = self.mkdtemp() self.out_parent_path = self.temp_dir - self.hostdir = cdist.str_hash(target_host) + self.hostdir = cdist.str_hash(target_host[0]) self.host_base_path = op.join(self.out_parent_path, self.hostdir) self.out_path = op.join(self.host_base_path, "data") @@ -111,7 +115,11 @@ class LocalTestCase(test.CdistTestCase): test_type = "__file" link_test_local = local.Local( - target_host='localhost', + target_host=( + 'localhost', + 'localhost', + 'localhost', + ), base_root_path=self.host_base_path, host_dir_name=self.hostdir, exec_path=test.cdist_exec_path, @@ -130,7 +138,11 @@ class LocalTestCase(test.CdistTestCase): test_type = "__cdist_test_type" link_test_local = local.Local( - target_host='localhost', + target_host=( + 'localhost', + 'localhost', + 'localhost', + ), base_root_path=self.host_base_path, host_dir_name=self.hostdir, exec_path=test.cdist_exec_path, @@ -152,7 +164,11 @@ class LocalTestCase(test.CdistTestCase): os.environ['CDIST_PATH'] = conf_dir link_test_local = local.Local( - target_host='localhost', + target_host=( + 'localhost', + 'localhost', + 'localhost', + ), base_root_path=self.host_base_path, host_dir_name=self.hostdir, exec_path=test.cdist_exec_path, diff --git a/cdist/test/exec/remote.py b/cdist/test/exec/remote.py index 318e4c7b..45dabb18 100644 --- a/cdist/test/exec/remote.py +++ b/cdist/test/exec/remote.py @@ -24,6 +24,7 @@ import getpass import shutil import string import random +import multiprocessing import cdist from cdist import test @@ -34,7 +35,11 @@ class RemoteTestCase(test.CdistTestCase): def setUp(self): self.temp_dir = self.mkdtemp() - self.target_host = 'localhost' + self.target_host = ( + 'localhost', + 'localhost', + 'localhost', + ) self.base_path = self.temp_dir user = getpass.getuser() remote_exec = "ssh -o User=%s -q" % user @@ -67,22 +72,22 @@ class RemoteTestCase(test.CdistTestCase): # /test api def test_run_success(self): - self.remote.run(['/bin/true']) + self.remote.run(['true']) def test_run_fail(self): - self.assertRaises(cdist.Error, self.remote.run, ['/bin/false']) + self.assertRaises(cdist.Error, self.remote.run, ['false']) def test_run_script_success(self): handle, script = self.mkstemp(dir=self.temp_dir) with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "/bin/true"]) + fd.writelines(["#!/bin/sh\n", "true"]) self.remote.run_script(script) def test_run_script_fail(self): handle, script = self.mkstemp(dir=self.temp_dir) with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "/bin/false"]) - self.assertRaises(remote.RemoteScriptError, self.remote.run_script, + fd.writelines(["#!/bin/sh\n", "false"]) + self.assertRaises(cdist.Error, self.remote.run_script, script) def test_run_script_get_output(self): @@ -121,8 +126,24 @@ class RemoteTestCase(test.CdistTestCase): # test if the payload file is in the target directory self.assertTrue(os.path.isfile(os.path.join(target, source_file_name))) - def test_create_directories(self): - self.remote.create_directories() + def test_transfer_dir_parallel(self): + source = self.mkdtemp(dir=self.temp_dir) + # put 8 files in the directory as payload + filenames = [] + for x in range(8): + handle, source_file = self.mkstemp(dir=source) + os.close(handle) + source_file_name = os.path.split(source_file)[-1] + filenames.append(source_file_name) + target = self.mkdtemp(dir=self.temp_dir) + self.remote.transfer_dir_parallel(source, target, + multiprocessing.cpu_count()) + # test if the payload files are in the target directory + for filename in filenames: + self.assertTrue(os.path.isfile(os.path.join(target, filename))) + + def test_create_files_dirs(self): + self.remote.create_files_dirs() self.assertTrue(os.path.isdir(self.remote.base_path)) self.assertTrue(os.path.isdir(self.remote.conf_path)) @@ -135,8 +156,8 @@ class RemoteTestCase(test.CdistTestCase): remote_copy = "echo" r = remote.Remote(self.target_host, base_path=self.base_path, remote_exec=remote_exec, remote_copy=remote_copy) - self.assertEqual(r.run('/bin/true', return_output=True), - "%s\n" % self.target_host) + self.assertEqual(r.run('true', return_output=True), + "%s\n" % self.target_host[0]) def test_run_script_target_host_in_env(self): handle, remote_exec_path = self.mkstemp(dir=self.temp_dir) @@ -149,9 +170,9 @@ class RemoteTestCase(test.CdistTestCase): remote_exec=remote_exec, remote_copy=remote_copy) handle, script = self.mkstemp(dir=self.temp_dir) with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "/bin/true"]) + fd.writelines(["#!/bin/sh\n", "true"]) self.assertEqual(r.run_script(script, return_output=True), - "%s\n" % self.target_host) + "%s\n" % self.target_host[0]) def test_run_script_with_env_target_host_in_env(self): handle, script = self.mkstemp(dir=self.temp_dir) diff --git a/cdist/test/explorer/__init__.py b/cdist/test/explorer/__init__.py index 9a4555b8..fc66020d 100644 --- a/cdist/test/explorer/__init__.py +++ b/cdist/test/explorer/__init__.py @@ -23,6 +23,7 @@ import os import shutil import getpass +import multiprocessing import cdist from cdist import core @@ -42,7 +43,7 @@ class ExplorerClassTestCase(test.CdistTestCase): def setUp(self): self.temp_dir = self.mkdtemp() self.local_path = os.path.join(self.temp_dir, "local") - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) base_root_path = os.path.join(self.local_path, hostdir) self.remote_base_path = os.path.join(self.temp_dir, "remote") os.makedirs(self.remote_base_path) @@ -168,3 +169,48 @@ class ExplorerClassTestCase(test.CdistTestCase): cdist_object.create() self.explorer.run_type_explorers(cdist_object) self.assertEqual(cdist_object.explorers, {'world': 'hello'}) + + def test_jobs_parameter(self): + self.assertIsNone(self.explorer.jobs) + expl = explorer.Explorer( + self.target_host, + self.local, + self.remote, + jobs=8) + self.assertEqual(expl.jobs, 8) + + def test_transfer_global_explorers_parallel(self): + expl = explorer.Explorer( + self.target_host, + self.local, + self.remote, + jobs=multiprocessing.cpu_count()) + self.assertIsNotNone(expl.jobs) + + expl.transfer_global_explorers() + source = self.local.global_explorer_path + destination = self.remote.global_explorer_path + self.assertEqual(sorted(os.listdir(source)), + sorted(os.listdir(destination))) + + def test_run_parallel_jobs(self): + expl = explorer.Explorer( + self.target_host, + self.local, + self.remote, + jobs=multiprocessing.cpu_count()) + self.assertIsNotNone(expl.jobs) + out_path = self.mkdtemp() + + expl.run_global_explorers(out_path) + names = sorted(expl.list_global_explorer_names()) + output = sorted(os.listdir(out_path)) + + self.assertEqual(names, output) + shutil.rmtree(out_path) + + +if __name__ == '__main__': + import unittest + + unittest.main() diff --git a/cdist/test/manifest/__init__.py b/cdist/test/manifest/__init__.py index cfaefe5c..3e07c1a7 100644 --- a/cdist/test/manifest/__init__.py +++ b/cdist/test/manifest/__init__.py @@ -49,7 +49,7 @@ class ManifestTestCase(test.CdistTestCase): self.temp_dir = self.mkdtemp() out_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host) + hostdir = cdist.str_hash(self.target_host[0]) base_root_path = os.path.join(out_path, hostdir) self.local = local.Local( target_host=self.target_host, @@ -60,7 +60,7 @@ class ManifestTestCase(test.CdistTestCase): self.local.create_files_dirs() self.manifest = manifest.Manifest(self.target_host, self.local) - self.log = logging.getLogger(self.target_host) + self.log = logging.getLogger(self.target_host[0]) def tearDown(self): os.environ = self.orig_environ @@ -82,7 +82,12 @@ class ManifestTestCase(test.CdistTestCase): key, value = line.split(': ') output_dict[key] = value self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path)) - self.assertEqual(output_dict['__target_host'], self.local.target_host) + self.assertEqual(output_dict['__target_host'], + self.local.target_host[0]) + self.assertEqual(output_dict['__target_hostname'], + self.local.target_host[1]) + self.assertEqual(output_dict['__target_fqdn'], + self.local.target_host[2]) self.assertEqual(output_dict['__global'], self.local.base_path) self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path) @@ -107,7 +112,12 @@ class ManifestTestCase(test.CdistTestCase): key, value = line.split(': ') output_dict[key] = value self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path)) - self.assertEqual(output_dict['__target_host'], self.local.target_host) + self.assertEqual(output_dict['__target_host'], + self.local.target_host[0]) + self.assertEqual(output_dict['__target_hostname'], + self.local.target_host[1]) + self.assertEqual(output_dict['__target_fqdn'], + self.local.target_host[2]) self.assertEqual(output_dict['__global'], self.local.base_path) self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path) diff --git a/cdist/test/manifest/fixtures/conf/manifest/dump_environment b/cdist/test/manifest/fixtures/conf/manifest/dump_environment index df901910..702145e2 100755 --- a/cdist/test/manifest/fixtures/conf/manifest/dump_environment +++ b/cdist/test/manifest/fixtures/conf/manifest/dump_environment @@ -3,6 +3,8 @@ cat > $__cdist_test_out << DONE PATH: $PATH __target_host: $__target_host +__target_hostname: $__target_hostname +__target_fqdn: $__target_fqdn __global: $__global __cdist_type_base_path: $__cdist_type_base_path __manifest: $__manifest diff --git a/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest b/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest index 13efe038..757d07b5 100755 --- a/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest +++ b/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest @@ -3,6 +3,8 @@ cat > $__cdist_test_out << DONE PATH: $PATH __target_host: $__target_host +__target_hostname: $__target_hostname +__target_fqdn: $__target_fqdn __global: $__global __cdist_type_base_path: $__cdist_type_base_path __type: $__type diff --git a/completions/bash/cdist-completion.bash b/completions/bash/cdist-completion.bash index 3d396bb4..c756fca8 100644 --- a/completions/bash/cdist-completion.bash +++ b/completions/bash/cdist-completion.bash @@ -36,10 +36,10 @@ _cdist() return 0 ;; config) - opts="-h --help -d --debug -v --verbose \ - -c --conf-dir -f --file -i --initial-manifest -n --dry-run \ - -o --out-dir -p --parallel -s --sequential --remote-copy \ - --remote-exec" + opts="-h --help -d --debug -v --verbose -b --enable-beta \ + -c --conf-dir -f --file -i --initial-manifest -j --jobs \ + -n --dry-run -o --out-dir -p --parallel -s --sequential \ + --remote-copy --remote-exec" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; diff --git a/completions/zsh/_cdist b/completions/zsh/_cdist index 2bf324a6..18fda0f0 100644 --- a/completions/zsh/_cdist +++ b/completions/zsh/_cdist @@ -36,7 +36,7 @@ _cdist() esac ;; config) - opts=(-h --help -d --debug -v --verbose -c --conf-dir -f --file -i --initial-manifest -n --dry-run -o --out-dir -p --parallel -s --sequential --remote-copy --remote-exec) + opts=(-h --help -d --debug -v --verbose -b --enable-beta -c --conf-dir -f --file -i --initial-manifest -j --jobs -n --dry-run -o --out-dir -p --parallel -s --sequential --remote-copy --remote-exec) compadd "$@" -- $opts ;; *) diff --git a/docs/changelog b/docs/changelog index 0fd1cc95..4d6efbc7 100644 --- a/docs/changelog +++ b/docs/changelog @@ -4,6 +4,17 @@ Changelog next: * New type: __hosts: manage entries in /etc/hosts (Dmitry Bogatov) +4.3.0: 2016-08-19 + * Documentation: Add Parallelization chapter (Darko Poljak) + * Core: Add -b, --enable-beta option for enabling beta functionalities (Darko Poljak) + * Core: Add -j, --jobs option for parallel execution and add parallel support for global explorers (currently in beta) (Darko Poljak) + * Core: Add derived env vars for target hostname and fqdn (Darko Poljak) + * New type: __keyboard: Set keyboard layout (Carlos Ortigoza) + * Documentation: Re-license types' man pages to GPLV3+ (Dmitry Bogatov, Darko Poljak) + * New type __filesystem: manage filesystems on devices (Daniel Heule) + * New type: __locale_system (Steven Armstrong, Carlos Ortigoza, Nico Schottelius) + * New type: __sysctl (Steven Armstrong) + 4.2.2: 2016-07-26 * Core: Fix ssh ControlPath socket file error (Darko Poljak) * Documentation: Update cdist man page and cdist-references (Darko Poljak) @@ -154,7 +165,7 @@ next: * Documentation: Cleanup up, added HTML links (Tomas Pospisek) * Explorer interfaces: Remove test output (Daniel Heule) * Type __jail: Add messaging support (Jake Guffey) - + 3.1.3: 2014-04-29 * New Type: __yum_repo (Steven Armstrong) * Type __hostname: Add support for CentOS (Nico Schottelius) @@ -316,7 +327,7 @@ next: * New Type: __postfix_postconf (Steven Armstrong) * New Type: __postfix_postmap (Steven Armstrong) * New Type: __postfix_reload (Steven Armstrong) - * Type __line: Ensure regex does not contain / + * Type __line: Ensure regex does not contain / * Type __ssh_authorized_keys: Bugfix: Preserve ownership (Steven Armstrong) 2.3.3: 2013-09-09 @@ -394,7 +405,7 @@ next: * Support for CDIST_PATH (Steven Armstrong) 2.1.0pre8: 2012-11-15 - * Type cleanup: __apt_ppa, __apt_ppa_update_index, __file, + * Type cleanup: __apt_ppa, __apt_ppa_update_index, __file, __ssh_authorized_key, __timezone, all install types (Steven Armstrong) * Types: Remove all parameter changing code (Nico Schottelius) * Type __rvm_ruby: Change parameter "default" to be boolean (Nico Schottelius) @@ -458,7 +469,7 @@ next: * Feature __group: Added support for FreeBSD (Jake Guffey) * New Type: __package_zypper (Nico Schottelius) * Feature Types: Initial Support for SuSE Linux (Nico Schottelius) - + 2.0.13: 2012-06-05 * Bugfix __ssh_authorized_key: Ensure it sets proper group (contradict) * Bugfix __addifnosuchline: Fixed quotes/interpolation bug ("a b" became "a b") (Nico Schottelius) @@ -490,7 +501,7 @@ next: * Various smaller bugfixes (Chris Lamb) 2.0.9: 2012-03-12 - * Cleanup documentation: Fix environment variable list to be properly + * Cleanup documentation: Fix environment variable list to be properly displayed (Giel van Schijndel) * Cleanup documentation: Some minor corrections * New Type: __package_opkg (Giel van Schijndel) @@ -499,7 +510,7 @@ next: * Feature __package: Support for OpenWRT (Giel van Schijndel) * Feature __start_on_boot: Support for OpenWRT (Giel van Schijndel) * Feature __start_on_boot: Support for Amazon Linux (Matt Coddington) - * New Example: Use rsync to backup files (Matt Coddington) + * New Example: Use rsync to backup files (Matt Coddington) * Feature core: Exit non-zero, if configuration failed (Nico Schottelius) * Documentation: Describe how to do templating (Aurélien Bondis) @@ -544,7 +555,7 @@ next: (Steven Armstrong, Daniel Maher) * Cleanup: Explicitly require Python >= 3.2 (do not fail implicitly) (Nico Schottelius) * Documentation: (Re)write of the tutorial (Nico Schottelius) - * Feature: __addifnosuchline supports matching on + * Feature: __addifnosuchline supports matching on regular expressions (Daniel Maher) * Feature: __directory, __file, __link: Add --state parameter (Steven Armstrong) diff --git a/docs/dev/fancy-ideas b/docs/dev/fancy-ideas deleted file mode 100644 index 8ee290cd..00000000 --- a/docs/dev/fancy-ideas +++ /dev/null @@ -1,17 +0,0 @@ -== types with namespaces == -- allow types to have namespaces, e.g. - __path/my/type -implemented as a proof of concept at: -https://github.com/asteven/cdist/tree/type-namespaces - - - -Execute all global explorers only when needed #286 - -My intention is to create a brunch of global explorer which are of use in some cases and makes cdist more userfriendly. But now, all global explorers are allways executed, even the return value of the explorers is never used. - -I think a possible approach can be to replace the result files with pipes, and on first read of the pipe, the explorer is executed by the core, all following read calls from the pipe are answered from the core with the result of the first real execute of the explorer. - -So cdist can have an unlimited number of global explorers and only used explorers are executed on the target host, all other explorers laying around are simply ignored. - -Also a possible approach would be to create a new explorer type (dynamic explorers) which are sitting in a different directory to (for example dynexploer) and only this ones are executed with the conditional approach explained above. So the overhead to create pipes and monitor it is only in place on explorers which are not interesting for everyone ... diff --git a/docs/dev/git-post-commit-hook b/docs/dev/git-post-commit-hook deleted file mode 100755 index b16caa2a..00000000 --- a/docs/dev/git-post-commit-hook +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash -# Distributed under the terms of the GNU General Public License v2 -# Copyright (c) 2006 Fernando J. Pereda -# -# Git CIA bot in bash. (no, not the POSIX shell, bash). -# It is *heavily* based on Git ciabot.pl by Petr Baudis. -# -# It is meant to be run either on a post-commit hook or in an update -# hook: -# -# post-commit: It parses latest commit and current HEAD to get the -# information it needs. -# -# update: You have to call it once per merged commit: -# -# refname=$1 -# oldhead=$2 -# newhead=$3 -# for merged in $(git rev-list ${oldhead}..${newhead} | tac) ; do -# /path/to/ciabot.bash ${refname} ${merged} -# done -# - -# The project as known to CIA -project="cdist" - -# Set to true if you want the full log to be sent -noisy=false - -# Addresses for the e-mail -from="nico-cia.vc@schottelius.org" -to="cia@cia.vc" - -# SMTP client to use -sendmail="/usr/sbin/sendmail -f ${from} ${to}" - -# Changeset URL -url="http://git.schottelius.org/?p=${project};a=commit;h=@@sha1@@" - -# You shouldn't be touching anything else. -if [[ $# = 0 ]] ; then - refname=$(git symbolic-ref HEAD 2>/dev/null) - merged=$(git rev-parse HEAD) -else - refname=$1 - merged=$2 -fi - -refname=${refname##refs/heads/} - -gitver=$(git --version) -gitver=${gitver##* } - -rev=$(git describe ${merged} 2>/dev/null) -[[ -z ${rev} ]] && rev=${merged:0:12} - -rawcommit=$(git cat-file commit ${merged}) - -author=$(sed -n -e '/^author .*<\([^@]*\).*$/s--\1-p' \ - <<< "${rawcommit}") - -logmessage=$(sed -e '1,/^$/d' <<< "${rawcommit}") -${noisy} || logmessage=$(head -n 1 <<< "${logmessage}") -logmessage=${logmessage//&/&} -logmessage=${logmessage///>} - -ts=$(sed -n -e '/^author .*> \([0-9]\+\).*$/s--\1-p' \ - <<< "${rawcommit}") - -out=" - - - CIA Bash client for Git - ${gitver} - http://dev.gentoo.org/~ferdy/stuff/ciabot.bash - - - ${project} - ${refname} - - ${ts} - - - ${author} - ${rev} - - $(git diff-tree -r --name-only ${merged} | - sed -e '1d' -e 's-.*-&-') - - -${logmessage} - - ${url//@@sha1@@/${merged}} - - -" - -${sendmail} << EOM -Message-ID: <${merged:0:12}.${author}@${project}> -From: ${from} -To: ${to} -Content-type: text/xml -Subject: DeliverXML -${out} -EOM - -# vim: set tw=70 : diff --git a/docs/dev/todo/3.0 b/docs/dev/todo/3.0 deleted file mode 100644 index 97699879..00000000 --- a/docs/dev/todo/3.0 +++ /dev/null @@ -1 +0,0 @@ -- remove __self and all references to it diff --git a/docs/dev/todo/niconext b/docs/dev/todo/niconext deleted file mode 100644 index aa5f6001..00000000 --- a/docs/dev/todo/niconext +++ /dev/null @@ -1,25 +0,0 @@ -- introduce default parameters - - valid for optional parameters only - - stored in parameter/default/$name - - - when/where to save? in emulator? - - read vi fsproperty? - -- cleanup object_id handling - - have a look at singletons - -- update/create docs - - cdist-cache:: - How to get use information about the hosts we have been working on [advanced] - - cdist-scaling-tuning:: - How to scale out with cdist and which tunings to apply. [advanced] - - cdist-installation - How to use cdist to install hosts - - check speech publishing - - and speeches, which may be outdated as well - - Create new video for cdist 2.x - http://www.youtube.com/watch?v=PRMjzy48eTI - - - exec flag is not true for manifest anymore - - SSH HINTS - ssh agent - diff --git a/docs/dev/todo/performance-ideas b/docs/dev/todo/performance-ideas index bbbfe427..0320affa 100644 --- a/docs/dev/todo/performance-ideas +++ b/docs/dev/todo/performance-ideas @@ -1,6 +1,3 @@ -- Migrate scripts from bin/* to functions in bin/cdist-deploy-to - Use one pipe-shell for type execution - Parallelise gencode and code-run of all objects - Diff against local cache only instead of real target -- Use only one ssh session? - - Can be indirectly improved via ssh config already! diff --git a/docs/dev/todo/steven b/docs/dev/todo/steven deleted file mode 100644 index 2aacaa42..00000000 --- a/docs/dev/todo/steven +++ /dev/null @@ -1,118 +0,0 @@ -autorequire: - - objects defined in type manifests should be automatically prerequisites of the current object - - __foo/some-id - __other other-id --state present - => require="__other/other-id" __foo/some-id - - -metaparameters: - - steal the metaparameters from puppet: - - # I have to be there before the other one - __directory /etc/ssh \ - --before __file/etc/ssh/sshd_config - - # the other one has to be there before me - __file /etc/ssh/sshd_config \ - --after __directory/etc/ssh - - # if I change, tell the other one about it - __file /etc/ssh/sshd_config \ - --notify __init_script/etc/rc.d/sshd - - # whenever the other one changes, I want to know - __init_script /etc/rc.d/sshd \ - --subscribe __file/etc/ssh/sshd_config - - - how does a type react to a received 'event'? - - maybe something like: - __some_type/ - manifest - ... - gencode-refresh - ... - - gencode-refresh -> code-refresh -> ssh $target sh -e code-refresh - - - - -logging: - - logging from type emulator without clobbering stdout - maybe implement logging server as described here [1] - [1] http://docs.python.org/py3k/howto/logging-cookbook.html#configuration-server-example - - - use different logger to limit output to current area of interest, - e.g. - explorer.$target_host: explorer related messages for the run for $target_host - manifest.$target_host: manifest related messages for the run for $target_host - ... - then one could filter e.g. on explorer.* - - - more granular debug output, - [2] http://blog.ooz.ie/2011/03/python-logging-extending-standard.html - - - -tests: - - __init__(): - - sets up env: __target_host - - run_initial_manifest(): - - parameter is actually used (from __init__) - - ensure changing the manifest actually runs a different manifest - -> give ConfigInstall Constructor different manifest - -> different manifest is executed. - - test all submitted (from core to type manifest) variables: - - ENVIRONMENT - - they are set - - they contain the correct values - - run_type_manifest(): - - test all submitted (from core to type manifest) variables: - - ENVIRONMENT - - they are set - - they contain the correct values - - same tests as for test_initial_manifest_*? - - run_manifest(): - - test all submitted variables: - - ENVIRONMENT - - including __debug, if debug - - they are set - - they contain the correct values - - does $require work? - - check that exception raised, if manifest is not existent - - object_run(): - - ensure no object is run twice - - ensure requirements are taken into account? - - and order of run is adjusted - - check (from extern?) that all needed variables are setup - - ensure no code-{local, remote} is created, - if gencode is not producing code - - ensure THAT code-{local, remote} contains what gencode created - - abort if gencode-* fails - - abort if code-* fails - - abort == raise(FooException) - - gencode-*: ensure ENVIRONMENT is setup correctly - - run_type_explorer() - - ensure ALL type explores have been run - - ensure output is saved to correct path - - ensure a type with {0,1,2} explorers works ? - - none, one, multiple - - ensure ENVIRONMENT is setup correctly - - fails if ANY of the given explorer fails - - run_global_explorers(): - - ensure ALL type explores have been run - - ensure output is saved to correct path - - ensure a type with {0,1,2} explorers works ? - - none, one, multiple - - ensure ENVIRONMENT is setup correctly - - fails if ANY of the given explorer fails - -Code fixes needed: - - - shutil, os.mkdir, etc. everywhere: catch/reraise exceptions correctly diff --git a/docs/dev/todo/tests b/docs/dev/todo/tests deleted file mode 100644 index d2101980..00000000 --- a/docs/dev/todo/tests +++ /dev/null @@ -1,27 +0,0 @@ -Tests needed for config_install: - - cleanup() - - Fail if cache_dir from previous run cannot be deleted - - Fail if cache_dir cannot be created from current out_dir - - filter() - - ensure logformat is changed: target host is prefixed: - LOGLEVEL: target_host: MESSAGE - - link_emulator(): - - ensure that links to ALL types are created - - ensure that links points to correct executable - - i.e. readlink() works - - AND target of readlink is the correct executable - - remote_mkdir() - - is directory created - - remove_remote_path - - is path removed - - transfer_path - - is src to dst transferred? - -emulator: - may only be called with __ as prefix - fail otherwise! diff --git a/docs/legal/Benedikt_Koeppel.email b/docs/legal/Benedikt_Koeppel.email new file mode 100644 index 00000000..71fb39e9 --- /dev/null +++ b/docs/legal/Benedikt_Koeppel.email @@ -0,0 +1,185 @@ +From kaction Fri Jul 22 10:45:09 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Fri, 22 Jul 2016 03:42:02 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Fri, 22 Jul 2016 10:45:09 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:42146) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bQV5t-0001Ct-WA + for KAction@gnu.org; Fri, 22 Jul 2016 03:42:02 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bQV5r-000365-7C + for KAction@gnu.org; Fri, 22 Jul 2016 03:42:00 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, + T_DKIM_INVALID autolearn=disabled version=3.3.2 +Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:32858) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bQV5q-00035k-WC + for KAction@gnu.org; Fri, 22 Jul 2016 03:41:59 -0400 +Received: by mail-oi0-x22f.google.com with SMTP id j185so152015483oih.0 + for ; Fri, 22 Jul 2016 00:41:58 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=benediktkoeppel.ch; s=google; + h=mime-version:in-reply-to:references:from:date:message-id:subject:to; + bh=blJePxf1Q0zVh1kUkaKI6tKoOKbPV9CkRqLrYN8tz+4=; + b=VSpfcDF2tO+mgrTfZGlhHaqbtfYNe/QCbkSH5jWx8CVaItTuu88pTzdHuNZPtYrlQO + KZ6R/7xJrqGdWnKFCUibDAKI1Pd9OAx+ahQsYT5M7eKQt+nM9cMxaiyBjTTPfpF9UVa/ + /anpDGs/Bs6Z/p6c3ElNJOunfeEeS7kscr+Do= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:in-reply-to:references:from:date + :message-id:subject:to; + bh=blJePxf1Q0zVh1kUkaKI6tKoOKbPV9CkRqLrYN8tz+4=; + b=azAT/E+JYRP5bGvTI3t2BGCNsNfHxSWK+NKOtaWNYo1lyATKw9nJsSl1g6osLeanFr + JjpwlqHUN7v18z5ETqI+kvrmUShZjrgzGYE+yQuq++E4z/0C2YOUf+XZkGFVACguKRNt + HmOufiJNmkB2fYsIRMw3R21hLnM5QkIBlujmwbdxrtWyQSQ8Mfr4+sOnfp1ltHKaixIe + phfyJ6K6qP2h71VShDZmopg8Sg9rz6DSHbFDy8Ka9UTT3DXC+sLpdKFAfSebl0Tgd0eE + r0JND1fwL3pDQCxo4uK+GVM3q/usdTgzBwLnlg22clN1eca2oqrqdQdLQzgGuWYOmQg9 + +tTg== +X-Gm-Message-State: AEkoous0GycxMsszEEqNZrxNJGSADUJISKsdXl4E3+tACC8xUjLdUl3dFeAjSq6rGKkDeLMDrrfVceDa+nAo8A== +X-Received: by 10.157.19.98 with SMTP id q31mr1158747otq.125.1469173317562; + Fri, 22 Jul 2016 00:41:57 -0700 (PDT) +MIME-Version: 1.0 +Received: by 10.202.93.135 with HTTP; Fri, 22 Jul 2016 00:41:38 -0700 (PDT) +In-Reply-To: +References: +From: =?UTF-8?Q?Benedikt_K=C3=B6ppel?= +Date: Fri, 22 Jul 2016 09:41:38 +0200 +Message-ID: +Subject: Re: cdist contribution relicensing +To: Dmitry Bogatov +Content-Type: multipart/alternative; boundary=001a1135177ab4fbf60538349102 +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 2607:f8b0:4003:c06::22f +X-UIDL: S)T"!() wrote: + +> +> Hello, dear contributors of cdist project! +> +> Recently we discovered licensing issue with your contribution. Namely, +> while most of code is GPLv3+, including some of code written by you, +> manpages (man.txt, now man.rst) are GPLv3 only licensed. +> +> On behalf of cdist releasers (Darko and Nico), I (another cdist +> contributor and cdist Debian maintainer) ask you to permit relicense +> your contribution from GPLv3 to GPLv3+. Without your permission, we +> would be stuck the day when GPLv4 come (hope it will never come, but +> still), or have to reimplement your contribution. +> +> If you agree, please respond with something like +> +> I, #name# <#email#> permit to relicense all my contribution to +> cdist project, source code https://github.com/ungleich/cdist +> to GNU General Public license, version 3 or (at your option) +> any later version, as published by Free Software Foundation. +> +> #day# Jule 2016 year. +> +> If possible, GPG-sign such email. Do not include anything else +> valuable in this email that you do not want to be stored forever in +> public. +> +> Dear contributors, when replying to this email, please do not send +> copy to other contributors -- save their inbox storage. +> +> Thank you in advance for one more contribution. +> +> -- +> Accept: text/plain, text/x-diff +> Accept-Language: eo,en,ru +> X-Web-Site: sinsekvu.github.io +> + +--001a1135177ab4fbf60538349102 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +

On Wed, Jul 20, 2016 at 5:09 PM, = +Dmitry Bogatov <KAction@gnu.org> wrote:

+Hello, dear contributors of cdist project!
+
+Recently we discovered licensing issue with your contribution. Namely,
+while most of code is GPLv3+, including some of code written by you,
+manpages (man.txt, now man.rst) are GPLv3 only licensed.
+
+On behalf of cdist releasers (Darko and Nico), I (another cdist
+contributor and cdist Debian maintainer) ask you to permit relicense
+your contribution from GPLv3 to GPLv3+. Without your permission, we
+would be stuck the day when GPLv4 come (hope it will never come, but
+still), or have to reimplement your contribution.
+
+If you agree, please respond with something like
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= +ll my contribution to
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= +ub.com/ungleich/cdist
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= + your option)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= +e Foundation.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
+
+If possible, GPG-sign such email. Do not include anything else
+valuable in this email that you do not want to be stored forever in
+public.
+
+Dear contributors, when replying to this email, please do not send
+copy to other contributors -- save their inbox storage.
+
+Thank you in advance for one more contribution.
+
+--
+Accept: text/plain, text/x-diff
+Accept-Language: eo,en,ru
+X-Web-Site: sinsekvu.github.io
+

+ +--001a1135177ab4fbf60538349102-- + diff --git a/docs/legal/Chase_James.email b/docs/legal/Chase_James.email new file mode 100644 index 00000000..c57c62fd --- /dev/null +++ b/docs/legal/Chase_James.email @@ -0,0 +1,185 @@ +From kaction Wed Jul 20 21:30:05 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Wed, 20 Jul 2016 14:25:53 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Wed, 20 Jul 2016 21:30:05 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:48289) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bPwBt-00025s-Lu + for KAction@gnu.org; Wed, 20 Jul 2016 14:25:53 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bPwBr-0007tM-Uq + for KAction@gnu.org; Wed, 20 Jul 2016 14:25:53 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, + T_DKIM_INVALID autolearn=disabled version=3.3.2 +Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]:32874) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bPwBr-0007t9-NK + for KAction@gnu.org; Wed, 20 Jul 2016 14:25:51 -0400 +Received: by mail-io0-x236.google.com with SMTP id 38so55303707iol.0 + for ; Wed, 20 Jul 2016 11:25:50 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=nu-ex-com.20150623.gappssmtp.com; s=20150623; + h=mime-version:references:in-reply-to:from:date:message-id:subject:to; + bh=jeiFw5Oto9q90WQrIDawOh/M0DSQuTm6MsNWzCa2iqM=; + b=w2EjWx2jk9uB85wrWykVmNEy9QEg28aOHaekBeO8iyoODPF2j8MsXjtXhvUs+4ZxLF + 9fo3qkCLMV9NrPtteb8y4y5kTjbAHJsskIf7r2vdmG1VavbaHlkg8RNya2D90M46cJtz + uaQHQsup+ukaia6j5rQOSq96ioa+hB6mDifxDyvuHY8nbnKnZ3ZYcs+XWnMEBFYa+fPr + Uy/WEnszBVLXVBWh8DN4KNYNuIenzTo0UBSscrriq4vVs3+7uzqimK2jK2OGYAx6sNot + S/DRbSGlY4HRrELgfL654UZsdExXAgphu1X+ibAjCaFjPPK/Nn+rOBif9KFmjLI5c+pF + tLQw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:references:in-reply-to:from:date + :message-id:subject:to; + bh=jeiFw5Oto9q90WQrIDawOh/M0DSQuTm6MsNWzCa2iqM=; + b=QzC2SV8Hl3lehpfi0nN2IboohDGuxFsjoqLSL38THT412ruqWgwQoVLbBQg4XRmAgg + rrT2sR8LCCTHJqUBjFlaTIOAFxxWj8ji9E9p9BNTHHvQ6Gqhl5U3SOPAXvtFtoEPEoLa + 9EyNGzjO7VqsZHoYcYgXf/Tpw8Nsro14Lnv7ShbPS5ZNitwwXlVO+7v1FvxxARQskM3a + NWmw5/8fXLqsd5bQATq6Lq3APmV2wZFmVdJ9QZam9BZHqq5X11hLf6t4r0OgEyhwZ4/o + MX1rJvYL7Qnc3Gy6iQJTw8IJeECYP1jJ+g87C15kgKiyE70x2Xg/dPTPi5wuO2OSBnNq + 0gAg== +X-Gm-Message-State: ALyK8tKkwgnTTOBYgFgESByuR5isjDNaKDDSP1OBDQYyhq6gPsDbGeLfq9zPZ7jm2ZciBSSvH2DS7EF+bA/qcw== +X-Received: by 10.107.130.170 with SMTP id m42mr43873568ioi.78.1469039149834; + Wed, 20 Jul 2016 11:25:49 -0700 (PDT) +MIME-Version: 1.0 +References: +In-Reply-To: +From: nx +Date: Wed, 20 Jul 2016 18:25:40 +0000 +Message-ID: +Subject: Re: cdist contribution relicensing +To: Dmitry Bogatov +Content-Type: multipart/alternative; boundary=001a113bd076affa64053815546c +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 2607:f8b0:4001:c06::236 +X-UIDL: ~j$"!G$!#!92;"!/;T"! + +--001a113bd076affa64053815546c +Content-Type: text/plain; charset=UTF-8 + +I, Chase James , permit to relicense all my +contribution to cdist project, source code https://github.com/ungleich/cdist + to GNU General Public license, version 3 or (at your option) any later +version, as published by Free Software Foundation. + +20 July 2016 + +On Wed, Jul 20, 2016 at 11:10 AM Dmitry Bogatov wrote: + +> +> Hello, dear contributors of cdist project! +> +> Recently we discovered licensing issue with your contribution. Namely, +> while most of code is GPLv3+, including some of code written by you, +> manpages (man.txt, now man.rst) are GPLv3 only licensed. +> +> On behalf of cdist releasers (Darko and Nico), I (another cdist +> contributor and cdist Debian maintainer) ask you to permit relicense +> your contribution from GPLv3 to GPLv3+. Without your permission, we +> would be stuck the day when GPLv4 come (hope it will never come, but +> still), or have to reimplement your contribution. +> +> If you agree, please respond with something like +> +> I, #name# <#email#> permit to relicense all my contribution to +> cdist project, source code https://github.com/ungleich/cdist +> to GNU General Public license, version 3 or (at your option) +> any later version, as published by Free Software Foundation. +> +> #day# Jule 2016 year. +> +> If possible, GPG-sign such email. Do not include anything else +> valuable in this email that you do not want to be stored forever in +> public. +> +> Dear contributors, when replying to this email, please do not send +> copy to other contributors -- save their inbox storage. +> +> Thank you in advance for one more contribution. +> +> -- +> Accept: text/plain, text/x-diff +> Accept-Language: eo,en,ru +> X-Web-Site: sinsekvu.github.io +> + +--001a113bd076affa64053815546c +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +
I, Chase James <nx-cdist@nu-ex.com>, permit to relicense a= +ll my contribution to=C2=A0cdist project,= + source code=C2=A0= +https://github.com/ungleich/cdist=C2=A0to GNU General Public license, version 3 or (at your option)=C2= +=A0any later version, as published by Fre= +e Software Foundation.

20 July 2016
= +

On Wed, Jul 20, 2016 = +at 11:10 AM Dmitry Bogatov <KAction@g= +nu.org> wrote:

+Hello, dear contributors of cdist project!
+
+Recently we discovered licensing issue with your contribution. Namely,
+while most of code is GPLv3+, including some of code written by you,
+manpages (man.txt, now man.rst) are GPLv3 only licensed.
+
+On behalf of cdist releasers (Darko and Nico), I (another cdist
+contributor and cdist Debian maintainer) ask you to permit relicense
+your contribution from GPLv3 to GPLv3+. Without your permission, we
+would be stuck the day when GPLv4 come (hope it will never come, but
+still), or have to reimplement your contribution.
+
+If you agree, please respond with something like
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= +ll my contribution to
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= +ub.com/ungleich/cdist
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= + your option)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= +e Foundation.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
+
+If possible, GPG-sign such email. Do not include anything else
+valuable in this email that you do not want to be stored forever in
+public.
+
+Dear contributors, when replying to this email, please do not send
+copy to other contributors -- save their inbox storage.
+
+Thank you in advance for one more contribution.
+
+--
+Accept: text/plain, text/x-diff
+Accept-Language: eo,en,ru
+X-Web-Site: sinsekvu.github.io
+
+ +--001a113bd076affa64053815546c-- + diff --git a/docs/legal/Christian_Warden.email b/docs/legal/Christian_Warden.email new file mode 100644 index 00000000..798b3201 --- /dev/null +++ b/docs/legal/Christian_Warden.email @@ -0,0 +1,122 @@ +From kaction Wed Jul 20 18:25:04 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Wed, 20 Jul 2016 11:20:15 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Wed, 20 Jul 2016 18:25:04 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:34238) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bPtIF-000809-Ob + for KAction@gnu.org; Wed, 20 Jul 2016 11:20:15 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bPtIB-0006jv-SP + for KAction@gnu.org; Wed, 20 Jul 2016 11:20:15 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, + T_DKIM_INVALID autolearn=disabled version=3.3.2 +Received: from sage.xerus.org ([207.210.217.189]:21397) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bPtIB-0006cm-9G + for KAction@gnu.org; Wed, 20 Jul 2016 11:20:11 -0400 +DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xerus.org; s=sage; + h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=O5u4neMHAeGrtpVYFlmpULGNH1YPNhLUEaWPXxzf2xk=; + b=KjzaEXo/CKeUuLj2B1Hrf3krvsJgkMnjqvjJM2KfFJWsiiHU9qPlUtaETBG9jE9tD5MTjg/5/Wr/4u+CnA3xLeNBMIDrFaLaPW2vdlqFsRSVsjl3g/a4LqNrIZcU60/Lwlzb4ber5Y5i69MUX4Y/m1p57FjXTlqONbZZzOa82WQ=; +Received: from c-71-59-214-243.hsd1.or.comcast.net ([71.59.214.243] helo=speedy.xerus.org) + by sage.xerus.org (envelope-from ) + with esmtpsa (Exim 4.80 #2 (Debian)) + id 1bPtHk-0005To-3h + for ; Wed, 20 Jul 2016 08:19:44 -0700 +Received: from cwarden by speedy.xerus.org with local (Exim 4.80) + (envelope-from ) + id 1bPtHj-0007NB-6e + for KAction@gnu.org; Wed, 20 Jul 2016 08:19:43 -0700 +Date: Wed, 20 Jul 2016 08:19:43 -0700 +From: "Christian G. Warden" +To: Dmitry Bogatov +Subject: Re: cdist contribution relicensing +Message-ID: <20160720151943.GD8681@xerus.org> +References: +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha1; + protocol="application/pgp-signature"; boundary="eAbsdosE1cNLO4uF" +Content-Disposition: inline +In-Reply-To: +X-Face: jD^+@)>yf8|'#1~7ie$N]>2XN},k*wInk~T->gX/l"0?GDg#b;M[;(4'R94H`6,~p"&"(`$ + ?KVH_(2BuS[Zi(IFt,DWb'j77JZMQ~S0mN]o^>zAGQOaz6/uCSFu(O,jf*(e<*'Sa~yW1k1RC0xhd1 + ]'F2p]Wvt3bJ$i2E69!rDttE@/nw?1kS#-#Al(p=G\{Jj4GaRlN(V=R@+&dqD{`v7Y{!WE_?H!iD2D + Z$ +User-Agent: Mutt/1.6.0 (2016-04-01) +X-Sender-Verification: OK +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] +X-Received-From: 207.210.217.189 +X-UIDL: Dh>"!+M_"!, waive all copyright and +related rights in my contribution to the cdist project. + +Christian + +On Wed, Jul 20, 2016 at 06:09:46PM +0300, Dmitry Bogatov wrote: +>=20 +> Hello, dear contributors of cdist project! +>=20 +> Recently we discovered licensing issue with your contribution. Namely, +> while most of code is GPLv3+, including some of code written by you, +> manpages (man.txt, now man.rst) are GPLv3 only licensed. +>=20 +> On behalf of cdist releasers (Darko and Nico), I (another cdist +> contributor and cdist Debian maintainer) ask you to permit relicense +> your contribution from GPLv3 to GPLv3+. Without your permission, we +> would be stuck the day when GPLv4 come (hope it will never come, but +> still), or have to reimplement your contribution. +>=20 +> If you agree, please respond with something like +>=20 +> I, #name# <#email#> permit to relicense all my contribution to +> cdist project, source code https://github.com/ungleich/cdist +> to GNU General Public license, version 3 or (at your option) +> any later version, as published by Free Software Foundation. +>=20 +> #day# Jule 2016 year. +>=20 +> If possible, GPG-sign such email. Do not include anything else +> valuable in this email that you do not want to be stored forever in +> public. +>=20 +> Dear contributors, when replying to this email, please do not send +> copy to other contributors -- save their inbox storage. +>=20 +> Thank you in advance for one more contribution. +>=20 +> -- +> Accept: text/plain, text/x-diff +> Accept-Language: eo,en,ru +> X-Web-Site: sinsekvu.github.io + + + +--eAbsdosE1cNLO4uF +Content-Type: application/pgp-signature; name="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iEYEARECAAYFAlePlo8ACgkQXSJ4OU73l6Ap6wCgjNo7oLH8G6KUECBOTyCoGbMk +wgAAoJHq5Tx5EWNO9pg3YvBtff5m1iHx +=srJn +-----END PGP SIGNATURE----- + +--eAbsdosE1cNLO4uF-- + diff --git a/docs/legal/Daniel_Heule.email b/docs/legal/Daniel_Heule.email new file mode 100644 index 00000000..a66e468c --- /dev/null +++ b/docs/legal/Daniel_Heule.email @@ -0,0 +1,97 @@ +From kaction Thu Jul 21 09:20:03 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Thu, 21 Jul 2016 02:15:43 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Thu, 21 Jul 2016 09:20:03 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:60463) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bQ7Go-0005is-V4 + for KAction@gnu.org; Thu, 21 Jul 2016 02:15:43 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bQ7Gk-0006QB-Hy + for KAction@gnu.org; Thu, 21 Jul 2016 02:15:41 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, + RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 +Received: from mail3.sfsservices.biz ([194.93.112.48]:32812) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bQ7Gk-0006Pg-Ay + for KAction@gnu.org; Thu, 21 Jul 2016 02:15:38 -0400 +X-Received: from localhost (localhost [127.0.0.1]) + by mail3.sfsservices.biz (Postfix) with ESMTP id 4F7C37E219FD + for ; Thu, 21 Jul 2016 08:15:33 +0200 (CEST) +X-Virus-Scanned: amavisd-new at sfsservices.biz +X-Received: from mail3.sfsservices.biz ([127.0.0.1]) + by localhost (mail3.sfsservices.biz [127.0.0.1]) (amavisd-new, port 10023) + with ESMTP id 42FFY6pT6H_v for ; + Thu, 21 Jul 2016 08:15:33 +0200 (CEST) +X-Received: from chsfsd14.sfs-intra.net (chsfsln0001.sfs-intra.net [INTERNAL-IP]) + by mail3.sfsservices.biz (Postfix) with ESMTP + for ; Thu, 21 Jul 2016 08:15:33 +0200 (CEST) +In-Reply-To: +References: +To: Dmitry Bogatov +MIME-Version: 1.0 +Subject: Antwort: cdist contribution relicensing +X-KeepSent: 3BCE55E5:113E83E4-C1257FF7:002232C0; + type=4; name=$KeepSent +X-Mailer: IBM Notes Release 9.0.1FP3 January 13, 2015 +Message-ID: +From: Daniel Heule +Date: Thu, 21 Jul 2016 08:15:32 +0200 +X-MIMETrack: Serialize by Router on chsfsd14/SFS(Release 9.0.1FP6|April 20, 2016) at + 21.07.2016 08:15:32, + Serialize complete at 21.07.2016 08:15:32 +Content-Type: multipart/alternative; boundary="=_alternative 00226206C1257FF7_=" +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 194.93.112.48 +X-UIDL: LCD"!0Gb!!dH-"!0ma"! + +Dies ist eine mehrteilige Nachricht im MIME-Format. +--=_alternative 00226206C1257FF7_= +Content-Type: text/plain; charset="ISO-8859-1" +Content-Transfer-Encoding: quoted-printable + +I, Daniel Heule, hda@sfs.biz permit to relicense all my contribution to +cdist project, source code https://github.com/ungleich/cdist +to GNU General Public license, version 3 or (at your option) +any later version, as published by Free Software Foundation. + +21 Jule 2016. + + + +Mit freundlichen Gr=FCssen / Kind regards + +Daniel Heule + +--=_alternative 00226206C1257FF7_= +Content-Type: text/html; charset="ISO-8859-1" +Content-Transfer-Encoding: quoted-printable + +I, Daniel Heule, hda@sfs.biz permit to relicense all +my contribution to
+cdist project, source code
https://github.com/ungleich/cdist
+to GNU General Public license, version 3 or (at your option)
+any later version, as published by Free Software Foundation.
+
+21 Jule 2016.
+
+
+
+
Mit freundlichen Gr=FCssen / Kind re= +gards
+
+
Daniel Heule +
+--=_alternative 00226206C1257FF7_=-- + diff --git a/docs/legal/Daniel_Maher.email b/docs/legal/Daniel_Maher.email new file mode 100644 index 00000000..3e7ab892 --- /dev/null +++ b/docs/legal/Daniel_Maher.email @@ -0,0 +1,180 @@ +From kaction Thu Jul 21 17:05:06 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Thu, 21 Jul 2016 10:00:45 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Thu, 21 Jul 2016 17:05:06 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:51771) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bQEWr-0007dw-7V + for KAction@gnu.org; Thu, 21 Jul 2016 10:00:45 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bQEWm-0005MY-BL + for KAction@gnu.org; Thu, 21 Jul 2016 10:00:44 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: * +X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, + FREEMAIL_REPLY,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 +Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:33089) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bQEWl-0005Lm-Ra + for KAction@gnu.org; Thu, 21 Jul 2016 10:00:40 -0400 +Received: by mail-lf0-x22f.google.com with SMTP id b199so62920486lfe.0 + for ; Thu, 21 Jul 2016 07:00:39 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20120113; + h=mime-version:in-reply-to:references:from:date:message-id:subject:to; + bh=QxAnWA/6Ux99c9jwOxhyzuW7Mgg4vOlk5/YLw6lG7vI=; + b=GxRkrDAKMCBYgbFXFw//11UoxJ1DI3SANR2ZJTIGfJQWun/PdH/UIp9Y/yrUgReQ52 + aF+/xiGwZtwAtNrW5x5sH8t6eKTEDX98F44kqyTn8W0r4UKlFveIGyqGLKhwgiysUa7s + V7t4HeZHf6KuS1M2v7pGHfY8RWNKkcqbAfc1o5RvSf5w7Fma7vwYTfHhpOTHymjJ6Q0r + 9Ite/jxAuZkg1MD1AQftYpJX1MHpEvsZfSwNNl/rc06onY8uF5/WCbORoDJdDvnFnIle + UKDqPxvOO5b82FH1t4YZQy3qN6uJEZj5XHTHNVe0wmnl09hkKJgq2OF7ih1tKLPhxyo+ + MhJw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:in-reply-to:references:from:date + :message-id:subject:to; + bh=QxAnWA/6Ux99c9jwOxhyzuW7Mgg4vOlk5/YLw6lG7vI=; + b=Um0d/lugkccoSfexFcSRQXYK9NPQW24ciOdTfq6HfF1io3u/LCeIg8Vevtk0aY2aJd + 88LeTX66bYD3s3fDRaAo3/GFnjD48IaXkkLNqXD9WHvLdC01RHVerPU0gG0drd28gFfS + BLr6EO7Eyx1VNNFw9eT9PSkzJdRBA73h6zv+/eJLLSI+xz2e9oMlixZ4UnVj7Zc2GDBD + QKftxgjr499rVbkRDXCvjBhEEUdYVJSPlr+gNCnmfy9Me6tqRvjWOwGbxwvnOj/DZ0Lc + s7F7oy6K3DnJMweLH48JsQLiOp4FDJjMydhrxavr2FZ1xdTtDXQzxQCPZfyJsilteQKd + VX1A== +X-Gm-Message-State: ALyK8tJIaYrPzw331bl+6pm5hf75dGrGWIlW3nvRHHCunoAIji4D3HIofy8DADE4ckYnaOxRSf6aYlYIrHPoYg== +X-Received: by 10.25.22.152 with SMTP id 24mr24682317lfw.180.1469109638281; + Thu, 21 Jul 2016 07:00:38 -0700 (PDT) +MIME-Version: 1.0 +Received: by 10.25.85.141 with HTTP; Thu, 21 Jul 2016 07:00:18 -0700 (PDT) +In-Reply-To: +References: +From: dan maher +Date: Thu, 21 Jul 2016 16:00:18 +0200 +Message-ID: +Subject: Re: cdist contribution relicensing +To: Dmitry Bogatov +Content-Type: multipart/alternative; boundary=001a11408306203f8e053825be9d +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 2a00:1450:4010:c07::22f +X-UIDL: PnS!!MF-!!Y1/!!@L permit to relicense all +my contribution to + cdist project, source code https://github.com/ungleich/cdist + to GNU General Public license, version 3 or (at your option) + any later version, as published by Free Software Foundation. + + 21 July 2016. + +On 20 July 2016 at 17:09, Dmitry Bogatov wrote: + +> +> Hello, dear contributors of cdist project! +> +> Recently we discovered licensing issue with your contribution. Namely, +> while most of code is GPLv3+, including some of code written by you, +> manpages (man.txt, now man.rst) are GPLv3 only licensed. +> +> On behalf of cdist releasers (Darko and Nico), I (another cdist +> contributor and cdist Debian maintainer) ask you to permit relicense +> your contribution from GPLv3 to GPLv3+. Without your permission, we +> would be stuck the day when GPLv4 come (hope it will never come, but +> still), or have to reimplement your contribution. +> +> If you agree, please respond with something like +> +> I, #name# <#email#> permit to relicense all my contribution to +> cdist project, source code https://github.com/ungleich/cdist +> to GNU General Public license, version 3 or (at your option) +> any later version, as published by Free Software Foundation. +> +> #day# Jule 2016 year. +> +> If possible, GPG-sign such email. Do not include anything else +> valuable in this email that you do not want to be stored forever in +> public. +> +> Dear contributors, when replying to this email, please do not send +> copy to other contributors -- save their inbox storage. +> +> Thank you in advance for one more contribution. +> +> -- +> Accept: text/plain, text/x-diff +> Accept-Language: eo,en,ru +> X-Web-Site: sinsekvu.github.io +> + +--001a11408306203f8e053825be9d +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, Daniel MAHER <phrawzty+cdist@gmail.com> permit= + to relicense all my contribution to
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= +ub.com/ungleich/cdist
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= + your option)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= +e Foundation.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 21 July 2016.
<= +br>
On 20 July 2016 at 17:09, Dmitry Bogatov <KAct= +ion@gnu.org> wrote:

+Hello, dear contributors of cdist project!
+
+Recently we discovered licensing issue with your contribution. Namely,
+while most of code is GPLv3+, including some of code written by you,
+manpages (man.txt, now man.rst) are GPLv3 only licensed.
+
+On behalf of cdist releasers (Darko and Nico), I (another cdist
+contributor and cdist Debian maintainer) ask you to permit relicense
+your contribution from GPLv3 to GPLv3+. Without your permission, we
+would be stuck the day when GPLv4 come (hope it will never come, but
+still), or have to reimplement your contribution.
+
+If you agree, please respond with something like
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= +ll my contribution to
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= +ub.com/ungleich/cdist
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= + your option)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= +e Foundation.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
+
+If possible, GPG-sign such email. Do not include anything else
+valuable in this email that you do not want to be stored forever in
+public.
+
+Dear contributors, when replying to this email, please do not send
+copy to other contributors -- save their inbox storage.
+
+Thank you in advance for one more contribution.
+
+--
+Accept: text/plain, text/x-diff
+Accept-Language: eo,en,ru
+X-Web-Site: sinsekvu.github.io
+

+ +--001a11408306203f8e053825be9d-- + diff --git a/docs/legal/Giel_van_Schijndel.email b/docs/legal/Giel_van_Schijndel.email new file mode 100644 index 00000000..2f085653 --- /dev/null +++ b/docs/legal/Giel_van_Schijndel.email @@ -0,0 +1,85 @@ +From kaction Thu Jul 21 01:10:04 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Wed, 20 Jul 2016 18:06:32 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Thu, 21 Jul 2016 01:10:04 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:44575) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bPzdP-0004KA-R1 + for KAction@gnu.org; Wed, 20 Jul 2016 18:06:31 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bPzdL-0005W4-Bl + for KAction@gnu.org; Wed, 20 Jul 2016 18:06:30 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD + autolearn=disabled version=3.3.2 +Received: from khitomer.mortis.eu ([185.27.175.75]:55475) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bPzdL-0005VB-4y + for KAction@gnu.org; Wed, 20 Jul 2016 18:06:27 -0400 +Received: from salidar.dom.custoft.eu (unknown [IPv6:2001:981:4eab:1:7016:52bb:c51b:646d]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) + (Client CN "Giel van Schijndel", Issuer "CAcert Class 3 Root" (not verified)) + by khitomer.mortis.eu (Postfix) with ESMTPS id 0634E1D8 + for ; Thu, 21 Jul 2016 00:06:24 +0200 (CEST) +Received: by salidar.dom.custoft.eu (Postfix, from userid 2079) + id BA3033216E; Thu, 21 Jul 2016 00:06:22 +0200 (CEST) +Date: Thu, 21 Jul 2016 00:06:22 +0200 +From: Giel van Schijndel +To: Dmitry Bogatov +Subject: Re: cdist contribution relicensing +Message-ID: <20160720220622.GC2228@salidar.dom.custoft.eu> +References: +MIME-Version: 1.0 +Content-Type: multipart/signed; micalg=pgp-sha1; + protocol="application/pgp-signature"; boundary="2qXFWqzzG3v1+95a" +Content-Disposition: inline +In-Reply-To: +OpenPGP: id=CEE5E742; url=http://gpg.mortis.eu/me.asc +User-Agent: Mutt/1.6.0 (2016-04-01) +X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x +X-Received-From: 185.27.175.75 +X-UIDL: Kgn!!Pf9!!I,+!!#DW"! + + +--2qXFWqzzG3v1+95a +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +Content-Transfer-Encoding: quoted-printable + +I, Giel van Schijndel, hereby give permission to any recipients of my +contributions to the cdist project done up to this date, to redistribute +these or derivatives thereof under the terms of the GNU General Public +License as published by the Free Software Foundation, either version 3 +of the License, or (at your option) any later version. For clarity: +these contributions should be reachable through the Git commit +identifiable by SHA-1 160-bit hash 7e57575f9e1ad0909750d116e9eabc15c1c77e2c +to be considered "up to this date". + +Signed, July 21th, 2016. + +--=20 +Met vriendelijke groet, +With kind regards, +Giel van Schijndel + +--2qXFWqzzG3v1+95a +Content-Type: application/pgp-signature; name="signature.asc" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iEYEARECAAYFAleP9dgACgkQZBYm/87l50LVfQCfXo/2XqCwreH0VEmsmYzE5nE/ +zlMAn0D8/9qif3bAwOwDtvFKJWtfabrg +=f6r/ +-----END PGP SIGNATURE----- + +--2qXFWqzzG3v1+95a-- + diff --git a/docs/legal/Jacob_Guffey.email b/docs/legal/Jacob_Guffey.email new file mode 100644 index 00000000..a9892deb --- /dev/null +++ b/docs/legal/Jacob_Guffey.email @@ -0,0 +1,64 @@ +From kaction Sat Jul 23 01:20:04 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Fri, 22 Jul 2016 18:19:30 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Sat, 23 Jul 2016 01:20:04 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:57472) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bQin4-0006js-EH + for KAction@gnu.org; Fri, 22 Jul 2016 18:19:30 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bQin0-00078i-0H + for KAction@gnu.org; Fri, 22 Jul 2016 18:19:29 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD + autolearn=disabled version=3.3.2 +Received: from jhsmtdmz01x.jointheirstm.org ([69.28.94.113]:64009) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bQimz-00078K-Rx + for KAction@gnu.org; Fri, 22 Jul 2016 18:19:25 -0400 +Received: from moshe.jointheirstm.org (c-98-253-78-203.hsd1.in.comcast.net [98.253.78.203]) + by JHSMTDMZ01X.jointheirstm.org (Postfix) with ESMTPSA id 922972AE606 + for ; Fri, 22 Jul 2016 18:19:23 -0400 (EDT) +Subject: Re: cdist contribution relicensing +To: Dmitry Bogatov +References: +From: Jake Guffey +Message-ID: <57929BB9.1080104@Jointheirstm.org> +Date: Fri, 22 Jul 2016 18:18:33 -0400 +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 + Thunderbird/38.5.0 +MIME-Version: 1.0 +In-Reply-To: +Content-Type: text/plain; charset=windows-1252 +Content-Transfer-Encoding: 7bit +X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x +X-Received-From: 69.28.94.113 +X-UIDL: B!'#!_Z2!![?h"!'Ij"! + +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +I, Jacob Guffey , permit to relicense +all my contributions to the cdist project, source code +https://github.com/ungleich/cdist to GNU General Public license, +version 3 or (at the maintainer's option) any later version, as +published by Free Software Foundation. + +2016-07-22 + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iF4EAREIAAYFAleSm7YACgkQT+o/hrTzJc0NQwD/b2hjXG6UCJXnVUANmWnVy+/L +ae+7lZhFL8UklI5cb/0BAOC7jjH8FfKz1lL/Arqw4SM64yy3wiwvJjqJDtmuumWl +=VLlV +-----END PGP SIGNATURE----- + diff --git a/docs/legal/README b/docs/legal/README new file mode 100644 index 00000000..91a2a0d3 --- /dev/null +++ b/docs/legal/README @@ -0,0 +1,10 @@ +Around 20 Jule 2016 year was discovered issue, that while all code is +GPLv3+ licensed, type documentation is GPLv3 only. As such +contributors was emailed to ask them permission to relicense to +GPLv3+. + +This directory contains emails, containing permission with all +headers. Not sure about legal significance, since email is so easy to +forge, but it is best option availiable. + + -- Dmitry Bogatov Wed, 20 Jul 2016 18:25:27 +0300 diff --git a/docs/legal/Ricardo_Catalinas.email b/docs/legal/Ricardo_Catalinas.email new file mode 100644 index 00000000..306ec073 --- /dev/null +++ b/docs/legal/Ricardo_Catalinas.email @@ -0,0 +1,183 @@ +From kaction Wed Jul 20 18:15:05 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Wed, 20 Jul 2016 11:13:48 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Wed, 20 Jul 2016 18:15:05 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:33032) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bPtBz-0007Ty-T1 + for KAction@gnu.org; Wed, 20 Jul 2016 11:13:48 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bPtBx-0005MG-9h + for KAction@gnu.org; Wed, 20 Jul 2016 11:13:46 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, + HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 +Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:36812) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bPtBw-0005Lt-Ul + for KAction@gnu.org; Wed, 20 Jul 2016 11:13:45 -0400 +Received: by mail-wm0-x22f.google.com with SMTP id q128so60444546wma.1 + for ; Wed, 20 Jul 2016 08:13:44 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20120113; + h=mime-version:in-reply-to:references:date:message-id:subject:from:to; + bh=YrPuTGXNLw9oFiHKKS+IheiScrs5DuAEvUTlakl0Mxg=; + b=WyUhnGVNalPpcJVnkHrFy1wNBjA/S7fZujrzehx9NGmJFOnawS4GJeatEZ4Pdj3hcq + sBzndUsU57BoYVn99QGM5eELbngARMKyU81V3sobYs5oeP6tFdKxnDpedgS6+yTKXLjP + ZH/tJiINIpXhjSxJkqw8q/dV5SKz6do840Roj1234XUKinRnUPX+zJt3Kjy2M+/dDfL8 + wp5u9xTIS1c9cA3xYN/rdrsIjbRkgo01Yh1wVaZBYpaWFybX09uOSo4fXFGZ6rKQl8iJ + 3M+S3+wQxaP2PZzj9z0eV/GVNM5+5lVcmUjI/PAqIq6nS6mOawolTB078FMFD9cvDRtS + KiNg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:in-reply-to:references:date + :message-id:subject:from:to; + bh=YrPuTGXNLw9oFiHKKS+IheiScrs5DuAEvUTlakl0Mxg=; + b=EwpgAswQ/18QAMRKkz00dKKmXL7loG/R2ZX6KjvFCsBb0x8sV90eWI+17vBF+GVS1y + k6pXyyfLBFgeFBlgjN8oqaSqHhKNoOzWLNKHpOwAW+WnJ/SyprpxdU1BHz2ZOMDTOJuP + 9NTW8LoB4fU24ns1Yor6ykRMeBGQZDvTT3Zi4JsU48522W1WRXXH/Y4sJRm/hdlSaU18 + 1UN7ySE0Oey6Ufk+yG7M6EwJvY7ZI+zRlPsoknGwofg8H6VH7mKBcDvHc71Wk5tGOVMN + iJeKjmgmReG38Em5C+uGO0h9zjsIYZsYC8dUyRCkfNLD66pRdpFuRFIWhG/PU1aH9hIo + Wlng== +X-Gm-Message-State: ALyK8tLwjExHqmfFbrI69OlGTEDrsSCXwwBlBtD3gfpXU42hI/M5850STADANQROCfznBfKvk/zO9N4+82n/hA== +MIME-Version: 1.0 +X-Received: by 10.194.209.163 with SMTP id mn3mr1847437wjc.45.1469027623430; + Wed, 20 Jul 2016 08:13:43 -0700 (PDT) +Received: by 10.194.228.10 with HTTP; Wed, 20 Jul 2016 08:13:43 -0700 (PDT) +Received: by 10.194.228.10 with HTTP; Wed, 20 Jul 2016 08:13:43 -0700 (PDT) +In-Reply-To: +References: +Date: Wed, 20 Jul 2016 16:13:43 +0100 +Message-ID: +Subject: Re: cdist contribution relicensing +From: =?UTF-8?Q?Ricardo_Catalinas_Jim=C3=A9nez?= +To: Dmitry Bogatov +Content-Type: multipart/alternative; boundary=047d7b3a8d24a8fb78053812a524 +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 2a00:1450:400c:c09::22f +X-UIDL: H8X!!VF3!!(#b"!\C)!! + +--047d7b3a8d24a8fb78053812a524 +Content-Type: text/plain; charset=UTF-8 + + I, Ricardo Catalinas permit to relicense all my +contribution to + cdist project, source codehttps://github.com/ungleich/cdist + to GNU General Public license, version 3 or (at your option) + any later version, as published by Free Software Foundation. + + 20th Jule 2016 year + +/Ricardo + +On Jul 20, 2016 4:11 PM, "Dmitry Bogatov" wrote: + +> +> Hello, dear contributors of cdist project! +> +> Recently we discovered licensing issue with your contribution. Namely, +> while most of code is GPLv3+, including some of code written by you, +> manpages (man.txt, now man.rst) are GPLv3 only licensed. +> +> On behalf of cdist releasers (Darko and Nico), I (another cdist +> contributor and cdist Debian maintainer) ask you to permit relicense +> your contribution from GPLv3 to GPLv3+. Without your permission, we +> would be stuck the day when GPLv4 come (hope it will never come, but +> still), or have to reimplement your contribution. +> +> If you agree, please respond with something like +> +> I, #name# <#email#> permit to relicense all my contribution to +> cdist project, source code https://github.com/ungleich/cdist +> to GNU General Public license, version 3 or (at your option) +> any later version, as published by Free Software Foundation. +> +> #day# Jule 2016 year. +> +> If possible, GPG-sign such email. Do not include anything else +> valuable in this email that you do not want to be stored forever in +> public. +> +> Dear contributors, when replying to this email, please do not send +> copy to other contributors -- save their inbox storage. +> +> Thank you in advance for one more contribution. +> +> -- +> Accept: text/plain, text/x-diff +> Accept-Language: eo,en,ru +> X-Web-Site: sinsekvu.github.io +> + +--047d7b3a8d24a8fb78053812a524 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +

=C2=A0 I, Ricardo Catalinas <jimenezrick@gmail.com> permit to relicense all my contr= +ibution to
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source codehttps://github.com/ungleich/cdist
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= + your option)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= +e Foundation.

+

=C2=A0 =C2=A0 =C2=A0 =C2=A0 20th Jule 2016 year

+

/Ricardo

+

On Jul 20, 2016 4= +:11 PM, "Dmitry Bogatov" <K= +Action@gnu.org> wrote:

+Hello, dear contributors of cdist project!
+
+Recently we discovered licensing issue with your contribution. Namely,
+while most of code is GPLv3+, including some of code written by you,
+manpages (man.txt, now man.rst) are GPLv3 only licensed.
+
+On behalf of cdist releasers (Darko and Nico), I (another cdist
+contributor and cdist Debian maintainer) ask you to permit relicense
+your contribution from GPLv3 to GPLv3+. Without your permission, we
+would be stuck the day when GPLv4 come (hope it will never come, but
+still), or have to reimplement your contribution.
+
+If you agree, please respond with something like
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= +ll my contribution to
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= +ub.com/ungleich/cdist
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= + your option)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= +e Foundation.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
+
+If possible, GPG-sign such email. Do not include anything else
+valuable in this email that you do not want to be stored forever in
+public.
+
+Dear contributors, when replying to this email, please do not send
+copy to other contributors -- save their inbox storage.
+
+Thank you in advance for one more contribution.
+
+--
+Accept: text/plain, text/x-diff
+Accept-Language: eo,en,ru
+X-Web-Site: sinsekvu.github.io
+
+ +--047d7b3a8d24a8fb78053812a524-- + diff --git a/docs/legal/Steven_Armstrong.email b/docs/legal/Steven_Armstrong.email new file mode 100644 index 00000000..02951a32 --- /dev/null +++ b/docs/legal/Steven_Armstrong.email @@ -0,0 +1,57 @@ +From kaction Thu Jul 21 00:55:04 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Wed, 20 Jul 2016 17:51:39 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Thu, 21 Jul 2016 00:55:04 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:42614) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bPzP1-0005f6-89 + for KAction@gnu.org; Wed, 20 Jul 2016 17:51:39 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bPzOx-00032C-RS + for KAction@gnu.org; Wed, 20 Jul 2016 17:51:38 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD + autolearn=disabled version=3.3.2 +Received: from wolke.armstrong.cc ([136.243.209.126]:37928) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bPzOx-00031o-L9 + for KAction@gnu.org; Wed, 20 Jul 2016 17:51:35 -0400 +Sender: steven@armstrong.cc +Subject: Re: cdist contribution relicensing +To: Dmitry Bogatov +References: +From: Steven Armstrong +Message-ID: +Date: Wed, 20 Jul 2016 23:51:28 +0200 +MIME-Version: 1.0 +In-Reply-To: +Content-Type: text/plain; charset=windows-1252; format=flowed +Content-Transfer-Encoding: 7bit +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 136.243.209.126 +X-UIDL: b-6"!eP*"!*!D"!c+f!! + +Dmitry Bogatov wrote on 07/20/16 17:09: +> I, #name# <#email#> permit to relicense all my contribution to +> cdist project, source code https://github.com/ungleich/cdist +> to GNU General Public license, version 3 or (at your option) +> any later version, as published by Free Software Foundation. +> +> #day# Jule 2016 year. + +I, Steven Armstrong , permit to re-license +all my contribution to the cdist project source code +https://github.com/ungleich/cdist to GNU General Public license, version +3 or (at your option) any later version, as published by Free Software +Foundation. + +20 July 2016 + diff --git a/docs/legal/Thomas_Oettli.email b/docs/legal/Thomas_Oettli.email new file mode 100644 index 00000000..eb515a59 --- /dev/null +++ b/docs/legal/Thomas_Oettli.email @@ -0,0 +1,342 @@ +From kaction Tue Aug 2 13:59:41 2016 +Return-path: +Envelope-to: KAction@gnu.org +Delivery-date: Tue, 02 Aug 2016 05:50:23 -0400 +Received: from fencepost.gnu.org [208.118.235.10] + by searing with POP3 (fetchmail-6.3.26) + for (single-drop); Tue, 02 Aug 2016 13:59:41 +0300 (MSK) +Received: from eggs.gnu.org ([2001:4830:134:3::10]:41424) + by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) + (Exim 4.82) + (envelope-from ) + id 1bUWL9-0006S9-Ft + for KAction@gnu.org; Tue, 02 Aug 2016 05:50:23 -0400 +Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) + (envelope-from ) + id 1bUWL1-0007oE-Eo + for KAction@gnu.org; Tue, 02 Aug 2016 05:50:21 -0400 +X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org +X-Spam-Level: +X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_50,HTML_MESSAGE, + RCVD_IN_DNSWL_NONE,TVD_FW_GRAPHIC_NAME_MID autolearn=disabled version=3.3.2 +Received: from mail2.sfsservices.biz ([194.93.112.42]:43385) + by eggs.gnu.org with esmtp (Exim 4.71) + (envelope-from ) + id 1bUWKe-0007eL-5Z + for KAction@gnu.org; Tue, 02 Aug 2016 05:50:15 -0400 +X-Received: from localhost (localhost [127.0.0.1]) + by mail2.sfsservices.biz (Postfix) with ESMTP id B80B68BEA15B + for ; Tue, 2 Aug 2016 11:49:19 +0200 (CEST) +X-Virus-Scanned: amavisd-new at sfsservices.biz +X-Received: from mail2.sfsservices.biz ([127.0.0.1]) + by localhost (mail2.sfsservices.biz [127.0.0.1]) (amavisd-new, port 10023) + with ESMTP id Kq9SpRTVO-tm for ; + Tue, 2 Aug 2016 11:49:19 +0200 (CEST) +X-Received: from chsfsd15.sfs-intra.net (chsfsln0002.sfs-intra.net [INTERNAL-IP]) + by mail2.sfsservices.biz (Postfix) with ESMTP + for ; Tue, 2 Aug 2016 11:49:19 +0200 (CEST) +In-Reply-To: +References: +Subject: Antwort: cdist contribution relicensing +X-KeepSent: A672E59F:C63BD8B2-C1258003:0035E697; + type=4; name=$KeepSent +To: Dmitry Bogatov +X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 +Message-ID: +From: Thomas Oettli +Date: Tue, 2 Aug 2016 11:49:18 +0200 +X-MIMETrack: Serialize by Router on chsfsd15/SFS(Release 9.0.1FP6|April 20, 2016) at + 02.08.2016 11:49:19 +MIME-Version: 1.0 +Content-type: multipart/related; + Boundary="0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007" +X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] +X-Received-From: 194.93.112.42 +X-UIDL: Jb%#!^\~!!pT3"!DD="! + +--0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 +Content-type: multipart/alternative; + Boundary="1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007" + +--1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: quoted-printable + + +I, Thomas Oettli permit to relicense all my contribution= + to +cdist project, source code https://github.com/ungleich/cdist +to GNU General Public license, version 3 or (at your option) +any later version, as published by Free Software Foundation. + + + +Thomas Oettli +Systemengineer SAP & Linux + +SFS services AG, Corporate IT +Rosenbergsaustrasse 8, CH-9435 Heerbrugg +T +41 71 72 75269 F +41 71 72 75237 +thomas.oettli@sfs.biz www.sfs.biz + + + +Denken Sie an die Umwelt bevor Sie drucken. - Please consider your +environment before printing. + + + + +Von: Dmitry Bogatov +An: Andi Br=C3=B6nnimann , Benedikt Koeppel + , Chase Allen James + , Christian G. Warden , + Daniel Heule , Daniel Maher , Dominique Roux , + Evax Software , Giel van Schijndel , Jake Guffey , J= +ake + Guffey , Nico Schottelius + , Ramon Salvad=C3=B3 + , Ricardo Catalinas Jim=C3=A9nez + , Steven Armstrong + , Thomas Oettli +Kopie: Darko Poljak , Nico Schottelius + +Datum: 20.07.2016 17:11 +Betreff: cdist contribution relicensing + + + + +Hello, dear contributors of cdist project! + +Recently we discovered licensing issue with your contribution. Namely, +while most of code is GPLv3+, including some of code written by you, +manpages (man.txt, now man.rst) are GPLv3 only licensed. + +On behalf of cdist releasers (Darko and Nico), I (another cdist +contributor and cdist Debian maintainer) ask you to permit relicense +your contribution from GPLv3 to GPLv3+. Without your permission, we +would be stuck the day when GPLv4 come (hope it will never come, but +still), or have to reimplement your contribution. + +If you agree, please respond with something like + + I, #name# <#email#> permit to relicense all my contribution to + cdist project, source code https://github.com/ungleich/cdist + to GNU General Public license, version 3 or (at your option) + any later version, as published by Free Software Foundation. + + #day# Jule 2016 year. + +If possible, GPG-sign such email. Do not include anything else +valuable in this email that you do not want to be stored forever in +public. + +Dear contributors, when replying to this email, please do not send +copy to other contributors -- save their inbox storage. + +Thank you in advance for one more contribution. + +-- +Accept: text/plain, text/x-diff +Accept-Language: eo,en,ru +X-Web-Site: sinsekvu.github.io +[Anhang "attsga4c.dat" gel=C3=B6scht von Thomas Oettli/otho/SFS]= + +--1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 +Content-type: text/html; charset=UTF-8 +Content-Disposition: inline +Content-transfer-encoding: quoted-printable + + +

I, Thomas Oettli <otho@sfs.biz> permit to= + relicense all my contribution to
+cdist project, source code
https://github.com/ungleich/cdist
+to GNU General Public license, version 3 or (at your option)
+any later version, as published by Free Software Foundation.

+
+
+
+Thomas Oettli
+Systemengineer SAP & Linux

+
+SFS services AG, Corporate IT
+Rosenbergsaustrasse 8, CH-9435 Heerbrugg
+T +41 71 72 75269   F +41 71 72 75237  

+
thomas.oettli@sfs.biz      www.sfs.biz
+
+
+
+3D"Denken
+
+
+3D"InactiveDmitry Bogatov ---20.07.2016 17:11:48---Hello, dear contribu= +tors of cdist project! Recently we discovered licensing issue with your= + contribu
+
+Von: Dmitry Bogatov <KAction@gnu.org>= +
+An: Andi Br=C3=B6nnimann <andi-cdist@v-n= +et.ch>, Benedikt Koeppel <code@benediktkoeppel.ch>, Chase Alle= +n James <nx-cdist@nu-ex.com>, Christian G. Warden <cwarden@xer= +us.org>, Daniel Heule <hda@sfs.biz>, Daniel Maher <phrawzty= ++cdist@gmail.com>, Dominique Roux <dominique.roux4@gmail.com>,= + Evax Software <contact@evax.fr>, Giel van Schijndel <giel+cdi= +st@mortis.eu>, Jake Guffey <jake.guffey@eprotex.com>, Jake Guf= +fey <jake.guffey@jointheirstm.org>, Nico Schottelius <nico-cdi= +st@schottelius.org>, Ramon Salvad=C3=B3 <rsalvado@gnuine.com>,= + Ricardo Catalinas Jim=C3=A9nez <jimenezrick@gmail.com>, Steven A= +rmstrong <steven-cdist@armstrong.cc>, Thomas Oettli <otho@sfs.= +biz>
+Kopie: Darko Poljak <darko.poljak@gmail.= +com>, Nico Schottelius <nico.schottelius@ungleich.ch> +Datum: 20.07.2016 17:11
+Betreff: = +cdist contribution relicensing
+



+
+
+
+Hello, dear contributors of cdist project!
+
+Recently we discovered licensing issue with your contribution. Namely,<= +br> +while most of code is GPLv3+, including some of code written by you, +manpages (man.txt, now man.rst) are GPLv3 only licensed.
+
+On behalf of cdist releasers (Darko and Nico), I (another cdist
+contributor and cdist Debian maintainer) ask you to permit relicense +your contribution from GPLv3 to GPLv3+. Without your permission, we
= + +would be stuck the day when GPLv4 come (hope it will never come, but +still), or have to reimplement your contribution.
+
+If you agree, please respond with something like
+
+ I, #name# <#email#> permit to relicense all my contribution to= +
+ cdist project, source code
https://github.com/ungleich/cdist
+ to GNU General Public license, version 3 or (at your option)
+ any later version, as published by Free Software Foundation.
+
+        #day# Jule 2016 year.
+
+If possible, GPG-sign such email. Do not include anything else
+valuable in this email that you do not want to be stored forever in
= + +public.
+
+Dear contributors, when replying to this email, please do not send
+copy to other contributors -- save their inbox storage.
+
+Thank you in advance for one more contribution.
+
+--
+Accept: text/plain, text/x-diff
+Accept-Language: eo,en,ru
+X-Web-Site: sinsekvu.github.io
+[Anhang "attsga4c.dat" gel=C3=B6scht von Thomas Oettli/otho/S= +FS]

+= + + +--1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007-- + + +--0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 +Content-type: image/gif; + name="16993833.gif" +Content-Disposition: inline; filename="16993833.gif" +Content-ID: <1__=4EBB0A90DFA660078f9e8a93df@sfs-intra.net> +Content-transfer-encoding: base64 + +R0lGODlhVgAqAOUAAPA4IP////AwGPAoEPi4sPBIMPAwEPCAcPiYkPA4GPBwYPjAuPCQgPiooOgg +CPBYSOggAPBAKPAoCPBQOPCIePCIgPiYiPjQyPB4aPigkOgYAPBoWOgoCPBgSPBgUPBoUPCYiPjw +8PBYQPCYkPigmPjAsPjIwPjg2Pjo4Pjw6OgoEPAgCPBIOPjY0PjY2Pjg4PBQQPB4YPCAePCQiPio +mPiwqPjo6PAgAPBAMPBwWPCAaPiQiPiwoPjIyPjQ0Pj48CwAAAAAVgAqAEAI/wADCBTogwIMAAgT +KlwIIAKDgRApTChAsaLFixU9uIAIEYUFDxhDVpyQQWABhgAEbJjBoKXLly4RhIC4YADDBB1kHNjJ +s+fOGhBRpnzgsyhPCicGpoAgtClDBy8E1nRKFSGHgSiYVnUKwQYCm1udCjggFaxCAyU5qlWLgENY +sRTWyp1Lt67du3gHOhDwtq/fv2EFqBA4gS9ghQ7KHk6YWOADw4sRehAqoLLlywIMDJAgQ+0CFSgT +WDaQOTNpA6htDpxAGfVo05k5DNiRV+4ByAklKF5ooEHt3xAx4E54e3ECCCY4amAIoQXwDcP9aiAg +8EOCyNizbxVgQeAFrYcFKP8Y6DZyAYgn9i42QAFE9L8rfAeYuh6DQAbv/UogIZQF8IH0nUUDcBKg +NMF/LjiAnW4AmnUYgxesEFkCA6i1AQQDYKbhewnAsBtDG2poAAc/cBTCAxCQFmJl16H0gUAnZACC +BSOMQKMFCOCIwIwIYOBgQgZ8CCQJ/wUQQg0NJKnkkkrywMCPCEWgXUMNMoQWgVMOBEIHD3TpJZcP +dAAmmBuAEJVcFyjAQgEfUFdkABKJJJIIFFygFgEODKDnnnz26eefgAYq6KCE6nkDdSdNqeiiKZEl +kA04cJCfU6RB9N2kTiWggZ0ciaCeX6oZCd5iFQbQA2iRNSaQgthF8AKrrQr/CViQAaAAa2QsWIfS +iiJqEJesCfFq2QARDCRCiwuJJqxlEIwn1IFFBgikfLUVyNB5wCW6kEoMVODtt95SYEFya0mLkAA5 +kIDAuuy2m6ObAr1nAAYZuNtuA85xhN96A6RAE5R9qSRQcYdVOlAByAImwANVRrbCQFJGJoAHA7Xw +qcIVABswxQOZAAGmVAkwwp0MGMWTj7tqLEIMCrTs8sstzzBXCDQcADPMHxiAEra/QccQg+YCYACR +b+YVw3sBeJBiZafx+iywVwKHAYaoVW311fk9wFp2DnAadNS1RbzgBWIvBgEKAxEAJdh56YydBhsF +IECGCdRttwCi2a13Zg5MUOAvRwh8fK4D4/03gNtvieZABEkV7fjjRZtAwOSUV2755SVcrjnmmxOQ +eeecb77AQBcsx+jpkWmQQtmotx4wBsK5LvtbA8inA+uz555Q4QEBADs= + +--0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 +Content-type: image/gif; + name="16816884.gif" +Content-Disposition: inline; filename="16816884.gif" +Content-ID: <2__=4EBB0A90DFA660078f9e8a93df@sfs-intra.net> +Content-transfer-encoding: base64 + +R0lGODlhNgEiAOQAAP///wCAAACIAJiIAACImACguOj4+Pj40HDI6PjgmND4+Pj46ACIcLigALjw ++OjIcAC40NC4APjw0NDw+HCIAJigAJjg+LjI0LjI6NDIuOjIuOj40PjwuAAAAAAAAAAAACwAAAAA +NgEiAEAI/wABCBxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzClzQQIDHjx4LGFAYoGBJACdRCgxw +suXKlzBZwhyYkqDLmTNb3qS58mbKmipt9hyq8idPo0GBykx6tGlMpQd3QkWpM2fMq0GT7tQo8YFH +BFzDih1LtqzZs2gRDgDJtq0ABg4SJvBIwCTLpUxxYhWqd2revzyzStVb1KpgwkgT50X6d/Bex34h +G2YceXJgn5cDp93MubPnz6BDP5zL1oLo06hTq15d0avbryT5Hp6N+bFJvo4v57Y8WzZlzb+xKq3d +W/HtzL150xauHOjFtWAFSqjwunrbujbvMmYd1aBz7rJB+/9diFfs970R11r3CHchaQHYNfsuL/Mn +/fI0a94Fnp/y/p7byfcfgFv1x59yVAUXXIIH0kdVdv5tN+BRCurWWH6ATRQBBOB16OGHIKJ1gHoh +jUReeA2d55B+aano3XFcFeiiRSxKNCNCN6YmwQQAjAgSAQoAsGNCU2kHGV5GGobjUxMSqCRvSaKY +m0slVUkgcZNp95JksWnVpHHLQdjfUgGKSOJ6QIao5ppsonbmRwVs8OZ6P7Zp5514hjXnW3E15GOd +4Ul1n36DRkWoUYXmZCWATtGGZGbDIToYlYxuKSlRlRalE4uJ/jfgok1q2hSVmzJ1X1YD7VldmgiR +Fh9hGSb/hx6Mzb14IaqI3QqmfJYRB+aUuc66q22y+lbrYsjhCoCqIjnk2kev5mmetNQqG2Oo1War +7bbc/ckqt+CGK65BC1zgrQIZmEiklhHlSNKnZhXYHYoYyRgvvA+5S2uIHLXVbJfAPfookxTa+hh+ +mVb5XX2KOlfkgxArKLCDneqGaKANG2pqcRJfClq/1f07b7KSVYgYvmWSDKOv+wJbGKjIVbYcl3YN +HOCvyW7ZIK+dvQdSewDPGqa8N+MG67E7W9uXkpTCfJzMDutqMLJLEpshlk9uBrJ1HOLIroHH4qvs +1/Yt7PTYnoLtnYNMC2gzp4cGOnDNERpKJoT2NTi3vGRp1hAkQa5FN9ABGIxr+OHVBo744oyntta/ +W9P5WrSNV245Rup1rdCfaNLKN5v6Xj7y0ft2FvpBqrol+EHvRVsjzbA/nSWxPh1pLM4Q663z7nc/ +5XvEs1/Nsq67AW9877UL51zqr61eEAcUwFe6l0h+Wv2XKzNts8W9CxU72mlfNbzUWYZ/NffDl40f +7sZ9TxDzbIl8UAR0Tc9l98WnrzL5sRaHINK44x/7cna8mO0PV8jbn/5yl6r1yK9VgBLdiSR4mtNR +ZHk/65ND6HcdCnrwgyAMoQhDExAAOw== + +--0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 +Content-type: image/gif; + name="graycol.gif" +Content-Disposition: inline; filename="graycol.gif" +Content-ID: <3__=4EBB0A90DFA660078f9e8a93df@sfs-intra.net> +Content-transfer-encoding: base64 + +R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu +ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 + +--0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007-- + + diff --git a/docs/speeches/2015-10-21-opennebulaconf-cdist.odp b/docs/speeches/2015-10-21-opennebulaconf-cdist.odp new file mode 100644 index 00000000..f76ba9c3 Binary files /dev/null and b/docs/speeches/2015-10-21-opennebulaconf-cdist.odp differ diff --git a/docs/src/cdist-manifest.rst b/docs/src/cdist-manifest.rst index 5c35b6a5..5655c6c2 100644 --- a/docs/src/cdist-manifest.rst +++ b/docs/src/cdist-manifest.rst @@ -53,8 +53,8 @@ Cdist expects the initial manifest at **cdist/conf/manifest/init**. Within this initial manifest you define, which objects should be created on which host. To distinguish between hosts, you can use the -environment variable **__target_host**. Let's have a look at a simple -example:: +environment variable **__target_host** and/or **__target_hostname** and/or +**__target_fqdn**. Let's have a look at a simple example:: __cdistmarker diff --git a/docs/src/cdist-parallelization.rst b/docs/src/cdist-parallelization.rst new file mode 100644 index 00000000..ce9f5bca --- /dev/null +++ b/docs/src/cdist-parallelization.rst @@ -0,0 +1,73 @@ +Parallelization +=============== + +Description +----------- +cdist has two modes of parallel operation. + +One of them is to operate on each host in separate process. This is enabled +with :strong:`-p/--parallel` option. + +The other way is to operate in parallel within one host where you specify +the number of jobs. This is enabled with :strong:`-j/--jobs` option where you +can specify the number of parallel jobs. By default, +:strong:`multiprocessing.cpu_count()` is used. For this mode only global +explorers are currently supported and this option is still in :strong:`beta`. + +You can, of course, use those two options together. This means that each host +will be processed by its own process. Within each process cdist will operate +using specified number of parallel jobs. + +For more info on those options see :strong:`cdist`\ (1). + + +Examples +-------- + +.. code-block:: sh + + # Configure hosts read from file hosts.file in parallel + $ cdist config -p -f hosts.file + + # Configure hosts read from file hosts.file sequentially but using default + # number of parallel jobs + $ cdist config -b -j -f hosts.file + + # Configure hosts read from file hosts.file in parallel using 16 + # parallel jobs + $ cdist config -b -j 16 -p -f hosts.file + + +Caveats +------- +When operating in parallel, either by operating in parallel for each host +(-p/--parallel) or by parallel jobs within a host (-j/--jobs), and depending +on target SSH server and its configuration you may encounter connection drops. +This is controlled with sshd :strong:MaxStartups configuration options. +You may also encounter session open refusal. This happens with ssh multiplexing +when you reach maximum number of open sessions permitted per network +connection. In this case ssh will disable multiplexing. +This limit is controlled with sshd :strong:MaxSessions configuration +options. For more details refer to :strong:`sshd_config`\ (5). + +For example, if you reach :strong:`MaxSessions` sessions you may get the +following output: + +.. code-block:: sh + + $ cdist config -b -j 11 -v 78.47.116.244 + INFO: cdist: version 4.2.2-55-g640b7f9 + INFO: 78.47.116.244: Running global explorers + INFO: 78.47.116.244: Remote transfer in 11 parallel jobs + channel 22: open failed: administratively prohibited: open failed + mux_client_request_session: session request failed: Session open refused by peer + ControlSocket /tmp/tmpuah6fw_t/d886d4b7e4425a102a54bfaff4d2288b/ssh-control-path already exists, disabling multiplexing + INFO: 78.47.116.244: Running global explorers in 11 parallel jobs + channel 22: open failed: administratively prohibited: open failed + mux_client_request_session: session request failed: Session open refused by peer + ControlSocket /tmp/tmpuah6fw_t/d886d4b7e4425a102a54bfaff4d2288b/ssh-control-path already exists, disabling multiplexing + INFO: 78.47.116.244: Running initial manifest /tmp/tmpuah6fw_t/d886d4b7e4425a102a54bfaff4d2288b/data/conf/manifest/init + INFO: 78.47.116.244: Running manifest and explorers for __file/root/host.file + INFO: 78.47.116.244: Generating code for __file/root/host.file + INFO: 78.47.116.244: Finished successful run in 18.655028820037842 seconds + INFO: cdist: Total processing time for 1 host(s): 19.159148693084717 diff --git a/docs/src/cdist-reference.rst.sh b/docs/src/cdist-reference.rst.sh index 06842450..97b22473 100755 --- a/docs/src/cdist-reference.rst.sh +++ b/docs/src/cdist-reference.rst.sh @@ -226,7 +226,18 @@ __object_name The full qualified name of the current object. Available for: type manifest, type explorer, type gencode. __target_host - The host we are deploying to. + The host we are deploying to. This is primary variable. It's content is + literally the one user passed in. + Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. +__target_hostname + The hostname of host we are deploying to. This variable is derived from + **__target_host** (using **socket.getaddrinfo(__target_host)** and then + **socket.gethostbyaddr()**). + Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. +__target_fqdn + The fully qualified domain name of the host we are deploying to. + This variable is derived from **__target_host** + (using **socket.getfqdn()**). Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. __type Path to the current type. diff --git a/docs/src/cdist-remote-exec-copy.rst b/docs/src/cdist-remote-exec-copy.rst index 10a370c7..882f0bc2 100644 --- a/docs/src/cdist-remote-exec-copy.rst +++ b/docs/src/cdist-remote-exec-copy.rst @@ -9,8 +9,8 @@ Cdist interacts with the target host in two ways: By default this is accomplished with ssh and scp respectively. The default implementations used by cdist are:: - __remote_exec: ssh -o User=root -q - __remote_copy: scp -o User=root -q + __remote_exec: ssh -o User=root + __remote_copy: scp -o User=root The user can override these defaults by providing custom implementations and passing them to cdist with the --remote-exec and/or --remote-copy arguments. diff --git a/docs/src/conf.py b/docs/src/conf.py index 463bcedd..a63a14ff 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -164,6 +164,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True +html_use_smartypants = False # Custom sidebar templates, maps document names to template names. # html_sidebars = {} diff --git a/docs/src/index.rst b/docs/src/index.rst index a34231f8..b33b707d 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -23,6 +23,7 @@ Contents: cdist-types cdist-explorer cdist-messaging + cdist-parallelization cdist-reference cdist-best-practice cdist-stages diff --git a/docs/src/man1/cdist.rst b/docs/src/man1/cdist.rst index 5a4873f7..47fe195c 100644 --- a/docs/src/man1/cdist.rst +++ b/docs/src/man1/cdist.rst @@ -15,7 +15,10 @@ SYNOPSIS cdist banner [-h] [-d] [-v] - cdist config [-h] [-d] [-V] [-c CONF_DIR] [-f HOSTFILE] [-i MANIFEST] [-p] [-s] [host [host ...]] + cdist config [-h] [-d] [-v] [-b] [-c CONF_DIR] [-f HOSTFILE] + [-i MANIFEST] [-j [JOBS]] [-n] [-o OUT_PATH] [-p] [-s] + [--remote-copy REMOTE_COPY] [--remote-exec REMOTE_EXEC] + [host [host ...]] cdist shell [-h] [-d] [-v] [-s SHELL] @@ -32,14 +35,14 @@ GENERAL ------- All commands accept the following options: +.. option:: -h, --help + + Show the help screen + .. option:: -d, --debug Set log level to debug -.. option:: -h, --help - - Show the help screen - .. option:: -v, --verbose Set log level to info, be more verbose @@ -59,6 +62,11 @@ CONFIG ------ Configure one or more hosts. +.. option:: -b, --enable-beta + + Enable beta functionalities. Beta functionalities include the + following options: -j/--jobs. + .. option:: -c CONF_DIR, --conf-dir CONF_DIR Add a configuration directory. Can be specified multiple times. @@ -80,13 +88,26 @@ Configure one or more hosts. Path to a cdist manifest or - to read from stdin +.. option:: -j [JOBS], --jobs [JOBS] + + Specify the maximum number of parallel jobs; currently only + global explorers are supported (currently in beta) + +.. option:: -n, --dry-run + + Do not execute code + +.. option:: -o OUT_PATH, --out-dir OUT_PATH + + Directory to save cdist output in + .. option:: -p, --parallel Operate on multiple hosts in parallel .. option:: -s, --sequential - Operate on multiple hosts sequentially + Operate on multiple hosts sequentially (default) .. option:: --remote-copy REMOTE_COPY @@ -103,7 +124,7 @@ to the types as commands. It can be thought as an "interactive manifest" environment. See below for example usage. Its primary use is for debugging type parameters. -.. option:: -s/--shell +.. option:: -s SHELL, --shell SHELL Select shell to use, defaults to current shell. Used shell should be POSIX compatible shell. @@ -137,6 +158,10 @@ EXAMPLES # Configure hosts read from file loadbalancers % cdist config -f loadbalancers + # Configure hosts read from file web.hosts using 16 parallel jobs + # (beta functionality) + % cdist config -b -j 16 -f web.hosts + # Display banner cdist banner @@ -195,6 +220,18 @@ AUTHORS ------- Nico Schottelius +CAVEATS +------- +When operating in parallel, either by operating in parallel for each host +(-p/--parallel) or by parallel jobs within a host (-j/--jobs), and depending +on target SSH server and its configuration you may encounter connection drops. +This is controlled with sshd :strong:`MaxStartups` configuration options. +You may also encounter session open refusal. This happens with ssh multiplexing +when you reach maximum number of open sessions permitted per network +connection. In this case ssh will disable multiplexing. +This limit is controlled with sshd :strong:`MaxSessions` configuration +options. For more details refer to :strong:`sshd_config`\ (5). + COPYING ------- Copyright \(C) 2011-2013 Nico Schottelius. Free use of this software is diff --git a/scripts/cdist b/scripts/cdist index 953cad78..91dec2c9 100755 --- a/scripts/cdist +++ b/scripts/cdist @@ -22,6 +22,39 @@ # +# list of beta arguments for sub-commands +BETA_ARGS = { + 'config': ['jobs', ], +} + + +def check_positive_int(value): + import argparse + + try: + val = int(value) + except ValueError as e: + raise argparse.ArgumentTypeError( + "{} is invalid int value".format(value)) + if val <= 0: + raise argparse.ArgumentTypeError( + "{} is invalid positive int value".format(val)) + return val + + +def check_beta(args_dict): + if 'beta' not in args_dict: + args_dict['beta'] = False + # Check only if beta is not enabled: if beta option is specified then + # raise error. + if not args_dict['beta']: + cmd = args_dict['command'] + if cmd in BETA_ARGS: + for arg in BETA_ARGS[cmd]: + if arg in args_dict and args_dict[arg]: + raise cdist.CdistBetaRequired(cmd, arg) + + def commandline(): """Parse command line""" import argparse @@ -31,6 +64,7 @@ def commandline(): import cdist.shell import shutil import os + import multiprocessing # Construct parser others can reuse parser = {} @@ -62,6 +96,11 @@ def commandline(): 'config', parents=[parser['loglevel']]) parser['config'].add_argument( 'host', nargs='*', help='host(s) to operate on') + parser['config'].add_argument( + '-b', '--enable-beta', + help=('Enable beta functionalities. Beta functionalities ' + 'include the following options: -j/--jobs.'), + action='store_true', dest='beta', default=False) parser['config'].add_argument( '-c', '--conf-dir', help=('Add configuration directory (can be repeated, ' @@ -77,6 +116,12 @@ def commandline(): '-i', '--initial-manifest', help='Path to a cdist manifest or \'-\' to read from stdin.', dest='manifest', required=False) + parser['config'].add_argument( + '-j', '--jobs', nargs='?', type=check_positive_int, + help=('Specify the maximum number of parallel jobs, currently ' + 'only global explorers are supported (currently in beta'), + action='store', dest='jobs', + const=multiprocessing.cpu_count()) parser['config'].add_argument( '-n', '--dry-run', help='Do not execute code', action='store_true') @@ -112,7 +157,8 @@ def commandline(): 'shell', parents=[parser['loglevel']]) parser['shell'].add_argument( '-s', '--shell', - help='Select shell to use, defaults to current shell') + help=('Select shell to use, defaults to current shell. Used shell' + ' should be POSIX compatible shell.')) parser['shell'].set_defaults(func=cdist.shell.Shell.commandline) for p in parser: @@ -145,6 +191,7 @@ def commandline(): parser['main'].print_help() sys.exit(0) + check_beta(vars(args)) args.func(args) if __name__ == "__main__":