From f77f551846ca2dc19d6dcda528603c5befb89385 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 8 Mar 2011 19:37:42 +0100 Subject: [PATCH 01/48] todos /dani updated --- doc/dev/todo/daninext | 2 ++ doc/dev/todo/post-1.0 | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 doc/dev/todo/daninext diff --git a/doc/dev/todo/daninext b/doc/dev/todo/daninext new file mode 100644 index 00000000..19ebc573 --- /dev/null +++ b/doc/dev/todo/daninext @@ -0,0 +1,2 @@ +file-edit + - add_line_to_file_if_not_existing diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index e469214e..d3fdd2c9 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -23,7 +23,6 @@ Types to be written/extended: - __service - __user - __file_edit - - add_line_to_file_if_not_existing - delete_line_from_file - regexp replace (can probably cover all?) - __file: From ac815524f405d4df7509f6766d53df453a149080 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 8 Mar 2011 19:34:51 +0100 Subject: [PATCH 02/48] Implementation of addifnosuchline type --- conf/type/__addifnosuchline/explorer/findline | 41 +++++++++++++++++++ conf/type/__addifnosuchline/gencode | 33 +++++++++++++++ .../type/__addifnosuchline/parameter/optional | 1 + .../type/__addifnosuchline/parameter/required | 1 + .../to_check/cdist-type-addifnosuchline.text | 30 ++++++++++++++ 5 files changed, 106 insertions(+) create mode 100755 conf/type/__addifnosuchline/explorer/findline create mode 100755 conf/type/__addifnosuchline/gencode create mode 100644 conf/type/__addifnosuchline/parameter/optional create mode 100644 conf/type/__addifnosuchline/parameter/required create mode 100644 doc/man/to_check/cdist-type-addifnosuchline.text diff --git a/conf/type/__addifnosuchline/explorer/findline b/conf/type/__addifnosuchline/explorer/findline new file mode 100755 index 00000000..9367be42 --- /dev/null +++ b/conf/type/__addifnosuchline/explorer/findline @@ -0,0 +1,41 @@ +#!/bin/sh +# +# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) +# +# 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 . +# +# + +if [ -f "$__object/parameter/file" ]; then + file=$(cat "$__object/parameter/file") +else + file="/$__object_id" +fi + +regex=$(cat "$__object/parameter/line") +if [ -f "$file" ]; then + grep -q "^$regex\$" "$file" + if [ $? -eq 1 ]; then + # regex pattern not found --> success + echo "SUCCESS" + else + # regex pattern found --> failure + echo "FAILURE" + fi +else + # file does not exist --> line not in file + echo "SUCCESS" +fi diff --git a/conf/type/__addifnosuchline/gencode b/conf/type/__addifnosuchline/gencode new file mode 100755 index 00000000..898d93f9 --- /dev/null +++ b/conf/type/__addifnosuchline/gencode @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) +# +# 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 . +# +# + +if [ -f "$__object/parameter/file" ]; then + file=$(cat "$__object/parameter/file") +else + file="/$__object_id" +fi + +result=$(cat "$__object/explorer/findline") + +if [ $result = "SUCCESS" ]; then + line=$(cat "$__object/parameter/line") + echo "echo $line >> $file" +fi diff --git a/conf/type/__addifnosuchline/parameter/optional b/conf/type/__addifnosuchline/parameter/optional new file mode 100644 index 00000000..f73f3093 --- /dev/null +++ b/conf/type/__addifnosuchline/parameter/optional @@ -0,0 +1 @@ +file diff --git a/conf/type/__addifnosuchline/parameter/required b/conf/type/__addifnosuchline/parameter/required new file mode 100644 index 00000000..a999a0c2 --- /dev/null +++ b/conf/type/__addifnosuchline/parameter/required @@ -0,0 +1 @@ +line diff --git a/doc/man/to_check/cdist-type-addifnosuchline.text b/doc/man/to_check/cdist-type-addifnosuchline.text new file mode 100644 index 00000000..09618dc3 --- /dev/null +++ b/doc/man/to_check/cdist-type-addifnosuchline.text @@ -0,0 +1,30 @@ +cdist-type-addifnosuchline(1) +====================== +Daniel Roth + + +NAME +---- +cdist-type-addifnosuchline + + +SYNOPSIS +-------- +cdist-type-addifnosuchline Add if no such line + + +DESCRIPTION +----------- +cdist-type-addifnosuchline can be used to check a file for existence of a +specific line and adding that if not found + + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Daniel Roth. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 5333b98299d59d2b1e2c543cc3309baa7335bd60 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 7 Mar 2011 20:08:41 +0100 Subject: [PATCH 03/48] Testing/Demonstration of type addifnosuchline --- conf/manifest/init | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/manifest/init b/conf/manifest/init index e6cf47d5..bca93d06 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -10,7 +10,11 @@ __file /etc/cdist-configured --type file case "$__target_host" in # Everybody has this localhost) - __file test --type file --destination /tmp/cdist-testfile +# __file test --type file --destination /tmp/cdist-testfile + __addifnosuchline testfile_foo --file /tmp/myTestFile --line "foo" + __addifnosuchline testfile2_foo --file /tmp/myTestFile2 --line "foo" + __addifnosuchline testfile_bar --file /tmp/myTestFile --line "bar" + __addifnosuchline /tmp/myTestFile3 --line "bar" ;; # Alias in /etc/hosts for localhost From 35df79534210b4bb68bd6043a74eecd34c26f758 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 8 Mar 2011 20:21:10 +0100 Subject: [PATCH 04/48] Return values replaced --- conf/type/__addifnosuchline/explorer/findline | 9 +++------ conf/type/__addifnosuchline/gencode | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/conf/type/__addifnosuchline/explorer/findline b/conf/type/__addifnosuchline/explorer/findline index 9367be42..c1633626 100755 --- a/conf/type/__addifnosuchline/explorer/findline +++ b/conf/type/__addifnosuchline/explorer/findline @@ -29,13 +29,10 @@ regex=$(cat "$__object/parameter/line") if [ -f "$file" ]; then grep -q "^$regex\$" "$file" if [ $? -eq 1 ]; then - # regex pattern not found --> success - echo "SUCCESS" + echo "NOTFOUND" else - # regex pattern found --> failure - echo "FAILURE" + echo "FOUND" fi else - # file does not exist --> line not in file - echo "SUCCESS" + echo "NOTFOUND" fi diff --git a/conf/type/__addifnosuchline/gencode b/conf/type/__addifnosuchline/gencode index 898d93f9..f97789ae 100755 --- a/conf/type/__addifnosuchline/gencode +++ b/conf/type/__addifnosuchline/gencode @@ -27,7 +27,7 @@ fi result=$(cat "$__object/explorer/findline") -if [ $result = "SUCCESS" ]; then +if [ "$result" = "NOTFOUND" ]; then line=$(cat "$__object/parameter/line") echo "echo $line >> $file" fi From d88f4afc8722d4e3bdca3c318ee51474b3198b66 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 12:01:54 +0100 Subject: [PATCH 05/48] +logfile Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-03-09 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/dev/logs/2011-03-09 diff --git a/doc/dev/logs/2011-03-09 b/doc/dev/logs/2011-03-09 new file mode 100644 index 00000000..4666ccb3 --- /dev/null +++ b/doc/dev/logs/2011-03-09 @@ -0,0 +1,3 @@ +Steven & Nico: +- types are closed in themselves +- manpage will be stored in conf/type/NAME/man.text From 1c45e4fe174995206c06ae6abc4b01e0cb3200aa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 13:06:23 +0100 Subject: [PATCH 06/48] begin the manpage integration with man.text Signed-off-by: Nico Schottelius --- Makefile | 33 ++++++++++++++----- .../type/__file/man.text | 0 doc/man/cdist-reference.text.sh | 14 +++++--- doc/man/cdist-type.text | 3 +- 4 files changed, 36 insertions(+), 14 deletions(-) rename doc/man/cdist-type__file.text => conf/type/__file/man.text (100%) diff --git a/Makefile b/Makefile index adf03e31..115fa5f8 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,6 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ - $(MANDIR)/cdist-type__file.text \ ################################################################################ @@ -47,16 +46,34 @@ all: man: doc/man/.marker -doc/man/.marker: $(MANSRC) $(MANGENERATED) - for mansrc in $^; do $(A2X) $$mansrc; done - for manpage in $(MANDIR)/*.[1-9]; do cat=$${manpage##*.}; mandir=$(MANDIR)/man$$cat; mkdir -p $$mandir; mv $$manpage $$mandir; done +doc/man/.marker: touch $@ -# Only depends on cdist-type__*.text in reality -$(MANDIR)/cdist-reference.text: $(MANSRC) $(MANDIR)/cdist-reference.text.sh - $(MANDIR)/cdist-reference.text.sh - +# Manual from core +mancore: $(MANSRC) + for mansrc in $^; do $(A2X) $$mansrc; done +# Manuals from types +mantype: + for man in conf/type/*/man.text; do $(A2X) $$man; done + +# Move into manpath directories +manmove: mantype mancore + for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \ + cat=$${manpage##*.}; \ + echo $$cat; \ + mandir=$(MANDIR)/man$$cat; \ + mkdir -p $$mandir; \ + mv $$manpage $$mandir; \ + done + +# Reference +$(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh + $(MANDIR)/cdist-reference.text.sh + $(A2X) $(MANDIR)/cdist-reference.text + # Move us to the destination as well + make manmove + clean: rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) diff --git a/doc/man/cdist-type__file.text b/conf/type/__file/man.text similarity index 100% rename from doc/man/cdist-type__file.text rename to conf/type/__file/man.text diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 2453c216..f900e35e 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -83,6 +83,9 @@ conf/type//:: This directory is referenced by the variable __type (see below). +conf/type//man.text:: + Manpage in Asciidoc format (nequired for inclusion into upstream) + conf/type//manifest:: Used to generate additional objects from a type. @@ -132,9 +135,9 @@ TYPES The following types are available: eof -for type in cdist-type__*.text; do - name_1="${type#cdist-type}" - name_2="${name_1%.text}" +for type in man7/cdist-type__*; do + name_1="${type#man7/cdist-type}" + name_2="${name_1%.7}" name="$name_2" echo "- $name" @@ -175,8 +178,9 @@ SEE ALSO -------- - cdist(7) eof -for type in cdist-type__*.text; do - name_2="${type%.text}" +for type in man7/cdist-type__*; do + name_1="${type#man7/}" + name_2="${name_1%.7}" name="$name_2" echo "- ${name}(7)" diff --git a/doc/man/cdist-type.text b/doc/man/cdist-type.text index b5097a5c..2835815e 100644 --- a/doc/man/cdist-type.text +++ b/doc/man/cdist-type.text @@ -153,7 +153,8 @@ If you think your type may be useful for others, ensure it works with the current master branch of cdist and submit the git url containing the type for inclusion to the mailinglist **cdist at cdist -- at -- l.schottelius.org**. -Ensure a corresponding manpage named cdist-type__NAME is included. +Ensure a corresponding manpage named man.text in asciidoc format with +the manpage-name "cdist-type__NAME" is included in the type directory. SEE ALSO From 719419d364feb2173e861d9e85b9fd1dd8b77b33 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 13:08:56 +0100 Subject: [PATCH 07/48] finish (kind of ugly) manpage generation in makefile Signed-off-by: Nico Schottelius --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 115fa5f8..a6d78aeb 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ all: man: doc/man/.marker -doc/man/.marker: +doc/man/.marker: $(MANDIR)/cdist-reference.text touch $@ # Manual from core @@ -61,13 +61,12 @@ mantype: manmove: mantype mancore for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \ cat=$${manpage##*.}; \ - echo $$cat; \ mandir=$(MANDIR)/man$$cat; \ mkdir -p $$mandir; \ mv $$manpage $$mandir; \ done -# Reference +# Reference depends on conf/type/*/man.text - HOWTO with posix make? $(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text.sh $(A2X) $(MANDIR)/cdist-reference.text From 8ac043e95f98ac47a4b18a27e4f536fe748241c0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 20:22:02 +0100 Subject: [PATCH 08/48] comment the initial manifest Signed-off-by: Nico Schottelius --- conf/manifest/init | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index e6cf47d5..ab366540 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -3,8 +3,10 @@ # # This is debug and should not be in a production environment -echo "We could access other manifests in $__manifest" +# echo "We could access other manifests in $__manifest" +# Every machine becomes a marker, so sysadmins know that automatic +# configurations are happening __file /etc/cdist-configured --type file case "$__target_host" in @@ -13,22 +15,34 @@ case "$__target_host" in __file test --type file --destination /tmp/cdist-testfile ;; + # + # Examples using different types + # + # Alias in /etc/hosts for localhost cdist-archlinux) - __package_pacman django --state deinstalled - __package_pacman wireshark-cli --state installed + # This is the specific package type for pacman __package_pacman zsh --state installed + + # The __package type autoselect the right type based on the os + __package vim --state installed ;; + # This is how it would look like on gentoo cdist-gentoo) + # Same stuff for gentoo __package tree --state installed ;; + cdist-debian) + __package_apt atop --state installed + __package apache2 --state deinstalled + ;; - # Real machines - ikq*) - __package_apt zsh --state installed - __package_apt apache2 --state deinstalled - ;; - kr) - __issue iddoesnotmatterhere - ;; + # Real machines may be used with their hostname or fqdn, + # depending on how you call cdist-deploy-to + # machine) + # ... + # ;; + # machine.example.org) + # ... + # ;; esac From b7dd337ea58c550598afe9d40077f427d4ee9423 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 21:27:47 +0100 Subject: [PATCH 09/48] currently no need for a parallel cdist-deploy-to Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 9d6031b4..d11a482b 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -1,8 +1,6 @@ Core: - Support singletons (see types/issue for a good reason) - probably name them only_once and use that as the internal id! - - cdist-deploy-to: Configure more than one host - - plus parallel mode like in ccollect Type handler: - add dependency parameters to core available for every type From a3f2bc5fbb738684bf2b293e4b7b5e86be5fec3d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 21:54:13 +0100 Subject: [PATCH 10/48] even less todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 10 ---------- doc/man/cdist-manifest.text | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index d11a482b..6331435c 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -34,8 +34,6 @@ Documentation: - cdist-trigger after first run from /var/lib/cdist/out/bin? - Different environments (production, integration, development) - via version control - - Define how to raise errors in types - - Check all references in manpages, ensure all manpages exist, generic ones: + cdist + cdist-deploy-to @@ -45,10 +43,6 @@ Documentation: - install packages only if not existent - copy file only if different - DOC document that $type/manifest is executed for every object/instance - - category 7: - - cdist-manifest(7) - - cdist-explorer - - cdist-config-layout - ensure every file in bin/ has a correspondent manpage - cdist-code-run-all - cdist-config @@ -67,8 +61,4 @@ Documentation: - cdist-run-remote - cdist-type-build-emulation - cdist-type-emulator - - Cleanup READMEs - Ensure html output of manpages are published on the web - -- Makefile: - - Include manpage generation diff --git a/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text index 40ab2c4e..efa5a8eb 100644 --- a/doc/man/cdist-manifest.text +++ b/doc/man/cdist-manifest.text @@ -43,10 +43,10 @@ __file /etc/nologin --type file --source "$__type/files/default.nologin" SEE ALSO -------- -cdist-manifest-run(1), -cdist-manifest-run-all(1), -cdist-manifest-run-init(1), -cdist-type(7) +- cdist-manifest-run(1) +- cdist-manifest-run-all(1) +- cdist-manifest-run-init(1) +- cdist-type(7) COPYING From 4fdfac292b75fad973da28209e18683ca37e2b05 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 21:55:32 +0100 Subject: [PATCH 11/48] nexttodo / nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 5 ++++- doc/dev/todo/post-1.0 | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 04dfc21b..c0dd742f 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,4 @@ -Documentation cleanup +Core: + - Support singletons (see types/issue for a good reason) + - probably name them only_once and use that as the internal id! + diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 6331435c..e5326a25 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -1,7 +1,3 @@ -Core: - - Support singletons (see types/issue for a good reason) - - probably name them only_once and use that as the internal id! - Type handler: - add dependency parameters to core available for every type --requires From 41d82ea89a9713e85fc3c7e79aee1d52a6c497e8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 21:58:34 +0100 Subject: [PATCH 12/48] add only once to __issue Signed-off-by: Nico Schottelius --- conf/type/__issue/only_once | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 conf/type/__issue/only_once diff --git a/conf/type/__issue/only_once b/conf/type/__issue/only_once new file mode 100644 index 00000000..e69de29b From 70485e3516011a7cb10868db9285b6f0b9e8568f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 22:09:44 +0100 Subject: [PATCH 13/48] extend cdist-type-emulator with singleton type Signed-off-by: Nico Schottelius --- bin/cdist-config | 11 ++++++----- bin/cdist-type-emulator | 10 ++++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 7f68ca67..bebf449c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -57,6 +57,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_parameter:=parameter} : ${__cdist_name_parameter_required:=required} : ${__cdist_name_parameter_optional:=optional} +: ${__cdist_name_singleton:=singleton} : ${__cdist_name_target_host:=target_host} : ${__cdist_name_type:=type} : ${__cdist_name_type_bin:=type_bin} @@ -162,11 +163,6 @@ __cdist_init_deploy() ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" } -# __cdist_cache_host() -# { -# echo "${__cdist_cache_hosts}/${__cdist_target_host}" -# } - __cdist_type_has_explorer() { # We only create output, if there's at least one explorer @@ -196,6 +192,11 @@ __cdist_type_gencode() echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" } +__cdist_type_singleton() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_singleton}" +} + __cdist_type_parameter_dir() { echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 69be9405..9c54c714 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -25,12 +25,18 @@ # . cdist-config -[ $# -ge 1 ] || __cdist_usage " " set -eu -__cdist_object_id="$1"; shift +# Find out whether type is a singleton or regular type __cdist_type="$__cdist_myname" +if [ -f "$(__cdist_type_singleton "$__cdist_type")" ]; then + __cdist_object_id="singleton" +else + [ $# -ge 1 ] || __cdist_usage " " + __cdist_object_id="$1"; shift +fi + echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_usage "Insane object id, ${__cdist_object_id}." From a67073a45bac6de17e36765815b2adb26ab60989 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 22:21:39 +0100 Subject: [PATCH 14/48] add example for singleton Signed-off-by: Nico Schottelius --- conf/manifest/init | 4 ++++ conf/type/__issue/manifest | 2 +- conf/type/__issue/{only_once => singleton} | 0 3 files changed, 5 insertions(+), 1 deletion(-) rename conf/type/__issue/{only_once => singleton} (100%) diff --git a/conf/manifest/init b/conf/manifest/init index ab366540..8a2428ce 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -12,6 +12,7 @@ __file /etc/cdist-configured --type file case "$__target_host" in # Everybody has this localhost) + # Usual example __file test --type file --destination /tmp/cdist-testfile ;; @@ -26,6 +27,9 @@ case "$__target_host" in # The __package type autoselect the right type based on the os __package vim --state installed + + # If the type is a singleton, it does not take an object id + __issue ;; # This is how it would look like on gentoo cdist-gentoo) diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index a79544ee..3f741e89 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -20,7 +20,7 @@ # destination=/etc/issue -os="$(cat "out/explorer/os")" +Zs="$(cat "out/explorer/os")" case "$os" in archlinux) diff --git a/conf/type/__issue/only_once b/conf/type/__issue/singleton similarity index 100% rename from conf/type/__issue/only_once rename to conf/type/__issue/singleton From 9ccaa85102696fc7c7b50f66d5445363bc195962 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 22:22:04 +0100 Subject: [PATCH 15/48] todo++ Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index c0dd742f..87b61b47 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,4 +1,3 @@ -Core: - - Support singletons (see types/issue for a good reason) - - probably name them only_once and use that as the internal id! +- Support singletons (see types/issue for a good reason) + - add documentation! From 70704b16a961f8cbae1eaad7660008210fa37e65 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 13:21:21 +0100 Subject: [PATCH 16/48] +comment Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 9c54c714..d79fb68a 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -27,9 +27,9 @@ . cdist-config set -eu -# Find out whether type is a singleton or regular type __cdist_type="$__cdist_myname" +# Find out whether type is a singleton or regular type if [ -f "$(__cdist_type_singleton "$__cdist_type")" ]; then __cdist_object_id="singleton" else From 637163d4af0ec4c10327a73a83aed3fd39eecf00 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 13:31:00 +0100 Subject: [PATCH 17/48] only md5sum if file is a regular file (not a directory) Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 6 +++++- conf/type/__file/gencode | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index b2867385..4ac0e1b9 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -41,7 +41,11 @@ esac # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - $md5sum < "$destination" + if [ -f "$destination" ]; then + $md5sum < "$destination" + else + echo "NO REGULAR FILE" + fi else echo "NO FILE FOUND, NO CHECKSUM CALCULATED." fi diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 0f3b1bf8..43104f6f 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -55,16 +55,18 @@ esac if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" - local_md5sum="$($md5sum < "$source")" - remote_md5sum="$(cat "$__object/explorer/md5sum")" + if [ -f "$source" ]; then + local_md5sum="$($md5sum < "$source")" + remote_md5sum="$(cat "$__object/explorer/md5sum")" - # Is md5sum the right approach? - if [ "$local_md5sum" != "$remote_md5sum" ]; then - # FIXME: This is ugly and hardcoded, replace after 1.0! - # Probably a better aproach is to have the user configured - # ~/.ssh/config to contain the right username - # Probably describe it in cdist-quickstart... - scp "$source" "root@${__target_host}:${destination}" + # Is md5sum the right approach? + if [ "$local_md5sum" != "$remote_md5sum" ]; then + # FIXME: This is ugly and hardcoded, replace after 1.0! + # Probably a better aproach is to have the user configured + # ~/.ssh/config to contain the right username + # Probably describe it in cdist-quickstart... + scp "$source" "root@${__target_host}:${destination}" + fi fi # No source? Create empty file/dir else From 62c64464120b101aff59e927d7ea6d81cbb5223e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 13:36:58 +0100 Subject: [PATCH 18/48] exit true in case packet is not installed Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode index b451eb9f..413562d5 100755 --- a/conf/type/__package_apt/gencode +++ b/conf/type/__package_apt/gencode @@ -29,7 +29,7 @@ fi state="$(cat "$__object/parameter/state")" -is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status")" +is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)" case "$state" in installed) From e48458f27ff57c357f5c4514f42646cd4bbaf1ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 13:38:12 +0100 Subject: [PATCH 19/48] add explorer to find out whether file exists Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/exists | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 conf/type/__file/explorer/exists diff --git a/conf/type/__file/explorer/exists b/conf/type/__file/explorer/exists new file mode 100755 index 00000000..b0be82fc --- /dev/null +++ b/conf/type/__file/explorer/exists @@ -0,0 +1,34 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# 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 . +# +# +# Check whether file exists or not +# + +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" +else + destination="/$__object_id" +fi + +if [ -e "$destination" ]; then + echo yes +else + echo no +fi From 03502567e3c6f5e1f3c907865718b107c1295738 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 13:40:05 +0100 Subject: [PATCH 20/48] check for existence before (re-)creation Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 43104f6f..9ad956fe 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -70,20 +70,23 @@ if [ -f "$__object/parameter/source" ]; then fi # No source? Create empty file/dir else - case "$type" in - directory) - echo mkdir \"$destination\" - ;; + # Only touch / create if it does not exist + if [ no = "$(cat "$__object/explorer/exists")" ]; then + case "$type" in + directory) + echo mkdir \"$destination\" + ;; - file) - echo touch \"$destination\" - ;; + file) + echo touch \"$destination\" + ;; - *) - echo "Unsupported type: \"$type\"" >&2 - exit 1 - ;; - esac + *) + echo "Unsupported type: \"$type\"" >&2 + exit 1 + ;; + esac + fi fi if [ -f "$__object/parameter/mode" ]; then From 5ababb12495f30dfb7aff8388517fa6de9e6e2d8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:09:04 +0100 Subject: [PATCH 21/48] correct manifest of __issue Signed-off-by: Nico Schottelius --- conf/type/__issue/manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index 3f741e89..aa6f7629 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -20,7 +20,7 @@ # destination=/etc/issue -Zs="$(cat "out/explorer/os")" +source="$(cat "out/explorer/os")" case "$os" in archlinux) From 96af3939428338f29798ab4dc73aab8b39f5ee45 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:11:51 +0100 Subject: [PATCH 22/48] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index e5326a25..8ea11dd4 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -58,3 +58,9 @@ Documentation: - cdist-type-build-emulation - cdist-type-emulator - Ensure html output of manpages are published on the web +-------------------------------------------------------------------------------- +Fix: +Running initial manifest for sgv-wiki-01 ... +/tmp/cdist.VfhjaH8LP3GE/out/type_bin/__ethz_systems_wiki: Zeile 87: /home/users/nico/privat/firmen/ethz/vcs/cdist/conf/type/__ethz_systems_wiki/parameter/required: Datei oder Verzeichnis nicht gefunden +/tmp/cdist.VfhjaH8LP3GE/out/type_bin/__ethz_systems_wiki: Zeile 94: /home/users/nico/privat/firmen/ethz/vcs/cdist/conf/type/__ethz_systems_wiki/parameter/optional: Datei oder Verzeichnis nicht gefunden + From 99e6b9e6b1e7101fdb164c5b1cd6660a9cf5aaa0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:19:25 +0100 Subject: [PATCH 23/48] update regexp for sane characters Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 ++-- doc/changelog | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index bebf449c..850f2a2b 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -63,8 +63,8 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_type_bin:=type_bin} : ${__cdist_name_type_explorer:=type_explorer} -# Used for IDs -: ${__cdist_sane_regexp:=[A-Za-z0-9/]*[-A-Za-z0-9_/]*} +# Used for IDs: Allow everything not starting with - and . +: ${__cdist_sane_regexp:=^[^-\.]} # Default remote user : ${__cdist_remote_user:=root} diff --git a/doc/changelog b/doc/changelog index 4ec2c47f..41073e2c 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.0.3: upcoming + * Update regexp used for sane characters + 1.0.2: 2011-03-09 * Add manpages: cdist-type, cdist-type__file, cdist-reference, cdist-explorer * Make doc/man/ usable as MANPATH entry From c67807af7641463d0ddc536d89eab6e573c0e65e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:23:47 +0100 Subject: [PATCH 24/48] make regexp usable in the middle of an expression Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 850f2a2b..625e0c3c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -64,7 +64,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_type_explorer:=type_explorer} # Used for IDs: Allow everything not starting with - and . -: ${__cdist_sane_regexp:=^[^-\.]} +: ${__cdist_sane_regexp:=^[^-\.].*} # Default remote user : ${__cdist_remote_user:=root} From dc2a49afe8a5d3d971dac9142a9f35d78507ec00 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:25:24 +0100 Subject: [PATCH 25/48] -^ Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 625e0c3c..837bccb6 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -64,7 +64,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_type_explorer:=type_explorer} # Used for IDs: Allow everything not starting with - and . -: ${__cdist_sane_regexp:=^[^-\.].*} +: ${__cdist_sane_regexp:=[^-\.].*} # Default remote user : ${__cdist_remote_user:=root} From e1a5a26cbfb4038c91475e81247ccf4a30be1a60 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:41:08 +0100 Subject: [PATCH 26/48] allow parameters to be missing, if not used Signed-off-by: Nico Schottelius --- bin/cdist-config | 11 +++++++++++ bin/cdist-type-emulator | 26 +++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 837bccb6..c7e671ef 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -207,6 +207,17 @@ __cdist_type_parameter_file() echo "$(__cdist_type_parameter_dir "$1")/$2" } +# Shorthand for required and optional +__cdist_type_parameter_required() +{ + __cdist_type_parameter_file "$1/$__cdist_name_parameter_required" +} + +__cdist_type_parameter_optional() +{ + __cdist_type_parameter_file "$1/$__cdist_name_parameter_optional" +} + __cdist_type_from_object() { echo "${1%%/*}" diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index d79fb68a..a4f66e5b 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -78,20 +78,24 @@ while [ $# -gt 0 ]; do done # Ensure required parameters are given -while read required; do - if [ ! -f "${tempparameter}/${required}" ]; then - __cdist_usage "Missing required parameter $required" - fi +if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then + while read required; do + if [ ! -f "${tempparameter}/${required}" ]; then + __cdist_usage "Missing required parameter $required" + fi - mv "${tempparameter}/${required}" "${__cdist_parameter_dir}" -done < "$(__cdist_type_parameter_file "$__cdist_type" "$__cdist_name_parameter_required")" + mv "${tempparameter}/${required}" "${__cdist_parameter_dir}" + done < "$(__cdist_type_parameter_required "$__cdist_type")" +fi # Allow optional parameters -while read optional; do - if [ -f "${tempparameter}/${optional}" ]; then - mv "${tempparameter}/${optional}" "${__cdist_parameter_dir}" - fi -done < "$(__cdist_type_parameter_file "$__cdist_type" "$__cdist_name_parameter_optional")" +if [ -f "$(__cdist_type_parameter_optional "$__cdist_type")" ]; then + while read optional; do + if [ -f "${tempparameter}/${optional}" ]; then + mv "${tempparameter}/${optional}" "${__cdist_parameter_dir}" + fi + done < "$(__cdist_type_parameter_optional "$__cdist_type")" +fi # Error out on other paramaters cd "${tempparameter}" From 24200865c90b5cf6ed2d8366fc716c1eb02d3f79 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:44:16 +0100 Subject: [PATCH 27/48] remove __cdist_type_parameter_file in favor for new variants Signed-off-by: Nico Schottelius --- bin/cdist-config | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c7e671ef..54984eaf 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -202,20 +202,15 @@ __cdist_type_parameter_dir() echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" } -__cdist_type_parameter_file() -{ - echo "$(__cdist_type_parameter_dir "$1")/$2" -} - # Shorthand for required and optional __cdist_type_parameter_required() { - __cdist_type_parameter_file "$1/$__cdist_name_parameter_required" + echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_required" } __cdist_type_parameter_optional() { - __cdist_type_parameter_file "$1/$__cdist_name_parameter_optional" + echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_optional" } __cdist_type_from_object() From 9e7a4303729db8f1db6badb3ed8da97e79711b2f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 17:45:15 +0100 Subject: [PATCH 28/48] more upcoming changes Signed-off-by: Nico Schottelius --- doc/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changelog b/doc/changelog index 41073e2c..2f528b90 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,7 @@ 1.0.3: upcoming * Update regexp used for sane characters + * Allow types without parameters + * Allow type to be singleton (DOCUMENTATION MISSING) 1.0.2: 2011-03-09 * Add manpages: cdist-type, cdist-type__file, cdist-reference, cdist-explorer From a190ee13b82ad814a610ee05e0bb66efc8c724c5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 18:14:35 +0100 Subject: [PATCH 29/48] __file: --type symlink supported Signed-off-by: Nico Schottelius --- conf/manifest/init | 2 +- conf/type/__file/gencode | 86 ++++++++++++++++++++++++---------------- doc/changelog | 1 + 3 files changed, 53 insertions(+), 36 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index 8a2428ce..0a1dca50 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -13,7 +13,7 @@ case "$__target_host" in # Everybody has this localhost) # Usual example - __file test --type file --destination /tmp/cdist-testfile + __file test --type symlink --source /etc/cdist-configured --destination /tmp/cdist-testfile ;; # diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 9ad956fe..1fb20bf9 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -22,8 +22,6 @@ # example for typewrites later # -type="$(cat "$__object/parameter/type")" - # If destination was specified, do not use the id if [ -f "$__object/parameter/destination" ]; then destination="$(cat "$__object/parameter/destination")" @@ -40,6 +38,7 @@ if ! $(echo "$destination" | grep -q ^/); then exit 1 fi +# Use correct md5sum binary - MacOSx is different here case "$os" in macosx) md5sum="md5" @@ -50,45 +49,62 @@ case "$os" in ;; esac -# Copy source if existing -# FIXME: directory handling not supported - add recursive flag? -if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" +type="$(cat "$__object/parameter/type")" - if [ -f "$source" ]; then - local_md5sum="$($md5sum < "$source")" - remote_md5sum="$(cat "$__object/explorer/md5sum")" - - # Is md5sum the right approach? - if [ "$local_md5sum" != "$remote_md5sum" ]; then - # FIXME: This is ugly and hardcoded, replace after 1.0! - # Probably a better aproach is to have the user configured - # ~/.ssh/config to contain the right username - # Probably describe it in cdist-quickstart... - scp "$source" "root@${__target_host}:${destination}" - fi - fi -# No source? Create empty file/dir -else - # Only touch / create if it does not exist - if [ no = "$(cat "$__object/explorer/exists")" ]; then - case "$type" in - directory) +case "$type" in + directory) + if [ -f "$__object/parameter/source" ]; then + echo "Source not supported for directory currently - FIXME" >&2 + exit 1 + else + if [ no = "$(cat "$__object/explorer/exists")" ]; then echo mkdir \"$destination\" - ;; + fi + fi + ;; - file) + file) + if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" + + if [ -f "$source" ]; then + local_md5sum="$($md5sum < "$source")" + remote_md5sum="$(cat "$__object/explorer/md5sum")" + + # FIXME: Is md5sum the right approach? + if [ "$local_md5sum" != "$remote_md5sum" ]; then + # FIXME: This is ugly and hardcoded, replace after 1.0! + # Probably a better aproach is to have the user configured + # ~/.ssh/config to contain the right username + # Probably describe it in cdist-quickstart... + scp "$source" "root@${__target_host}:${destination}" + fi + fi + else + if [ no = "$(cat "$__object/explorer/exists")" ]; then echo touch \"$destination\" - ;; + fi + fi + ;; - *) - echo "Unsupported type: \"$type\"" >&2 - exit 1 - ;; - esac - fi -fi + symlink) + if [ ! -f "$__object/parameter/source" ]; then + echo "Source required for symlink" >&2 + exit 1 + fi + source="$(cat "$__object/parameter/source")" + # FIXME: handle directories or document & ignore? + echo ln -sf \"$source\" \"$destination\" + ;; + + *) + echo "Unsupported type: \"$type\"" >&2 + exit 1 + ;; +esac + +# Mode settings if [ -f "$__object/parameter/mode" ]; then mode="$(cat "$__object/parameters/mode")" echo chmod \"$mode\" \"$destination\" diff --git a/doc/changelog b/doc/changelog index 2f528b90..4bca6d9c 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,7 @@ * Update regexp used for sane characters * Allow types without parameters * Allow type to be singleton (DOCUMENTATION MISSING) + * Type __file learned --type symlink 1.0.2: 2011-03-09 * Add manpages: cdist-type, cdist-type__file, cdist-reference, cdist-explorer From f90d37d4bc164cc82be2123bafa45b9946683467 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 18:23:55 +0100 Subject: [PATCH 30/48] add name of target host at end of run again Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 5d06cf96..35c058d9 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -67,4 +67,4 @@ cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ # And finally - execute the code cdist-code-run-all "$__cdist_target_host" -echo "Configuration successfully finished." +echo "Configuration successfully finished for $__cdist_target_host" From d4fac0951866e9ecf09571fcae1276521b14b85b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 19:16:21 +0100 Subject: [PATCH 31/48] fail, if source is not existing Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 1fb20bf9..5f386349 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -79,6 +79,9 @@ case "$type" in # Probably describe it in cdist-quickstart... scp "$source" "root@${__target_host}:${destination}" fi + else + echo "Source \"$source\" does not exist." >&2 + exit 1 fi else if [ no = "$(cat "$__object/explorer/exists")" ]; then From b8772f073db0ea49a8737bd41c31d9dfff8f4f30 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 19:41:18 +0100 Subject: [PATCH 32/48] +thoughts Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 87b61b47..f10db701 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,7 @@ - Support singletons (see types/issue for a good reason) - add documentation! +- think about splitting __file: + __file --source + __directory --recursive yes|no --source + __link --type symbolic|hard From e5d2874c245f6af09dafa62f3038c98b85076090 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 21:49:49 +0100 Subject: [PATCH 33/48] +asciidoc hint Signed-off-by: Nico Schottelius --- REAL_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REAL_README b/REAL_README index ab070b38..474dde56 100644 --- a/REAL_README +++ b/REAL_README @@ -79,7 +79,7 @@ To install cdist, execute the following commands: cd cdist export PATH=$PATH:$(pwd -P)/bin - # If you want the manpages + # If you want the manpages (requires asciidoc to be installed) make man export MANPATH=$MANPATH:$(pwd -P)/doc/man From 53e3e718642d85add77dc44ddf5a36d34a65737f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 23:14:57 +0100 Subject: [PATCH 34/48] + used_by Signed-off-by: Nico Schottelius --- REAL_README | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/REAL_README b/REAL_README index 474dde56..5c66f96b 100644 --- a/REAL_README +++ b/REAL_README @@ -129,3 +129,24 @@ You can join the development ***IRC channel*** Bug reports, questions, patches, etc. should be send to the [cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist). + +## Used by + +If you're using cdist, feel free to send a report to the mailing list. +Interesting information are for instance + + * Which services do you manage? + * How many machines do you manage? + * What are the pros/cons you see in cdist? + * General comments/critics + +### Nico Schottelius, Systems Group ETH Zurich + +Yes, I'm actually eating my own dogfood and currently managing + + * [plone](http://plone.org/) (cms) + * [moinmoin](http://moinmo.in/) (wiki) + * [apache](http://httpd.apache.org/) (webserver) + * [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication) + +with cdist on a total of **2** production servers. From 65f09477d0a4592502eae72dd3e6181db719fdf0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 10 Mar 2011 23:15:49 +0100 Subject: [PATCH 35/48] +urls Signed-off-by: Nico Schottelius --- REAL_README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/REAL_README b/REAL_README index 5c66f96b..46e0c3ee 100644 --- a/REAL_README +++ b/REAL_README @@ -149,4 +149,6 @@ Yes, I'm actually eating my own dogfood and currently managing * [apache](http://httpd.apache.org/) (webserver) * [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication) -with cdist on a total of **2** production servers. +with cdist on a total of **2** production servers of the +[Systems Group](http://www.systems.ethz.ch) at the +[ETH Zurich](http://www.ethz.ch). From a145ca32f4d466f17a885da7ae1bd615f1a7ae29 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 16:20:29 +0100 Subject: [PATCH 36/48] update used_by section Signed-off-by: Nico Schottelius --- REAL_README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/REAL_README b/REAL_README index 46e0c3ee..e69c36ba 100644 --- a/REAL_README +++ b/REAL_README @@ -148,7 +148,9 @@ Yes, I'm actually eating my own dogfood and currently managing * [moinmoin](http://moinmo.in/) (wiki) * [apache](http://httpd.apache.org/) (webserver) * [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication) + * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) + * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) -with cdist on a total of **2** production servers of the +with cdist on a total of **3** production servers of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch). From 783c4b12ca9fb3107dc745c71f6628e6db05c86c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 19:08:52 +0100 Subject: [PATCH 37/48] [__issue] remove unneeded parameters Signed-off-by: Nico Schottelius --- conf/type/__issue/parameter/optional | 0 conf/type/__issue/parameter/required | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 conf/type/__issue/parameter/optional delete mode 100644 conf/type/__issue/parameter/required diff --git a/conf/type/__issue/parameter/optional b/conf/type/__issue/parameter/optional deleted file mode 100644 index e69de29b..00000000 diff --git a/conf/type/__issue/parameter/required b/conf/type/__issue/parameter/required deleted file mode 100644 index e69de29b..00000000 From 19c7317cbbd38c4f9731186a29508dd34a4e2dc4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 19:09:36 +0100 Subject: [PATCH 38/48] [DOC] document singleton behaviour in type manpage Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/dev/todo/niconext | 16 ++++++++++------ doc/man/cdist-type.text | 37 +++++++++++++++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 54984eaf..ce07fde8 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -# Fail if something bogus is going on and export all variables +# Fail if something bogus is going on set -u ################################################################################ diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index f10db701..239a1f83 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,7 +1,11 @@ -- Support singletons (see types/issue for a good reason) - - add documentation! - - think about splitting __file: - __file --source - __directory --recursive yes|no --source - __link --type symbolic|hard + __file + source + mode + owner + __directory + parents + mode + owner + __link + type symbolic | hard diff --git a/doc/man/cdist-type.text b/doc/man/cdist-type.text index 2835815e..7c8b49f3 100644 --- a/doc/man/cdist-type.text +++ b/doc/man/cdist-type.text @@ -10,7 +10,9 @@ cdist-type - Functionality bundled SYNOPSIS -------- -Other languages name this module or class +__TYPE ID --parameter value [--parameter value ...] + +__TYPE --parameter value [--parameter value ...] (for singletons) DESCRIPTION @@ -37,7 +39,23 @@ Internally cdist-type-emulator(1) will be called from cdist-manifest-run(1) to save the given parameters into a cconfig database, so they can be accessed by the manifest and gencode scripts of the type (see below). -A list of supported types can be found in the cdist-type-listing(7) manpage. +A list of supported types can be found in the cdist-reference(7) manpage. + +SINGLETON TYPES +--------------- +If a type is flagged as a singleton, it may me used only once. This +is useful for types which can be used only once on a system. If a type +can only be used once, it does not take an + +Example: +-------------------------------------------------------------------------------- +# __issue type manages /etc/issue +__issue + +# Probably your own type - singletons may use parameters +__myfancysingleton --colour green +-------------------------------------------------------------------------------- + HOW TO WRITE A NEW TYPE @@ -46,6 +64,7 @@ A type consists of - parameter (optional) - manifest (optional) +- singleton (optional) - explorer (optional) - gencode (optional) @@ -98,6 +117,20 @@ Always ensure the manifest is executable, otherwise cdist will not be able to execute it. +SINGLETON - ONLY INSTANCE ONLY +------------------------------ +If you want to ensure that a type can only be used once per target, you can +mark it as a singleton: Just create the (empty) file "singleton" in your type +directory. This will also change the way your type must be called: + +-------------------------------------------------------------------------------- +__YOURTYPE --parameter value +-------------------------------------------------------------------------------- + +As you can see, the ID is omitted, because it does not make any sense, if your +type can be used only once. + + THE TYPE EXPLORERS ------------------ If a type needs to explore specific details, it can provide type specific From 0dc9c7f8ff148eb81ae92c2ad33b41639ae66ce4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 19:15:28 +0100 Subject: [PATCH 39/48] [TODO] update lists Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 11 ----------- doc/dev/todo/post-1.0 | 33 +++++++++++++++++---------------- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 239a1f83..e69de29b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,11 +0,0 @@ -- think about splitting __file: - __file - source - mode - owner - __directory - parents - mode - owner - __link - type symbolic | hard diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 8ea11dd4..6d248db5 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -1,13 +1,8 @@ -Type handler: - - add dependency parameters to core available for every type - --requires - --excludes? - -Stage 5 (code execution): - - check return codes - - abort on first error? - - dependencies - +Dependencies: + - Add meta parameters like --requires --excludes --depends? + - Build dependency tree + - Exit on any error + - Check return codes Types to be written/extended: - __ssh-keys (host/user) @@ -20,6 +15,18 @@ Types to be written/extended: - __file: - template == [shell script] stdout - cron + - __file: think about splitting + __file + source + mode + owner + __directory + parents + mode + owner + __link + type symbolic | hard + Documentation: - Describe Multi master setups @@ -58,9 +65,3 @@ Documentation: - cdist-type-build-emulation - cdist-type-emulator - Ensure html output of manpages are published on the web --------------------------------------------------------------------------------- -Fix: -Running initial manifest for sgv-wiki-01 ... -/tmp/cdist.VfhjaH8LP3GE/out/type_bin/__ethz_systems_wiki: Zeile 87: /home/users/nico/privat/firmen/ethz/vcs/cdist/conf/type/__ethz_systems_wiki/parameter/required: Datei oder Verzeichnis nicht gefunden -/tmp/cdist.VfhjaH8LP3GE/out/type_bin/__ethz_systems_wiki: Zeile 94: /home/users/nico/privat/firmen/ethz/vcs/cdist/conf/type/__ethz_systems_wiki/parameter/optional: Datei oder Verzeichnis nicht gefunden - From 6a591d3e06a424c20fa5975fe0b4e98bdd61e597 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 19:17:31 +0100 Subject: [PATCH 40/48] update version to be indpendent of git tree Otherwise versions will include changes by users, which will not be helpful for development. Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/changelog | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index ce07fde8..c1498f58 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -31,7 +31,7 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" -: ${__cdist_version:="$(cd "$__cdist_abs_mydir/.." && git describe)"} +__cdist_version="1.0.3" ################################################################################ # Names / Constants diff --git a/doc/changelog b/doc/changelog index 4bca6d9c..d5c5f882 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,7 +1,7 @@ -1.0.3: upcoming +1.0.3: 2011-03-11 * Update regexp used for sane characters * Allow types without parameters - * Allow type to be singleton (DOCUMENTATION MISSING) + * Allow type to be singleton * Type __file learned --type symlink 1.0.2: 2011-03-09 From 068a7d272b38851504ec64bd5328947c3fc91c51 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 19:25:55 +0100 Subject: [PATCH 41/48] place version on top Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c1498f58..0d0fd152 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,6 +19,8 @@ # # +__cdist_version="1.0.3" + # Fail if something bogus is going on set -u @@ -31,8 +33,6 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" -__cdist_version="1.0.3" - ################################################################################ # Names / Constants # From f8b8ba32facae6740688fb509ae3f8e36c9f4c7b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 11 Mar 2011 23:42:44 +0100 Subject: [PATCH 42/48] add new cdist-env Signed-off-by: Nico Schottelius --- bin/cdist-env | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 bin/cdist-env diff --git a/bin/cdist-env b/bin/cdist-env new file mode 100755 index 00000000..e95e078b --- /dev/null +++ b/bin/cdist-env @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# 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 . +# +# +# Setup environment for use with cdist +# + +. cdist-config +[ $# -eq 0 ] || __cdist_usage "no arguments" + +# Allow access to unset variables like PATH and MANPATH +set +u + +echo export PATH=$__cdist_abs_mydir:$PATH + +cd "$__cdist_abs_mydir/../doc/man" +echo export MANPATH=$(pwd -P):$MANPATH From ff1eb0895b6277c50b4a0d366647ae0aa9ec9c82 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 12 Mar 2011 18:47:34 +0100 Subject: [PATCH 43/48] add new type: __motd Signed-off-by: Nico Schottelius --- conf/type/__motd/README | 1 + conf/type/__motd/files/motd | 17 +++++++++++++ conf/type/__motd/man.text | 48 +++++++++++++++++++++++++++++++++++++ conf/type/__motd/manifest | 31 ++++++++++++++++++++++++ conf/type/__motd/singleton | 0 5 files changed, 97 insertions(+) create mode 100644 conf/type/__motd/README create mode 100644 conf/type/__motd/files/motd create mode 100644 conf/type/__motd/man.text create mode 100755 conf/type/__motd/manifest create mode 100644 conf/type/__motd/singleton diff --git a/conf/type/__motd/README b/conf/type/__motd/README new file mode 100644 index 00000000..f7bbde5c --- /dev/null +++ b/conf/type/__motd/README @@ -0,0 +1 @@ +Manage /etc/issue diff --git a/conf/type/__motd/files/motd b/conf/type/__motd/files/motd new file mode 100644 index 00000000..b5f5bfdf --- /dev/null +++ b/conf/type/__motd/files/motd @@ -0,0 +1,17 @@ + +Welcome to a cdist automated systems! + + .. . .x+=:. s + dF @88> z` ^% :8 + '88bu. %8P . + + +NAME +---- +cdist-type__motd - Manage message of the day + + +DESCRIPTION +----------- +This cdist type allows you to easily setup /etc/motd. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +source:: + If supplied, copy this file from the host running cdist to the target. + If not supplied, a default message will be placed onto the target. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Use cdist defaults +__motd + +# Supply source file from a different type +__file --source "$__type/files/my-motd" +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__motd/manifest b/conf/type/__motd/manifest new file mode 100755 index 00000000..594977b9 --- /dev/null +++ b/conf/type/__motd/manifest @@ -0,0 +1,31 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# 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 . +# +# + +destination=/etc/motd + +# Select motd source +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" +else + source="$__type/files/motd" +fi + +__file "$destination" --source "$source" --type file diff --git a/conf/type/__motd/singleton b/conf/type/__motd/singleton new file mode 100644 index 00000000..e69de29b From 5bd26959e683cc82841d7b95f306deedb68f0559 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 12 Mar 2011 18:48:02 +0100 Subject: [PATCH 44/48] update changelog Signed-off-by: Nico Schottelius --- doc/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog b/doc/changelog index d5c5f882..aa466277 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.0.4: + * New type: __motd + 1.0.3: 2011-03-11 * Update regexp used for sane characters * Allow types without parameters From 32042aba8fb8b05fbe9ca6b9c1b9b20ab06608fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 12 Mar 2011 18:58:22 +0100 Subject: [PATCH 45/48] cleanup motd Signed-off-by: Nico Schottelius --- conf/type/__motd/files/motd | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/conf/type/__motd/files/motd b/conf/type/__motd/files/motd index b5f5bfdf..fcba183d 100644 --- a/conf/type/__motd/files/motd +++ b/conf/type/__motd/files/motd @@ -1,17 +1,16 @@ -Welcome to a cdist automated systems! - - .. . .x+=:. s - dF @88> z` ^% :8 - '88bu. %8P . z` ^% :8 + '88bu. %8P . Date: Sat, 12 Mar 2011 19:07:19 +0100 Subject: [PATCH 46/48] +banner in readme Signed-off-by: Nico Schottelius --- REAL_README | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/REAL_README b/REAL_README index e69c36ba..0938289f 100644 --- a/REAL_README +++ b/REAL_README @@ -1,5 +1,20 @@ [[!meta title="cdist - configuration management"]] + + .. . .x+=:. s + dF @88> z` ^% :8 + '88bu. %8P . Date: Sat, 12 Mar 2011 19:48:37 +0100 Subject: [PATCH 47/48] [DOC] type __issue Signed-off-by: Nico Schottelius --- conf/type/__issue/README | 1 - conf/type/__issue/man.text | 41 ++++++++++++++++++++++++++++++++++++++ conf/type/__motd/README | 1 - doc/changelog | 4 +++- 4 files changed, 44 insertions(+), 3 deletions(-) delete mode 100644 conf/type/__issue/README create mode 100644 conf/type/__issue/man.text delete mode 100644 conf/type/__motd/README diff --git a/conf/type/__issue/README b/conf/type/__issue/README deleted file mode 100644 index f7bbde5c..00000000 --- a/conf/type/__issue/README +++ /dev/null @@ -1 +0,0 @@ -Manage /etc/issue diff --git a/conf/type/__issue/man.text b/conf/type/__issue/man.text new file mode 100644 index 00000000..57ece530 --- /dev/null +++ b/conf/type/__issue/man.text @@ -0,0 +1,41 @@ +cdist-type__issue(7) +=================== +Nico Schottelius + + +NAME +---- +cdist-type__issue - Manage issue + + +DESCRIPTION +----------- +This cdist type allows you to easily setup /etc/issue. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +None + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +__issue +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__motd/README b/conf/type/__motd/README deleted file mode 100644 index f7bbde5c..00000000 --- a/conf/type/__motd/README +++ /dev/null @@ -1 +0,0 @@ -Manage /etc/issue diff --git a/doc/changelog b/doc/changelog index aa466277..c939b547 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,7 @@ 1.0.4: - * New type: __motd + * New type __motd + * New type __addifnosuchline + * Document type __issue 1.0.3: 2011-03-11 * Update regexp used for sane characters From 6ab7df596e3fe860f555675a8ce20a57e1a5429c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 12 Mar 2011 19:48:51 +0100 Subject: [PATCH 48/48] +cleanup Signed-off-by: Nico Schottelius --- .gitignore | 4 ++++ doc/dev/todo/post-1.0 | 1 + 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index ba65e3f8..d7c6f7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ +# -vim .*.swp + +# Ignore generated manpages doc/man/*.[1-9] doc/man/.marker doc/man/man*/ +conf/type/*/*.7 diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 63872eb2..49c6f8b0 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -25,6 +25,7 @@ Types to be written/extended: owner __link type symbolic | hard + - __issue: add --source Documentation: